bnstooltips 1.4.4
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 +3 -0
- package/build/ItemTooltip/ItemTooltip.d.ts +5 -0
- package/build/ItemTooltip/ItemTooltip.types.d.ts +11 -0
- package/build/ItemTooltip/SubComponents/AccountTransfer.d.ts +10 -0
- package/build/ItemTooltip/SubComponents/DecomposeResults.d.ts +10 -0
- package/build/ItemTooltip/SubComponents/GearScore.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/ItemCooldowns.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/ItemDescriptionText.d.ts +5 -0
- package/build/ItemTooltip/SubComponents/ItemIconNameDiv.d.ts +11 -0
- package/build/ItemTooltip/SubComponents/ItemMainInfo.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/ItemRandomStats.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/ItemSkillDescriptions.d.ts +8 -0
- package/build/ItemTooltip/SubComponents/ItemSkillTitles.d.ts +8 -0
- package/build/ItemTooltip/SubComponents/ItemStats.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/ItemSubInfo.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/RawText.d.ts +5 -0
- package/build/ItemTooltip/SubComponents/SealingResult.d.ts +10 -0
- package/build/ItemTooltip/SubComponents/SetBonus.d.ts +7 -0
- package/build/ItemTooltip/SubComponents/SetBonusItems.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/SetBonusToggle.d.ts +7 -0
- package/build/ItemTooltip/SubComponents/SkillModifierGroup.d.ts +6 -0
- package/build/ItemTooltip/SubComponents/SkillModifiers.d.ts +8 -0
- package/build/ItemTooltip/SubComponents/StringEnumerationWithText.d.ts +7 -0
- package/build/ItemTooltip/SubComponents/TextWithNumber.d.ts +6 -0
- package/build/ItemTooltip/SubComponents/TopText.d.ts +4 -0
- package/build/ItemTooltip/SubComponents/index.d.ts +44 -0
- package/build/ItemTooltipWrapper/ItemTooltipWrapper.d.ts +6 -0
- package/build/ItemTooltipWrapper/ItemTooltipWrapper.types.d.ts +14 -0
- package/build/JsonTooltip/JsonTooltip.d.ts +5 -0
- package/build/JsonTooltip/JsonTooltip.types.d.ts +12 -0
- package/build/SkillTooltip/SkillTooltip.d.ts +5 -0
- package/build/SkillTooltip/SkillTooltip.types.d.ts +5 -0
- package/build/SkillTooltip/SubComponents/PvpModifiers.d.ts +6 -0
- package/build/SkillTooltip/SubComponents/SkillBoundaries.d.ts +6 -0
- package/build/SkillTooltip/SubComponents/SkillConditions.d.ts +6 -0
- package/build/SkillTooltip/SubComponents/SkillIconWithButton.d.ts +6 -0
- package/build/SkillTooltip/SubComponents/SkillTooltipBoundary.d.ts +9 -0
- package/build/SkillTooltip/SubComponents/SkillTooltipBoundaryContainer.d.ts +5 -0
- package/build/SkillTooltip/SubComponents/index.d.ts +8 -0
- package/build/SkillTooltipWrapper/SkillTooltipWrapper.d.ts +6 -0
- package/build/SkillTooltipWrapper/SkillTooltipWrapper.types.d.ts +7 -0
- package/build/TestComponent/TestComponent.d.ts +5 -0
- package/build/TestComponent/TestComponent.types.d.ts +3 -0
- package/build/TooltipBase/TooltipBase.d.ts +5 -0
- package/build/TooltipBase/TooltipBase.types.d.ts +14 -0
- package/build/Utilities/ButtonIconMapping.d.ts +1 -0
- package/build/Utilities/Helpers.d.ts +9 -0
- package/build/Utilities/ISkill.d.ts +40 -0
- package/build/Utilities/ItemDownloadClient.d.ts +14 -0
- package/build/Utilities/Models.d.ts +20 -0
- package/build/index.d.ts +14 -0
- package/build/index.es.js +6000 -0
- package/build/index.es.js.map +1 -0
- package/build/index.js +6033 -0
- package/build/index.js.map +1 -0
- package/build/itemapiclient/api.d.ts +1143 -0
- package/build/itemapiclient/configuration.d.ts +55 -0
- package/build/itemapiclient/index.d.ts +13 -0
- package/build/stories/Button.d.ts +29 -0
- package/build/stories/Header.d.ts +10 -0
- package/build/stories/Page.d.ts +10 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ItemTooltipProps } from "./ItemTooltip.types";
|
|
3
|
+
import "./ItemTooltip.scss";
|
|
4
|
+
declare function ItemTooltip({ data, region, debug, offline, client: clientProp, jobstyleOverride, }: ItemTooltipProps): JSX.Element;
|
|
5
|
+
export default ItemTooltip;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BnsItemDto } from "../itemapiclient";
|
|
2
|
+
import { ItemDownloadClient } from "../Utilities/ItemDownloadClient";
|
|
3
|
+
import { ServerRegion } from "../Utilities/Models";
|
|
4
|
+
export interface ItemTooltipProps {
|
|
5
|
+
data: BnsItemDto;
|
|
6
|
+
region: ServerRegion;
|
|
7
|
+
offline?: boolean;
|
|
8
|
+
client?: ItemDownloadClient;
|
|
9
|
+
debug?: boolean;
|
|
10
|
+
jobstyleOverride?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ServerRegion } from "../..";
|
|
3
|
+
import { BnsItemDto } from "../../itemapiclient";
|
|
4
|
+
import { ItemDownloadClient } from "../../Utilities/ItemDownloadClient";
|
|
5
|
+
declare function AccountTransfer({ item, client, region, }: {
|
|
6
|
+
item: BnsItemDto;
|
|
7
|
+
client: ItemDownloadClient;
|
|
8
|
+
region: ServerRegion;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export default AccountTransfer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ServerRegion } from "../..";
|
|
3
|
+
import { ItemRefWithCount } from "../../itemapiclient";
|
|
4
|
+
import { ItemDownloadClient } from "../../Utilities/ItemDownloadClient";
|
|
5
|
+
declare function DecomposeResults(props: {
|
|
6
|
+
items: ItemRefWithCount[];
|
|
7
|
+
client: ItemDownloadClient;
|
|
8
|
+
region: ServerRegion;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export default DecomposeResults;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ServerRegion } from "../..";
|
|
3
|
+
import { ItemRefWithCount } from "../../itemapiclient";
|
|
4
|
+
import { ItemDownloadClient } from "../../Utilities/ItemDownloadClient";
|
|
5
|
+
declare function ItemIconNameDiv({ item, region, client, showRandomIcon, }: {
|
|
6
|
+
item: ItemRefWithCount;
|
|
7
|
+
region: ServerRegion;
|
|
8
|
+
client: ItemDownloadClient;
|
|
9
|
+
showRandomIcon?: boolean;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
export default ItemIconNameDiv;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BnsItemDto } from "../../itemapiclient";
|
|
3
|
+
declare function ItemSkillDescriptions({ item, itemCombats, jobstyle, }: {
|
|
4
|
+
item: BnsItemDto;
|
|
5
|
+
itemCombats: boolean;
|
|
6
|
+
jobstyle: string;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
export default ItemSkillDescriptions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BnsItemDto } from "../../itemapiclient";
|
|
3
|
+
declare function ItemSkillTitles({ item, itemCombats, jobstyle, }: {
|
|
4
|
+
item: BnsItemDto;
|
|
5
|
+
itemCombats: boolean;
|
|
6
|
+
jobstyle: string;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
export default ItemSkillTitles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ServerRegion } from "../..";
|
|
3
|
+
import { BnsItemDto } from "../../itemapiclient";
|
|
4
|
+
import { ItemDownloadClient } from "../../Utilities/ItemDownloadClient";
|
|
5
|
+
declare function SealingResult({ item, client, region, }: {
|
|
6
|
+
item: BnsItemDto;
|
|
7
|
+
client: ItemDownloadClient;
|
|
8
|
+
region: ServerRegion;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export default SealingResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkillModifierGroupDto } from "../../itemapiclient";
|
|
3
|
+
declare function SkillModifiers(props: {
|
|
4
|
+
skillModifierGroups: SkillModifierGroupDto[];
|
|
5
|
+
isSetBonus: boolean;
|
|
6
|
+
jobstyle: string;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
export default SkillModifiers;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import ItemMainInfo from "./ItemMainInfo";
|
|
2
|
+
export { ItemMainInfo };
|
|
3
|
+
import ItemSubInfo from "./ItemSubInfo";
|
|
4
|
+
export { ItemSubInfo };
|
|
5
|
+
import ItemSkillTitles from "./ItemSkillTitles";
|
|
6
|
+
export { ItemSkillTitles };
|
|
7
|
+
import ItemCooldowns from "./ItemCooldowns";
|
|
8
|
+
export { ItemCooldowns };
|
|
9
|
+
import ItemStats from "./ItemStats";
|
|
10
|
+
export { ItemStats };
|
|
11
|
+
import ItemRandomStats from "./ItemRandomStats";
|
|
12
|
+
export { ItemRandomStats };
|
|
13
|
+
import GearScore from "./GearScore";
|
|
14
|
+
export { GearScore };
|
|
15
|
+
import TopText from "./TopText";
|
|
16
|
+
export { TopText };
|
|
17
|
+
import ItemSkillDescriptions from "./ItemSkillDescriptions";
|
|
18
|
+
export { ItemSkillDescriptions };
|
|
19
|
+
import SkillModifiers from "./SkillModifiers";
|
|
20
|
+
export { SkillModifiers };
|
|
21
|
+
import SkillModifierGroup from "./SkillModifierGroup";
|
|
22
|
+
export { SkillModifierGroup };
|
|
23
|
+
import SetBonusItems from "./SetBonusItems";
|
|
24
|
+
export { SetBonusItems };
|
|
25
|
+
import SetBonus from "./SetBonus";
|
|
26
|
+
export { SetBonus };
|
|
27
|
+
import ItemIconNameDiv from "./ItemIconNameDiv";
|
|
28
|
+
export { ItemIconNameDiv };
|
|
29
|
+
import DecomposeResults from "./DecomposeResults";
|
|
30
|
+
export { DecomposeResults };
|
|
31
|
+
import SetBonusToggle from "./SetBonusToggle";
|
|
32
|
+
export { SetBonusToggle };
|
|
33
|
+
import ItemDescriptionText from "./ItemDescriptionText";
|
|
34
|
+
export { ItemDescriptionText };
|
|
35
|
+
import RawText from "./RawText";
|
|
36
|
+
export { RawText };
|
|
37
|
+
import TextWithNumber from "./TextWithNumber";
|
|
38
|
+
export { TextWithNumber };
|
|
39
|
+
import StringEnumerationWithText from "./StringEnumerationWithText";
|
|
40
|
+
export { StringEnumerationWithText };
|
|
41
|
+
import SealingResult from "./SealingResult";
|
|
42
|
+
export { SealingResult };
|
|
43
|
+
import AccountTransfer from "./AccountTransfer";
|
|
44
|
+
export { AccountTransfer };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { ItemTooltipWrapperProps } from "./ItemTooltipWrapper.types";
|
|
3
|
+
import "./ItemTooltipWrapper.scss";
|
|
4
|
+
import "tippy.js/dist/tippy.css";
|
|
5
|
+
declare const ItemTooltipWrapper: FunctionComponent<ItemTooltipWrapperProps>;
|
|
6
|
+
export default ItemTooltipWrapper;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BnsItemDto } from "../itemapiclient";
|
|
2
|
+
import { ItemDownloadClient } from "../Utilities/ItemDownloadClient";
|
|
3
|
+
import { Placement } from "tippy.js";
|
|
4
|
+
import { ServerRegion } from "..";
|
|
5
|
+
export interface ItemTooltipWrapperProps {
|
|
6
|
+
data: BnsItemDto;
|
|
7
|
+
region: ServerRegion;
|
|
8
|
+
offline?: boolean;
|
|
9
|
+
client?: ItemDownloadClient;
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
placement?: Placement;
|
|
12
|
+
jobstyleOverride?: string;
|
|
13
|
+
debug?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface JsonTooltipProps {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
grade: number;
|
|
5
|
+
icon?: string;
|
|
6
|
+
mainInfos?: string[];
|
|
7
|
+
subInfoGroups?: JsonSubInfoGroup[];
|
|
8
|
+
}
|
|
9
|
+
export declare type JsonSubInfoGroup = {
|
|
10
|
+
title: string | undefined;
|
|
11
|
+
texts: string[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare function SkillTooltipBoundary({ head, body, bodyClass, pvpModifier, hasIcon, }: {
|
|
3
|
+
head: JSX.Element;
|
|
4
|
+
body: JSX.Element;
|
|
5
|
+
bodyClass?: string;
|
|
6
|
+
pvpModifier?: boolean;
|
|
7
|
+
hasIcon?: boolean;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
export default SkillTooltipBoundary;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import SkillIconWithButton from "./SkillIconWithButton";
|
|
2
|
+
export { SkillIconWithButton };
|
|
3
|
+
import PvpModifiers from "./PvpModifiers";
|
|
4
|
+
export { PvpModifiers };
|
|
5
|
+
import SkillBoundaries from "./SkillBoundaries";
|
|
6
|
+
export { SkillBoundaries };
|
|
7
|
+
import SkillConditions from "./SkillConditions";
|
|
8
|
+
export { SkillConditions };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { SkillTooltipWrapperProps } from "./SkillTooltipWrapper.types";
|
|
3
|
+
import "./SkillTooltipWrapper.scss";
|
|
4
|
+
import "tippy.js/dist/tippy.css";
|
|
5
|
+
declare const SkillTooltipWrapper: FunctionComponent<SkillTooltipWrapperProps>;
|
|
6
|
+
export default SkillTooltipWrapper;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TooltipBaseProps } from "./TooltipBase.types";
|
|
3
|
+
import "./TooltipBase.scss";
|
|
4
|
+
declare function TooltipBase({ title, subtitle: category, grade, icon, mainInfos: mainTexts, subInfoGroups: subTexts, id, }: TooltipBaseProps): JSX.Element;
|
|
5
|
+
export default TooltipBase;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface TooltipBaseProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
grade: number;
|
|
7
|
+
icon?: string | JSX.Element;
|
|
8
|
+
mainInfos?: JSX.Element[];
|
|
9
|
+
subInfoGroups?: SubInfoGroup[];
|
|
10
|
+
}
|
|
11
|
+
export declare type SubInfoGroup = {
|
|
12
|
+
title: string | undefined;
|
|
13
|
+
texts: JSX.Element[];
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getButtonIconPath(button: string): string | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Skill } from "./ISkill";
|
|
2
|
+
export declare function BuildIconPath(iconPath: string, iconIndex?: number): string;
|
|
3
|
+
export declare function IsNullOrEmpty(property?: string): boolean;
|
|
4
|
+
export declare function ReplaceIconsInHtmlString(htmlString: string): string;
|
|
5
|
+
export declare function GetStatDisplayValue(value: number, percent: boolean): string;
|
|
6
|
+
export declare function ReplaceBossAndPvpAp(english: string): string;
|
|
7
|
+
export declare function GetRangeString(min: number, max?: number): string;
|
|
8
|
+
export declare function GetJobStyleNameString(jobstyle: string): string;
|
|
9
|
+
export declare function getNormalizedButton(skill: Skill): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface Skill {
|
|
2
|
+
ID: number;
|
|
3
|
+
Variation: number;
|
|
4
|
+
Name: string;
|
|
5
|
+
IconPath: string;
|
|
6
|
+
IconIndex: number;
|
|
7
|
+
GroupName: string;
|
|
8
|
+
GroupIcon: string;
|
|
9
|
+
Shortcut: string;
|
|
10
|
+
Tooltip: Tooltip;
|
|
11
|
+
SubTableDef: string;
|
|
12
|
+
AdditionalInfo: string;
|
|
13
|
+
Boundaries: Boundaries | null;
|
|
14
|
+
EqualizedPvp: string;
|
|
15
|
+
Pvp: string;
|
|
16
|
+
BreakValue: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Tooltip {
|
|
19
|
+
Main1: TooltipItem[];
|
|
20
|
+
Main2: TooltipItem[];
|
|
21
|
+
Sub: TooltipItem[];
|
|
22
|
+
Condition: TooltipItem[];
|
|
23
|
+
Stance: TooltipItem[];
|
|
24
|
+
}
|
|
25
|
+
export interface TooltipItem {
|
|
26
|
+
Text: string;
|
|
27
|
+
IconPath: string;
|
|
28
|
+
IconIndex: number;
|
|
29
|
+
}
|
|
30
|
+
export interface Boundaries {
|
|
31
|
+
Recycle: BoundaryItem;
|
|
32
|
+
Cast: BoundaryItem;
|
|
33
|
+
Range: BoundaryItem;
|
|
34
|
+
Distance: BoundaryItem;
|
|
35
|
+
}
|
|
36
|
+
export interface BoundaryItem {
|
|
37
|
+
Name: string;
|
|
38
|
+
Value: string;
|
|
39
|
+
Shape: string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as api from "../itemapiclient/api";
|
|
2
|
+
import { ServerRegion } from "./Models";
|
|
3
|
+
export declare class ItemDownloadClient {
|
|
4
|
+
private static urlBase;
|
|
5
|
+
private instance;
|
|
6
|
+
private patch;
|
|
7
|
+
private region;
|
|
8
|
+
constructor(region: ServerRegion, patch?: string);
|
|
9
|
+
GetNewItems(): Promise<api.BnsItemDto[]>;
|
|
10
|
+
GetModifiedItems(): Promise<api.BnsItemDto[]>;
|
|
11
|
+
GetItemByString(idlevelString: string): Promise<api.BnsItemDto>;
|
|
12
|
+
GetItem(id: number, level: number): Promise<api.BnsItemDto>;
|
|
13
|
+
GetItemsByCategory(category: string, technicalClassName: string, gradesString: string): Promise<api.BnsItemDto[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface PatchesList {
|
|
2
|
+
patches: {
|
|
3
|
+
[key: string]: PatchesListPatch;
|
|
4
|
+
};
|
|
5
|
+
highestIndex: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PatchesListPatch {
|
|
8
|
+
short: string;
|
|
9
|
+
text: string;
|
|
10
|
+
index: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ItemLookupFile {
|
|
13
|
+
lookup: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare enum ServerRegion {
|
|
18
|
+
EUNA = "EUNA",
|
|
19
|
+
Korea = "Korea"
|
|
20
|
+
}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import TooltipBase from "./TooltipBase/TooltipBase";
|
|
2
|
+
export { TooltipBase };
|
|
3
|
+
import ItemTooltip from "./ItemTooltip/ItemTooltip";
|
|
4
|
+
export { ItemTooltip };
|
|
5
|
+
import JsonTooltip from "./JsonTooltip/JsonTooltip";
|
|
6
|
+
export { JsonTooltip };
|
|
7
|
+
import ItemTooltipWrapper from "./ItemTooltipWrapper/ItemTooltipWrapper";
|
|
8
|
+
export { ItemTooltipWrapper };
|
|
9
|
+
import SkillTooltip from "./SkillTooltip/SkillTooltip";
|
|
10
|
+
export { SkillTooltip };
|
|
11
|
+
import SkillTooltipWrapper from "./SkillTooltipWrapper/SkillTooltipWrapper";
|
|
12
|
+
export { SkillTooltipWrapper };
|
|
13
|
+
import { ServerRegion } from "./Utilities/Models";
|
|
14
|
+
export { ServerRegion };
|