bnstooltips 1.8.0 → 1.8.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/build/index.es.js CHANGED
@@ -5579,6 +5579,8 @@ function ItemWithText(_a) {
5579
5579
  var borderClass = _a.borderClass, itemProp = _a.item, itemLevel = _a.itemLevel, itemId = _a.itemId, client = _a.client, region = _a.region, tooltip = _a.tooltip, _d = _a.small, small = _d === void 0 ? false : _d;
5580
5580
  var _e = useState(), item = _e[0], setItem = _e[1];
5581
5581
  useEffect(function () {
5582
+ if (client == null)
5583
+ return;
5582
5584
  if (itemProp == null) {
5583
5585
  (function () { return __awaiter(_this, void 0, void 0, function () {
5584
5586
  var _a;
@@ -5597,7 +5599,7 @@ function ItemWithText(_a) {
5597
5599
  else {
5598
5600
  setItem(itemProp);
5599
5601
  }
5600
- }, [itemProp, itemId, itemLevel]);
5602
+ }, [itemProp, itemId, itemLevel, client]);
5601
5603
  if (item == null)
5602
5604
  return null;
5603
5605
  return (React.createElement("div", { className: "ItemImproveTooltip_ItemWithText" },
@@ -5873,7 +5875,7 @@ function ItemImproveTooltip(_a) {
5873
5875
  var _k = useState([]), steps = _k[0], setSteps = _k[1];
5874
5876
  var _l = useState([]), allPossibleUpgrades = _l[0], setAllPossibleUpgrades = _l[1];
5875
5877
  useEffect(function () {
5876
- if (data == null || client == null)
5878
+ if (data == null || client == null || offline)
5877
5879
  return;
5878
5880
  (function () { return __awaiter(_this, void 0, void 0, function () {
5879
5881
  var existing, _a, existing, _b, foundIndex, _c;
@@ -6024,7 +6026,7 @@ function AddUpgradeCost(subInfoGroups, item, nextItem, steps, client, region) {
6024
6026
  }
6025
6027
 
6026
6028
  var ItemImproveTooltipWrapper = function (_a) {
6027
- var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.offline, offline = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, _d = _a.placement, placement = _d === void 0 ? "right" : _d, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.followCursor, followCursor$1 = _f === void 0 ? false : _f, _g = _a.trigger, trigger = _g === void 0 ? "mouseenter focus" : _g; _a.showArrow;
6029
+ var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.offline, offline = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, _d = _a.placement, placement = _d === void 0 ? "right" : _d, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.followCursor, followCursor$1 = _f === void 0 ? false : _f, _g = _a.trigger, trigger = _g === void 0 ? "mouseenter focus" : _g, _h = _a.showArrow, showArrow = _h === void 0 ? true : _h;
6028
6030
  var spanRef = useRef(null);
6029
6031
  var _j = useState(null), childRef = _j[0], setChildRef = _j[1];
6030
6032
  /**
@@ -6040,7 +6042,7 @@ var ItemImproveTooltipWrapper = function (_a) {
6040
6042
  var _k = useState(true), isOffline = _k[0], setIsOffline = _k[1];
6041
6043
  return (React.createElement(React.Fragment, null,
6042
6044
  children,
6043
- childRef ? (React.createElement(Tippy, { arrow: false, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(ItemImproveTooltip, { region: region, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6045
+ childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(ItemImproveTooltip, { region: region, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6044
6046
  };
6045
6047
 
6046
6048
  function ItemMainInfo(item) {