@blueking/bk-user-selector 0.1.1-beta.2 → 0.1.1-beta.4

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.
@@ -5747,28 +5747,21 @@ ${$(r2)}`), n2;
5747
5747
  mounted: function mounted(el, binding) {
5748
5748
  if (binding.value) {
5749
5749
  createInstance(el, binding);
5750
- if (!binding.value.loading) {
5751
- var _instance$vm;
5752
- var instance = el[INSTANCE_KEY];
5753
- 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) {
5754
- instance.vm.$el.parentNode.style.display = "none";
5755
- }
5756
- }
5757
5750
  }
5758
5751
  },
5759
5752
  updated: function updated(el, binding) {
5760
- var _instance$vm2;
5753
+ var _instance$vm;
5761
5754
  var instance = el[INSTANCE_KEY];
5762
5755
  var value = binding.value;
5763
5756
  updateOptions(value, instance.options);
5764
- if (instance !== null && instance !== void 0 && (_instance$vm2 = instance.vm) !== null && _instance$vm2 !== void 0 && (_instance$vm2 = _instance$vm2.$el) !== null && _instance$vm2 !== void 0 && (_instance$vm2 = _instance$vm2.parentNode) !== null && _instance$vm2 !== void 0 && _instance$vm2.style) {
5757
+ 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) {
5765
5758
  instance.vm.$el.parentNode.style.display = value.loading ? "" : "none";
5766
5759
  }
5767
5760
  },
5768
5761
  unmounted: function unmounted(el) {
5769
- var _instance$vm3, _instance$instance;
5762
+ var _instance$vm2, _instance$instance;
5770
5763
  var instance = el[INSTANCE_KEY];
5771
- el === null || el === void 0 || el.removeChild(instance === null || instance === void 0 || (_instance$vm3 = instance.vm) === null || _instance$vm3 === void 0 || (_instance$vm3 = _instance$vm3.$el) === null || _instance$vm3 === void 0 ? void 0 : _instance$vm3.parentNode);
5764
+ 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);
5772
5765
  instance === null || instance === void 0 || (_instance$instance = instance.instance) === null || _instance$instance === void 0 || _instance$instance.unmount();
5773
5766
  el[INSTANCE_KEY] = null;
5774
5767
  }
@@ -6234,7 +6227,7 @@ ${$(r2)}`), n2;
6234
6227
  __webpack_require__$1.d(x3, y2);
6235
6228
  return x3;
6236
6229
  };
