@rpg-engine/long-bow 0.4.6 → 0.4.8
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/dist/components/ConfirmModal.d.ts +8 -0
- package/dist/components/DraggableContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +7 -7
- package/dist/components/Marketplace/BuyPanel.d.ts +22 -0
- package/dist/components/Marketplace/ManagmentPanel.d.ts +18 -0
- package/dist/components/Marketplace/Marketplace.d.ts +22 -9
- package/dist/components/Marketplace/MarketplaceRows.d.ts +3 -1
- package/dist/components/Marketplace/{__mocks__ → filters}/index.d.ts +1 -3
- package/dist/components/Pager.d.ts +9 -0
- package/dist/components/SkillProgressBar.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +552 -147
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +552 -147
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ConfirmModal.tsx +87 -0
- package/src/components/DraggableContainer.tsx +3 -0
- package/src/components/Dropdown.tsx +14 -6
- package/src/components/Item/Inventory/ItemSlot.tsx +31 -16
- package/src/components/Marketplace/BuyPanel.tsx +296 -0
- package/src/components/Marketplace/ManagmentPanel.tsx +247 -0
- package/src/components/Marketplace/Marketplace.tsx +74 -100
- package/src/components/Marketplace/MarketplaceRows.tsx +82 -92
- package/src/components/Marketplace/{__mocks__ → filters}/index.tsx +13 -11
- package/src/components/Pager.tsx +94 -0
- package/src/components/SkillProgressBar.tsx +69 -4
- package/src/components/SkillsContainer.tsx +1 -0
- package/src/components/Spellbook/Spell.tsx +0 -1
- package/src/components/Spellbook/Spellbook.tsx +1 -17
- package/src/components/Spellbook/mockSpells.ts +68 -68
- package/src/components/shared/Ellipsis.tsx +10 -2
- package/src/mocks/skills.mocks.ts +2 -0
- package/src/stories/Marketplace.stories.tsx +22 -11
|
@@ -6,20 +6,20 @@ interface IProps {
|
|
|
6
6
|
slotIndex: number;
|
|
7
7
|
item: IItem | null;
|
|
8
8
|
itemContainer?: IItemContainer | null;
|
|
9
|
-
itemContainerType
|
|
9
|
+
itemContainerType?: ItemContainerType | null;
|
|
10
10
|
slotSpriteMask?: ItemSlotType | null;
|
|
11
|
-
onSelected
|
|
12
|
-
onMouseOver
|
|
11
|
+
onSelected?: (selectedOption: string, item: IItem) => void;
|
|
12
|
+
onMouseOver?: (event: any, slotIndex: number, item: IItem | null, x: number, y: number) => void;
|
|
13
13
|
onMouseOut?: () => void;
|
|
14
14
|
onPointerDown: (ItemType: ItemType, itemContainerType: ItemContainerType | null, item: IItem) => void;
|
|
15
|
-
onDragStart
|
|
16
|
-
onDragEnd
|
|
15
|
+
onDragStart?: (item: IItem, slotIndex: number, itemContainerType: ItemContainerType | null) => void;
|
|
16
|
+
onDragEnd?: (quantity?: number) => void;
|
|
17
17
|
onOutsideDrop?: (item: IItem, position: IPosition) => void;
|
|
18
18
|
dragScale?: number;
|
|
19
|
-
checkIfItemCanBeMoved
|
|
19
|
+
checkIfItemCanBeMoved?: () => boolean;
|
|
20
20
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
21
21
|
openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;
|
|
22
|
-
onPlaceDrop
|
|
22
|
+
onPlaceDrop?: (item: IItem | null, slotIndex: number, itemContainerType: ItemContainerType | null) => void;
|
|
23
23
|
atlasJSON: any;
|
|
24
24
|
atlasIMG: any;
|
|
25
25
|
isContextMenuDisabled?: boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IEquipmentSet, IMarketplaceItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IBuyPanelProps {
|
|
4
|
+
items: IMarketplaceItem[];
|
|
5
|
+
atlasJSON: any;
|
|
6
|
+
atlasIMG: any;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onChangeType: (value: string) => void;
|
|
9
|
+
onChangeRarity: (value: string) => void;
|
|
10
|
+
onChangeOrder: (value: string) => void;
|
|
11
|
+
onChangeNameInput: (value: string) => void;
|
|
12
|
+
onChangeMainLevelInput: (value: [number | undefined, number | undefined]) => void;
|
|
13
|
+
onChangeSecondaryLevelInput: (value: [number | undefined, number | undefined]) => void;
|
|
14
|
+
onChangePriceInput: (value: [number | undefined, number | undefined]) => void;
|
|
15
|
+
scale?: number;
|
|
16
|
+
equipmentSet?: IEquipmentSet | null;
|
|
17
|
+
onMarketPlaceItemBuy?: (marketPlaceItemId: string) => void;
|
|
18
|
+
characterId: string;
|
|
19
|
+
enableHotkeys?: () => void;
|
|
20
|
+
disableHotkeys?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const BuyPanel: React.FC<IBuyPanelProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IManagmentPanelProps {
|
|
4
|
+
items: IMarketplaceItem[];
|
|
5
|
+
atlasJSON: any;
|
|
6
|
+
atlasIMG: any;
|
|
7
|
+
onChangeNameInput: (value: string) => void;
|
|
8
|
+
equipmentSet?: IEquipmentSet | null;
|
|
9
|
+
availableGold: number;
|
|
10
|
+
onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;
|
|
11
|
+
selectedItemToSell: IItem | null;
|
|
12
|
+
onSelectedItemToSellRemove: (item: IItem) => void;
|
|
13
|
+
onAddItemToMarketplace: (item: IItem, price: number) => void;
|
|
14
|
+
enableHotkeys?: () => void;
|
|
15
|
+
disableHotkeys?: () => void;
|
|
16
|
+
onMoneyWithdraw: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const ManagmentPanel: React.FC<IManagmentPanelProps>;
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import { IEquipmentSet, IItem } from '@rpg-engine/shared';
|
|
2
|
-
import React
|
|
3
|
-
import { IOptionsProps } from '../Dropdown';
|
|
1
|
+
import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
export interface IMarketPlaceProps {
|
|
5
|
-
items:
|
|
4
|
+
items: IMarketplaceItem[];
|
|
6
5
|
atlasJSON: any;
|
|
7
6
|
atlasIMG: any;
|
|
8
|
-
optionsType: IOptionsProps[];
|
|
9
|
-
optionsRarity: IOptionsProps[];
|
|
10
|
-
optionsPrice: IOptionsProps[];
|
|
11
7
|
onClose: () => void;
|
|
12
8
|
onChangeType: (value: string) => void;
|
|
13
9
|
onChangeRarity: (value: string) => void;
|
|
14
10
|
onChangeOrder: (value: string) => void;
|
|
15
|
-
onChangeNameInput: (
|
|
11
|
+
onChangeNameInput: (value: string) => void;
|
|
12
|
+
onChangeMainLevelInput: (value: [number | undefined, number | undefined]) => void;
|
|
13
|
+
onChangeSecondaryLevelInput: (value: [number | undefined, number | undefined]) => void;
|
|
14
|
+
onChangePriceInput: (value: [number | undefined, number | undefined]) => void;
|
|
16
15
|
scale?: number;
|
|
17
16
|
equipmentSet?: IEquipmentSet | null;
|
|
18
|
-
|
|
17
|
+
onMarketPlaceItemBuy?: (marketPlaceItemId: string) => void;
|
|
18
|
+
onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;
|
|
19
|
+
availableGold: number;
|
|
20
|
+
selectedItemToSell: IItem | null;
|
|
21
|
+
onSelectedItemToSellRemove: (item: IItem) => void;
|
|
22
|
+
onYourPanelToggle: (yourPanel: boolean) => void;
|
|
23
|
+
onAddItemToMarketplace: (item: IItem, price: number) => void;
|
|
24
|
+
characterId: string;
|
|
25
|
+
enableHotkeys?: () => void;
|
|
26
|
+
disableHotkeys?: () => void;
|
|
27
|
+
onMoneyWithdraw: () => void;
|
|
28
|
+
totalItems: number;
|
|
29
|
+
currentPage: number;
|
|
30
|
+
itemsPerPage: number;
|
|
31
|
+
onPageChange: (page: number) => void;
|
|
19
32
|
}
|
|
20
33
|
export declare const Marketplace: React.FC<IMarketPlaceProps>;
|
|
@@ -7,6 +7,8 @@ export interface IMarketPlaceRowsPropos {
|
|
|
7
7
|
itemPrice: number;
|
|
8
8
|
equipmentSet?: IEquipmentSet | null;
|
|
9
9
|
scale?: number;
|
|
10
|
-
|
|
10
|
+
onMarketPlaceItemBuy?: () => void;
|
|
11
|
+
onMarketPlaceItemRemove?: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const MarketplaceRows: React.FC<IMarketPlaceRowsPropos>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IOptionsProps } from '../../Dropdown';
|
|
2
2
|
export declare enum OrderByType {
|
|
3
3
|
Name = "Name",
|
|
4
|
-
|
|
5
|
-
Price = "Price",
|
|
6
|
-
DateAdded = "Date Added"
|
|
4
|
+
Price = "Price"
|
|
7
5
|
}
|
|
8
6
|
export declare const itemTypeOptions: IOptionsProps[];
|
|
9
7
|
export declare const itemRarityOptions: IOptionsProps[];
|