bnstooltips 1.21.1 → 1.21.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.js CHANGED
@@ -8905,7 +8905,7 @@ function SkillConditions(_a) {
8905
8905
  }
8906
8906
 
8907
8907
  function SkillTooltip(_a) {
8908
- var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b, _c = _a.masteryPoints, masteryPoints = _c === void 0 ? 0 : _c, _d = _a.multi, multi = _d === void 0 ? false : _d;
8908
+ var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b, _c = _a.masteryPoints, masteryPoints = _c === void 0 ? 0 : _c, _d = _a.showZeroMastery, showZeroMastery = _d === void 0 ? false : _d, _e = _a.multi, multi = _e === void 0 ? false : _e;
8909
8909
  var skill = data;
8910
8910
  var tooltipBaseProps = {
8911
8911
  title: skill.Name,
@@ -8926,7 +8926,7 @@ function SkillTooltip(_a) {
8926
8926
  //bottomPart
8927
8927
  AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
8928
8928
  AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
8929
- AddSkillMastery(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo);
8929
+ AddSkillMastery(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo, showZeroMastery);
8930
8930
  AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
8931
8931
  AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
8932
8932
  AddConditions(tooltipBaseProps.subInfoGroups, skill);
@@ -8979,8 +8979,11 @@ function AddBreakValue(subInfoGroups, skill) {
8979
8979
  });
8980
8980
  }
8981
8981
  }
8982
- function AddSkillMastery(subInfoGroups, masteryPoints, arcaneInfo) {
8983
- if (masteryPoints == null || masteryPoints == 0 || arcaneInfo == null)
8982
+ function AddSkillMastery(subInfoGroups, masteryPoints, arcaneInfo, showZeroMastery) {
8983
+ if (showZeroMastery === void 0) { showZeroMastery = false; }
8984
+ if (masteryPoints == null ||
8985
+ (masteryPoints == 0 && !showZeroMastery) ||
8986
+ arcaneInfo == null)
8984
8987
  return;
8985
8988
  var masteryValue = GetSkillMasteryValue(masteryPoints, arcaneInfo);
8986
8989
  if (masteryValue == null)
@@ -9263,9 +9266,9 @@ var css_248z$7 = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.
9263
9266
  styleInject(css_248z$7);
9264
9267
 
9265
9268
  var SkillTooltipWrapper = function (_a) {
9266
- var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f, _g = _a.debug, debug = _g === void 0 ? false : _g, _h = _a.masteryPoints, masteryPoints = _h === void 0 ? 0 : _h;
9269
+ var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f, _g = _a.debug, debug = _g === void 0 ? false : _g, _h = _a.masteryPoints, masteryPoints = _h === void 0 ? 0 : _h, _j = _a.showZeroMastery, showZeroMastery = _j === void 0 ? false : _j;
9267
9270
  var spanRef = React.useRef(null);
9268
- var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
9271
+ var _k = React.useState(null), childRef = _k[0], setChildRef = _k[1];
9269
9272
  /**
9270
9273
  * Mount the temporary span element.
9271
9274
  * retrieve and store the target element's reference.
@@ -9278,7 +9281,7 @@ var SkillTooltipWrapper = function (_a) {
9278
9281
  }, []);
9279
9282
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
9280
9283
  children,
9281
- childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && (!interactive && !debug), appendTo: document.body, placement: placement, animation: "fade", interactive: interactive || debug, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: debug, masteryPoints: masteryPoints }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
9284
+ childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive && !debug, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive || debug, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: debug, masteryPoints: masteryPoints, showZeroMastery: showZeroMastery }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
9282
9285
  };
9283
9286
 
9284
9287
  exports.ServerRegion = void 0;
@@ -9642,9 +9645,9 @@ var css_248z = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.To
9642
9645
  styleInject(css_248z);
9643
9646
 
9644
9647
  var MultiSkillTooltipWrapper = function (_a) {
9645
- var skills = _a.skills, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f, _g = _a.debug, debug = _g === void 0 ? false : _g;
9648
+ var skills = _a.skills, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f, _g = _a.debug, debug = _g === void 0 ? false : _g, _h = _a.fullheight, fullheight = _h === void 0 ? false : _h;
9646
9649
  var spanRef = React.useRef(null);
9647
- var _h = React.useState(null), childRef = _h[0], setChildRef = _h[1];
9650
+ var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
9648
9651
  /**
9649
9652
  * Mount the temporary span element.
9650
9653
  * retrieve and store the target element's reference.
@@ -9657,7 +9660,7 @@ var MultiSkillTooltipWrapper = function (_a) {
9657
9660
  }, []);
9658
9661
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
9659
9662
  children,
9660
- childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive && !debug, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive || debug, content: React__default["default"].createElement(MultiSkillTooltip, { skills: skills, debug: debug }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
9663
+ childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive && !debug, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive || debug, content: React__default["default"].createElement(MultiSkillTooltip, { skills: skills, debug: debug, fullheight: fullheight }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
9661
9664
  };
9662
9665
 
9663
9666
  exports.EffectTooltip = EffectTooltip;