6237
- const external_vue_namespaceObject2 = external_vue_x2({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.render, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.watch });
6230
+ const external_vue_namespaceObject2 = external_vue_x2({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.render, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue____namespace.withDirectives });
6238
6231
  function _createForOfIteratorHelper(o2, allowArrayLike) {
6239
6232
  var it = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
6240
6233
  if (!it) {
@@ -6516,6 +6509,7 @@ ${$(r2)}`), n2;
6516
6509
  var refContent = (0, external_vue_namespaceObject2.ref)(null);
6517
6510
  var refTimer = (0, external_vue_namespaceObject2.ref)(null);
6518
6511
  var handleClick = function handleClick2(evt) {
6512
+ evt.stopPropagation();
6519
6513
  emit("click", evt);
6520
6514
  };
6521
6515
  var resetPointerEvent = function resetPointerEvent2() {
@@ -6616,7 +6610,7 @@ ${$(r2)}`), n2;
6616
6610
  /**
6617
6611
  * 弹出内容绑定元素
6618
6612
  */
6619
- boundary: shared_namespaceObject2.PropTypes.oneOfType([shared_namespaceObject2.PropTypes.string.def("parent"), shared_namespaceObject2.PropTypes.instanceOf(HTMLElement)]).def("body"),
6613
+ boundary: shared_namespaceObject2.PropTypes.oneOfType([shared_namespaceObject2.PropTypes.string.def("parent"), shared_namespaceObject2.PropTypes.instanceOf(HTMLElement)]),
6620
6614
  zIndex: shared_namespaceObject2.PropTypes.number.def(void 0),
6621
6615
  disableTeleport: shared_namespaceObject2.PropTypes.bool.def(false),
6622
6616
  /**
@@ -8512,23 +8506,6 @@ ${$(r2)}`), n2;
8512
8506
  }, {});
8513
8507
  var contentClass = "".concat(customThemeCls);
8514
8508
  var cleanup = null;
8515
- var clearAllTimers = function clearAllTimers2() {
8516
- if (popHideTimerId) {
8517
- clearTimeout(popHideTimerId);
8518
- popHideTimerId = void 0;
8519
- }
8520
- if (popShowTimerId) {
8521
- clearTimeout(popShowTimerId);
8522
- popShowTimerId = void 0;
8523
- }
8524
- };
8525
- var wrappedCleanup = function wrappedCleanup2() {
8526
- clearAllTimers();
8527
- if (cleanup) {
8528
- cleanup();
8529
- cleanup = null;
8530
- }
8531
- };
8532
8509
  var getRoundPixelVal = function getRoundPixelVal2(val) {
8533
8510
  var dpr = window.devicePixelRatio || 1;
8534
8511
  return Math.round(val * dpr) / dpr || 0;
@@ -8577,28 +8554,7 @@ ${$(r2)}`), n2;
8577
8554
  }
8578
8555
  };
8579
8556
  var createPopInstance = function createPopInstance2() {
8580
- var retryCount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
8581
8557
  var _resolvePopElements = resolvePopElements(), elReference = _resolvePopElements.elReference, elContent = _resolvePopElements.elContent;
8582
- if (!elReference || !elContent) {
8583
- if (retryCount >= 10) {
8584
- console.warn("[Popover] Failed to create popover instance: elements not found after retries");
8585
- return;
8586
- }
8587
- (0, external_vue_namespaceObject2.nextTick)(function() {
8588
- createPopInstance2(retryCount + 1);
8589
- });
8590
- return;
8591
- }
8592
- if (!elReference.isConnected || !elContent.isConnected) {
8593
- if (retryCount >= 10) {
8594
- console.warn("[Popover] Failed to create popover instance: elements not connected to DOM after retries");
8595
- return;
8596
- }
8597
- (0, external_vue_namespaceObject2.nextTick)(function() {
8598
- createPopInstance2(retryCount + 1);
8599
- });
8600
- return;
8601
- }
8602
8558
  cleanup = autoUpdate(elReference, elContent, function() {
8603
8559
  if (localIsShow.value) {
8604
8560
  updatePopover(null, props);
@@ -8643,9 +8599,6 @@ ${$(r2)}`), n2;
8643
8599
  var showPopover = function showPopover2() {
8644
8600
  var delay = resolvePopoverDelay()[0];
8645
8601
  popShowTimerId = setTimeout(function() {
8646
- if (!refContent.value) {
8647
- return;
8648
- }
8649
8602
  if (!props.disabled) {
8650
8603
  localIsShow.value = true;
8651
8604
  }
@@ -8654,9 +8607,6 @@ ${$(r2)}`), n2;
8654
8607
  var hidePopover = function hidePopover2() {
8655
8608
  var delay = resolvePopoverDelay()[1];
8656
8609
  popHideTimerId = setTimeout(function() {
8657
- if (!refContent.value) {
8658
- return;
8659
- }
8660
8610
  popShowTimerId && clearTimeout(popShowTimerId);
8661
8611
  localIsShow.value = false;
8662
8612
  }, delay);
@@ -8664,30 +8614,20 @@ ${$(r2)}`), n2;
8664
8614
  var handlePopoverShow = function handlePopoverShow2() {
8665
8615
  var _refContent$value2;
8666
8616
  var elContent = resolveTargetElement((_refContent$value2 = refContent.value) === null || _refContent$value2 === void 0 ? void 0 : _refContent$value2.$el);
8667
- if (!elContent) {
8668
- return;
8669
- }
8670
8617
  elContent.style.setProperty("display", "block");
8671
8618
  elContent.style.setProperty("z-index", "".concat(props.zIndex ? props.zIndex : shared_namespaceObject2.bkZIndexManager.getPopperIndex()));
8672
8619
  updatePopover();
8673
- if (ctx !== null && ctx !== void 0 && ctx.emit) {
8674
- ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
8675
- isShow: true
8676
- });
8677
- }
8620
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
8621
+ isShow: true
8622
+ });
8678
8623
  };
8679
8624
  var handlePopoverHide = function handlePopoverHide2() {
8680
8625
  var _refContent$value3;
8681
8626
  var elContent = resolveTargetElement((_refContent$value3 = refContent.value) === null || _refContent$value3 === void 0 ? void 0 : _refContent$value3.$el);
8682
- if (!elContent) {
8683
- return;
8684
- }
8685
8627
  elContent.style.setProperty("display", "none");
8686
- if (ctx !== null && ctx !== void 0 && ctx.emit) {
8687
- ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
8688
- isShow: false
8689
- });
8690
- }
8628
+ ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
8629
+ isShow: false
8630
+ });
8691
8631
  };
8692
8632
  var triggerPopover = function triggerPopover2() {
8693
8633
  if (!localIsShow.value) {
@@ -8716,14 +8656,10 @@ ${$(r2)}`), n2;
8716
8656
  emitPopContentMouseLeave(e);
8717
8657
  };
8718
8658
  var emitPopContentMouseEnter = function emitPopContentMouseEnter2(e) {
8719
- if (ctx !== null && ctx !== void 0 && ctx.emit) {
8720
- ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
8721
- }
8659
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
8722
8660
  };
8723
8661
  var emitPopContentMouseLeave = function emitPopContentMouseLeave2(e) {
8724
- if (ctx !== null && ctx !== void 0 && ctx.emit) {
8725
- ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
8726
- }
8662
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
8727
8663
  };
8728
8664
  var resolveTriggerEvents = function resolveTriggerEvents2() {
8729
8665
  var _triggerEvents$props$;
@@ -8775,13 +8711,13 @@ ${$(r2)}`), n2;
8775
8711
  getFullscreenRoot: getFullscreenRoot2,
8776
8712
  stopHide,
8777
8713
  localIsShow,
8778
- cleanup: wrappedCleanup
8714
+ cleanup
8779
8715
  };
8780
8716
  };
8781
- var popContainerId2 = "id_".concat(esm_browser_v42());
8717
+ var popContainerId2 = null;
8718
+ var parentNodeReferId = null;
8782
8719
  const use_popper_id = function(props) {
8783
8720
  var prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "#";
8784
- var parentNodeReferId = "id_".concat(esm_browser_v42());
8785
8721
  var getPrefixId = function getPrefixId2(root3) {
8786
8722
  var resolvedBoundary = null;
8787
8723
  var resolveBoundary = function resolveBoundary2(fn) {
@@ -8790,7 +8726,8 @@ ${$(r2)}`), n2;
8790
8726
  }
8791
8727
  };
8792
8728
  var resolveParentBoundary = function resolveParentBoundary2() {
8793
- if (/^parent$/i.test(props.boundary) || !props.boundary) {
8729
+ if (/^parent$/i.test(props.boundary)) {
8730
+ resolvedBoundary = "".concat(prefix).concat(popContainerId2);
8794
8731
  var _ref = root3 || {}, parentNode = _ref.parentNode;
8795
8732
  if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
8796
8733
  parentNode.parentNode.setAttribute("data-pnode-id", parentNodeReferId);
@@ -8799,53 +8736,42 @@ ${$(r2)}`), n2;
8799
8736
  }
8800
8737
  };
8801
8738
  var resolveCommonBoundary = function resolveCommonBoundary2() {
8802
- if (typeof props.boundary === "string" && /^body$/i.test(props.boundary)) {
8803
- resolvedBoundary = "".concat(prefix).concat(popContainerId2);
8804
- return;
8805
- }
8806
- if (props.boundary === document.body) {
8807
- resolvedBoundary = "".concat(prefix).concat(popContainerId2);
8808
- return;
8809
- }
8810
- if (typeof props.boundary === "string") {
8811
- resolvedBoundary = props.boundary;
8812
- return;
8813
- }
8814
- if (utils_isElement(props.boundary)) {
8815
- resolvedBoundary = props.boundary;
8816
- return;
8739
+ if (!/^body$/i.test(props.boundary)) {
8740
+ if (typeof props.boundary === "string") {
8741
+ if (!isAvailableId(props.boundary)) {
8742
+ resolvedBoundary = "body";
8743
+ return;
8744
+ }
8745
+ resolvedBoundary = props.boundary;
8746
+ return;
8747
+ }
8748
+ if (utils_isElement(props.boundary)) {
8749
+ resolvedBoundary = props.boundary;
8750
+ return;
8751
+ }
8817
8752
  }
8818
8753
  };
8819
8754
  resolveBoundary(resolveParentBoundary);
8820
8755
  resolveBoundary(resolveCommonBoundary);
8821
8756
  resolveBoundary(function() {
8822
- resolvedBoundary = "".concat(prefix).concat(popContainerId2);
8757
+ resolvedBoundary = typeof props.boundary === "string" ? props.boundary : "".concat(prefix).concat(popContainerId2);
8823
8758
  });
8824
8759
  return resolvedBoundary;
8825
8760
  };
8826
- if (!isAvailableId("#".concat(popContainerId2))) {
8761
+ if (popContainerId2 === null || !isAvailableId("#".concat(popContainerId2))) {
8762
+ popContainerId2 = "id_".concat(esm_browser_v42());
8827
8763
  var popContainer = document.createElement("div");
8828
8764
  popContainer.setAttribute("id", popContainerId2);
8829
8765
  popContainer.setAttribute("data-popper-id", popContainerId2);
8830
8766
  document.body.append(popContainer);
8831
8767
  }
8832
- var clearParentNodeId = function clearParentNodeId2(root3) {
8833
- if (/^parent$/i.test(props.boundary)) {
8834
- var _ref2 = root3 || {}, parentNode = _ref2.parentNode;
8835
- if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
8836
- var attr = parentNode.parentNode.getAttribute("data-pnode-id");
8837
- if (attr === parentNodeReferId) {
8838
- parentNode.parentNode.removeAttribute("data-pnode-id");
8839
- }
8840
- }
8841
- }
8842
- };
8768
+ if (parentNodeReferId === null) {
8769
+ parentNodeReferId = "id_".concat(esm_browser_v42());
8770
+ }
8843
8771
  return {
8844
8772
  popContainerId: popContainerId2,
8845
8773
  prefixId: getPrefixId(),
8846
- getPrefixId,
8847
- parentNodeReferId,
8848
- clearParentNodeId
8774
+ getPrefixId
8849
8775
  };
8850
8776
  };
8851
8777
  const use_popover_init = function(props, ctx, _ref) {
@@ -8880,18 +8806,7 @@ ${$(r2)}`), n2;
8880
8806
  }
8881
8807
  };
8882
8808
  var addEventToPopTargetEl = function addEventToPopTargetEl2() {
8883
- var retryCount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
8884
8809
  var _resolvePopElements = resolvePopElements(), elReference = _resolvePopElements.elReference, elContent = _resolvePopElements.elContent;
8885
- if (!elReference) {
8886
- if (retryCount >= 10) {
8887
- console.warn("[Popover] Failed to add events: reference element not found after retries");
8888
- return;
8889
- }
8890
- (0, external_vue_namespaceObject2.nextTick)(function() {
8891
- addEventToPopTargetEl2(retryCount + 1);
8892
- });
8893
- return;
8894
- }
8895
8810
  storeEvents = resolveTriggerEvents();
8896
8811
  storeEvents.forEach(function(storeEvent) {
8897
8812
  if (Array.isArray(storeEvent)) {
@@ -8899,16 +8814,11 @@ ${$(r2)}`), n2;
8899
8814
  } else {
8900
8815
  var content2 = storeEvent.content, reference3 = storeEvent.reference;
8901
8816
  addEventToTargetEl(elReference, reference3);
8902
- if (elContent) {
8903
- addEventToTargetEl(elContent, content2);
8904
- }
8817
+ addEventToTargetEl(elContent, content2);
8905
8818
  }
8906
8819
  });
8907
8820
  };
8908
8821
  var addEventToTargetEl = function addEventToTargetEl2(target, evets) {
8909
- if (!target) {
8910
- return;
8911
- }
8912
8822
  evets.forEach(function(_ref2) {
8913
8823
  var _ref3 = _slicedToArray(_ref2, 2), event = _ref3[0], listener = _ref3[1];
8914
8824
  if (event && typeof listener === "function") {
@@ -8960,14 +8870,12 @@ ${$(r2)}`), n2;
8960
8870
  if (isFullscreen.value) {
8961
8871
  var _fullScreenTarget$val;
8962
8872
  var _ref10 = elReference || root3 || {}, parentNode = _ref10.parentNode;
8963
- var fullscreenBoundary = (_fullScreenTarget$val = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) !== null && _fullScreenTarget$val !== void 0 ? _fullScreenTarget$val : getClosestFullscreenElement(parentNode);
8964
- boundary.value = fullscreenBoundary || "body";
8873
+ boundary.value = (_fullScreenTarget$val = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) !== null && _fullScreenTarget$val !== void 0 ? _fullScreenTarget$val : getClosestFullscreenElement(parentNode);
8965
8874
  return;
8966
8875
  }
8967
- var resolvedBoundary = getPrefixId(root3 || elReference);
8968
- boundary.value = resolvedBoundary || "body";
8876
+ boundary.value = getPrefixId(root3 || elReference);
8969
8877
  };
8970
- var _usePopperId = use_popper_id(props, "#"), getPrefixId = _usePopperId.getPrefixId, clearParentNodeId = _usePopperId.clearParentNodeId;
8878
+ var _usePopperId = use_popper_id(props, "#"), getPrefixId = _usePopperId.getPrefixId;
8971
8879
  var setFullscreenTag = function setFullscreenTag2() {
8972
8880
  var _fullScreenTarget$val2;
8973
8881
  fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val2 = fullScreenTarget.value) === null || _fullScreenTarget$val2 === void 0 || _fullScreenTarget$val2.setAttribute("data-fllsrn-id", fullscreenReferId);
@@ -8979,7 +8887,7 @@ ${$(r2)}`), n2;
8979
8887
  element === null || element === void 0 || element.removeAttribute("data-fllsrn-id");
8980
8888
  });
8981
8889
  };
8982
- var boundary = (0, external_vue_namespaceObject2.ref)("body");
8890
+ var boundary = (0, external_vue_namespaceObject2.ref)();
8983
8891
  var beforeInstanceUnmount = function beforeInstanceUnmount2() {
8984
8892
  removeEventListener();
8985
8893
  };
@@ -9001,39 +8909,25 @@ ${$(r2)}`), n2;
9001
8909
  if (props.disabled) {
9002
8910
  return;
9003
8911
  }
8912
+ initPopInstance();
9004
8913
  if (isElementFullScreen()) {
9005
8914
  var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
9006
8915
  var target = getFullscreenRoot2(query);
9007
8916
  updateFullscreen(target);
9008
8917
  }
9009
8918
  updateBoundary();
9010
- initPopInstance();
9011
8919
  document.body.addEventListener("fullscreenchange", handleFullscreenChange);
9012
- document.addEventListener("click", handleClickOutside);
9013
8920
  };
9014
8921
  var onUnmountedFn = function onUnmountedFn2() {
9015
8922
  beforeInstanceUnmount();
9016
- var _resolvePopElements4 = resolvePopElements(), root3 = _resolvePopElements4.root;
9017
- clearParentNodeId(root3);
9018
8923
  document.body.removeEventListener("fullscreenchange", handleFullscreenChange);
9019
- document.removeEventListener("click", handleClickOutside);
9020
- };
9021
- var isClickInside = function isClickInside2(target) {
9022
- var _refContent$value$$el, _refContent$value, _refContent$value$con;
9023
- 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;
9024
- };
9025
- var handleClickOutside = function handleClickOutside2(e) {
9026
- var target = e.target;
9027
- if (isClickInside(target)) {
9028
- e.preventDefault();
9029
- e.stopPropagation();
9030
- e.stopImmediatePropagation();
9031
- return;
9032
- }
8924
+ };
8925
+ var handleClickOutside = function handleClickOutside2(_e) {
8926
+ var hideIgnoreReference = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
9033
8927
  var commonFunc = function commonFunc2() {
9034
8928
  ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
9035
8929
  isShow: localIsShow.value,
9036
- event: e
8930
+ event: _e
9037
8931
  });
9038
8932
  var needExec = props.disableOutsideClick || props.always || props.disabled || props.trigger === "manual";
9039
8933
  if (!props.forceClickoutside && needExec) {
@@ -9043,7 +8937,7 @@ ${$(r2)}`), n2;
9043
8937
  hideFn();
9044
8938
  }
9045
8939
  };
9046
- if (props.hideIgnoreReference) {
8940
+ if (hideIgnoreReference) {
9047
8941
  setTimeout(function() {
9048
8942
  if (ReferenceClickSharedState[uniqKey]) {
9049
8943
  ReferenceClickSharedState[uniqKey] = false;
@@ -9104,7 +8998,7 @@ ${$(r2)}`), n2;
9104
8998
  refContent,
9105
8999
  refArrow,
9106
9000
  refRoot
9107
- }), 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;
9001
+ }), 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;
9108
9002
  if (!props.always && !props.disabled) {
9109
9003
  (0, external_vue_namespaceObject2.watch)(function() {
9110
9004
  return props.isShow;
@@ -9123,6 +9017,7 @@ ${$(r2)}`), n2;
9123
9017
  initPopInstance();
9124
9018
  }
9125
9019
  });
9020
+ updateBoundary();
9126
9021
  (0, external_vue_namespaceObject2.onMounted)(onMountedFn);
9127
9022
  (0, external_vue_namespaceObject2.onBeforeUnmount)(onUnmountedFn);
9128
9023
  var isRenderModeShow = (0, external_vue_namespaceObject2.computed)(function() {
@@ -9169,6 +9064,7 @@ ${$(r2)}`), n2;
9169
9064
  isRenderModeShow,
9170
9065
  transBoundary,
9171
9066
  handleClickContent,
9067
+ handleClickOutside,
9172
9068
  updatePopover,
9173
9069
  resetPopover,
9174
9070
  hide: hide2,
@@ -9215,7 +9111,7 @@ ${$(r2)}`), n2;
9215
9111
  "to": _this.boundary
9216
9112
  }, {
9217
9113
  "default": function _default2() {
9218
- return [(0, external_vue_namespaceObject2.createVNode)(content, {
9114
+ return [(0, external_vue_namespaceObject2.withDirectives)((0, external_vue_namespaceObject2.createVNode)(content, {
9219
9115
  "ref": "refContent",
9220
9116
  "width": _this.width,
9221
9117
  "height": _this.height,
@@ -9240,7 +9136,9 @@ ${$(r2)}`), n2;
9240
9136
  }
9241
9137
  }) : "";
9242
9138
  }
9243
- })];
9139
+ }), [[(0, external_vue_namespaceObject2.resolveDirective)("clickoutside"), function(e) {
9140
+ return _this.handleClickOutside(e, _this.hideIgnoreReference);
9141
+ }]])];
9244
9142
  }
9245
9143
  })];
9246
9144
  }