@rpg-engine/long-bow 0.8.151 → 0.8.154
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 +16 -5
- 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 +16 -5
- 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/BuyOrderRows.tsx +14 -0
- package/src/components/Marketplace/HistoryPanel.tsx +2 -2
- package/src/stories/Features/marketplace/BuyOrderPanel.stories.tsx +3 -0
- package/src/stories/Features/marketplace/BuyOrderRows.stories.tsx +1 -0
- package/src/stories/Features/trading/Marketplace.stories.tsx +1 -0
|
@@ -44510,12 +44510,18 @@ var TabButton$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
|
44510
44510
|
return $active ? '#ffffff' : '#888888';
|
|
44511
44511
|
});
|
|
44512
44512
|
|
|
44513
|
+
var BLOCKED_SUBTYPES = /*#__PURE__*/new Set([shared.ItemSubType.DeadBody]);
|
|
44513
44514
|
var BlueprintTable = function BlueprintTable(_ref) {
|
|
44514
44515
|
var blueprints = _ref.blueprints,
|
|
44515
44516
|
atlasJSON = _ref.atlasJSON,
|
|
44516
44517
|
atlasIMG = _ref.atlasIMG,
|
|
44517
44518
|
onSelect = _ref.onSelect;
|
|
44518
|
-
|
|
44519
|
+
var filteredBlueprints = React.useMemo(function () {
|
|
44520
|
+
return blueprints.filter(function (b) {
|
|
44521
|
+
return !BLOCKED_SUBTYPES.has(b.subType);
|
|
44522
|
+
});
|
|
44523
|
+
}, [blueprints]);
|
|
44524
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ResultsHeader, null, React__default.createElement("span", null), React__default.createElement(ColName, null, "Name"), React__default.createElement(ColType, null, "Type"), React__default.createElement(ColTier, null, "Tier")), filteredBlueprints.map(function (blueprint) {
|
|
44519
44525
|
return React__default.createElement(ResultRow, {
|
|
44520
44526
|
key: blueprint.key,
|
|
44521
44527
|
"$selectable": !!onSelect,
|
|
@@ -45228,6 +45234,7 @@ var RARITY_COLORS = {
|
|
|
45228
45234
|
};
|
|
45229
45235
|
var STATUS_COLORS = (_STATUS_COLORS = {}, _STATUS_COLORS[shared.MarketplaceBuyOrderStatus.Active] = uiColors.lightGreen, _STATUS_COLORS[shared.MarketplaceBuyOrderStatus.Fulfilled] = uiColors.blue, _STATUS_COLORS[shared.MarketplaceBuyOrderStatus.Expired] = uiColors.cardinal, _STATUS_COLORS[shared.MarketplaceBuyOrderStatus.Cancelled] = uiColors.red, _STATUS_COLORS);
|
|
45230
45236
|
var BuyOrderRow = function BuyOrderRow(_ref) {
|
|
45237
|
+
var _buyOrder$stackQty;
|
|
45231
45238
|
var buyOrder = _ref.buyOrder,
|
|
45232
45239
|
atlasJSON = _ref.atlasJSON,
|
|
45233
45240
|
atlasIMG = _ref.atlasIMG,
|
|
@@ -45238,6 +45245,7 @@ var BuyOrderRow = function BuyOrderRow(_ref) {
|
|
|
45238
45245
|
showRequestTag = _ref$showRequestTag === void 0 ? false : _ref$showRequestTag,
|
|
45239
45246
|
_ref$requestTagLabel = _ref.requestTagLabel,
|
|
45240
45247
|
requestTagLabel = _ref$requestTagLabel === void 0 ? 'Buy Request' : _ref$requestTagLabel;
|
|
45248
|
+
var stackQty = (_buyOrder$stackQty = buyOrder.stackQty) != null ? _buyOrder$stackQty : buyOrder.quantity;
|
|
45241
45249
|
var timeRemaining = buyOrder.status === shared.MarketplaceBuyOrderStatus.Active ? getTimeRemaining(buyOrder.createdAt) : null;
|
|
45242
45250
|
var spriteKey = resolveAtlasSpriteKey(atlasJSON, buyOrder.itemBlueprintKey);
|
|
45243
45251
|
var rarityGlow = buyOrder.itemRarity ? RARITY_COLORS[buyOrder.itemRarity] || null : null;
|
|
@@ -45249,7 +45257,7 @@ var BuyOrderRow = function BuyOrderRow(_ref) {
|
|
|
45249
45257
|
spriteKey: spriteKey,
|
|
45250
45258
|
imgScale: 2,
|
|
45251
45259
|
imgClassname: "sprite-from-atlas-img--item"
|
|
45252
|
-
}) : React__default.createElement(SpritePlaceholder, null))), React__default.createElement(ItemDetails, null, React__default.createElement(ItemName$1, null, React__default.createElement(Ellipsis, {
|
|
45260
|
+
}) : React__default.createElement(SpritePlaceholder, null)), stackQty && stackQty > 1 && React__default.createElement(QuantityOverlay, null, "x", stackQty)), React__default.createElement(ItemDetails, null, React__default.createElement(ItemName$1, null, React__default.createElement(Ellipsis, {
|
|
45253
45261
|
maxLines: 1,
|
|
45254
45262
|
maxWidth: "200px",
|
|
45255
45263
|
fontSize: "10px"
|
|
@@ -45351,6 +45359,10 @@ var ActionSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
45351
45359
|
displayName: "BuyOrderRows__ActionSection",
|
|
45352
45360
|
componentId: "sc-zz5s5j-11"
|
|
45353
45361
|
})(["flex-shrink:0;margin-left:0.75rem;"]);
|
|
45362
|
+
var QuantityOverlay = /*#__PURE__*/styled__default.p.withConfig({
|
|
45363
|
+
displayName: "BuyOrderRows__QuantityOverlay",
|
|
45364
|
+
componentId: "sc-zz5s5j-12"
|
|
45365
|
+
})(["position:absolute;display:block;top:15px;left:-8px;font-size:", " !important;"], uiFonts.size.xsmall);
|
|
45354
45366
|
|
|
45355
45367
|
var BUY_ORDERS_PER_PAGE = 5;
|
|
45356
45368
|
var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
@@ -46409,7 +46421,6 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46409
46421
|
})), React__default.createElement(ScrollArea$1, {
|
|
46410
46422
|
id: "MarketContainer"
|
|
46411
46423
|
}, transactions.length === 0 ? React__default.createElement(EmptyState$4, null, "No transactions yet") : transactions.map(function (tx, index) {
|
|
46412
|
-
var _tx$metadata;
|
|
46413
46424
|
return React__default.createElement(RowWrapper$1, {
|
|
46414
46425
|
key: index,
|
|
46415
46426
|
"$even": index % 2 === 0,
|
|
@@ -46418,9 +46429,9 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46418
46429
|
maxLines: 1,
|
|
46419
46430
|
maxWidth: "200px",
|
|
46420
46431
|
fontSize: "10px"
|
|
46421
|
-
}, tx.itemName)) : React__default.createElement(ItemName$3, null, React__default.createElement(NoItemText, null, tx.type === shared.MarketplaceTransactionType.Withdrawal ? 'Gold Withdrawal' : '--')), React__default.createElement(MetaRow$1, null, React__default.createElement(Label$5, {
|
|
46432
|
+
}, tx.qty && tx.qty > 1 ? tx.qty + "x " + tx.itemName : tx.itemName)) : React__default.createElement(ItemName$3, null, React__default.createElement(NoItemText, null, tx.type === shared.MarketplaceTransactionType.Withdrawal ? 'Gold Withdrawal' : '--')), React__default.createElement(MetaRow$1, null, React__default.createElement(Label$5, {
|
|
46422
46433
|
"$bg": TRANSACTION_TYPE_COLORS$1[tx.type]
|
|
46423
|
-
}, formatTransactionLabel(tx.type)), React__default.createElement(SecondaryText, null, formatDate(tx.createdAt)), tx.counterpartName && React__default.createElement(SecondaryText, null, "w/ ", tx.counterpartName)))), tx.goldAmount > 0 && React__default.createElement(PriceSection, null,
|
|
46434
|
+
}, formatTransactionLabel(tx.type)), React__default.createElement(SecondaryText, null, formatDate(tx.createdAt)), tx.counterpartName && React__default.createElement(SecondaryText, null, "w/ ", tx.counterpartName)))), tx.goldAmount > 0 && React__default.createElement(PriceSection, null, tx.currency === 'dc' ?
|
|
46424
46435
|
// Show DC only
|
|
46425
46436
|
React__default.createElement(DCPriceRow$1, null, atlasIMG && atlasJSON && React__default.createElement(DCCoinWrapper$1, null, React__default.createElement(SimpleTooltip, {
|
|
46426
46437
|
content: "Definya Coin",
|