@rpg-engine/long-bow 0.8.141 → 0.8.145
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/Marketplace/BlueprintSearchModal.d.ts +17 -0
- package/dist/components/Marketplace/BuyOrderDetailsModal.d.ts +17 -0
- package/dist/components/Marketplace/BuyOrderPanel.d.ts +24 -0
- package/dist/components/Marketplace/BuyOrderRows.d.ts +13 -0
- package/dist/components/Marketplace/BuyPanel.d.ts +9 -1
- package/dist/components/Marketplace/HistoryPanel.d.ts +18 -0
- package/dist/components/Marketplace/ManagmentPanel.d.ts +3 -2
- package/dist/components/Marketplace/Marketplace.d.ts +35 -2
- package/dist/components/Marketplace/MarketplaceSettingsPanel.d.ts +2 -1
- package/dist/components/Store/PaymentMethodModal.d.ts +1 -0
- package/dist/components/shared/LabelPill/LabelPill.d.ts +9 -0
- package/dist/components/shared/LabelPill/index.d.ts +1 -0
- package/dist/components/shared/SegmentedToggle/SegmentedToggle.d.ts +12 -0
- package/dist/components/shared/SegmentedToggle/index.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/long-bow.cjs.development.js +11529 -1288
- 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 +11518 -1290
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/Features/marketplace/BlueprintSearchModal.stories.d.ts +1 -0
- package/dist/stories/Features/marketplace/BuyOrderPanel.stories.d.ts +1 -0
- package/dist/stories/Features/marketplace/BuyOrderRows.stories.d.ts +1 -0
- package/dist/stories/Features/marketplace/HistoryPanel.stories.d.ts +1 -0
- package/dist/stories/Features/trading/MarketplaceRows.stories.d.ts +2 -1
- package/dist/stories/UI/buttonsAndInputs/SegmentedToggle.stories.d.ts +6 -0
- package/dist/stories/UI/text/LabelPill.stories.d.ts +7 -0
- package/dist/utils/atlasUtils.d.ts +2 -0
- package/package.json +2 -2
- package/src/components/Marketplace/BlueprintSearchModal.tsx +418 -0
- package/src/components/Marketplace/BuyOrderDetailsModal.tsx +307 -0
- package/src/components/Marketplace/BuyOrderPanel.tsx +266 -0
- package/src/components/Marketplace/BuyOrderRows.tsx +287 -0
- package/src/components/Marketplace/BuyPanel.tsx +406 -166
- package/src/components/Marketplace/HistoryPanel.tsx +422 -0
- package/src/components/Marketplace/ManagmentPanel.tsx +13 -15
- package/src/components/Marketplace/Marketplace.tsx +181 -30
- package/src/components/Marketplace/MarketplaceBuyModal.tsx +1 -0
- package/src/components/Marketplace/MarketplaceRows.tsx +41 -10
- package/src/components/Marketplace/MarketplaceSettingsPanel.tsx +4 -3
- package/src/components/Store/CartView.tsx +11 -0
- package/src/components/Store/PaymentMethodModal.tsx +26 -9
- package/src/components/shared/LabelPill/LabelPill.tsx +45 -0
- package/src/components/shared/LabelPill/index.ts +1 -0
- package/src/components/shared/SegmentedToggle/SegmentedToggle.tsx +61 -0
- package/src/components/shared/SegmentedToggle/index.ts +1 -0
- package/src/components/shared/SpriteFromAtlas.tsx +7 -2
- package/src/index.tsx +4 -0
- package/src/mocks/atlas/items/items.json +33998 -25238
- package/src/mocks/atlas/items/items.png +0 -0
- package/src/mocks/itemContainer.mocks.ts +31 -0
- package/src/stories/Features/marketplace/BlueprintSearchModal.stories.tsx +145 -0
- package/src/stories/Features/marketplace/BuyOrderPanel.stories.tsx +207 -0
- package/src/stories/Features/marketplace/BuyOrderRows.stories.tsx +116 -0
- package/src/stories/Features/marketplace/HistoryPanel.stories.tsx +157 -0
- package/src/stories/Features/trading/Marketplace.stories.tsx +107 -0
- package/src/stories/Features/trading/MarketplaceRows.stories.tsx +11 -0
- package/src/stories/UI/buttonsAndInputs/SegmentedToggle.stories.tsx +54 -0
- package/src/stories/UI/text/LabelPill.stories.tsx +43 -0
- package/src/utils/__test__/atlasUtils.spec.ts +26 -0
- package/src/utils/atlasUtils.ts +80 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMarketplaceBlueprintSearchRequest, IMarketplaceBlueprintSummary } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IBlueprintSearchModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSelect: (blueprint: IMarketplaceBlueprintSummary) => void;
|
|
7
|
+
onSearch: (request: IMarketplaceBlueprintSearchRequest) => void;
|
|
8
|
+
blueprints: IMarketplaceBlueprintSummary[];
|
|
9
|
+
totalCount: number;
|
|
10
|
+
currentPage: number;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
atlasJSON: any;
|
|
13
|
+
atlasIMG: any;
|
|
14
|
+
}
|
|
15
|
+
declare const BLUEPRINTS_PER_PAGE = 10;
|
|
16
|
+
export declare const BlueprintSearchModal: React.FC<IBlueprintSearchModalProps>;
|
|
17
|
+
export { BLUEPRINTS_PER_PAGE };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMarketplaceBlueprintSummary } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IBuyOrderDetailsModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
blueprint: IMarketplaceBlueprintSummary | null;
|
|
7
|
+
quantity: number;
|
|
8
|
+
maxPrice: number;
|
|
9
|
+
rarity: string;
|
|
10
|
+
onQuantityChange: (quantity: number) => void;
|
|
11
|
+
onMaxPriceChange: (price: number) => void;
|
|
12
|
+
onRarityChange: (rarity: string) => void;
|
|
13
|
+
onConfirm: () => void;
|
|
14
|
+
atlasJSON: any;
|
|
15
|
+
atlasIMG: any;
|
|
16
|
+
}
|
|
17
|
+
export declare const BuyOrderDetailsModal: React.FC<IBuyOrderDetailsModalProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IMarketplaceBlueprintSummary, IMarketplaceBuyOrderItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IBuyOrderPanelProps {
|
|
4
|
+
atlasJSON?: any;
|
|
5
|
+
atlasIMG?: any;
|
|
6
|
+
selectedBlueprint?: IMarketplaceBlueprintSummary;
|
|
7
|
+
onOpenBlueprintSearch: () => void;
|
|
8
|
+
onCloseDetails?: () => void;
|
|
9
|
+
onQuantityChange: (quantity: number) => void;
|
|
10
|
+
onMaxPriceChange: (price: number) => void;
|
|
11
|
+
onRarityChange: (rarity: string) => void;
|
|
12
|
+
onPlaceBuyOrder: () => void;
|
|
13
|
+
currentQuantity: number;
|
|
14
|
+
currentMaxPrice: number;
|
|
15
|
+
selectedRarity: string;
|
|
16
|
+
yourBuyOrders: IMarketplaceBuyOrderItem[];
|
|
17
|
+
yourBuyOrdersTotal: number;
|
|
18
|
+
yourBuyOrdersPage: number;
|
|
19
|
+
onYourBuyOrdersPageChange: (page: number) => void;
|
|
20
|
+
onCancelBuyOrder: (buyOrderId: string) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const BUY_ORDERS_PER_PAGE = 5;
|
|
23
|
+
export declare const BuyOrderPanel: React.FC<IBuyOrderPanelProps>;
|
|
24
|
+
export { BUY_ORDERS_PER_PAGE };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IMarketplaceBuyOrderItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IBuyOrderRowProps {
|
|
4
|
+
buyOrder: IMarketplaceBuyOrderItem;
|
|
5
|
+
atlasJSON?: any;
|
|
6
|
+
atlasIMG?: any;
|
|
7
|
+
isOwn?: boolean;
|
|
8
|
+
onCancel?: (buyOrderId: string) => void;
|
|
9
|
+
onFulfill?: (buyOrderId: string) => void;
|
|
10
|
+
showRequestTag?: boolean;
|
|
11
|
+
requestTagLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const BuyOrderRow: React.FC<IBuyOrderRowProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEquipmentSet, IMarketplaceItem } from '@rpg-engine/shared';
|
|
1
|
+
import { IEquipmentSet, IMarketplaceBuyOrderItem, IMarketplaceItem } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MarketplacePaymentMethod } from './MarketplaceBuyModal';
|
|
4
4
|
export interface IBuyPanelProps {
|
|
@@ -16,11 +16,19 @@ export interface IBuyPanelProps {
|
|
|
16
16
|
scale?: number;
|
|
17
17
|
equipmentSet?: IEquipmentSet | null;
|
|
18
18
|
onMarketPlaceItemBuy?: (marketPlaceItemId: string, paymentMethod?: MarketplacePaymentMethod) => void;
|
|
19
|
+
onFulfillBuyOrder?: (buyOrderId: string) => void;
|
|
19
20
|
characterId: string;
|
|
20
21
|
enableHotkeys?: () => void;
|
|
21
22
|
disableHotkeys?: () => void;
|
|
23
|
+
totalItems: number;
|
|
22
24
|
currentPage: number;
|
|
25
|
+
itemsPerPage: number;
|
|
26
|
+
onPageChange: (page: number) => void;
|
|
23
27
|
dcBalance?: number;
|
|
24
28
|
dcToGoldSwapRate?: number;
|
|
29
|
+
openBuyOrders?: IMarketplaceBuyOrderItem[];
|
|
30
|
+
openBuyOrdersTotal?: number;
|
|
31
|
+
openBuyOrdersPage?: number;
|
|
32
|
+
onOpenBuyOrdersPageChange?: (page: number) => void;
|
|
25
33
|
}
|
|
26
34
|
export declare const BuyPanel: React.FC<IBuyPanelProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IMarketplaceTransaction } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IHistoryPanelProps {
|
|
4
|
+
transactions: IMarketplaceTransaction[];
|
|
5
|
+
totalCount: number;
|
|
6
|
+
currentPage: number;
|
|
7
|
+
itemsPerPage: number;
|
|
8
|
+
selectedType: string;
|
|
9
|
+
onTypeChange: (type: string) => void;
|
|
10
|
+
onPageChange: (page: number) => void;
|
|
11
|
+
atlasJSON?: any;
|
|
12
|
+
atlasIMG?: any;
|
|
13
|
+
dcToGoldSwapRate?: number;
|
|
14
|
+
}
|
|
15
|
+
declare const HISTORY_ITEMS_PER_PAGE = 10;
|
|
16
|
+
declare const TRANSACTION_TYPE_FILTER_ALL = "All";
|
|
17
|
+
export declare const HistoryPanel: React.FC<IHistoryPanelProps>;
|
|
18
|
+
export { HISTORY_ITEMS_PER_PAGE, TRANSACTION_TYPE_FILTER_ALL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';
|
|
1
|
+
import { IEquipmentSet, IItem, IMarketplaceItem, MarketplaceAcceptedCurrency } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export interface IManagmentPanelProps {
|
|
4
4
|
items: IMarketplaceItem[];
|
|
@@ -10,7 +10,8 @@ export interface IManagmentPanelProps {
|
|
|
10
10
|
onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;
|
|
11
11
|
selectedItemToSell: IItem | null;
|
|
12
12
|
onSelectedItemToSellRemove: (item: IItem) => void;
|
|
13
|
-
onAddItemToMarketplace: (item: IItem, price: number) => void;
|
|
13
|
+
onAddItemToMarketplace: (item: IItem, price: number, acceptedCurrency?: MarketplaceAcceptedCurrency) => void;
|
|
14
|
+
acceptedCurrency?: MarketplaceAcceptedCurrency;
|
|
14
15
|
enableHotkeys?: () => void;
|
|
15
16
|
disableHotkeys?: () => void;
|
|
16
17
|
onMoneyWithdraw: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';
|
|
1
|
+
import { IEquipmentSet, IItem, IMarketplaceBlueprintSearchRequest, IMarketplaceBlueprintSummary, IMarketplaceBuyOrderItem, IMarketplaceItem, IMarketplaceTransaction } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MarketplacePaymentMethod } from './MarketplaceBuyModal';
|
|
4
4
|
import { MarketplaceAcceptedCurrency } from './MarketplaceSettingsPanel';
|
|
@@ -17,12 +17,13 @@ export interface IMarketPlaceProps {
|
|
|
17
17
|
scale?: number;
|
|
18
18
|
equipmentSet?: IEquipmentSet | null;
|
|
19
19
|
onMarketPlaceItemBuy?: (marketPlaceItemId: string, paymentMethod?: MarketplacePaymentMethod) => void;
|
|
20
|
+
onFulfillBuyOrder?: (buyOrderId: string) => void;
|
|
20
21
|
onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;
|
|
21
22
|
availableGold: number;
|
|
22
23
|
selectedItemToSell: IItem | null;
|
|
23
24
|
onSelectedItemToSellRemove: (item: IItem) => void;
|
|
24
25
|
onYourPanelToggle: (yourPanel: boolean) => void;
|
|
25
|
-
onAddItemToMarketplace: (item: IItem, price: number) => void;
|
|
26
|
+
onAddItemToMarketplace: (item: IItem, price: number, acceptedCurrency?: MarketplaceAcceptedCurrency) => void;
|
|
26
27
|
characterId: string;
|
|
27
28
|
enableHotkeys?: () => void;
|
|
28
29
|
disableHotkeys?: () => void;
|
|
@@ -35,5 +36,37 @@ export interface IMarketPlaceProps {
|
|
|
35
36
|
dcToGoldSwapRate?: number;
|
|
36
37
|
acceptedCurrency?: MarketplaceAcceptedCurrency;
|
|
37
38
|
onAcceptedCurrencyChange?: (value: MarketplaceAcceptedCurrency) => void;
|
|
39
|
+
onActiveTabChange?: (tab: string) => void;
|
|
40
|
+
buyOrderSelectedBlueprint?: IMarketplaceBlueprintSummary;
|
|
41
|
+
buyOrderQuantity?: number;
|
|
42
|
+
buyOrderMaxPrice?: number;
|
|
43
|
+
buyOrderSelectedRarity?: string;
|
|
44
|
+
onBuyOrderQuantityChange?: (quantity: number) => void;
|
|
45
|
+
onBuyOrderMaxPriceChange?: (price: number) => void;
|
|
46
|
+
onBuyOrderRarityChange?: (rarity: string) => void;
|
|
47
|
+
onPlaceBuyOrder?: () => void;
|
|
48
|
+
onClearBuyOrderBlueprint?: () => void;
|
|
49
|
+
yourBuyOrders?: IMarketplaceBuyOrderItem[];
|
|
50
|
+
yourBuyOrdersTotal?: number;
|
|
51
|
+
yourBuyOrdersPage?: number;
|
|
52
|
+
onYourBuyOrdersPageChange?: (page: number) => void;
|
|
53
|
+
onCancelBuyOrder?: (buyOrderId: string) => void;
|
|
54
|
+
openBuyOrders?: IMarketplaceBuyOrderItem[];
|
|
55
|
+
openBuyOrdersTotal?: number;
|
|
56
|
+
openBuyOrdersPage?: number;
|
|
57
|
+
onOpenBuyOrdersPageChange?: (page: number) => void;
|
|
58
|
+
onBlueprintSearch?: (request: IMarketplaceBlueprintSearchRequest) => void;
|
|
59
|
+
onBlueprintSelect?: (blueprint: IMarketplaceBlueprintSummary) => void;
|
|
60
|
+
blueprintSearchResults?: IMarketplaceBlueprintSummary[];
|
|
61
|
+
blueprintSearchTotalCount?: number;
|
|
62
|
+
blueprintSearchCurrentPage?: number;
|
|
63
|
+
blueprintSearchIsLoading?: boolean;
|
|
64
|
+
historyTransactions?: IMarketplaceTransaction[];
|
|
65
|
+
historyTotalCount?: number;
|
|
66
|
+
historyCurrentPage?: number;
|
|
67
|
+
historyItemsPerPage?: number;
|
|
68
|
+
historySelectedType?: string;
|
|
69
|
+
onHistoryTypeChange?: (type: string) => void;
|
|
70
|
+
onHistoryPageChange?: (page: number) => void;
|
|
38
71
|
}
|
|
39
72
|
export declare const Marketplace: React.FC<IMarketPlaceProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { MarketplaceAcceptedCurrency } from '@rpg-engine/shared';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
export
|
|
3
|
+
export { MarketplaceAcceptedCurrency };
|
|
3
4
|
export interface IMarketplaceSettingsPanelProps {
|
|
4
5
|
acceptedCurrency: MarketplaceAcceptedCurrency;
|
|
5
6
|
onAcceptedCurrencyChange: (value: MarketplaceAcceptedCurrency) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LabelPill';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ISegmentedToggleOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface ISegmentedToggleProps {
|
|
7
|
+
options: ISegmentedToggleOption[];
|
|
8
|
+
activeId: string;
|
|
9
|
+
onChange: (id: string) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const SegmentedToggle: React.FC<ISegmentedToggleProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SegmentedToggle';
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export * from './components/Marketplace/Marketplace';
|
|
|
38
38
|
export * from './components/Marketplace/MarketplaceBuyModal';
|
|
39
39
|
export * from './components/Marketplace/MarketplaceRows';
|
|
40
40
|
export * from './components/Marketplace/MarketplaceSettingsPanel';
|
|
41
|
+
export * from './components/Marketplace/BuyOrderPanel';
|
|
42
|
+
export * from './components/Marketplace/BuyOrderRows';
|
|
43
|
+
export * from './components/Marketplace/HistoryPanel';
|
|
44
|
+
export * from './components/Marketplace/BlueprintSearchModal';
|
|
41
45
|
export * from './components/Multitab/TabBody';
|
|
42
46
|
export * from './components/Multitab/TabsContainer';
|
|
43
47
|
export * from './components/NPCDialog/NPCDialog';
|