bnstooltips 2.0.2 → 2.1.0
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/ItemTooltip/ItemTooltip.d.ts +2 -2
- package/build/ItemTooltip/ItemTooltip.types.d.ts +2 -1
- package/build/NpcTooltip/NpcTooltip.types.d.ts +2 -1
- package/build/SkillTooltip/SkillTooltip.types.d.ts +1 -1
- package/build/TooltipWrapper/TooltipWrapper.d.ts +1 -1
- package/build/TooltipWrapper/TooltipWrapper.types.d.ts +3 -3
- package/build/Utilities/Models.d.ts +0 -18
- package/build/Utilities/TooltipSettingsBase.d.ts +13 -0
- package/build/index.es.js +98 -104
- package/build/index.es.js.map +1 -1
- package/build/index.js +98 -104
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -5641,6 +5641,50 @@ var TooltipWrapperSettings = /** @class */ (function () {
|
|
|
5641
5641
|
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";
|
|
5642
5642
|
styleInject(css_248z$3);
|
|
5643
5643
|
|
|
5644
|
+
var TooltipSettingsBase = /** @class */ (function () {
|
|
5645
|
+
function TooltipSettingsBase() {
|
|
5646
|
+
this.debug = false;
|
|
5647
|
+
this.fullHeight = false;
|
|
5648
|
+
}
|
|
5649
|
+
return TooltipSettingsBase;
|
|
5650
|
+
}());
|
|
5651
|
+
var TooltipWithNetworkSettings = /** @class */ (function (_super) {
|
|
5652
|
+
__extends(TooltipWithNetworkSettings, _super);
|
|
5653
|
+
function TooltipWithNetworkSettings(region, client, offline) {
|
|
5654
|
+
if (offline === void 0) { offline = false; }
|
|
5655
|
+
var _this = this;
|
|
5656
|
+
var l_offline = offline;
|
|
5657
|
+
if (region == null)
|
|
5658
|
+
l_offline = true;
|
|
5659
|
+
_this = _super.call(this) || this;
|
|
5660
|
+
_this.region = region;
|
|
5661
|
+
_this.client = client;
|
|
5662
|
+
_this.offline = l_offline;
|
|
5663
|
+
return _this;
|
|
5664
|
+
}
|
|
5665
|
+
return TooltipWithNetworkSettings;
|
|
5666
|
+
}(TooltipSettingsBase));
|
|
5667
|
+
|
|
5668
|
+
var ItemTooltipSettings = /** @class */ (function (_super) {
|
|
5669
|
+
__extends(ItemTooltipSettings, _super);
|
|
5670
|
+
function ItemTooltipSettings(data, region, client, offline) {
|
|
5671
|
+
var _this = _super.call(this, region, client, offline) || this;
|
|
5672
|
+
_this.data = data;
|
|
5673
|
+
return _this;
|
|
5674
|
+
}
|
|
5675
|
+
return ItemTooltipSettings;
|
|
5676
|
+
}(TooltipWithNetworkSettings));
|
|
5677
|
+
|
|
5678
|
+
var SkillTooltipSettings = /** @class */ (function (_super) {
|
|
5679
|
+
__extends(SkillTooltipSettings, _super);
|
|
5680
|
+
function SkillTooltipSettings(data) {
|
|
5681
|
+
var _this = _super.call(this) || this;
|
|
5682
|
+
_this.data = data;
|
|
5683
|
+
return _this;
|
|
5684
|
+
}
|
|
5685
|
+
return SkillTooltipSettings;
|
|
5686
|
+
}(TooltipSettingsBase));
|
|
5687
|
+
|
|
5644
5688
|
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";
|
|
5645
5689
|
styleInject(css_248z$2);
|
|
5646
5690
|
|
|
@@ -5919,6 +5963,18 @@ function AddIds(subInfoGroups, skill) {
|
|
|
5919
5963
|
});
|
|
5920
5964
|
}
|
|
5921
5965
|
|
|
5966
|
+
var NpcTooltipSettings = /** @class */ (function (_super) {
|
|
5967
|
+
__extends(NpcTooltipSettings, _super);
|
|
5968
|
+
function NpcTooltipSettings(npc, region, grade, client, offline) {
|
|
5969
|
+
if (grade === void 0) { grade = 4; }
|
|
5970
|
+
var _this = _super.call(this, region, client, offline) || this;
|
|
5971
|
+
_this.npc = npc;
|
|
5972
|
+
_this.grade = grade;
|
|
5973
|
+
return _this;
|
|
5974
|
+
}
|
|
5975
|
+
return NpcTooltipSettings;
|
|
5976
|
+
}(TooltipWithNetworkSettings));
|
|
5977
|
+
|
|
5922
5978
|
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";
|
|
5923
5979
|
styleInject(css_248z$1);
|
|
5924
5980
|
|
|
@@ -5933,54 +5989,6 @@ function StoreToggleBar(_a) {
|
|
|
5933
5989
|
return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
|
|
5934
5990
|
}
|
|
5935
5991
|
|
|
5936
|
-
exports.ServerRegion = void 0;
|
|
5937
|
-
(function (ServerRegion) {
|
|
5938
|
-
ServerRegion["EUNA"] = "EUNA";
|
|
5939
|
-
ServerRegion["Korea"] = "Korea";
|
|
5940
|
-
ServerRegion["KoreaTest"] = "KoreaTest";
|
|
5941
|
-
})(exports.ServerRegion || (exports.ServerRegion = {}));
|
|
5942
|
-
var TooltipType;
|
|
5943
|
-
(function (TooltipType) {
|
|
5944
|
-
TooltipType[TooltipType["Item"] = 0] = "Item";
|
|
5945
|
-
TooltipType[TooltipType["Skill"] = 1] = "Skill";
|
|
5946
|
-
TooltipType[TooltipType["Npc"] = 2] = "Npc";
|
|
5947
|
-
})(TooltipType || (TooltipType = {}));
|
|
5948
|
-
var TooltipSettingsBase = /** @class */ (function () {
|
|
5949
|
-
function TooltipSettingsBase(offline) {
|
|
5950
|
-
if (offline === void 0) { offline = false; }
|
|
5951
|
-
this.debug = false;
|
|
5952
|
-
this.fullHeight = false;
|
|
5953
|
-
this.offline = offline;
|
|
5954
|
-
}
|
|
5955
|
-
return TooltipSettingsBase;
|
|
5956
|
-
}());
|
|
5957
|
-
var TooltipWithNetworkSettings = /** @class */ (function (_super) {
|
|
5958
|
-
__extends(TooltipWithNetworkSettings, _super);
|
|
5959
|
-
function TooltipWithNetworkSettings(region, client, offline) {
|
|
5960
|
-
if (offline === void 0) { offline = false; }
|
|
5961
|
-
var _this = this;
|
|
5962
|
-
var l_offline = offline;
|
|
5963
|
-
if (region == null)
|
|
5964
|
-
l_offline = true;
|
|
5965
|
-
_this = _super.call(this, l_offline) || this;
|
|
5966
|
-
_this.region = region;
|
|
5967
|
-
_this.client = client;
|
|
5968
|
-
return _this;
|
|
5969
|
-
}
|
|
5970
|
-
return TooltipWithNetworkSettings;
|
|
5971
|
-
}(TooltipSettingsBase));
|
|
5972
|
-
|
|
5973
|
-
var ItemTooltipSettings = /** @class */ (function (_super) {
|
|
5974
|
-
__extends(ItemTooltipSettings, _super);
|
|
5975
|
-
function ItemTooltipSettings(data, region, client, offline) {
|
|
5976
|
-
var _this = _super.call(this, region, client, offline) || this;
|
|
5977
|
-
_this.data = data;
|
|
5978
|
-
_this.type = TooltipType.Item;
|
|
5979
|
-
return _this;
|
|
5980
|
-
}
|
|
5981
|
-
return ItemTooltipSettings;
|
|
5982
|
-
}(TooltipWithNetworkSettings));
|
|
5983
|
-
|
|
5984
5992
|
var BuyLimitReset;
|
|
5985
5993
|
(function (BuyLimitReset) {
|
|
5986
5994
|
BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
|
|
@@ -6067,7 +6075,7 @@ function StoreItemBuyPriceEntry(_a) {
|
|
|
6067
6075
|
}, [itemRef, client]);
|
|
6068
6076
|
var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
|
|
6069
6077
|
var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
|
|
6070
|
-
return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(TooltipWrapper, {
|
|
6078
|
+
return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(TooltipWrapper, { targetSettings: wrapperSettings, contentSettings: tooltipItemSettings },
|
|
6071
6079
|
React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
|
|
6072
6080
|
React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
|
|
6073
6081
|
React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
|
|
@@ -6101,7 +6109,7 @@ function NpcStoreEntry(_a) {
|
|
|
6101
6109
|
var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
|
|
6102
6110
|
return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
|
|
6103
6111
|
React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
|
|
6104
|
-
React__default["default"].createElement(TooltipWrapper, {
|
|
6112
|
+
React__default["default"].createElement(TooltipWrapper, { targetSettings: wrapperSettings, contentSettings: tooltipItemSettings },
|
|
6105
6113
|
React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
|
|
6106
6114
|
React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
|
|
6107
6115
|
React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
|
|
@@ -6181,14 +6189,15 @@ function AddStores(subInfoGroups, activeTab, client, Stores) {
|
|
|
6181
6189
|
}
|
|
6182
6190
|
|
|
6183
6191
|
function TooltipWrapper(_a) {
|
|
6184
|
-
var
|
|
6185
|
-
if (
|
|
6186
|
-
|
|
6192
|
+
var targetSettings = _a.targetSettings, contentSettings = _a.contentSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
|
|
6193
|
+
if (targetSettings == undefined) {
|
|
6194
|
+
targetSettings = new TooltipWrapperSettings();
|
|
6187
6195
|
}
|
|
6188
|
-
if (
|
|
6196
|
+
if (targetSettings == null || contentSettings == null)
|
|
6189
6197
|
return null;
|
|
6190
6198
|
var spanRef = React.useRef(null);
|
|
6191
6199
|
var _b = React.useState(null), childRef = _b[0], setChildRef = _b[1];
|
|
6200
|
+
var _c = React.useState(true), origOffline = _c[0], setOrigOffline = _c[1];
|
|
6192
6201
|
/**
|
|
6193
6202
|
* Mount the temporary span element.
|
|
6194
6203
|
* retrieve and store the target element's reference.
|
|
@@ -6197,37 +6206,41 @@ function TooltipWrapper(_a) {
|
|
|
6197
6206
|
if (spanRef.current) {
|
|
6198
6207
|
setChildRef(spanRef.current.previousElementSibling);
|
|
6199
6208
|
}
|
|
6209
|
+
var offline = contentSettings instanceof TooltipWithNetworkSettings
|
|
6210
|
+
? contentSettings.offline
|
|
6211
|
+
: true;
|
|
6212
|
+
setOrigOffline(offline);
|
|
6200
6213
|
return function () { return setChildRef(null); };
|
|
6201
6214
|
}, []);
|
|
6202
|
-
var
|
|
6203
|
-
var
|
|
6204
|
-
var
|
|
6215
|
+
var _d = React.useState(true), isOffline = _d[0], setIsOffline = _d[1];
|
|
6216
|
+
var _e = React.useState(4), grade = _e[0], setGrade = _e[1];
|
|
6217
|
+
var _f = React.useState(null), content = _f[0], setContent = _f[1];
|
|
6205
6218
|
React.useEffect(function () {
|
|
6206
6219
|
var _a;
|
|
6207
|
-
if (
|
|
6208
|
-
|
|
6209
|
-
|
|
6220
|
+
if (contentSettings == null)
|
|
6221
|
+
return;
|
|
6222
|
+
if (contentSettings instanceof TooltipWithNetworkSettings)
|
|
6223
|
+
contentSettings.offline = isOffline;
|
|
6224
|
+
if (contentSettings instanceof ItemTooltipSettings) {
|
|
6225
|
+
setContent(React__default["default"].createElement(ItemTooltipComponent, { jobstyleOverride: jobstyleOverride, settings: contentSettings }));
|
|
6226
|
+
setGrade(contentSettings.data.grade);
|
|
6210
6227
|
}
|
|
6211
|
-
|
|
6212
|
-
setContent(React__default["default"].createElement(SkillTooltip, { settings:
|
|
6228
|
+
if (contentSettings instanceof SkillTooltipSettings) {
|
|
6229
|
+
setContent(React__default["default"].createElement(SkillTooltip, { settings: contentSettings }));
|
|
6213
6230
|
setGrade(4);
|
|
6214
6231
|
}
|
|
6215
|
-
|
|
6216
|
-
setContent(React__default["default"].createElement(NpcTooltip, { settings:
|
|
6217
|
-
setGrade((_a =
|
|
6232
|
+
if (contentSettings instanceof NpcTooltipSettings) {
|
|
6233
|
+
setContent(React__default["default"].createElement(NpcTooltip, { settings: contentSettings }));
|
|
6234
|
+
setGrade((_a = contentSettings.grade) !== null && _a !== void 0 ? _a : 4);
|
|
6218
6235
|
}
|
|
6219
|
-
}, [
|
|
6220
|
-
|
|
6221
|
-
if (
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
newSettings.offline = isOffline;
|
|
6225
|
-
return React__default["default"].cloneElement(prev, { tooltipSettings: newSettings });
|
|
6226
|
-
});
|
|
6227
|
-
}, [isOffline]);
|
|
6236
|
+
}, [contentSettings, isOffline]);
|
|
6237
|
+
function mountOfflineState() {
|
|
6238
|
+
if (origOffline != isOffline)
|
|
6239
|
+
setIsOffline(origOffline);
|
|
6240
|
+
}
|
|
6228
6241
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6229
6242
|
children,
|
|
6230
|
-
childRef && content ? (React__default["default"].createElement(Tippy, { arrow:
|
|
6243
|
+
childRef && content ? (React__default["default"].createElement(Tippy, { arrow: targetSettings.showArrow, trigger: targetSettings.trigger, plugins: [followCursor], followCursor: targetSettings.followCursor && !targetSettings.interactive, appendTo: document.body, onMount: function () { return mountOfflineState(); }, placement: targetSettings.placement, animation: "fade", interactive: targetSettings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
6231
6244
|
}
|
|
6232
6245
|
|
|
6233
6246
|
function ItemIconNameDiv(_a) {
|
|
@@ -6253,11 +6266,9 @@ function ItemIconNameDiv(_a) {
|
|
|
6253
6266
|
}, [item, client]);
|
|
6254
6267
|
if (itemData) {
|
|
6255
6268
|
if (itemData.grade != 0) {
|
|
6256
|
-
var itemSettings = new ItemTooltipSettings(itemData);
|
|
6257
|
-
itemSettings.client = client;
|
|
6258
|
-
itemSettings.region = region;
|
|
6269
|
+
var itemSettings = new ItemTooltipSettings(itemData, region, client);
|
|
6259
6270
|
return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
|
|
6260
|
-
React__default["default"].createElement(TooltipWrapper, {
|
|
6271
|
+
React__default["default"].createElement(TooltipWrapper, { targetSettings: new TooltipWrapperSettings(), contentSettings: itemSettings },
|
|
6261
6272
|
React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
|
|
6262
6273
|
React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
|
|
6263
6274
|
React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
|
|
@@ -6358,7 +6369,7 @@ function AccountTransfer(_a) {
|
|
|
6358
6369
|
"\u00A0copper")) : null));
|
|
6359
6370
|
}
|
|
6360
6371
|
|
|
6361
|
-
function
|
|
6372
|
+
function ItemTooltipComponent(_a) {
|
|
6362
6373
|
var _this = this;
|
|
6363
6374
|
var _b, _c, _d;
|
|
6364
6375
|
var settings = _a.settings, jobstyleOverride = _a.jobstyleOverride;
|
|
@@ -6712,32 +6723,15 @@ function JsonArrayToJsxArray(stringArray) {
|
|
|
6712
6723
|
return jsxArray;
|
|
6713
6724
|
}
|
|
6714
6725
|
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
_this.grade = grade;
|
|
6722
|
-
_this.type = TooltipType.Npc;
|
|
6723
|
-
return _this;
|
|
6724
|
-
}
|
|
6725
|
-
return NpcTooltipSettings;
|
|
6726
|
-
}(TooltipWithNetworkSettings));
|
|
6727
|
-
|
|
6728
|
-
var SkillTooltipSettings = /** @class */ (function (_super) {
|
|
6729
|
-
__extends(SkillTooltipSettings, _super);
|
|
6730
|
-
function SkillTooltipSettings(data) {
|
|
6731
|
-
var _this = _super.call(this) || this;
|
|
6732
|
-
_this.data = data;
|
|
6733
|
-
_this.type = TooltipType.Skill;
|
|
6734
|
-
return _this;
|
|
6735
|
-
}
|
|
6736
|
-
return SkillTooltipSettings;
|
|
6737
|
-
}(TooltipSettingsBase));
|
|
6726
|
+
exports.ServerRegion = void 0;
|
|
6727
|
+
(function (ServerRegion) {
|
|
6728
|
+
ServerRegion["EUNA"] = "EUNA";
|
|
6729
|
+
ServerRegion["Korea"] = "Korea";
|
|
6730
|
+
ServerRegion["KoreaTest"] = "KoreaTest";
|
|
6731
|
+
})(exports.ServerRegion || (exports.ServerRegion = {}));
|
|
6738
6732
|
|
|
6739
6733
|
exports.GetCooldownString = GetCooldownString;
|
|
6740
|
-
exports.ItemTooltip =
|
|
6734
|
+
exports.ItemTooltip = ItemTooltipComponent;
|
|
6741
6735
|
exports.ItemTooltipSettings = ItemTooltipSettings;
|
|
6742
6736
|
exports.JsonTooltip = JsonTooltip;
|
|
6743
6737
|
exports.NpcTooltip = NpcTooltip;
|