@rpg-engine/long-bow 0.8.155 → 0.8.156
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/BuyPanel.d.ts +1 -0
- package/dist/components/Marketplace/Marketplace.d.ts +1 -0
- package/dist/components/Marketplace/MarketplaceRows.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +40 -28
- 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 +40 -28
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Marketplace/BuyPanel.tsx +32 -27
- package/src/components/Marketplace/Marketplace.tsx +1 -0
- package/src/components/Marketplace/MarketplaceRows.tsx +16 -3
- package/src/stories/Features/trading/Marketplace.stories.tsx +7 -1
package/dist/long-bow.esm.js
CHANGED
|
@@ -45701,6 +45701,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
45701
45701
|
scale = _ref.scale,
|
|
45702
45702
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
45703
45703
|
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
45704
|
+
onDCCoinClick = _ref.onDCCoinClick,
|
|
45704
45705
|
disabled = _ref.disabled;
|
|
45705
45706
|
var renderGems = function renderGems(item) {
|
|
45706
45707
|
return item.attachedGems && onRenderGems(item);
|
|
@@ -45736,8 +45737,11 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
45736
45737
|
atlasJSON: atlasJSON,
|
|
45737
45738
|
spriteKey: "others/gold-coin-qty-5.png",
|
|
45738
45739
|
imgScale: 1
|
|
45739
|
-
}))), React.createElement(GoldPrice$1, null, itemPrice)), dcEquivalentPrice !== undefined && React.createElement(DCPriceRow,
|
|
45740
|
-
|
|
45740
|
+
}))), React.createElement(GoldPrice$1, null, itemPrice)), dcEquivalentPrice !== undefined && React.createElement(DCPriceRow, {
|
|
45741
|
+
"$clickable": !!onDCCoinClick,
|
|
45742
|
+
onPointerDown: onDCCoinClick
|
|
45743
|
+
}, React.createElement(DCCoinWrapper, null, React.createElement(SimpleTooltip, {
|
|
45744
|
+
content: onDCCoinClick ? 'Buy Definya Coin' : 'Definya Coin',
|
|
45741
45745
|
direction: "top"
|
|
45742
45746
|
}, React.createElement(SpriteFromAtlas, {
|
|
45743
45747
|
atlasIMG: atlasIMG,
|
|
@@ -45772,7 +45776,8 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
|
|
|
45772
45776
|
dcToGoldSwapRate = _ref2$dcToGoldSwapRat === void 0 ? 0 : _ref2$dcToGoldSwapRat,
|
|
45773
45777
|
getDCEquivalentPrice = _ref2.getDCEquivalentPrice,
|
|
45774
45778
|
characterId = _ref2.characterId,
|
|
45775
|
-
onBuy = _ref2.onBuy
|
|
45779
|
+
onBuy = _ref2.onBuy,
|
|
45780
|
+
onDCCoinClick = _ref2.onDCCoinClick;
|
|
45776
45781
|
var _useState = useState(false),
|
|
45777
45782
|
expanded = _useState[0],
|
|
45778
45783
|
setExpanded = _useState[1];
|
|
@@ -45793,6 +45798,7 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
|
|
|
45793
45798
|
onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
|
|
45794
45799
|
return onBuy(bestListing._id);
|
|
45795
45800
|
},
|
|
45801
|
+
onDCCoinClick: onDCCoinClick,
|
|
45796
45802
|
disabled: bestListing.owner === characterId
|
|
45797
45803
|
}), hasMultiple && React.createElement(GroupMeta, null, React.createElement(OfferBadge, null, totalOffers, " offers"), React.createElement(Chevron, {
|
|
45798
45804
|
expanded: expanded
|
|
@@ -45808,6 +45814,7 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
|
|
|
45808
45814
|
onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
|
|
45809
45815
|
return onBuy(listing._id);
|
|
45810
45816
|
},
|
|
45817
|
+
onDCCoinClick: onDCCoinClick,
|
|
45811
45818
|
disabled: listing.owner === characterId
|
|
45812
45819
|
});
|
|
45813
45820
|
})));
|
|
@@ -45881,7 +45888,13 @@ var GoldPrice$1 = /*#__PURE__*/styled.span.withConfig({
|
|
|
45881
45888
|
var DCPriceRow = /*#__PURE__*/styled.div.withConfig({
|
|
45882
45889
|
displayName: "MarketplaceRows__DCPriceRow",
|
|
45883
45890
|
componentId: "sc-wmpr1o-15"
|
|
45884
|
-
})(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;"])
|
|
45891
|
+
})(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;cursor:", ";border-radius:4px;transition:opacity 0.15s;&:hover{opacity:", ";}"], function (_ref5) {
|
|
45892
|
+
var $clickable = _ref5.$clickable;
|
|
45893
|
+
return $clickable ? 'pointer' : 'default';
|
|
45894
|
+
}, function (_ref6) {
|
|
45895
|
+
var $clickable = _ref6.$clickable;
|
|
45896
|
+
return $clickable ? '0.75' : '1';
|
|
45897
|
+
});
|
|
45885
45898
|
var DCCoinWrapper = /*#__PURE__*/styled.span.withConfig({
|
|
45886
45899
|
displayName: "MarketplaceRows__DCCoinWrapper",
|
|
45887
45900
|
componentId: "sc-wmpr1o-16"
|
|
@@ -45905,14 +45918,14 @@ var GemContainer = /*#__PURE__*/styled.p.withConfig({
|
|
|
45905
45918
|
var RarityContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45906
45919
|
displayName: "MarketplaceRows__RarityContainer",
|
|
45907
45920
|
componentId: "sc-wmpr1o-21"
|
|
45908
|
-
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (
|
|
45909
|
-
var item =
|
|
45921
|
+
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref7) {
|
|
45922
|
+
var item = _ref7.item;
|
|
45910
45923
|
return rarityColor(item);
|
|
45911
|
-
}, function (
|
|
45912
|
-
var item =
|
|
45924
|
+
}, function (_ref8) {
|
|
45925
|
+
var item = _ref8.item;
|
|
45913
45926
|
return "0 0 5px 8px " + rarityColor(item);
|
|
45914
|
-
}, function (
|
|
45915
|
-
var item =
|
|
45927
|
+
}, function (_ref9) {
|
|
45928
|
+
var item = _ref9.item;
|
|
45916
45929
|
return "0 0 8px 6px " + rarityColor(item);
|
|
45917
45930
|
});
|
|
45918
45931
|
|
|
@@ -45980,6 +45993,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
45980
45993
|
equipmentSet = _ref.equipmentSet,
|
|
45981
45994
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
45982
45995
|
onFulfillBuyOrder = _ref.onFulfillBuyOrder,
|
|
45996
|
+
onDCCoinClick = _ref.onDCCoinClick,
|
|
45983
45997
|
characterId = _ref.characterId,
|
|
45984
45998
|
enableHotkeys = _ref.enableHotkeys,
|
|
45985
45999
|
disableHotkeys = _ref.disableHotkeys,
|
|
@@ -46006,7 +46020,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46006
46020
|
var _useState2 = useState(false),
|
|
46007
46021
|
showFilters = _useState2[0],
|
|
46008
46022
|
setShowFilters = _useState2[1];
|
|
46009
|
-
var _useState3 = useState('
|
|
46023
|
+
var _useState3 = useState('sell'),
|
|
46010
46024
|
browseMode = _useState3[0],
|
|
46011
46025
|
setBrowseMode = _useState3[1];
|
|
46012
46026
|
var _useState4 = useState(''),
|
|
@@ -46080,8 +46094,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46080
46094
|
return true;
|
|
46081
46095
|
});
|
|
46082
46096
|
}, [name, openBuyOrders, price, selectedRarity]);
|
|
46083
|
-
var showSellSection = browseMode === '
|
|
46084
|
-
var showBuySection = browseMode === '
|
|
46097
|
+
var showSellSection = browseMode === 'sell';
|
|
46098
|
+
var showBuySection = browseMode === 'buy';
|
|
46085
46099
|
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && visibleBuyOrders.length > 0;
|
|
46086
46100
|
return React.createElement(React.Fragment, null, buyingItemId && buyingItem && hasDCBalance && React.createElement(MarketplaceBuyModal, {
|
|
46087
46101
|
goldPrice: buyingItem.price,
|
|
@@ -46117,9 +46131,6 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46117
46131
|
return setBrowseMode(value);
|
|
46118
46132
|
},
|
|
46119
46133
|
options: [{
|
|
46120
|
-
id: 'all',
|
|
46121
|
-
label: 'All'
|
|
46122
|
-
}, {
|
|
46123
46134
|
id: 'sell',
|
|
46124
46135
|
label: 'Sell Offers'
|
|
46125
46136
|
}, {
|
|
@@ -46251,14 +46262,10 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46251
46262
|
dcToGoldSwapRate: dcToGoldSwapRate,
|
|
46252
46263
|
getDCEquivalentPrice: getDCEquivalentPrice,
|
|
46253
46264
|
characterId: characterId,
|
|
46254
|
-
onBuy: setBuyingItemId
|
|
46265
|
+
onBuy: setBuyingItemId,
|
|
46266
|
+
onDCCoinClick: onDCCoinClick
|
|
46255
46267
|
});
|
|
46256
|
-
}),
|
|
46257
|
-
totalItems: totalItems,
|
|
46258
|
-
currentPage: currentPage,
|
|
46259
|
-
itemsPerPage: itemsPerPage,
|
|
46260
|
-
onPageChange: onPageChange
|
|
46261
|
-
}))), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, visibleBuyOrders.length, " visible")), visibleBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : visibleBuyOrders.map(function (order) {
|
|
46268
|
+
})), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, visibleBuyOrders.length, " visible")), visibleBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : visibleBuyOrders.map(function (order) {
|
|
46262
46269
|
return React.createElement(BuyOrderRow, {
|
|
46263
46270
|
key: order._id,
|
|
46264
46271
|
buyOrder: order,
|
|
@@ -46267,12 +46274,17 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46267
46274
|
onFulfill: setFulfillingBuyOrderId,
|
|
46268
46275
|
showRequestTag: true
|
|
46269
46276
|
});
|
|
46270
|
-
}),
|
|
46277
|
+
})))), React.createElement(PagerFooter, null, showSellSection && totalItems > itemsPerPage && React.createElement(Pager, {
|
|
46278
|
+
totalItems: totalItems,
|
|
46279
|
+
currentPage: currentPage,
|
|
46280
|
+
itemsPerPage: itemsPerPage,
|
|
46281
|
+
onPageChange: onPageChange
|
|
46282
|
+
}), showBuySection && openBuyOrdersTotal > BUY_REQUESTS_PER_PAGE && React.createElement(Pager, {
|
|
46271
46283
|
totalItems: openBuyOrdersTotal,
|
|
46272
46284
|
currentPage: openBuyOrdersPage,
|
|
46273
46285
|
itemsPerPage: BUY_REQUESTS_PER_PAGE,
|
|
46274
46286
|
onPageChange: onOpenBuyOrdersPageChange != null ? onOpenBuyOrdersPageChange : function () {}
|
|
46275
|
-
})))
|
|
46287
|
+
})));
|
|
46276
46288
|
};
|
|
46277
46289
|
var ToolbarRow = /*#__PURE__*/styled.div.withConfig({
|
|
46278
46290
|
displayName: "BuyPanel__ToolbarRow",
|
|
@@ -46338,10 +46350,10 @@ var SectionEmpty = /*#__PURE__*/styled.div.withConfig({
|
|
|
46338
46350
|
displayName: "BuyPanel__SectionEmpty",
|
|
46339
46351
|
componentId: "sc-1si8t7i-12"
|
|
46340
46352
|
})(["min-height:56px;display:flex;align-items:center;justify-content:center;color:#71717a;font-size:0.48rem;text-transform:uppercase;letter-spacing:1px;background:rgba(255,255,255,0.03);border:1px dashed rgba(255,255,255,0.08);border-radius:6px;"]);
|
|
46341
|
-
var
|
|
46342
|
-
displayName: "
|
|
46353
|
+
var PagerFooter = /*#__PURE__*/styled.div.withConfig({
|
|
46354
|
+
displayName: "BuyPanel__PagerFooter",
|
|
46343
46355
|
componentId: "sc-1si8t7i-13"
|
|
46344
|
-
})(["display:flex;justify-content:center;
|
|
46356
|
+
})(["display:flex;justify-content:center;align-items:center;padding:8px 0 4px;min-height:36px;width:95%;margin:0 auto;"]);
|
|
46345
46357
|
var StyledDropdown$4 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
46346
46358
|
displayName: "BuyPanel__StyledDropdown",
|
|
46347
46359
|
componentId: "sc-1si8t7i-14"
|