@blueking/bk-user-selector 0.1.1-beta.2 → 0.1.1-beta.3
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/package.json +2 -1
- package/vue2/index.es.min.js +58 -160
- package/vue2/index.iife.min.js +86 -165
- package/vue2/index.umd.min.js +58 -160
- package/vue3/index.iife.min.js +58 -160
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/bk-user-selector",
|
|
3
|
-
"version": "0.1.1-beta.
|
|
3
|
+
"version": "0.1.1-beta.3",
|
|
4
4
|
"description": "蓝鲸用户选择器",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tencent BlueKing",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"registry": "https://registry.npmjs.org/"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"bkui-vue": "2.0.2-beta.63",
|
|
60
61
|
"lodash": "^4.17.21",
|
|
61
62
|
"sortablejs": "^1.15.6"
|
|
62
63
|
},
|
package/vue2/index.es.min.js
CHANGED
|
@@ -5718,28 +5718,21 @@ var vBkloading = {
|
|
|
5718
5718
|
mounted: function mounted(el, binding) {
|
|
5719
5719
|
if (binding.value) {
|
|
5720
5720
|
createInstance(el, binding);
|
|
5721
|
-
if (!binding.value.loading) {
|
|
5722
|
-
var _instance$vm;
|
|
5723
|
-
var instance = el[INSTANCE_KEY];
|
|
5724
|
-
if (instance !== null && instance !== void 0 && (_instance$vm = instance.vm) !== null && _instance$vm !== void 0 && (_instance$vm = _instance$vm.$el) !== null && _instance$vm !== void 0 && (_instance$vm = _instance$vm.parentNode) !== null && _instance$vm !== void 0 && _instance$vm.style) {
|
|
5725
|
-
instance.vm.$el.parentNode.style.display = "none";
|
|
5726
|
-
}
|
|
5727
|
-
}
|
|
5728
5721
|
}
|
|
5729
5722
|
},
|
|
5730
5723
|
updated: function updated(el, binding) {
|
|
5731
|
-
var _instance$
|
|
5724
|
+
var _instance$vm;
|
|
5732
5725
|
var instance = el[INSTANCE_KEY];
|
|
5733
5726
|
var value = binding.value;
|
|
5734
5727
|
updateOptions(value, instance.options);
|
|
5735
|
-
if (instance !== null && instance !== void 0 && (_instance$
|
|
5728
|
+
if (instance !== null && instance !== void 0 && (_instance$vm = instance.vm) !== null && _instance$vm !== void 0 && (_instance$vm = _instance$vm.$el) !== null && _instance$vm !== void 0 && (_instance$vm = _instance$vm.parentNode) !== null && _instance$vm !== void 0 && _instance$vm.style) {
|
|
5736
5729
|
instance.vm.$el.parentNode.style.display = value.loading ? "" : "none";
|
|
5737
5730
|
}
|
|
5738
5731
|
},
|
|
5739
5732
|
unmounted: function unmounted(el) {
|
|
5740
|
-
var _instance$
|
|
5733
|
+
var _instance$vm2, _instance$instance;
|
|
5741
5734
|
var instance = el[INSTANCE_KEY];
|
|
5742
|
-
el === null || el === void 0 || el.removeChild(instance === null || instance === void 0 || (_instance$
|
|
5735
|
+
el === null || el === void 0 || el.removeChild(instance === null || instance === void 0 || (_instance$vm2 = instance.vm) === null || _instance$vm2 === void 0 || (_instance$vm2 = _instance$vm2.$el) === null || _instance$vm2 === void 0 ? void 0 : _instance$vm2.parentNode);
|
|
5743
5736
|
instance === null || instance === void 0 || (_instance$instance = instance.instance) === null || _instance$instance === void 0 || _instance$instance.unmount();
|
|
5744
5737
|
el[INSTANCE_KEY] = null;
|
|
5745
5738
|
}
|
|
@@ -6205,7 +6198,7 @@ var __webpack_exports__$1 = {};
|
|
|
6205
6198
|
__webpack_require__$1.d(x3, y2);
|
|
6206
6199
|
return x3;
|
|
6207
6200
|
};
|
|
6208
|
-
const external_vue_namespaceObject2 = external_vue_x2({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
|
6201
|
+
const external_vue_namespaceObject2 = external_vue_x2({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
|
6209
6202
|
function _createForOfIteratorHelper(o2, allowArrayLike) {
|
|
6210
6203
|
var it = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
|
|
6211
6204
|
if (!it) {
|
|
@@ -6487,6 +6480,7 @@ var __webpack_exports__$1 = {};
|
|
|
6487
6480
|
var refContent = (0, external_vue_namespaceObject2.ref)(null);
|
|
6488
6481
|
var refTimer = (0, external_vue_namespaceObject2.ref)(null);
|
|
6489
6482
|
var handleClick = function handleClick2(evt) {
|
|
6483
|
+
evt.stopPropagation();
|
|
6490
6484
|
emit("click", evt);
|
|
6491
6485
|
};
|
|
6492
6486
|
var resetPointerEvent = function resetPointerEvent2() {
|
|
@@ -6587,7 +6581,7 @@ var __webpack_exports__$1 = {};
|
|
|
6587
6581
|
/**
|
|
6588
6582
|
* 弹出内容绑定元素
|
|
6589
6583
|
*/
|
|
6590
|
-
boundary: shared_namespaceObject2.PropTypes.oneOfType([shared_namespaceObject2.PropTypes.string.def("parent"), shared_namespaceObject2.PropTypes.instanceOf(HTMLElement)])
|
|
6584
|
+
boundary: shared_namespaceObject2.PropTypes.oneOfType([shared_namespaceObject2.PropTypes.string.def("parent"), shared_namespaceObject2.PropTypes.instanceOf(HTMLElement)]),
|
|
6591
6585
|
zIndex: shared_namespaceObject2.PropTypes.number.def(void 0),
|
|
6592
6586
|
disableTeleport: shared_namespaceObject2.PropTypes.bool.def(false),
|
|
6593
6587
|
/**
|
|
@@ -8483,23 +8477,6 @@ var __webpack_exports__$1 = {};
|
|
|
8483
8477
|
}, {});
|
|
8484
8478
|
var contentClass = "".concat(customThemeCls);
|
|
8485
8479
|
var cleanup = null;
|
|
8486
|
-
var clearAllTimers = function clearAllTimers2() {
|
|
8487
|
-
if (popHideTimerId) {
|
|
8488
|
-
clearTimeout(popHideTimerId);
|
|
8489
|
-
popHideTimerId = void 0;
|
|
8490
|
-
}
|
|
8491
|
-
if (popShowTimerId) {
|
|
8492
|
-
clearTimeout(popShowTimerId);
|
|
8493
|
-
popShowTimerId = void 0;
|
|
8494
|
-
}
|
|
8495
|
-
};
|
|
8496
|
-
var wrappedCleanup = function wrappedCleanup2() {
|
|
8497
|
-
clearAllTimers();
|
|
8498
|
-
if (cleanup) {
|
|
8499
|
-
cleanup();
|
|
8500
|
-
cleanup = null;
|
|
8501
|
-
}
|
|
8502
|
-
};
|
|
8503
8480
|
var getRoundPixelVal = function getRoundPixelVal2(val) {
|
|
8504
8481
|
var dpr = window.devicePixelRatio || 1;
|
|
8505
8482
|
return Math.round(val * dpr) / dpr || 0;
|
|
@@ -8548,28 +8525,7 @@ var __webpack_exports__$1 = {};
|
|
|
8548
8525
|
}
|
|
8549
8526
|
};
|
|
8550
8527
|
var createPopInstance = function createPopInstance2() {
|
|
8551
|
-
var retryCount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
8552
8528
|
var _resolvePopElements = resolvePopElements(), elReference = _resolvePopElements.elReference, elContent = _resolvePopElements.elContent;
|
|
8553
|
-
if (!elReference || !elContent) {
|
|
8554
|
-
if (retryCount >= 10) {
|
|
8555
|
-
console.warn("[Popover] Failed to create popover instance: elements not found after retries");
|
|
8556
|
-
return;
|
|
8557
|
-
}
|
|
8558
|
-
(0, external_vue_namespaceObject2.nextTick)(function() {
|
|
8559
|
-
createPopInstance2(retryCount + 1);
|
|
8560
|
-
});
|
|
8561
|
-
return;
|
|
8562
|
-
}
|
|
8563
|
-
if (!elReference.isConnected || !elContent.isConnected) {
|
|
8564
|
-
if (retryCount >= 10) {
|
|
8565
|
-
console.warn("[Popover] Failed to create popover instance: elements not connected to DOM after retries");
|
|
8566
|
-
return;
|
|
8567
|
-
}
|
|
8568
|
-
(0, external_vue_namespaceObject2.nextTick)(function() {
|
|
8569
|
-
createPopInstance2(retryCount + 1);
|
|
8570
|
-
});
|
|
8571
|
-
return;
|
|
8572
|
-
}
|
|
8573
8529
|
cleanup = autoUpdate(elReference, elContent, function() {
|
|
8574
8530
|
if (localIsShow.value) {
|
|
8575
8531
|
updatePopover(null, props);
|
|
@@ -8614,9 +8570,6 @@ var __webpack_exports__$1 = {};
|
|
|
8614
8570
|
var showPopover = function showPopover2() {
|
|
8615
8571
|
var delay = resolvePopoverDelay()[0];
|
|
8616
8572
|
popShowTimerId = setTimeout(function() {
|
|
8617
|
-
if (!refContent.value) {
|
|
8618
|
-
return;
|
|
8619
|
-
}
|
|
8620
8573
|
if (!props.disabled) {
|
|
8621
8574
|
localIsShow.value = true;
|
|
8622
8575
|
}
|
|
@@ -8625,9 +8578,6 @@ var __webpack_exports__$1 = {};
|
|
|
8625
8578
|
var hidePopover = function hidePopover2() {
|
|
8626
8579
|
var delay = resolvePopoverDelay()[1];
|
|
8627
8580
|
popHideTimerId = setTimeout(function() {
|
|
8628
|
-
if (!refContent.value) {
|
|
8629
|
-
return;
|
|
8630
|
-
}
|
|
8631
8581
|
popShowTimerId && clearTimeout(popShowTimerId);
|
|
8632
8582
|
localIsShow.value = false;
|
|
8633
8583
|
}, delay);
|
|
@@ -8635,30 +8585,20 @@ var __webpack_exports__$1 = {};
|
|
|
8635
8585
|
var handlePopoverShow = function handlePopoverShow2() {
|
|
8636
8586
|
var _refContent$value2;
|
|
8637
8587
|
var elContent = resolveTargetElement((_refContent$value2 = refContent.value) === null || _refContent$value2 === void 0 ? void 0 : _refContent$value2.$el);
|
|
8638
|
-
if (!elContent) {
|
|
8639
|
-
return;
|
|
8640
|
-
}
|
|
8641
8588
|
elContent.style.setProperty("display", "block");
|
|
8642
8589
|
elContent.style.setProperty("z-index", "".concat(props.zIndex ? props.zIndex : shared_namespaceObject2.bkZIndexManager.getPopperIndex()));
|
|
8643
8590
|
updatePopover();
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
});
|
|
8648
|
-
}
|
|
8591
|
+
ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
|
|
8592
|
+
isShow: true
|
|
8593
|
+
});
|
|
8649
8594
|
};
|
|
8650
8595
|
var handlePopoverHide = function handlePopoverHide2() {
|
|
8651
8596
|
var _refContent$value3;
|
|
8652
8597
|
var elContent = resolveTargetElement((_refContent$value3 = refContent.value) === null || _refContent$value3 === void 0 ? void 0 : _refContent$value3.$el);
|
|
8653
|
-
if (!elContent) {
|
|
8654
|
-
return;
|
|
8655
|
-
}
|
|
8656
8598
|
elContent.style.setProperty("display", "none");
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
});
|
|
8661
|
-
}
|
|
8599
|
+
ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
|
|
8600
|
+
isShow: false
|
|
8601
|
+
});
|
|
8662
8602
|
};
|
|
8663
8603
|
var triggerPopover = function triggerPopover2() {
|
|
8664
8604
|
if (!localIsShow.value) {
|
|
@@ -8687,14 +8627,10 @@ var __webpack_exports__$1 = {};
|
|
|
8687
8627
|
emitPopContentMouseLeave(e);
|
|
8688
8628
|
};
|
|
8689
8629
|
var emitPopContentMouseEnter = function emitPopContentMouseEnter2(e) {
|
|
8690
|
-
|
|
8691
|
-
ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
|
|
8692
|
-
}
|
|
8630
|
+
ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
|
|
8693
8631
|
};
|
|
8694
8632
|
var emitPopContentMouseLeave = function emitPopContentMouseLeave2(e) {
|
|
8695
|
-
|
|
8696
|
-
ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
|
|
8697
|
-
}
|
|
8633
|
+
ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
|
|
8698
8634
|
};
|
|
8699
8635
|
var resolveTriggerEvents = function resolveTriggerEvents2() {
|
|
8700
8636
|
var _triggerEvents$props$;
|
|
@@ -8746,13 +8682,13 @@ var __webpack_exports__$1 = {};
|
|
|
8746
8682
|
getFullscreenRoot: getFullscreenRoot3,
|
|
8747
8683
|
stopHide,
|
|
8748
8684
|
localIsShow,
|
|
8749
|
-
cleanup
|
|
8685
|
+
cleanup
|
|
8750
8686
|
};
|
|
8751
8687
|
};
|
|
8752
|
-
var popContainerId2 =
|
|
8688
|
+
var popContainerId2 = null;
|
|
8689
|
+
var parentNodeReferId = null;
|
|
8753
8690
|
const use_popper_id = function(props) {
|
|
8754
8691
|
var prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "#";
|
|
8755
|
-
var parentNodeReferId = "id_".concat(esm_browser_v42());
|
|
8756
8692
|
var getPrefixId = function getPrefixId2(root3) {
|
|
8757
8693
|
var resolvedBoundary = null;
|
|
8758
8694
|
var resolveBoundary = function resolveBoundary2(fn2) {
|
|
@@ -8761,7 +8697,8 @@ var __webpack_exports__$1 = {};
|
|
|
8761
8697
|
}
|
|
8762
8698
|
};
|
|
8763
8699
|
var resolveParentBoundary = function resolveParentBoundary2() {
|
|
8764
|
-
if (/^parent$/i.test(props.boundary)
|
|
8700
|
+
if (/^parent$/i.test(props.boundary)) {
|
|
8701
|
+
resolvedBoundary = "".concat(prefix).concat(popContainerId2);
|
|
8765
8702
|
var _ref = root3 || {}, parentNode = _ref.parentNode;
|
|
8766
8703
|
if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
|
|
8767
8704
|
parentNode.parentNode.setAttribute("data-pnode-id", parentNodeReferId);
|
|
@@ -8770,53 +8707,42 @@ var __webpack_exports__$1 = {};
|
|
|
8770
8707
|
}
|
|
8771
8708
|
};
|
|
8772
8709
|
var resolveCommonBoundary = function resolveCommonBoundary2() {
|
|
8773
|
-
if (
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
resolvedBoundary = props.boundary;
|
|
8787
|
-
return;
|
|
8710
|
+
if (!/^body$/i.test(props.boundary)) {
|
|
8711
|
+
if (typeof props.boundary === "string") {
|
|
8712
|
+
if (!isAvailableId(props.boundary)) {
|
|
8713
|
+
resolvedBoundary = "body";
|
|
8714
|
+
return;
|
|
8715
|
+
}
|
|
8716
|
+
resolvedBoundary = props.boundary;
|
|
8717
|
+
return;
|
|
8718
|
+
}
|
|
8719
|
+
if (utils_isElement(props.boundary)) {
|
|
8720
|
+
resolvedBoundary = props.boundary;
|
|
8721
|
+
return;
|
|
8722
|
+
}
|
|
8788
8723
|
}
|
|
8789
8724
|
};
|
|
8790
8725
|
resolveBoundary(resolveParentBoundary);
|
|
8791
8726
|
resolveBoundary(resolveCommonBoundary);
|
|
8792
8727
|
resolveBoundary(function() {
|
|
8793
|
-
resolvedBoundary = "".concat(prefix).concat(popContainerId2);
|
|
8728
|
+
resolvedBoundary = typeof props.boundary === "string" ? props.boundary : "".concat(prefix).concat(popContainerId2);
|
|
8794
8729
|
});
|
|
8795
8730
|
return resolvedBoundary;
|
|
8796
8731
|
};
|
|
8797
|
-
if (!isAvailableId("#".concat(popContainerId2))) {
|
|
8732
|
+
if (popContainerId2 === null || !isAvailableId("#".concat(popContainerId2))) {
|
|
8733
|
+
popContainerId2 = "id_".concat(esm_browser_v42());
|
|
8798
8734
|
var popContainer = document.createElement("div");
|
|
8799
8735
|
popContainer.setAttribute("id", popContainerId2);
|
|
8800
8736
|
popContainer.setAttribute("data-popper-id", popContainerId2);
|
|
8801
8737
|
document.body.append(popContainer);
|
|
8802
8738
|
}
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
|
|
8807
|
-
var attr = parentNode.parentNode.getAttribute("data-pnode-id");
|
|
8808
|
-
if (attr === parentNodeReferId) {
|
|
8809
|
-
parentNode.parentNode.removeAttribute("data-pnode-id");
|
|
8810
|
-
}
|
|
8811
|
-
}
|
|
8812
|
-
}
|
|
8813
|
-
};
|
|
8739
|
+
if (parentNodeReferId === null) {
|
|
8740
|
+
parentNodeReferId = "id_".concat(esm_browser_v42());
|
|
8741
|
+
}
|
|
8814
8742
|
return {
|
|
8815
8743
|
popContainerId: popContainerId2,
|
|
8816
8744
|
prefixId: getPrefixId(),
|
|
8817
|
-
getPrefixId
|
|
8818
|
-
parentNodeReferId,
|
|
8819
|
-
clearParentNodeId
|
|
8745
|
+
getPrefixId
|
|
8820
8746
|
};
|
|
8821
8747
|
};
|
|
8822
8748
|
const use_popover_init = function(props, ctx, _ref) {
|
|
@@ -8851,18 +8777,7 @@ var __webpack_exports__$1 = {};
|
|
|
8851
8777
|
}
|
|
8852
8778
|
};
|
|
8853
8779
|
var addEventToPopTargetEl = function addEventToPopTargetEl2() {
|
|
8854
|
-
var retryCount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
8855
8780
|
var _resolvePopElements = resolvePopElements(), elReference = _resolvePopElements.elReference, elContent = _resolvePopElements.elContent;
|
|
8856
|
-
if (!elReference) {
|
|
8857
|
-
if (retryCount >= 10) {
|
|
8858
|
-
console.warn("[Popover] Failed to add events: reference element not found after retries");
|
|
8859
|
-
return;
|
|
8860
|
-
}
|
|
8861
|
-
(0, external_vue_namespaceObject2.nextTick)(function() {
|
|
8862
|
-
addEventToPopTargetEl2(retryCount + 1);
|
|
8863
|
-
});
|
|
8864
|
-
return;
|
|
8865
|
-
}
|
|
8866
8781
|
storeEvents = resolveTriggerEvents();
|
|
8867
8782
|
storeEvents.forEach(function(storeEvent) {
|
|
8868
8783
|
if (Array.isArray(storeEvent)) {
|
|
@@ -8870,16 +8785,11 @@ var __webpack_exports__$1 = {};
|
|
|
8870
8785
|
} else {
|
|
8871
8786
|
var content2 = storeEvent.content, reference3 = storeEvent.reference;
|
|
8872
8787
|
addEventToTargetEl(elReference, reference3);
|
|
8873
|
-
|
|
8874
|
-
addEventToTargetEl(elContent, content2);
|
|
8875
|
-
}
|
|
8788
|
+
addEventToTargetEl(elContent, content2);
|
|
8876
8789
|
}
|
|
8877
8790
|
});
|
|
8878
8791
|
};
|
|
8879
8792
|
var addEventToTargetEl = function addEventToTargetEl2(target, evets) {
|
|
8880
|
-
if (!target) {
|
|
8881
|
-
return;
|
|
8882
|
-
}
|
|
8883
8793
|
evets.forEach(function(_ref2) {
|
|
8884
8794
|
var _ref3 = _slicedToArray(_ref2, 2), event = _ref3[0], listener = _ref3[1];
|
|
8885
8795
|
if (event && typeof listener === "function") {
|
|
@@ -8931,14 +8841,12 @@ var __webpack_exports__$1 = {};
|
|
|
8931
8841
|
if (isFullscreen.value) {
|
|
8932
8842
|
var _fullScreenTarget$val;
|
|
8933
8843
|
var _ref10 = elReference || root3 || {}, parentNode = _ref10.parentNode;
|
|
8934
|
-
|
|
8935
|
-
boundary.value = fullscreenBoundary || "body";
|
|
8844
|
+
boundary.value = (_fullScreenTarget$val = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) !== null && _fullScreenTarget$val !== void 0 ? _fullScreenTarget$val : getClosestFullscreenElement(parentNode);
|
|
8936
8845
|
return;
|
|
8937
8846
|
}
|
|
8938
|
-
|
|
8939
|
-
boundary.value = resolvedBoundary || "body";
|
|
8847
|
+
boundary.value = getPrefixId(root3 || elReference);
|
|
8940
8848
|
};
|
|
8941
|
-
var _usePopperId = use_popper_id(props, "#"), getPrefixId = _usePopperId.getPrefixId
|
|
8849
|
+
var _usePopperId = use_popper_id(props, "#"), getPrefixId = _usePopperId.getPrefixId;
|
|
8942
8850
|
var setFullscreenTag = function setFullscreenTag2() {
|
|
8943
8851
|
var _fullScreenTarget$val2;
|
|
8944
8852
|
fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val2 = fullScreenTarget.value) === null || _fullScreenTarget$val2 === void 0 || _fullScreenTarget$val2.setAttribute("data-fllsrn-id", fullscreenReferId);
|
|
@@ -8950,7 +8858,7 @@ var __webpack_exports__$1 = {};
|
|
|
8950
8858
|
element === null || element === void 0 || element.removeAttribute("data-fllsrn-id");
|
|
8951
8859
|
});
|
|
8952
8860
|
};
|
|
8953
|
-
var boundary = (0, external_vue_namespaceObject2.ref)(
|
|
8861
|
+
var boundary = (0, external_vue_namespaceObject2.ref)();
|
|
8954
8862
|
var beforeInstanceUnmount = function beforeInstanceUnmount2() {
|
|
8955
8863
|
removeEventListener();
|
|
8956
8864
|
};
|
|
@@ -8972,39 +8880,25 @@ var __webpack_exports__$1 = {};
|
|
|
8972
8880
|
if (props.disabled) {
|
|
8973
8881
|
return;
|
|
8974
8882
|
}
|
|
8883
|
+
initPopInstance();
|
|
8975
8884
|
if (isElementFullScreen()) {
|
|
8976
8885
|
var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
|
|
8977
8886
|
var target = getFullscreenRoot3(query);
|
|
8978
8887
|
updateFullscreen(target);
|
|
8979
8888
|
}
|
|
8980
8889
|
updateBoundary();
|
|
8981
|
-
initPopInstance();
|
|
8982
8890
|
document.body.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
8983
|
-
document.addEventListener("click", handleClickOutside);
|
|
8984
8891
|
};
|
|
8985
8892
|
var onUnmountedFn = function onUnmountedFn2() {
|
|
8986
8893
|
beforeInstanceUnmount();
|
|
8987
|
-
var _resolvePopElements4 = resolvePopElements(), root3 = _resolvePopElements4.root;
|
|
8988
|
-
clearParentNodeId(root3);
|
|
8989
8894
|
document.body.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
var _refContent$value$$el, _refContent$value, _refContent$value$con;
|
|
8994
|
-
return (_refContent$value$$el = (_refContent$value = refContent.value) === null || _refContent$value === void 0 || (_refContent$value = _refContent$value.$el) === null || _refContent$value === void 0 || (_refContent$value$con = _refContent$value.contains) === null || _refContent$value$con === void 0 ? void 0 : _refContent$value$con.call(_refContent$value, target)) !== null && _refContent$value$$el !== void 0 ? _refContent$value$$el : false;
|
|
8995
|
-
};
|
|
8996
|
-
var handleClickOutside = function handleClickOutside2(e) {
|
|
8997
|
-
var target = e.target;
|
|
8998
|
-
if (isClickInside(target)) {
|
|
8999
|
-
e.preventDefault();
|
|
9000
|
-
e.stopPropagation();
|
|
9001
|
-
e.stopImmediatePropagation();
|
|
9002
|
-
return;
|
|
9003
|
-
}
|
|
8895
|
+
};
|
|
8896
|
+
var handleClickOutside = function handleClickOutside2(_e) {
|
|
8897
|
+
var hideIgnoreReference = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
9004
8898
|
var commonFunc = function commonFunc2() {
|
|
9005
8899
|
ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
|
|
9006
8900
|
isShow: localIsShow.value,
|
|
9007
|
-
event:
|
|
8901
|
+
event: _e
|
|
9008
8902
|
});
|
|
9009
8903
|
var needExec = props.disableOutsideClick || props.always || props.disabled || props.trigger === "manual";
|
|
9010
8904
|
if (!props.forceClickoutside && needExec) {
|
|
@@ -9014,7 +8908,7 @@ var __webpack_exports__$1 = {};
|
|
|
9014
8908
|
hideFn();
|
|
9015
8909
|
}
|
|
9016
8910
|
};
|
|
9017
|
-
if (
|
|
8911
|
+
if (hideIgnoreReference) {
|
|
9018
8912
|
setTimeout(function() {
|
|
9019
8913
|
if (ReferenceClickSharedState[uniqKey]) {
|
|
9020
8914
|
ReferenceClickSharedState[uniqKey] = false;
|
|
@@ -9075,7 +8969,7 @@ var __webpack_exports__$1 = {};
|
|
|
9075
8969
|
refContent,
|
|
9076
8970
|
refArrow,
|
|
9077
8971
|
refRoot
|
|
9078
|
-
}), onMountedFn = _usePopoverInit.onMountedFn, onUnmountedFn = _usePopoverInit.onUnmountedFn, beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount, initPopInstance = _usePopoverInit.initPopInstance, showFn = _usePopoverInit.showFn, hideFn = _usePopoverInit.hideFn, showPopover = _usePopoverInit.showPopover, hidePopover = _usePopoverInit.hidePopover, updatePopover = _usePopoverInit.updatePopover, resetPopover = _usePopoverInit.resetPopover, stopHide = _usePopoverInit.stopHide, localIsShow = _usePopoverInit.localIsShow, boundary = _usePopoverInit.boundary, uniqKey = _usePopoverInit.uniqKey;
|
|
8972
|
+
}), onMountedFn = _usePopoverInit.onMountedFn, onUnmountedFn = _usePopoverInit.onUnmountedFn, handleClickOutside = _usePopoverInit.handleClickOutside, beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount, updateBoundary = _usePopoverInit.updateBoundary, initPopInstance = _usePopoverInit.initPopInstance, showFn = _usePopoverInit.showFn, hideFn = _usePopoverInit.hideFn, showPopover = _usePopoverInit.showPopover, hidePopover = _usePopoverInit.hidePopover, updatePopover = _usePopoverInit.updatePopover, resetPopover = _usePopoverInit.resetPopover, stopHide = _usePopoverInit.stopHide, localIsShow = _usePopoverInit.localIsShow, boundary = _usePopoverInit.boundary, uniqKey = _usePopoverInit.uniqKey;
|
|
9079
8973
|
if (!props.always && !props.disabled) {
|
|
9080
8974
|
(0, external_vue_namespaceObject2.watch)(function() {
|
|
9081
8975
|
return props.isShow;
|
|
@@ -9094,6 +8988,7 @@ var __webpack_exports__$1 = {};
|
|
|
9094
8988
|
initPopInstance();
|
|
9095
8989
|
}
|
|
9096
8990
|
});
|
|
8991
|
+
updateBoundary();
|
|
9097
8992
|
(0, external_vue_namespaceObject2.onMounted)(onMountedFn);
|
|
9098
8993
|
(0, external_vue_namespaceObject2.onBeforeUnmount)(onUnmountedFn);
|
|
9099
8994
|
var isRenderModeShow = (0, external_vue_namespaceObject2.computed)(function() {
|
|
@@ -9140,6 +9035,7 @@ var __webpack_exports__$1 = {};
|
|
|
9140
9035
|
isRenderModeShow,
|
|
9141
9036
|
transBoundary,
|
|
9142
9037
|
handleClickContent,
|
|
9038
|
+
handleClickOutside,
|
|
9143
9039
|
updatePopover,
|
|
9144
9040
|
resetPopover,
|
|
9145
9041
|
hide: hide2,
|
|
@@ -9186,7 +9082,7 @@ var __webpack_exports__$1 = {};
|
|
|
9186
9082
|
"to": _this.boundary
|
|
9187
9083
|
}, {
|
|
9188
9084
|
"default": function _default2() {
|
|
9189
|
-
return [(0, external_vue_namespaceObject2.createVNode)(content, {
|
|
9085
|
+
return [(0, external_vue_namespaceObject2.withDirectives)((0, external_vue_namespaceObject2.createVNode)(content, {
|
|
9190
9086
|
"ref": "refContent",
|
|
9191
9087
|
"width": _this.width,
|
|
9192
9088
|
"height": _this.height,
|
|
@@ -9211,7 +9107,9 @@ var __webpack_exports__$1 = {};
|
|
|
9211
9107
|
}
|
|
9212
9108
|
}) : "";
|
|
9213
9109
|
}
|
|
9214
|
-
})
|
|
9110
|
+
}), [[(0, external_vue_namespaceObject2.resolveDirective)("clickoutside"), function(e) {
|
|
9111
|
+
return _this.handleClickOutside(e, _this.hideIgnoreReference);
|
|
9112
|
+
}]])];
|
|
9215
9113
|
}
|
|
9216
9114
|
})];
|
|
9217
9115
|
}
|