bnstooltips 1.8.4 → 1.8.7
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/README.md +16 -3
- package/build/Utilities/ItemDownloadClient.d.ts +2 -1
- package/build/index.es.js +23 -13
- package/build/index.es.js.map +1 -1
- package/build/index.js +23 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,10 +5,23 @@
|
|
|
5
5
|
Used in my YAST Project. https://yast.now.sh
|
|
6
6
|
|
|
7
7
|
### Examples
|
|
8
|
+
<details>
|
|
9
|
+
<summary>Click to show examples</summary>
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
</details>
|
|
8
24
|
|
|
9
|
-

|
|
10
|
-

|
|
11
|
-

|
|
12
25
|
|
|
13
26
|
### Dev note
|
|
14
27
|
Create a new component from templates with `yarn createCp`
|
|
@@ -2,6 +2,7 @@ import * as api from "../itemapiclient/api";
|
|
|
2
2
|
import { ServerRegion } from "./Models";
|
|
3
3
|
export declare class ItemDownloadClient {
|
|
4
4
|
private static urlBase;
|
|
5
|
+
private static options;
|
|
5
6
|
private instance;
|
|
6
7
|
private patch;
|
|
7
8
|
region: ServerRegion;
|
|
@@ -10,7 +11,7 @@ export declare class ItemDownloadClient {
|
|
|
10
11
|
GetModifiedItems(): Promise<api.BnsItemDto[]>;
|
|
11
12
|
GetItemByString(idlevelString: string): Promise<api.BnsItemDto>;
|
|
12
13
|
GetItem(id: number, level: number): Promise<api.BnsItemDto>;
|
|
13
|
-
GetItemsByCategory(category: string, technicalClassName: string, gradesString: string): Promise<api.BnsItemDto[]>;
|
|
14
|
+
GetItemsByCategory(category: string, technicalClassName: string, gradesString: string, minGs?: string): Promise<api.BnsItemDto[]>;
|
|
14
15
|
GetItemUpgrades(item: api.BnsItemDto): Promise<api.BnsItemDto[]>;
|
|
15
16
|
GetItemUpgradesByIdLevel(id: number, level: number): Promise<api.BnsItemDto[]>;
|
|
16
17
|
}
|
package/build/index.es.js
CHANGED
|
@@ -1280,7 +1280,7 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1280
1280
|
var result;
|
|
1281
1281
|
return __generator(this, function (_a) {
|
|
1282
1282
|
switch (_a.label) {
|
|
1283
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(true, false, this.region, this.patch)];
|
|
1283
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(true, false, this.region, this.patch, ItemDownloadClient.options)];
|
|
1284
1284
|
case 1:
|
|
1285
1285
|
result = _a.sent();
|
|
1286
1286
|
return [2 /*return*/, result];
|
|
@@ -1293,7 +1293,7 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1293
1293
|
var result;
|
|
1294
1294
|
return __generator(this, function (_a) {
|
|
1295
1295
|
switch (_a.label) {
|
|
1296
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(false, true, this.region, this.patch)];
|
|
1296
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(false, true, this.region, this.patch, ItemDownloadClient.options)];
|
|
1297
1297
|
case 1:
|
|
1298
1298
|
result = _a.sent();
|
|
1299
1299
|
return [2 /*return*/, result];
|
|
@@ -1306,7 +1306,7 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1306
1306
|
var result;
|
|
1307
1307
|
return __generator(this, function (_a) {
|
|
1308
1308
|
switch (_a.label) {
|
|
1309
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemItemByStringGet(idlevelString, this.region, false, this.patch)];
|
|
1309
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemItemByStringGet(idlevelString, this.region, false, this.patch, ItemDownloadClient.options)];
|
|
1310
1310
|
case 1:
|
|
1311
1311
|
result = _a.sent();
|
|
1312
1312
|
return [2 /*return*/, result];
|
|
@@ -1319,7 +1319,7 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1319
1319
|
var result;
|
|
1320
1320
|
return __generator(this, function (_a) {
|
|
1321
1321
|
switch (_a.label) {
|
|
1322
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemItemGet(id, level, this.region, false, this.patch)];
|
|
1322
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemItemGet(id, level, this.region, false, this.patch, ItemDownloadClient.options)];
|
|
1323
1323
|
case 1:
|
|
1324
1324
|
result = _a.sent();
|
|
1325
1325
|
return [2 /*return*/, result];
|
|
@@ -1327,12 +1327,12 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1327
1327
|
});
|
|
1328
1328
|
});
|
|
1329
1329
|
};
|
|
1330
|
-
ItemDownloadClient.prototype.GetItemsByCategory = function (category, technicalClassName, gradesString) {
|
|
1330
|
+
ItemDownloadClient.prototype.GetItemsByCategory = function (category, technicalClassName, gradesString, minGs) {
|
|
1331
1331
|
return __awaiter(this, void 0, void 0, function () {
|
|
1332
1332
|
var result;
|
|
1333
1333
|
return __generator(this, function (_a) {
|
|
1334
1334
|
switch (_a.label) {
|
|
1335
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemItemsByCategoryGet(this.region, category, technicalClassName, gradesString)];
|
|
1335
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemItemsByCategoryGet(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined, ItemDownloadClient.options)];
|
|
1336
1336
|
case 1:
|
|
1337
1337
|
result = _a.sent();
|
|
1338
1338
|
return [2 /*return*/, result];
|
|
@@ -1345,7 +1345,7 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1345
1345
|
var result;
|
|
1346
1346
|
return __generator(this, function (_a) {
|
|
1347
1347
|
switch (_a.label) {
|
|
1348
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(item.id, item.level, this.region, this.patch)];
|
|
1348
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(item.id, item.level, this.region, this.patch, ItemDownloadClient.options)];
|
|
1349
1349
|
case 1:
|
|
1350
1350
|
result = _a.sent();
|
|
1351
1351
|
return [2 /*return*/, result];
|
|
@@ -1358,7 +1358,7 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1358
1358
|
var result;
|
|
1359
1359
|
return __generator(this, function (_a) {
|
|
1360
1360
|
switch (_a.label) {
|
|
1361
|
-
case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(id, level, this.region, this.patch)];
|
|
1361
|
+
case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(id, level, this.region, this.patch, ItemDownloadClient.options)];
|
|
1362
1362
|
case 1:
|
|
1363
1363
|
result = _a.sent();
|
|
1364
1364
|
return [2 /*return*/, result];
|
|
@@ -1367,6 +1367,11 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1367
1367
|
});
|
|
1368
1368
|
};
|
|
1369
1369
|
ItemDownloadClient.urlBase = "https://bnsitemstoragewebapi.azurewebsites.net";
|
|
1370
|
+
ItemDownloadClient.options = {
|
|
1371
|
+
"headers": {
|
|
1372
|
+
"Referer": "https://yast.vercel.app"
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1370
1375
|
return ItemDownloadClient;
|
|
1371
1376
|
}());
|
|
1372
1377
|
|
|
@@ -5674,7 +5679,7 @@ var ItemImproveEffectsTooltipWrapper = function (_a) {
|
|
|
5674
5679
|
};
|
|
5675
5680
|
|
|
5676
5681
|
function PrevCurNext(_a) {
|
|
5677
|
-
var item = _a.item, client = _a.client, region = _a.region, nextItem = _a.nextItem, prevItem = _a.prevItem, steps = _a.steps
|
|
5682
|
+
var item = _a.item, client = _a.client, region = _a.region, nextItem = _a.nextItem, prevItem = _a.prevItem, steps = _a.steps, allPossibleUpgrades = _a.allPossibleUpgrades, SetCustomStage = _a.SetCustomStage, NavigateTo = _a.NavigateTo;
|
|
5678
5683
|
return (React.createElement("div", { className: "ItemImproveTooltip_PrevCurNext" },
|
|
5679
5684
|
React.createElement("div", { className: "ItemImproveTooltip_PrevCurNext_container" },
|
|
5680
5685
|
React.createElement("div", { className: "ItemImproveTooltip_PrevCurNext_container_itemChild" }, prevItem != null ?
|
|
@@ -5706,7 +5711,12 @@ function PrevCurNext(_a) {
|
|
|
5706
5711
|
React.createElement("div", { style: { cursor: "default" } },
|
|
5707
5712
|
React.createElement(ItemImproveEffectsTooltipWrapper, { effectsForName: GetUpgradeEffects(item, steps, nextItem) },
|
|
5708
5713
|
React.createElement("span", { style: { fontSize: 16 }, className: "00008130.UI.Label_Green03_12 material-symbols-outlined" }, "help")))
|
|
5709
|
-
: null
|
|
5714
|
+
: null,
|
|
5715
|
+
React.createElement(ItemImproveSelectStageTooltipWrapper, { trigger: "click", interactive: true, items: allPossibleUpgrades, onClick: function (item) {
|
|
5716
|
+
SetCustomStage(item);
|
|
5717
|
+
} },
|
|
5718
|
+
React.createElement("div", { className: "ItemImproveTooltip_PrevCurNext_container_itemChildExtra_container_arrow" },
|
|
5719
|
+
React.createElement("span", { style: { fontSize: 32 }, className: "material-symbols-outlined" }, "keyboard_arrow_down"))))
|
|
5710
5720
|
: null))));
|
|
5711
5721
|
}
|
|
5712
5722
|
function GetUpgradeEffects(item, steps, nextItem) {
|
|
@@ -5834,8 +5844,8 @@ function GetAccumulatedUpgradeCost(item, steps) {
|
|
|
5834
5844
|
result = item.itemImprove.upgradeOptions;
|
|
5835
5845
|
}
|
|
5836
5846
|
else {
|
|
5837
|
-
var mainCost = item.itemImprove.upgradeOptions[0].mainItemCost;
|
|
5838
|
-
var subCosts = item.itemImprove.upgradeOptions[0].subItemCost;
|
|
5847
|
+
var mainCost = structuredClone(item.itemImprove.upgradeOptions[0].mainItemCost);
|
|
5848
|
+
var subCosts = structuredClone(item.itemImprove.upgradeOptions[0].subItemCost);
|
|
5839
5849
|
var moneyCost = item.itemImprove.upgradeOptions[0].moneyCost;
|
|
5840
5850
|
steps.forEach(function (step) {
|
|
5841
5851
|
var option0 = step.itemImprove.upgradeOptions[0];
|
|
@@ -5852,7 +5862,7 @@ function GetAccumulatedUpgradeCost(item, steps) {
|
|
|
5852
5862
|
else {
|
|
5853
5863
|
subCosts.push(mainCost);
|
|
5854
5864
|
}
|
|
5855
|
-
mainCost = option0.mainItemCost;
|
|
5865
|
+
mainCost = structuredClone(option0.mainItemCost);
|
|
5856
5866
|
}
|
|
5857
5867
|
moneyCost += option0.moneyCost;
|
|
5858
5868
|
option0.subItemCost.forEach(function (subItem) {
|