@rpg-engine/long-bow 0.8.153 → 0.8.155
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/long-bow.cjs.development.js +13 -6
- 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 +13 -6
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Marketplace/BlueprintTable.tsx +10 -3
- package/src/components/Marketplace/BuyPanel.tsx +6 -1
- package/src/components/Marketplace/HistoryPanel.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.155",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@capacitor/core": "^6.1.0",
|
|
86
86
|
"@rollup/plugin-image": "^2.1.1",
|
|
87
|
-
"@rpg-engine/shared": "
|
|
87
|
+
"@rpg-engine/shared": "0.10.93",
|
|
88
88
|
"dayjs": "^1.11.2",
|
|
89
89
|
"font-awesome": "^4.7.0",
|
|
90
90
|
"fs-extra": "^10.1.0",
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { IMarketplaceBlueprintSummary } from '@rpg-engine/shared';
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { IMarketplaceBlueprintSummary, ItemSubType } from '@rpg-engine/shared';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
|
|
5
5
|
|
|
6
|
+
const BLOCKED_SUBTYPES = new Set([ItemSubType.DeadBody]);
|
|
7
|
+
|
|
6
8
|
export interface IBlueprintTableProps {
|
|
7
9
|
blueprints: IMarketplaceBlueprintSummary[];
|
|
8
10
|
atlasJSON: any;
|
|
@@ -16,6 +18,11 @@ export const BlueprintTable: React.FC<IBlueprintTableProps> = ({
|
|
|
16
18
|
atlasIMG,
|
|
17
19
|
onSelect,
|
|
18
20
|
}) => {
|
|
21
|
+
const filteredBlueprints = useMemo(
|
|
22
|
+
() => blueprints.filter((b) => !BLOCKED_SUBTYPES.has(b.subType as ItemSubType)),
|
|
23
|
+
[blueprints]
|
|
24
|
+
);
|
|
25
|
+
|
|
19
26
|
return (
|
|
20
27
|
<>
|
|
21
28
|
<ResultsHeader>
|
|
@@ -24,7 +31,7 @@ export const BlueprintTable: React.FC<IBlueprintTableProps> = ({
|
|
|
24
31
|
<ColType>Type</ColType>
|
|
25
32
|
<ColTier>Tier</ColTier>
|
|
26
33
|
</ResultsHeader>
|
|
27
|
-
{
|
|
34
|
+
{filteredBlueprints.map((blueprint) => (
|
|
28
35
|
<ResultRow
|
|
29
36
|
key={blueprint.key}
|
|
30
37
|
$selectable={!!onSelect}
|
|
@@ -91,6 +91,7 @@ export const BuyPanel: React.FC<IBuyPanelProps> = ({
|
|
|
91
91
|
openBuyOrdersTotal = 0,
|
|
92
92
|
openBuyOrdersPage = 1,
|
|
93
93
|
onOpenBuyOrdersPageChange,
|
|
94
|
+
isLoading = false,
|
|
94
95
|
|
|
95
96
|
}) => {
|
|
96
97
|
const [name, setName] = useState('');
|
|
@@ -371,11 +372,15 @@ export const BuyPanel: React.FC<IBuyPanelProps> = ({
|
|
|
371
372
|
)}
|
|
372
373
|
|
|
373
374
|
<ItemComponentScrollWrapper id="MarketContainer" ref={itemsContainer}>
|
|
374
|
-
{
|
|
375
|
+
{isLoading ? (
|
|
375
376
|
<LoadingState>
|
|
376
377
|
<Spinner />
|
|
377
378
|
<LoadingText>Loading marketplace...</LoadingText>
|
|
378
379
|
</LoadingState>
|
|
380
|
+
) : !hasVisibleContent ? (
|
|
381
|
+
<LoadingState>
|
|
382
|
+
<LoadingText>No items listed.</LoadingText>
|
|
383
|
+
</LoadingState>
|
|
379
384
|
) : (
|
|
380
385
|
<>
|
|
381
386
|
{showSellSection && (
|
|
@@ -130,7 +130,7 @@ export const HistoryPanel: React.FC<IHistoryPanelProps> = ({
|
|
|
130
130
|
{tx.itemName ? (
|
|
131
131
|
<ItemName>
|
|
132
132
|
<Ellipsis maxLines={1} maxWidth="200px" fontSize="10px">
|
|
133
|
-
{tx.itemName}
|
|
133
|
+
{tx.qty && tx.qty > 1 ? `${tx.qty}x ${tx.itemName}` : tx.itemName}
|
|
134
134
|
</Ellipsis>
|
|
135
135
|
</ItemName>
|
|
136
136
|
) : (
|
|
@@ -160,7 +160,7 @@ export const HistoryPanel: React.FC<IHistoryPanelProps> = ({
|
|
|
160
160
|
|
|
161
161
|
{tx.goldAmount > 0 && (
|
|
162
162
|
<PriceSection>
|
|
163
|
-
{tx.
|
|
163
|
+
{tx.currency === 'dc' ? (
|
|
164
164
|
// Show DC only
|
|
165
165
|
<DCPriceRow>
|
|
166
166
|
{atlasIMG && atlasJSON && (
|