bnstooltips 2.0.0 → 2.0.2
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/Utilities/Models.d.ts +6 -0
- package/build/index.es.js +100 -80
- package/build/index.es.js.map +1 -1
- package/build/index.js +100 -80
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -20,11 +20,17 @@ export declare enum ServerRegion {
|
|
|
20
20
|
Korea = "Korea",
|
|
21
21
|
KoreaTest = "KoreaTest"
|
|
22
22
|
}
|
|
23
|
+
export declare enum TooltipType {
|
|
24
|
+
Item = 0,
|
|
25
|
+
Skill = 1,
|
|
26
|
+
Npc = 2
|
|
27
|
+
}
|
|
23
28
|
export declare abstract class TooltipSettingsBase {
|
|
24
29
|
constructor(offline?: boolean);
|
|
25
30
|
debug?: boolean;
|
|
26
31
|
fullHeight?: boolean;
|
|
27
32
|
offline?: boolean;
|
|
33
|
+
type: TooltipType;
|
|
28
34
|
}
|
|
29
35
|
export declare abstract class TooltipWithNetworkSettings extends TooltipSettingsBase {
|
|
30
36
|
constructor(region?: ServerRegion, client?: ItemDownloadClient, offline?: boolean);
|
package/build/index.es.js
CHANGED
|
@@ -5613,57 +5613,6 @@ var TooltipWrapperSettings = /** @class */ (function () {
|
|
|
5613
5613
|
var css_248z$3 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
|
|
5614
5614
|
styleInject(css_248z$3);
|
|
5615
5615
|
|
|
5616
|
-
var ServerRegion;
|
|
5617
|
-
(function (ServerRegion) {
|
|
5618
|
-
ServerRegion["EUNA"] = "EUNA";
|
|
5619
|
-
ServerRegion["Korea"] = "Korea";
|
|
5620
|
-
ServerRegion["KoreaTest"] = "KoreaTest";
|
|
5621
|
-
})(ServerRegion || (ServerRegion = {}));
|
|
5622
|
-
var TooltipSettingsBase = /** @class */ (function () {
|
|
5623
|
-
function TooltipSettingsBase(offline) {
|
|
5624
|
-
if (offline === void 0) { offline = false; }
|
|
5625
|
-
this.debug = false;
|
|
5626
|
-
this.fullHeight = false;
|
|
5627
|
-
this.offline = offline;
|
|
5628
|
-
}
|
|
5629
|
-
return TooltipSettingsBase;
|
|
5630
|
-
}());
|
|
5631
|
-
var TooltipWithNetworkSettings = /** @class */ (function (_super) {
|
|
5632
|
-
__extends(TooltipWithNetworkSettings, _super);
|
|
5633
|
-
function TooltipWithNetworkSettings(region, client, offline) {
|
|
5634
|
-
if (offline === void 0) { offline = false; }
|
|
5635
|
-
var _this = this;
|
|
5636
|
-
var l_offline = offline;
|
|
5637
|
-
if (region == null)
|
|
5638
|
-
l_offline = true;
|
|
5639
|
-
_this = _super.call(this, l_offline) || this;
|
|
5640
|
-
_this.region = region;
|
|
5641
|
-
_this.client = client;
|
|
5642
|
-
return _this;
|
|
5643
|
-
}
|
|
5644
|
-
return TooltipWithNetworkSettings;
|
|
5645
|
-
}(TooltipSettingsBase));
|
|
5646
|
-
|
|
5647
|
-
var ItemTooltipSettings = /** @class */ (function (_super) {
|
|
5648
|
-
__extends(ItemTooltipSettings, _super);
|
|
5649
|
-
function ItemTooltipSettings(data, region, client, offline) {
|
|
5650
|
-
var _this = _super.call(this, region, client, offline) || this;
|
|
5651
|
-
_this.data = data;
|
|
5652
|
-
return _this;
|
|
5653
|
-
}
|
|
5654
|
-
return ItemTooltipSettings;
|
|
5655
|
-
}(TooltipWithNetworkSettings));
|
|
5656
|
-
|
|
5657
|
-
var SkillTooltipSettings = /** @class */ (function (_super) {
|
|
5658
|
-
__extends(SkillTooltipSettings, _super);
|
|
5659
|
-
function SkillTooltipSettings(data) {
|
|
5660
|
-
var _this = _super.call(this) || this;
|
|
5661
|
-
_this.data = data;
|
|
5662
|
-
return _this;
|
|
5663
|
-
}
|
|
5664
|
-
return SkillTooltipSettings;
|
|
5665
|
-
}(TooltipSettingsBase));
|
|
5666
|
-
|
|
5667
5616
|
var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
|
|
5668
5617
|
styleInject(css_248z$2);
|
|
5669
5618
|
|
|
@@ -5942,18 +5891,6 @@ function AddIds(subInfoGroups, skill) {
|
|
|
5942
5891
|
});
|
|
5943
5892
|
}
|
|
5944
5893
|
|
|
5945
|
-
var NpcTooltipSettings = /** @class */ (function (_super) {
|
|
5946
|
-
__extends(NpcTooltipSettings, _super);
|
|
5947
|
-
function NpcTooltipSettings(npc, region, grade, client, offline) {
|
|
5948
|
-
if (grade === void 0) { grade = 4; }
|
|
5949
|
-
var _this = _super.call(this, region, client, offline) || this;
|
|
5950
|
-
_this.npc = npc;
|
|
5951
|
-
_this.grade = grade;
|
|
5952
|
-
return _this;
|
|
5953
|
-
}
|
|
5954
|
-
return NpcTooltipSettings;
|
|
5955
|
-
}(TooltipWithNetworkSettings));
|
|
5956
|
-
|
|
5957
5894
|
var css_248z$1 = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\n border: none;\n padding: 0.33rem;\n margin: 0 0.1rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n .NpcTooltip_toggleButton img {\n width: 32px;\n height: 32px; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
|
|
5958
5895
|
styleInject(css_248z$1);
|
|
5959
5896
|
|
|
@@ -5968,6 +5905,54 @@ function StoreToggleBar(_a) {
|
|
|
5968
5905
|
return (React.createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React.createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
|
|
5969
5906
|
}
|
|
5970
5907
|
|
|
5908
|
+
var ServerRegion;
|
|
5909
|
+
(function (ServerRegion) {
|
|
5910
|
+
ServerRegion["EUNA"] = "EUNA";
|
|
5911
|
+
ServerRegion["Korea"] = "Korea";
|
|
5912
|
+
ServerRegion["KoreaTest"] = "KoreaTest";
|
|
5913
|
+
})(ServerRegion || (ServerRegion = {}));
|
|
5914
|
+
var TooltipType;
|
|
5915
|
+
(function (TooltipType) {
|
|
5916
|
+
TooltipType[TooltipType["Item"] = 0] = "Item";
|
|
5917
|
+
TooltipType[TooltipType["Skill"] = 1] = "Skill";
|
|
5918
|
+
TooltipType[TooltipType["Npc"] = 2] = "Npc";
|
|
5919
|
+
})(TooltipType || (TooltipType = {}));
|
|
5920
|
+
var TooltipSettingsBase = /** @class */ (function () {
|
|
5921
|
+
function TooltipSettingsBase(offline) {
|
|
5922
|
+
if (offline === void 0) { offline = false; }
|
|
5923
|
+
this.debug = false;
|
|
5924
|
+
this.fullHeight = false;
|
|
5925
|
+
this.offline = offline;
|
|
5926
|
+
}
|
|
5927
|
+
return TooltipSettingsBase;
|
|
5928
|
+
}());
|
|
5929
|
+
var TooltipWithNetworkSettings = /** @class */ (function (_super) {
|
|
5930
|
+
__extends(TooltipWithNetworkSettings, _super);
|
|
5931
|
+
function TooltipWithNetworkSettings(region, client, offline) {
|
|
5932
|
+
if (offline === void 0) { offline = false; }
|
|
5933
|
+
var _this = this;
|
|
5934
|
+
var l_offline = offline;
|
|
5935
|
+
if (region == null)
|
|
5936
|
+
l_offline = true;
|
|
5937
|
+
_this = _super.call(this, l_offline) || this;
|
|
5938
|
+
_this.region = region;
|
|
5939
|
+
_this.client = client;
|
|
5940
|
+
return _this;
|
|
5941
|
+
}
|
|
5942
|
+
return TooltipWithNetworkSettings;
|
|
5943
|
+
}(TooltipSettingsBase));
|
|
5944
|
+
|
|
5945
|
+
var ItemTooltipSettings = /** @class */ (function (_super) {
|
|
5946
|
+
__extends(ItemTooltipSettings, _super);
|
|
5947
|
+
function ItemTooltipSettings(data, region, client, offline) {
|
|
5948
|
+
var _this = _super.call(this, region, client, offline) || this;
|
|
5949
|
+
_this.data = data;
|
|
5950
|
+
_this.type = TooltipType.Item;
|
|
5951
|
+
return _this;
|
|
5952
|
+
}
|
|
5953
|
+
return ItemTooltipSettings;
|
|
5954
|
+
}(TooltipWithNetworkSettings));
|
|
5955
|
+
|
|
5971
5956
|
var BuyLimitReset;
|
|
5972
5957
|
(function (BuyLimitReset) {
|
|
5973
5958
|
BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
|
|
@@ -6168,7 +6153,6 @@ function AddStores(subInfoGroups, activeTab, client, Stores) {
|
|
|
6168
6153
|
}
|
|
6169
6154
|
|
|
6170
6155
|
function TooltipWrapper(_a) {
|
|
6171
|
-
var _b;
|
|
6172
6156
|
var settings = _a.settings, tooltipSettings = _a.tooltipSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
|
|
6173
6157
|
if (settings == undefined) {
|
|
6174
6158
|
settings = new TooltipWrapperSettings();
|
|
@@ -6176,7 +6160,7 @@ function TooltipWrapper(_a) {
|
|
|
6176
6160
|
if (settings == null || tooltipSettings == null)
|
|
6177
6161
|
return null;
|
|
6178
6162
|
var spanRef = useRef(null);
|
|
6179
|
-
var
|
|
6163
|
+
var _b = useState(null), childRef = _b[0], setChildRef = _b[1];
|
|
6180
6164
|
/**
|
|
6181
6165
|
* Mount the temporary span element.
|
|
6182
6166
|
* retrieve and store the target element's reference.
|
|
@@ -6187,23 +6171,35 @@ function TooltipWrapper(_a) {
|
|
|
6187
6171
|
}
|
|
6188
6172
|
return function () { return setChildRef(null); };
|
|
6189
6173
|
}, []);
|
|
6190
|
-
var
|
|
6191
|
-
var grade =
|
|
6192
|
-
var content =
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6174
|
+
var _c = useState(true), isOffline = _c[0], setIsOffline = _c[1];
|
|
6175
|
+
var _d = useState(4), grade = _d[0], setGrade = _d[1];
|
|
6176
|
+
var _e = useState(null), content = _e[0], setContent = _e[1];
|
|
6177
|
+
useEffect(function () {
|
|
6178
|
+
var _a;
|
|
6179
|
+
if (tooltipSettings.type == TooltipType.Item) {
|
|
6180
|
+
setContent(React.createElement(ItemTooltip, { jobstyleOverride: jobstyleOverride, settings: tooltipSettings }));
|
|
6181
|
+
setGrade(tooltipSettings.data.grade);
|
|
6182
|
+
}
|
|
6183
|
+
else if (tooltipSettings.type == TooltipType.Skill) {
|
|
6184
|
+
setContent(React.createElement(SkillTooltip, { settings: tooltipSettings }));
|
|
6185
|
+
setGrade(4);
|
|
6186
|
+
}
|
|
6187
|
+
else if (tooltipSettings.type == TooltipType.Npc) {
|
|
6188
|
+
setContent(React.createElement(NpcTooltip, { settings: tooltipSettings }));
|
|
6189
|
+
setGrade((_a = tooltipSettings.grade) !== null && _a !== void 0 ? _a : 4);
|
|
6190
|
+
}
|
|
6191
|
+
}, [tooltipSettings]);
|
|
6192
|
+
useEffect(function () {
|
|
6193
|
+
if (content != null)
|
|
6194
|
+
setContent(function (prev) {
|
|
6195
|
+
var newSettings = JSON.parse(JSON.stringify(tooltipSettings));
|
|
6196
|
+
newSettings.offline = isOffline;
|
|
6197
|
+
return React.cloneElement(prev, { tooltipSettings: newSettings });
|
|
6198
|
+
});
|
|
6199
|
+
}, [isOffline]);
|
|
6204
6200
|
return (React.createElement(React.Fragment, null,
|
|
6205
6201
|
children,
|
|
6206
|
-
childRef ? (React.createElement(Tippy, { arrow: settings.showArrow, trigger: settings.trigger, plugins: [followCursor], followCursor: settings.followCursor && !settings.interactive, appendTo: document.body, onMount: function () { return setIsOffline(tooltipSettings.offline); }, placement: settings.placement, animation: "fade", interactive: settings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
6202
|
+
childRef && content ? (React.createElement(Tippy, { arrow: settings.showArrow, trigger: settings.trigger, plugins: [followCursor], followCursor: settings.followCursor && !settings.interactive, appendTo: document.body, onMount: function () { return setIsOffline(tooltipSettings.offline); }, placement: settings.placement, animation: "fade", interactive: settings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
6207
6203
|
}
|
|
6208
6204
|
|
|
6209
6205
|
function ItemIconNameDiv(_a) {
|
|
@@ -6688,5 +6684,29 @@ function JsonArrayToJsxArray(stringArray) {
|
|
|
6688
6684
|
return jsxArray;
|
|
6689
6685
|
}
|
|
6690
6686
|
|
|
6687
|
+
var NpcTooltipSettings = /** @class */ (function (_super) {
|
|
6688
|
+
__extends(NpcTooltipSettings, _super);
|
|
6689
|
+
function NpcTooltipSettings(npc, region, grade, client, offline) {
|
|
6690
|
+
if (grade === void 0) { grade = 4; }
|
|
6691
|
+
var _this = _super.call(this, region, client, offline) || this;
|
|
6692
|
+
_this.npc = npc;
|
|
6693
|
+
_this.grade = grade;
|
|
6694
|
+
_this.type = TooltipType.Npc;
|
|
6695
|
+
return _this;
|
|
6696
|
+
}
|
|
6697
|
+
return NpcTooltipSettings;
|
|
6698
|
+
}(TooltipWithNetworkSettings));
|
|
6699
|
+
|
|
6700
|
+
var SkillTooltipSettings = /** @class */ (function (_super) {
|
|
6701
|
+
__extends(SkillTooltipSettings, _super);
|
|
6702
|
+
function SkillTooltipSettings(data) {
|
|
6703
|
+
var _this = _super.call(this) || this;
|
|
6704
|
+
_this.data = data;
|
|
6705
|
+
_this.type = TooltipType.Skill;
|
|
6706
|
+
return _this;
|
|
6707
|
+
}
|
|
6708
|
+
return SkillTooltipSettings;
|
|
6709
|
+
}(TooltipSettingsBase));
|
|
6710
|
+
|
|
6691
6711
|
export { GetCooldownString, ItemTooltip, ItemTooltipSettings, JsonTooltip, NpcTooltip, NpcTooltipSettings, ServerRegion, SkillTooltip, SkillTooltipSettings, TooltipBase, TooltipWrapper, TooltipWrapperSettings };
|
|
6692
6712
|
//# sourceMappingURL=index.es.js.map
|