@rpg-engine/long-bow 0.8.161 → 0.8.162
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/BuyOrderRows.d.ts +11 -0
- package/dist/components/Marketplace/GroupedRowContainer.d.ts +7 -0
- package/dist/components/shared/ItemRowWrapper.d.ts +3 -0
- package/dist/long-bow.cjs.development.js +256 -165
- 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 +256 -166
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Marketplace/BuyOrderRows.tsx +53 -16
- package/src/components/Marketplace/BuyPanel.tsx +140 -114
- package/src/components/Marketplace/GroupedRowContainer.tsx +86 -0
- package/src/components/Marketplace/MarketplaceRows.tsx +24 -125
- package/src/components/Store/Store.tsx +22 -18
- package/src/components/Store/StoreItemRow.tsx +28 -33
- package/src/components/Store/sections/StoreItemsSection.tsx +7 -13
- package/src/components/Store/sections/StorePacksSection.tsx +19 -21
- package/src/components/shared/ItemRowWrapper.tsx +22 -0
- package/src/stories/Features/trading/Marketplace.stories.tsx +18 -5
package/dist/long-bow.esm.js
CHANGED
|
@@ -27,6 +27,9 @@ import { Delete } from 'pixelarticons/react/Delete';
|
|
|
27
27
|
import 'rpgui/rpgui.css';
|
|
28
28
|
import 'rpgui/rpgui.min.js';
|
|
29
29
|
import { Coins } from 'pixelarticons/react/Coins';
|
|
30
|
+
import { Box } from 'pixelarticons/react/Box';
|
|
31
|
+
import { Crown } from 'pixelarticons/react/Crown';
|
|
32
|
+
import { Gift } from 'pixelarticons/react/Gift';
|
|
30
33
|
import capitalize from 'lodash-es/capitalize';
|
|
31
34
|
|
|
32
35
|
function _arrayLikeToArray(r, a) {
|
|
@@ -45103,6 +45106,58 @@ var CancelButton$1 = /*#__PURE__*/styled.button.withConfig({
|
|
|
45103
45106
|
componentId: "sc-6bghe9-17"
|
|
45104
45107
|
})(["flex:1;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);color:#ccc;border-radius:4px;padding:8px 12px;font-size:0.5rem;font-family:'Press Start 2P',cursive;cursor:pointer;text-transform:uppercase;letter-spacing:0.5px;transition:background 0.1s,border-color 0.1s;pointer-events:auto;&:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15);}"]);
|
|
45105
45108
|
|
|
45109
|
+
var GroupedRowContainer = function GroupedRowContainer(_ref) {
|
|
45110
|
+
var mainRow = _ref.mainRow,
|
|
45111
|
+
subRows = _ref.subRows,
|
|
45112
|
+
_ref$badgeLabel = _ref.badgeLabel,
|
|
45113
|
+
badgeLabel = _ref$badgeLabel === void 0 ? 'offers' : _ref$badgeLabel;
|
|
45114
|
+
var _useState = useState(false),
|
|
45115
|
+
expanded = _useState[0],
|
|
45116
|
+
setExpanded = _useState[1];
|
|
45117
|
+
var hasMultiple = subRows.length > 0;
|
|
45118
|
+
var totalCount = subRows.length + 1;
|
|
45119
|
+
return React.createElement(GroupWrapper, null, React.createElement(GroupHeader, {
|
|
45120
|
+
"$clickable": hasMultiple,
|
|
45121
|
+
onClick: hasMultiple ? function () {
|
|
45122
|
+
return setExpanded(function (e) {
|
|
45123
|
+
return !e;
|
|
45124
|
+
});
|
|
45125
|
+
} : undefined
|
|
45126
|
+
}, mainRow, hasMultiple && React.createElement(GroupMeta, null, React.createElement(OfferBadge, null, totalCount, " ", badgeLabel), React.createElement(Chevron, {
|
|
45127
|
+
"$expanded": expanded
|
|
45128
|
+
}, "\u25B8"))), expanded && React.createElement(SubRows, null, subRows));
|
|
45129
|
+
};
|
|
45130
|
+
var GroupWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45131
|
+
displayName: "GroupedRowContainer__GroupWrapper",
|
|
45132
|
+
componentId: "sc-12q03tq-0"
|
|
45133
|
+
})(["margin-bottom:2px;"]);
|
|
45134
|
+
var GroupHeader = /*#__PURE__*/styled.div.withConfig({
|
|
45135
|
+
displayName: "GroupedRowContainer__GroupHeader",
|
|
45136
|
+
componentId: "sc-12q03tq-1"
|
|
45137
|
+
})(["position:relative;cursor:", ";"], function (_ref2) {
|
|
45138
|
+
var $clickable = _ref2.$clickable;
|
|
45139
|
+
return $clickable ? 'pointer' : 'default';
|
|
45140
|
+
});
|
|
45141
|
+
var GroupMeta = /*#__PURE__*/styled.div.withConfig({
|
|
45142
|
+
displayName: "GroupedRowContainer__GroupMeta",
|
|
45143
|
+
componentId: "sc-12q03tq-2"
|
|
45144
|
+
})(["position:absolute;right:180px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:6px;pointer-events:none;"]);
|
|
45145
|
+
var OfferBadge = /*#__PURE__*/styled.span.withConfig({
|
|
45146
|
+
displayName: "GroupedRowContainer__OfferBadge",
|
|
45147
|
+
componentId: "sc-12q03tq-3"
|
|
45148
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.5);background:rgba(255,255,255,0.08);padding:2px 6px;border-radius:8px;white-space:nowrap;"]);
|
|
45149
|
+
var Chevron = /*#__PURE__*/styled.span.withConfig({
|
|
45150
|
+
displayName: "GroupedRowContainer__Chevron",
|
|
45151
|
+
componentId: "sc-12q03tq-4"
|
|
45152
|
+
})(["display:inline-block;font-size:0.7rem;color:rgba(255,255,255,0.4);transition:transform 0.2s ease;transform:rotate(", ");"], function (_ref3) {
|
|
45153
|
+
var $expanded = _ref3.$expanded;
|
|
45154
|
+
return $expanded ? '90deg' : '0deg';
|
|
45155
|
+
});
|
|
45156
|
+
var SubRows = /*#__PURE__*/styled.div.withConfig({
|
|
45157
|
+
displayName: "GroupedRowContainer__SubRows",
|
|
45158
|
+
componentId: "sc-12q03tq-5"
|
|
45159
|
+
})(["margin-left:12px;padding-left:8px;border-left:2px solid rgba(245,158,11,0.25);> div > div{background:rgba(0,0,0,0.4);}"]);
|
|
45160
|
+
|
|
45106
45161
|
var LabelPill = function LabelPill(_ref) {
|
|
45107
45162
|
var children = _ref.children,
|
|
45108
45163
|
_ref$background = _ref.background,
|
|
@@ -45363,19 +45418,18 @@ var BuyOrderRow = function BuyOrderRow(_ref) {
|
|
|
45363
45418
|
background: "rgba(34, 197, 94, 0.16)",
|
|
45364
45419
|
borderColor: "rgba(34, 197, 94, 0.4)",
|
|
45365
45420
|
color: "#bbf7d0"
|
|
45366
|
-
}, requestTagLabel),
|
|
45367
|
-
background: rarityGlow != null ? rarityGlow : 'rgba(255,255,255,0.1)',
|
|
45368
|
-
borderColor: "rgba(255,255,255,0.08)",
|
|
45369
|
-
color: "#fff"
|
|
45370
|
-
}, buyOrder.itemRarity), isOwn && React.createElement(LabelPill, {
|
|
45421
|
+
}, requestTagLabel), isOwn && React.createElement(LabelPill, {
|
|
45371
45422
|
background: STATUS_COLORS[buyOrder.status],
|
|
45372
45423
|
borderColor: "transparent",
|
|
45373
45424
|
color: "#fff"
|
|
45374
|
-
}, formatStatusLabel(buyOrder.status)), timeRemaining && React.createElement(
|
|
45425
|
+
}, formatStatusLabel(buyOrder.status)), timeRemaining && React.createElement(SimpleTooltip, {
|
|
45426
|
+
content: "Expires in",
|
|
45427
|
+
direction: "top"
|
|
45428
|
+
}, React.createElement(LabelPill, {
|
|
45375
45429
|
background: "rgba(255,255,255,0.08)",
|
|
45376
45430
|
borderColor: "rgba(255,255,255,0.08)",
|
|
45377
45431
|
color: "#fff"
|
|
45378
|
-
}, timeRemaining)))), isOwn && buyOrder.status === MarketplaceBuyOrderStatus.Active && onCancel && React.createElement(ActionSection, null, React.createElement(CTAButton, {
|
|
45432
|
+
}, timeRemaining))))), isOwn && buyOrder.status === MarketplaceBuyOrderStatus.Active && onCancel && React.createElement(ActionSection, null, React.createElement(CTAButton, {
|
|
45379
45433
|
icon: React.createElement(Delete, {
|
|
45380
45434
|
width: 18,
|
|
45381
45435
|
height: 18
|
|
@@ -45397,6 +45451,33 @@ var BuyOrderRow = function BuyOrderRow(_ref) {
|
|
|
45397
45451
|
}
|
|
45398
45452
|
})));
|
|
45399
45453
|
};
|
|
45454
|
+
var GroupedBuyOrderRow = function GroupedBuyOrderRow(_ref2) {
|
|
45455
|
+
var bestOrder = _ref2.bestOrder,
|
|
45456
|
+
otherOrders = _ref2.otherOrders,
|
|
45457
|
+
atlasJSON = _ref2.atlasJSON,
|
|
45458
|
+
atlasIMG = _ref2.atlasIMG,
|
|
45459
|
+
isOwn = _ref2.isOwn,
|
|
45460
|
+
onCancel = _ref2.onCancel,
|
|
45461
|
+
onFulfill = _ref2.onFulfill,
|
|
45462
|
+
showRequestTag = _ref2.showRequestTag;
|
|
45463
|
+
var makeRow = function makeRow(order) {
|
|
45464
|
+
return React.createElement(BuyOrderRow, {
|
|
45465
|
+
key: order._id,
|
|
45466
|
+
buyOrder: order,
|
|
45467
|
+
atlasJSON: atlasJSON,
|
|
45468
|
+
atlasIMG: atlasIMG,
|
|
45469
|
+
isOwn: isOwn,
|
|
45470
|
+
onCancel: onCancel,
|
|
45471
|
+
onFulfill: onFulfill,
|
|
45472
|
+
showRequestTag: showRequestTag
|
|
45473
|
+
});
|
|
45474
|
+
};
|
|
45475
|
+
return React.createElement(GroupedRowContainer, {
|
|
45476
|
+
mainRow: makeRow(bestOrder),
|
|
45477
|
+
subRows: otherOrders.map(makeRow),
|
|
45478
|
+
badgeLabel: "requests"
|
|
45479
|
+
});
|
|
45480
|
+
};
|
|
45400
45481
|
// ── Styled components matching MarketplaceRows layout ──
|
|
45401
45482
|
var RowWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45402
45483
|
displayName: "BuyOrderRows__RowWrapper",
|
|
@@ -45413,8 +45494,8 @@ var SpriteContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
45413
45494
|
var RarityGlow = /*#__PURE__*/styled.div.withConfig({
|
|
45414
45495
|
displayName: "BuyOrderRows__RarityGlow",
|
|
45415
45496
|
componentId: "sc-zz5s5j-3"
|
|
45416
|
-
})(["width:32px;height:32px;", ""], function (
|
|
45417
|
-
var $color =
|
|
45497
|
+
})(["width:32px;height:32px;", ""], function (_ref3) {
|
|
45498
|
+
var $color = _ref3.$color;
|
|
45418
45499
|
return $color ? "\n border-color: " + $color + ";\n box-shadow: 0 0 5px 8px " + $color + " inset, 0 0 8px 6px " + $color + ";\n " : '';
|
|
45419
45500
|
});
|
|
45420
45501
|
var SpritePlaceholder = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -45784,6 +45865,15 @@ var ConfirmRow = /*#__PURE__*/styled.div.withConfig({
|
|
|
45784
45865
|
componentId: "sc-86ottl-13"
|
|
45785
45866
|
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
45786
45867
|
|
|
45868
|
+
var ItemRowWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45869
|
+
displayName: "ItemRowWrapper",
|
|
45870
|
+
componentId: "sc-5g2skk-0"
|
|
45871
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:0.6rem 1rem;margin-bottom:4px;background:", ";border:1px solid rgba(255,255,255,0.05);border-radius:6px;border-left:4px solid ", ";transition:all 0.2s ease-in-out;&:hover{background:rgba(245,158,11,0.08);border-color:rgba(245,158,11,0.2);border-left-color:#f59e0b;box-shadow:0 4px 12px rgba(0,0,0,0.2);transform:translateY(-1px);}"], function (p) {
|
|
45872
|
+
return p.$isHighlighted ? 'rgba(255, 215, 0, 0.08)' : 'rgba(0, 0, 0, 0.25)';
|
|
45873
|
+
}, function (p) {
|
|
45874
|
+
return p.$isHighlighted ? '#ffd700' : 'transparent';
|
|
45875
|
+
});
|
|
45876
|
+
|
|
45787
45877
|
var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
45788
45878
|
var atlasJSON = _ref.atlasJSON,
|
|
45789
45879
|
atlasIMG = _ref.atlasIMG,
|
|
@@ -45799,7 +45889,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
45799
45889
|
var renderGems = function renderGems(item) {
|
|
45800
45890
|
return item.attachedGems && onRenderGems(item);
|
|
45801
45891
|
};
|
|
45802
|
-
return React.createElement(
|
|
45892
|
+
return React.createElement(ItemRowWrapper, null, React.createElement(ItemSection$1, null, React.createElement(SpriteContainer$4, null, React.createElement(ItemInfoWrapper, {
|
|
45803
45893
|
item: item,
|
|
45804
45894
|
atlasIMG: atlasIMG,
|
|
45805
45895
|
atlasJSON: atlasJSON,
|
|
@@ -45871,31 +45961,7 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
|
|
|
45871
45961
|
characterId = _ref2.characterId,
|
|
45872
45962
|
onBuy = _ref2.onBuy,
|
|
45873
45963
|
onDCCoinClick = _ref2.onDCCoinClick;
|
|
45874
|
-
var
|
|
45875
|
-
expanded = _useState[0],
|
|
45876
|
-
setExpanded = _useState[1];
|
|
45877
|
-
var totalOffers = otherListings.length + 1;
|
|
45878
|
-
var hasMultiple = otherListings.length > 0;
|
|
45879
|
-
return React.createElement(GroupWrapper, null, React.createElement(GroupHeader, {
|
|
45880
|
-
onClick: hasMultiple ? function () {
|
|
45881
|
-
return setExpanded(!expanded);
|
|
45882
|
-
} : undefined,
|
|
45883
|
-
clickable: hasMultiple
|
|
45884
|
-
}, React.createElement(MarketplaceRows, {
|
|
45885
|
-
atlasIMG: atlasIMG,
|
|
45886
|
-
atlasJSON: atlasJSON,
|
|
45887
|
-
item: bestListing.item,
|
|
45888
|
-
itemPrice: bestListing.price,
|
|
45889
|
-
dcEquivalentPrice: dcToGoldSwapRate > 0 ? getDCEquivalentPrice(bestListing.price) : undefined,
|
|
45890
|
-
equipmentSet: equipmentSet,
|
|
45891
|
-
onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
|
|
45892
|
-
return onBuy(bestListing._id);
|
|
45893
|
-
},
|
|
45894
|
-
onDCCoinClick: onDCCoinClick,
|
|
45895
|
-
disabled: bestListing.owner === characterId
|
|
45896
|
-
}), hasMultiple && React.createElement(GroupMeta, null, React.createElement(OfferBadge, null, totalOffers, " offers"), React.createElement(Chevron, {
|
|
45897
|
-
expanded: expanded
|
|
45898
|
-
}, "\u25B8"))), expanded && React.createElement(SubRows, null, otherListings.map(function (listing) {
|
|
45964
|
+
var makeRow = function makeRow(listing) {
|
|
45899
45965
|
return React.createElement(MarketplaceRows, {
|
|
45900
45966
|
key: listing._id,
|
|
45901
45967
|
atlasIMG: atlasIMG,
|
|
@@ -45910,115 +45976,86 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
|
|
|
45910
45976
|
onDCCoinClick: onDCCoinClick,
|
|
45911
45977
|
disabled: listing.owner === characterId
|
|
45912
45978
|
});
|
|
45913
|
-
}
|
|
45979
|
+
};
|
|
45980
|
+
return React.createElement(GroupedRowContainer, {
|
|
45981
|
+
mainRow: makeRow(bestListing),
|
|
45982
|
+
subRows: otherListings.map(makeRow),
|
|
45983
|
+
badgeLabel: "offers"
|
|
45984
|
+
});
|
|
45914
45985
|
};
|
|
45915
|
-
var GroupWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45916
|
-
displayName: "MarketplaceRows__GroupWrapper",
|
|
45917
|
-
componentId: "sc-wmpr1o-0"
|
|
45918
|
-
})(["margin-bottom:2px;"]);
|
|
45919
|
-
var GroupHeader = /*#__PURE__*/styled.div.withConfig({
|
|
45920
|
-
displayName: "MarketplaceRows__GroupHeader",
|
|
45921
|
-
componentId: "sc-wmpr1o-1"
|
|
45922
|
-
})(["position:relative;cursor:", ";"], function (_ref3) {
|
|
45923
|
-
var clickable = _ref3.clickable;
|
|
45924
|
-
return clickable ? 'pointer' : 'default';
|
|
45925
|
-
});
|
|
45926
|
-
var GroupMeta = /*#__PURE__*/styled.div.withConfig({
|
|
45927
|
-
displayName: "MarketplaceRows__GroupMeta",
|
|
45928
|
-
componentId: "sc-wmpr1o-2"
|
|
45929
|
-
})(["position:absolute;right:180px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:6px;pointer-events:none;"]);
|
|
45930
|
-
var OfferBadge = /*#__PURE__*/styled.span.withConfig({
|
|
45931
|
-
displayName: "MarketplaceRows__OfferBadge",
|
|
45932
|
-
componentId: "sc-wmpr1o-3"
|
|
45933
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.5);background:rgba(255,255,255,0.08);padding:2px 6px;border-radius:8px;white-space:nowrap;"]);
|
|
45934
|
-
var Chevron = /*#__PURE__*/styled.span.withConfig({
|
|
45935
|
-
displayName: "MarketplaceRows__Chevron",
|
|
45936
|
-
componentId: "sc-wmpr1o-4"
|
|
45937
|
-
})(["display:inline-block;font-size:0.7rem;color:rgba(255,255,255,0.4);transition:transform 0.2s ease;transform:rotate(", ");"], function (_ref4) {
|
|
45938
|
-
var expanded = _ref4.expanded;
|
|
45939
|
-
return expanded ? '90deg' : '0deg';
|
|
45940
|
-
});
|
|
45941
|
-
var SubRows = /*#__PURE__*/styled.div.withConfig({
|
|
45942
|
-
displayName: "MarketplaceRows__SubRows",
|
|
45943
|
-
componentId: "sc-wmpr1o-5"
|
|
45944
|
-
})(["margin-left:12px;padding-left:8px;border-left:2px solid rgba(245,158,11,0.25);> div > div{background:rgba(0,0,0,0.4);}"]);
|
|
45945
|
-
var MarketplaceWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45946
|
-
displayName: "MarketplaceRows__MarketplaceWrapper",
|
|
45947
|
-
componentId: "sc-wmpr1o-6"
|
|
45948
|
-
})(["display:flex;align-items:center;justify-content:space-between;padding:0.6rem 1rem;margin-bottom:4px;background:rgba(0,0,0,0.25);border:1px solid rgba(255,255,255,0.05);border-radius:6px;border-left:4px solid transparent;transition:all 0.2s ease-in-out;&:hover{background:rgba(245,158,11,0.08);border-color:rgba(245,158,11,0.2);border-left-color:#f59e0b;box-shadow:0 4px 12px rgba(0,0,0,0.2);transform:translateY(-1px);}"]);
|
|
45949
45986
|
var ItemSection$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45950
45987
|
displayName: "MarketplaceRows__ItemSection",
|
|
45951
|
-
componentId: "sc-wmpr1o-
|
|
45988
|
+
componentId: "sc-wmpr1o-0"
|
|
45952
45989
|
})(["display:flex;align-items:center;gap:0.75rem;flex:1;min-width:0;"]);
|
|
45953
45990
|
var SpriteContainer$4 = /*#__PURE__*/styled.div.withConfig({
|
|
45954
45991
|
displayName: "MarketplaceRows__SpriteContainer",
|
|
45955
|
-
componentId: "sc-wmpr1o-
|
|
45992
|
+
componentId: "sc-wmpr1o-1"
|
|
45956
45993
|
})(["position:relative;flex-shrink:0;min-width:44px;"]);
|
|
45957
45994
|
var ItemDetails$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45958
45995
|
displayName: "MarketplaceRows__ItemDetails",
|
|
45959
|
-
componentId: "sc-wmpr1o-
|
|
45996
|
+
componentId: "sc-wmpr1o-2"
|
|
45960
45997
|
})(["display:flex;flex-direction:column;gap:0.2rem;min-width:0;margin-left:1rem;"]);
|
|
45961
45998
|
var ItemName$2 = /*#__PURE__*/styled.div.withConfig({
|
|
45962
45999
|
displayName: "MarketplaceRows__ItemName",
|
|
45963
|
-
componentId: "sc-wmpr1o-
|
|
46000
|
+
componentId: "sc-wmpr1o-3"
|
|
45964
46001
|
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
|
|
45965
46002
|
var PriceRow = /*#__PURE__*/styled.div.withConfig({
|
|
45966
46003
|
displayName: "MarketplaceRows__PriceRow",
|
|
45967
|
-
componentId: "sc-wmpr1o-
|
|
46004
|
+
componentId: "sc-wmpr1o-4"
|
|
45968
46005
|
})(["display:flex;flex-direction:row;align-items:center;gap:0.5rem;margin-top:0.2rem;"]);
|
|
45969
46006
|
var GoldPriceRow$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45970
46007
|
displayName: "MarketplaceRows__GoldPriceRow",
|
|
45971
|
-
componentId: "sc-wmpr1o-
|
|
46008
|
+
componentId: "sc-wmpr1o-5"
|
|
45972
46009
|
})(["display:flex;align-items:center;gap:0.3rem;"]);
|
|
45973
46010
|
var GoldIcon$1 = /*#__PURE__*/styled.span.withConfig({
|
|
45974
46011
|
displayName: "MarketplaceRows__GoldIcon",
|
|
45975
|
-
componentId: "sc-wmpr1o-
|
|
46012
|
+
componentId: "sc-wmpr1o-6"
|
|
45976
46013
|
})(["display:flex;align-items:center;justify-content:center;position:relative;top:-0.6rem;left:-0.5rem;"]);
|
|
45977
46014
|
var GoldPrice$1 = /*#__PURE__*/styled.span.withConfig({
|
|
45978
46015
|
displayName: "MarketplaceRows__GoldPrice",
|
|
45979
|
-
componentId: "sc-wmpr1o-
|
|
46016
|
+
componentId: "sc-wmpr1o-7"
|
|
45980
46017
|
})(["font-family:'Press Start 2P',cursive;font-size:0.6rem !important;color:#fef08a;line-height:1;"]);
|
|
45981
46018
|
var DCPriceRow = /*#__PURE__*/styled.div.withConfig({
|
|
45982
46019
|
displayName: "MarketplaceRows__DCPriceRow",
|
|
45983
|
-
componentId: "sc-wmpr1o-
|
|
45984
|
-
})(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;cursor:", ";border-radius:4px;transition:opacity 0.15s;&:hover{opacity:", ";}"], function (
|
|
45985
|
-
var $clickable =
|
|
46020
|
+
componentId: "sc-wmpr1o-8"
|
|
46021
|
+
})(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;cursor:", ";border-radius:4px;transition:opacity 0.15s;&:hover{opacity:", ";}"], function (_ref3) {
|
|
46022
|
+
var $clickable = _ref3.$clickable;
|
|
45986
46023
|
return $clickable ? 'pointer' : 'default';
|
|
45987
|
-
}, function (
|
|
45988
|
-
var $clickable =
|
|
46024
|
+
}, function (_ref4) {
|
|
46025
|
+
var $clickable = _ref4.$clickable;
|
|
45989
46026
|
return $clickable ? '0.75' : '1';
|
|
45990
46027
|
});
|
|
45991
46028
|
var DCCoinWrapper = /*#__PURE__*/styled.span.withConfig({
|
|
45992
46029
|
displayName: "MarketplaceRows__DCCoinWrapper",
|
|
45993
|
-
componentId: "sc-wmpr1o-
|
|
46030
|
+
componentId: "sc-wmpr1o-9"
|
|
45994
46031
|
})(["display:flex;align-items:center;justify-content:center;position:relative;top:-0.6rem;left:-0.5rem;"]);
|
|
45995
46032
|
var DCPrice = /*#__PURE__*/styled.span.withConfig({
|
|
45996
46033
|
displayName: "MarketplaceRows__DCPrice",
|
|
45997
|
-
componentId: "sc-wmpr1o-
|
|
46034
|
+
componentId: "sc-wmpr1o-10"
|
|
45998
46035
|
})(["font-family:'Press Start 2P',cursive;font-size:0.6rem !important;color:rgba(254,240,138,0.65);white-space:nowrap;"]);
|
|
45999
46036
|
var ActionSection$1 = /*#__PURE__*/styled.div.withConfig({
|
|
46000
46037
|
displayName: "MarketplaceRows__ActionSection",
|
|
46001
|
-
componentId: "sc-wmpr1o-
|
|
46038
|
+
componentId: "sc-wmpr1o-11"
|
|
46002
46039
|
})(["flex-shrink:0;margin-left:0.75rem;"]);
|
|
46003
46040
|
var QuantityContainer = /*#__PURE__*/styled.p.withConfig({
|
|
46004
46041
|
displayName: "MarketplaceRows__QuantityContainer",
|
|
46005
|
-
componentId: "sc-wmpr1o-
|
|
46042
|
+
componentId: "sc-wmpr1o-12"
|
|
46006
46043
|
})(["position:absolute;display:block;top:15px;left:-8px;font-size:", " !important;"], uiFonts.size.xsmall);
|
|
46007
46044
|
var GemContainer = /*#__PURE__*/styled.p.withConfig({
|
|
46008
46045
|
displayName: "MarketplaceRows__GemContainer",
|
|
46009
|
-
componentId: "sc-wmpr1o-
|
|
46046
|
+
componentId: "sc-wmpr1o-13"
|
|
46010
46047
|
})(["position:absolute;display:block;top:-5px;left:-10px;font-size:", " !important;"], uiFonts.size.xsmall);
|
|
46011
46048
|
var RarityContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
46012
46049
|
displayName: "MarketplaceRows__RarityContainer",
|
|
46013
|
-
componentId: "sc-wmpr1o-
|
|
46014
|
-
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (
|
|
46015
|
-
var item =
|
|
46050
|
+
componentId: "sc-wmpr1o-14"
|
|
46051
|
+
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref5) {
|
|
46052
|
+
var item = _ref5.item;
|
|
46016
46053
|
return rarityColor(item);
|
|
46017
|
-
}, function (
|
|
46018
|
-
var item =
|
|
46054
|
+
}, function (_ref6) {
|
|
46055
|
+
var item = _ref6.item;
|
|
46019
46056
|
return "0 0 5px 8px " + rarityColor(item);
|
|
46020
|
-
}, function (
|
|
46021
|
-
var item =
|
|
46057
|
+
}, function (_ref7) {
|
|
46058
|
+
var item = _ref7.item;
|
|
46022
46059
|
return "0 0 8px 6px " + rarityColor(item);
|
|
46023
46060
|
});
|
|
46024
46061
|
|
|
@@ -46187,9 +46224,34 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46187
46224
|
return true;
|
|
46188
46225
|
});
|
|
46189
46226
|
}, [name, openBuyOrders, price, selectedRarity]);
|
|
46227
|
+
var groupedBuyOrders = useMemo(function () {
|
|
46228
|
+
var groups = new Map();
|
|
46229
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(visibleBuyOrders), _step2; !(_step2 = _iterator2()).done;) {
|
|
46230
|
+
var order = _step2.value;
|
|
46231
|
+
var key = order.itemBlueprintKey;
|
|
46232
|
+
if (!groups.has(key)) groups.set(key, []);
|
|
46233
|
+
groups.get(key).push(order);
|
|
46234
|
+
}
|
|
46235
|
+
return Array.from(groups.values()).map(function (group) {
|
|
46236
|
+
var sorted = [].concat(group).sort(function (a, b) {
|
|
46237
|
+
return b.maxPrice - a.maxPrice;
|
|
46238
|
+
});
|
|
46239
|
+
return {
|
|
46240
|
+
bestOrder: sorted[0],
|
|
46241
|
+
otherOrders: sorted.slice(1)
|
|
46242
|
+
};
|
|
46243
|
+
}).sort(function (a, b) {
|
|
46244
|
+
var totalGold = function totalGold(g) {
|
|
46245
|
+
return [g.bestOrder].concat(g.otherOrders).reduce(function (sum, o) {
|
|
46246
|
+
return sum + o.maxPrice;
|
|
46247
|
+
}, 0);
|
|
46248
|
+
};
|
|
46249
|
+
return totalGold(b) - totalGold(a);
|
|
46250
|
+
});
|
|
46251
|
+
}, [visibleBuyOrders]);
|
|
46190
46252
|
var showSellSection = browseMode === 'sell';
|
|
46191
46253
|
var showBuySection = browseMode === 'buy';
|
|
46192
|
-
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection &&
|
|
46254
|
+
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && groupedBuyOrders.length > 0;
|
|
46193
46255
|
return React.createElement(React.Fragment, null, buyingItemId && buyingItem && hasDCBalance && React.createElement(MarketplaceBuyModal, {
|
|
46194
46256
|
goldPrice: buyingItem.price,
|
|
46195
46257
|
dcEquivalentPrice: getDCEquivalentPrice(buyingItem.price),
|
|
@@ -46252,7 +46314,9 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46252
46314
|
height: 18
|
|
46253
46315
|
}))), showFilters && React.createElement(OptionsWrapper, {
|
|
46254
46316
|
showFilters: showFilters
|
|
46255
|
-
}, React.createElement(WrapperContainer$1,
|
|
46317
|
+
}, React.createElement(WrapperContainer$1, {
|
|
46318
|
+
"$sell": showSellSection
|
|
46319
|
+
}, showSellSection && React.createElement(StyledDropdown$5, {
|
|
46256
46320
|
options: itemTypeOptions,
|
|
46257
46321
|
onChange: onChangeType,
|
|
46258
46322
|
width: "100%"
|
|
@@ -46263,11 +46327,11 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46263
46327
|
onChangeRarity(value);
|
|
46264
46328
|
},
|
|
46265
46329
|
width: "100%"
|
|
46266
|
-
}), React.createElement(StyledDropdown$5, {
|
|
46330
|
+
}), showSellSection && React.createElement(StyledDropdown$5, {
|
|
46267
46331
|
options: orderByOptions,
|
|
46268
46332
|
onChange: onChangeOrder,
|
|
46269
46333
|
width: "100%"
|
|
46270
|
-
})), React.createElement(FilterInputsWrapper, null, React.createElement("div", null, React.createElement("p", null, "Main level"), React.createElement("div", {
|
|
46334
|
+
})), React.createElement(FilterInputsWrapper, null, showSellSection && React.createElement("div", null, React.createElement("p", null, "Main level"), React.createElement("div", {
|
|
46271
46335
|
className: "input-group"
|
|
46272
46336
|
}, React.createElement(Input, {
|
|
46273
46337
|
onChange: function onChange(e) {
|
|
@@ -46291,7 +46355,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46291
46355
|
min: 0,
|
|
46292
46356
|
onBlur: enableHotkeys,
|
|
46293
46357
|
onFocus: disableHotkeys
|
|
46294
|
-
}))), React.createElement("div", null, React.createElement("p", null, "Secondary level"), React.createElement("div", {
|
|
46358
|
+
}))), showSellSection && React.createElement("div", null, React.createElement("p", null, "Secondary level"), React.createElement("div", {
|
|
46295
46359
|
className: "input-group"
|
|
46296
46360
|
}, React.createElement(Input, {
|
|
46297
46361
|
onChange: function onChange(e) {
|
|
@@ -46358,14 +46422,16 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46358
46422
|
onBuy: setBuyingItemId,
|
|
46359
46423
|
onDCCoinClick: onDCCoinClick
|
|
46360
46424
|
});
|
|
46361
|
-
})), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null,
|
|
46362
|
-
|
|
46363
|
-
|
|
46364
|
-
|
|
46425
|
+
})), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, groupedBuyOrders.length, " groups")), groupedBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : groupedBuyOrders.map(function (_ref3) {
|
|
46426
|
+
var bestOrder = _ref3.bestOrder,
|
|
46427
|
+
otherOrders = _ref3.otherOrders;
|
|
46428
|
+
return React.createElement(GroupedBuyOrderRow, {
|
|
46429
|
+
key: bestOrder._id,
|
|
46430
|
+
bestOrder: bestOrder,
|
|
46431
|
+
otherOrders: otherOrders,
|
|
46365
46432
|
atlasJSON: atlasJSON,
|
|
46366
46433
|
atlasIMG: atlasIMG,
|
|
46367
|
-
onFulfill: setFulfillingBuyOrderId
|
|
46368
|
-
showRequestTag: true
|
|
46434
|
+
onFulfill: setFulfillingBuyOrderId
|
|
46369
46435
|
});
|
|
46370
46436
|
})))), React.createElement(PagerFooter, null, showSellSection && totalItems > itemsPerPage && React.createElement(Pager, {
|
|
46371
46437
|
totalItems: totalItems,
|
|
@@ -46390,14 +46456,14 @@ var SearchField = /*#__PURE__*/styled.div.withConfig({
|
|
|
46390
46456
|
var FilterButton$2 = /*#__PURE__*/styled.button.withConfig({
|
|
46391
46457
|
displayName: "BuyPanel__FilterButton",
|
|
46392
46458
|
componentId: "sc-1si8t7i-2"
|
|
46393
|
-
})(["width:36px;height:36px;border-radius:8px;border:1px solid ", ";background:", ";color:", ";cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color 0.15s,border-color 0.15s,background 0.15s;&:hover{color:#f59e0b;border-color:rgba(245,158,11,0.45);}"], function (
|
|
46394
|
-
var $active = _ref3.$active;
|
|
46395
|
-
return $active ? 'rgba(245, 158, 11, 0.55)' : 'rgba(255, 255, 255, 0.08)';
|
|
46396
|
-
}, function (_ref4) {
|
|
46459
|
+
})(["width:36px;height:36px;border-radius:8px;border:1px solid ", ";background:", ";color:", ";cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color 0.15s,border-color 0.15s,background 0.15s;&:hover{color:#f59e0b;border-color:rgba(245,158,11,0.45);}"], function (_ref4) {
|
|
46397
46460
|
var $active = _ref4.$active;
|
|
46398
|
-
return $active ? 'rgba(245, 158, 11, 0.
|
|
46461
|
+
return $active ? 'rgba(245, 158, 11, 0.55)' : 'rgba(255, 255, 255, 0.08)';
|
|
46399
46462
|
}, function (_ref5) {
|
|
46400
46463
|
var $active = _ref5.$active;
|
|
46464
|
+
return $active ? 'rgba(245, 158, 11, 0.14)' : 'rgba(255, 255, 255, 0.03)';
|
|
46465
|
+
}, function (_ref6) {
|
|
46466
|
+
var $active = _ref6.$active;
|
|
46401
46467
|
return $active ? '#f59e0b' : '#ccc';
|
|
46402
46468
|
});
|
|
46403
46469
|
var BrowseModeRow = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -46407,18 +46473,21 @@ var BrowseModeRow = /*#__PURE__*/styled.div.withConfig({
|
|
|
46407
46473
|
var OptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
46408
46474
|
displayName: "BuyPanel__OptionsWrapper",
|
|
46409
46475
|
componentId: "sc-1si8t7i-4"
|
|
46410
|
-
})(["width:95%;margin:0 auto;background:rgba(0,0,0,0.15);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:10px;display:flex;flex-direction:column;gap:", ";"], function (
|
|
46411
|
-
var showFilters =
|
|
46476
|
+
})(["width:95%;margin:0 auto;background:rgba(0,0,0,0.15);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:10px;display:flex;flex-direction:column;gap:", ";"], function (_ref7) {
|
|
46477
|
+
var showFilters = _ref7.showFilters;
|
|
46412
46478
|
return showFilters ? '15px' : '0';
|
|
46413
46479
|
});
|
|
46414
46480
|
var FilterInputsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
46415
46481
|
displayName: "BuyPanel__FilterInputsWrapper",
|
|
46416
46482
|
componentId: "sc-1si8t7i-5"
|
|
46417
|
-
})(["display:grid;grid-template-columns:repeat(
|
|
46483
|
+
})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:15px;color:white;> div{display:flex;flex-direction:column;gap:5px;}p{margin:0;font-size:0.65rem;color:#aaa;text-transform:uppercase;letter-spacing:1px;}.input-group{display:flex;align-items:center;gap:5px;input{width:100%;height:10px;}}.separator-icon{flex-shrink:0;color:rgba(255,255,255,0.3);}"]);
|
|
46418
46484
|
var WrapperContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
46419
46485
|
displayName: "BuyPanel__WrapperContainer",
|
|
46420
46486
|
componentId: "sc-1si8t7i-6"
|
|
46421
|
-
})(["display:grid;grid-template-columns:
|
|
46487
|
+
})(["display:grid;grid-template-columns:", ";gap:15px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"], function (_ref8) {
|
|
46488
|
+
var $sell = _ref8.$sell;
|
|
46489
|
+
return $sell ? 'repeat(3, 1fr)' : 'minmax(0, 200px)';
|
|
46490
|
+
});
|
|
46422
46491
|
var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
46423
46492
|
displayName: "BuyPanel__ItemComponentScrollWrapper",
|
|
46424
46493
|
componentId: "sc-1si8t7i-7"
|
|
@@ -70148,9 +70217,9 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
70148
70217
|
resetQuantity();
|
|
70149
70218
|
}
|
|
70150
70219
|
};
|
|
70151
|
-
return React.createElement(
|
|
70220
|
+
return React.createElement(ItemRowWrapper, {
|
|
70152
70221
|
"$isHighlighted": ((_item$store = item.store) == null ? void 0 : _item$store.isHighlighted) || false
|
|
70153
|
-
}, React.createElement(ItemIconContainer$2, null, React.createElement(SpriteFromAtlas, {
|
|
70222
|
+
}, React.createElement(LeftSection, null, React.createElement(ItemIconContainer$2, null, React.createElement(SpriteFromAtlas, {
|
|
70154
70223
|
atlasJSON: atlasJSON,
|
|
70155
70224
|
atlasIMG: atlasIMG,
|
|
70156
70225
|
spriteKey: item.texturePath,
|
|
@@ -70158,7 +70227,7 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
70158
70227
|
height: 32,
|
|
70159
70228
|
imgScale: 2,
|
|
70160
70229
|
centered: true
|
|
70161
|
-
})), React.createElement(ItemDetails$5, null, React.createElement(ItemName$6, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(ItemDescription, null, item.description)), React.createElement(Controls$1, null, showTextInput ? React.createElement(TextInput, {
|
|
70230
|
+
})), React.createElement(ItemDetails$5, null, React.createElement(ItemName$6, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(ItemDescription, null, item.description))), React.createElement(Controls$1, null, showTextInput ? React.createElement(TextInput, {
|
|
70162
70231
|
type: "text",
|
|
70163
70232
|
value: textInputValue,
|
|
70164
70233
|
placeholder: textInputPlaceholder,
|
|
@@ -70189,14 +70258,10 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
70189
70258
|
disabled: !hasRequiredAccount
|
|
70190
70259
|
})));
|
|
70191
70260
|
};
|
|
70192
|
-
var
|
|
70193
|
-
displayName: "
|
|
70261
|
+
var LeftSection = /*#__PURE__*/styled.div.withConfig({
|
|
70262
|
+
displayName: "StoreItemRow__LeftSection",
|
|
70194
70263
|
componentId: "sc-ptotuo-0"
|
|
70195
|
-
})(["display:flex;align-items:center;gap:0.75rem;
|
|
70196
|
-
return props.$isHighlighted ? 'rgba(255, 215, 0, 0.1)' : 'transparent';
|
|
70197
|
-
}, function (props) {
|
|
70198
|
-
return props.$isHighlighted ? '3px solid #ffd700' : '3px solid transparent';
|
|
70199
|
-
});
|
|
70264
|
+
})(["display:flex;align-items:center;gap:0.75rem;flex:1;min-width:0;"]);
|
|
70200
70265
|
var ItemIconContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
70201
70266
|
displayName: "StoreItemRow__ItemIconContainer",
|
|
70202
70267
|
componentId: "sc-ptotuo-1"
|
|
@@ -70289,6 +70354,7 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
70289
70354
|
var _useStoreFiltering = useStoreFiltering(items),
|
|
70290
70355
|
searchQuery = _useStoreFiltering.searchQuery,
|
|
70291
70356
|
setSearchQuery = _useStoreFiltering.setSearchQuery,
|
|
70357
|
+
selectedCategory = _useStoreFiltering.selectedCategory,
|
|
70292
70358
|
setSelectedCategory = _useStoreFiltering.setSelectedCategory,
|
|
70293
70359
|
categoryOptions = _useStoreFiltering.categoryOptions,
|
|
70294
70360
|
filteredItems = _useStoreFiltering.filteredItems;
|
|
@@ -70330,13 +70396,18 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
70330
70396
|
value: searchQuery,
|
|
70331
70397
|
onChange: setSearchQuery,
|
|
70332
70398
|
placeholder: "Search items..."
|
|
70333
|
-
})), React.createElement(
|
|
70334
|
-
options: categoryOptions
|
|
70335
|
-
|
|
70336
|
-
|
|
70337
|
-
|
|
70338
|
-
|
|
70339
|
-
|
|
70399
|
+
})), React.createElement(SegmentedToggle, {
|
|
70400
|
+
options: categoryOptions.map(function (opt) {
|
|
70401
|
+
return {
|
|
70402
|
+
id: opt.value,
|
|
70403
|
+
label: opt.option
|
|
70404
|
+
};
|
|
70405
|
+
}),
|
|
70406
|
+
activeId: selectedCategory,
|
|
70407
|
+
onChange: function onChange(id) {
|
|
70408
|
+
return setSelectedCategory(id);
|
|
70409
|
+
}
|
|
70410
|
+
})), React.createElement(ScrollableContent, {
|
|
70340
70411
|
items: filteredItems,
|
|
70341
70412
|
renderItem: renderStoreItem,
|
|
70342
70413
|
emptyMessage: "No items match your filters.",
|
|
@@ -70356,10 +70427,6 @@ var SearchBarContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
70356
70427
|
displayName: "StoreItemsSection__SearchBarContainer",
|
|
70357
70428
|
componentId: "sc-l6f466-2"
|
|
70358
70429
|
})(["flex:0.75;"]);
|
|
70359
|
-
var DropdownContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
70360
|
-
displayName: "StoreItemsSection__DropdownContainer",
|
|
70361
|
-
componentId: "sc-l6f466-3"
|
|
70362
|
-
})(["flex:0.25;min-width:140px;"]);
|
|
70363
70430
|
|
|
70364
70431
|
var usePackFiltering = function usePackFiltering(packs) {
|
|
70365
70432
|
var _useState = useState(''),
|
|
@@ -70416,7 +70483,7 @@ var StorePacksSection = function StorePacksSection(_ref) {
|
|
|
70416
70483
|
onClick: function onClick() {
|
|
70417
70484
|
return onSelectPack == null ? void 0 : onSelectPack(pack);
|
|
70418
70485
|
}
|
|
70419
|
-
}, React.createElement(PackIconContainer, null, renderPackIcon(pack)), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React.createElement(PackDescription, null, pack.description)), React.createElement(Controls$2, null, React.createElement(CTAButton, {
|
|
70486
|
+
}, React.createElement(LeftSection$1, null, React.createElement(PackIconContainer, null, renderPackIcon(pack)), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React.createElement(PackDescription, null, pack.description))), React.createElement(Controls$2, null, React.createElement(CTAButton, {
|
|
70420
70487
|
icon: React.createElement(FaCartPlus, null),
|
|
70421
70488
|
label: "Add",
|
|
70422
70489
|
onClick: function onClick(e) {
|
|
@@ -70438,33 +70505,37 @@ var StorePacksSection = function StorePacksSection(_ref) {
|
|
|
70438
70505
|
maxHeight: "420px"
|
|
70439
70506
|
});
|
|
70440
70507
|
};
|
|
70441
|
-
var PackRow = /*#__PURE__*/styled.
|
|
70508
|
+
var PackRow = /*#__PURE__*/styled(ItemRowWrapper).withConfig({
|
|
70442
70509
|
displayName: "StorePacksSection__PackRow",
|
|
70443
70510
|
componentId: "sc-ulazq3-0"
|
|
70444
|
-
})(["
|
|
70511
|
+
})(["cursor:pointer;"]);
|
|
70512
|
+
var LeftSection$1 = /*#__PURE__*/styled.div.withConfig({
|
|
70513
|
+
displayName: "StorePacksSection__LeftSection",
|
|
70514
|
+
componentId: "sc-ulazq3-1"
|
|
70515
|
+
})(["display:flex;align-items:center;gap:0.75rem;flex:1;min-width:0;"]);
|
|
70445
70516
|
var PackIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
70446
70517
|
displayName: "StorePacksSection__PackIconContainer",
|
|
70447
|
-
componentId: "sc-ulazq3-
|
|
70518
|
+
componentId: "sc-ulazq3-2"
|
|
70448
70519
|
})(["width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;img{width:100%;height:100%;object-fit:cover;}"]);
|
|
70449
70520
|
var PackDetails = /*#__PURE__*/styled.div.withConfig({
|
|
70450
70521
|
displayName: "StorePacksSection__PackDetails",
|
|
70451
|
-
componentId: "sc-ulazq3-
|
|
70522
|
+
componentId: "sc-ulazq3-3"
|
|
70452
70523
|
})(["flex:1;display:flex;flex-direction:column;gap:0.25rem;min-width:0;"]);
|
|
70453
70524
|
var PackName = /*#__PURE__*/styled.div.withConfig({
|
|
70454
70525
|
displayName: "StorePacksSection__PackName",
|
|
70455
|
-
componentId: "sc-ulazq3-
|
|
70526
|
+
componentId: "sc-ulazq3-4"
|
|
70456
70527
|
})(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
|
|
70457
70528
|
var PackPrice = /*#__PURE__*/styled.div.withConfig({
|
|
70458
70529
|
displayName: "StorePacksSection__PackPrice",
|
|
70459
|
-
componentId: "sc-ulazq3-
|
|
70530
|
+
componentId: "sc-ulazq3-5"
|
|
70460
70531
|
})(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
|
|
70461
70532
|
var PackDescription = /*#__PURE__*/styled.div.withConfig({
|
|
70462
70533
|
displayName: "StorePacksSection__PackDescription",
|
|
70463
|
-
componentId: "sc-ulazq3-
|
|
70534
|
+
componentId: "sc-ulazq3-6"
|
|
70464
70535
|
})(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:rgba(255,255,255,0.7);line-height:1.4;"]);
|
|
70465
70536
|
var Controls$2 = /*#__PURE__*/styled.div.withConfig({
|
|
70466
70537
|
displayName: "StorePacksSection__Controls",
|
|
70467
|
-
componentId: "sc-ulazq3-
|
|
70538
|
+
componentId: "sc-ulazq3-7"
|
|
70468
70539
|
})(["display:flex;align-items:center;flex-shrink:0;"]);
|
|
70469
70540
|
|
|
70470
70541
|
var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
@@ -70537,6 +70608,7 @@ var Actions = /*#__PURE__*/styled.div.withConfig({
|
|
|
70537
70608
|
})(["margin-top:auto;padding-top:1rem;border-top:1px solid rgba(255,255,255,0.1);"]);
|
|
70538
70609
|
|
|
70539
70610
|
var Store = function Store(_ref) {
|
|
70611
|
+
var _tabsMap$activeTab;
|
|
70540
70612
|
var items = _ref.items,
|
|
70541
70613
|
_ref$packs = _ref.packs,
|
|
70542
70614
|
packs = _ref$packs === void 0 ? [] : _ref$packs,
|
|
@@ -70674,6 +70746,10 @@ var Store = function Store(_ref) {
|
|
|
70674
70746
|
premium: {
|
|
70675
70747
|
id: 'premium',
|
|
70676
70748
|
title: 'Premium',
|
|
70749
|
+
icon: React.createElement(Crown, {
|
|
70750
|
+
width: 18,
|
|
70751
|
+
height: 18
|
|
70752
|
+
}),
|
|
70677
70753
|
content: React.createElement(StorePacksSection, {
|
|
70678
70754
|
packs: packs.filter(function (pack) {
|
|
70679
70755
|
return pack.priceUSD >= 9.99;
|
|
@@ -70687,6 +70763,10 @@ var Store = function Store(_ref) {
|
|
|
70687
70763
|
packs: {
|
|
70688
70764
|
id: 'packs',
|
|
70689
70765
|
title: packsTabLabel,
|
|
70766
|
+
icon: React.createElement(Gift, {
|
|
70767
|
+
width: 18,
|
|
70768
|
+
height: 18
|
|
70769
|
+
}),
|
|
70690
70770
|
content: customPacksContent != null ? customPacksContent : React.createElement(StorePacksSection, {
|
|
70691
70771
|
packs: hidePremiumTab ? packs : packs.filter(function (pack) {
|
|
70692
70772
|
return pack.priceUSD < 9.99;
|
|
@@ -70700,6 +70780,10 @@ var Store = function Store(_ref) {
|
|
|
70700
70780
|
items: {
|
|
70701
70781
|
id: 'items',
|
|
70702
70782
|
title: 'Items',
|
|
70783
|
+
icon: React.createElement(Box, {
|
|
70784
|
+
width: 18,
|
|
70785
|
+
height: 18
|
|
70786
|
+
}),
|
|
70703
70787
|
content: React.createElement(StoreItemsSection, {
|
|
70704
70788
|
items: filteredItems.items,
|
|
70705
70789
|
onAddToCart: handleAddToCart,
|
|
@@ -70712,12 +70796,13 @@ var Store = function Store(_ref) {
|
|
|
70712
70796
|
wallet: {
|
|
70713
70797
|
id: 'wallet',
|
|
70714
70798
|
title: 'Wallet',
|
|
70799
|
+
icon: React.createElement(Wallet, {
|
|
70800
|
+
width: 18,
|
|
70801
|
+
height: 18
|
|
70802
|
+
}),
|
|
70715
70803
|
content: customWalletContent != null ? customWalletContent : null
|
|
70716
70804
|
}
|
|
70717
70805
|
};
|
|
70718
|
-
var tabs = availableTabIds.map(function (id) {
|
|
70719
|
-
return tabsMap[id];
|
|
70720
|
-
});
|
|
70721
70806
|
return React.createElement(DraggableContainer, {
|
|
70722
70807
|
title: "Store",
|
|
70723
70808
|
onCloseButton: onClose,
|
|
@@ -70780,18 +70865,19 @@ var Store = function Store(_ref) {
|
|
|
70780
70865
|
icon: React.createElement(FaShoppingCart, null),
|
|
70781
70866
|
label: getTotalItems() + " items ($" + getTotalPrice().toFixed(2) + ")",
|
|
70782
70867
|
onClick: openCart
|
|
70783
|
-
}))), React.createElement(MainContent$1, null, React.createElement(
|
|
70784
|
-
|
|
70785
|
-
|
|
70786
|
-
|
|
70787
|
-
|
|
70788
|
-
|
|
70789
|
-
|
|
70790
|
-
|
|
70868
|
+
}))), React.createElement(MainContent$1, null, React.createElement(Tabs, {
|
|
70869
|
+
options: availableTabIds.map(function (id) {
|
|
70870
|
+
return {
|
|
70871
|
+
id: id,
|
|
70872
|
+
label: tabsMap[id].title,
|
|
70873
|
+
icon: tabsMap[id].icon
|
|
70874
|
+
};
|
|
70875
|
+
}),
|
|
70876
|
+
activeTabId: activeTab,
|
|
70791
70877
|
onTabChange: function onTabChange(tabId) {
|
|
70792
70878
|
return setActiveTab(tabId);
|
|
70793
70879
|
}
|
|
70794
|
-
})), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, "$", getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
|
|
70880
|
+
}), React.createElement(TabContent, null, (_tabsMap$activeTab = tabsMap[activeTab]) == null ? void 0 : _tabsMap$activeTab.content)), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, "$", getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
|
|
70795
70881
|
icon: React.createElement(FaShoppingCart, null),
|
|
70796
70882
|
label: "Proceed to Checkout ($" + getTotalPrice().toFixed(2) + ")",
|
|
70797
70883
|
onClick: openCart,
|
|
@@ -70817,26 +70903,30 @@ var CartButton = /*#__PURE__*/styled.div.withConfig({
|
|
|
70817
70903
|
var MainContent$1 = /*#__PURE__*/styled.div.withConfig({
|
|
70818
70904
|
displayName: "Store__MainContent",
|
|
70819
70905
|
componentId: "sc-64dj00-4"
|
|
70820
|
-
})(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden
|
|
70906
|
+
})(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);
|
|
70907
|
+
var TabContent = /*#__PURE__*/styled.div.withConfig({
|
|
70908
|
+
displayName: "Store__TabContent",
|
|
70909
|
+
componentId: "sc-64dj00-5"
|
|
70910
|
+
})(["flex:1;overflow-y:auto;padding-right:0.5rem;"]);
|
|
70821
70911
|
var Footer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
70822
70912
|
displayName: "Store__Footer",
|
|
70823
|
-
componentId: "sc-64dj00-
|
|
70913
|
+
componentId: "sc-64dj00-6"
|
|
70824
70914
|
})(["display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:2px solid #f59e0b;background:rgba(0,0,0,0.2);flex-shrink:0;"]);
|
|
70825
70915
|
var CartSummary = /*#__PURE__*/styled.div.withConfig({
|
|
70826
70916
|
displayName: "Store__CartSummary",
|
|
70827
|
-
componentId: "sc-64dj00-
|
|
70917
|
+
componentId: "sc-64dj00-7"
|
|
70828
70918
|
})(["display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
70829
70919
|
var CartInfo = /*#__PURE__*/styled.div.withConfig({
|
|
70830
70920
|
displayName: "Store__CartInfo",
|
|
70831
|
-
componentId: "sc-64dj00-
|
|
70921
|
+
componentId: "sc-64dj00-8"
|
|
70832
70922
|
})(["display:flex;align-items:center;gap:0.75rem;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;span:last-child{color:#fef08a;}"]);
|
|
70833
70923
|
var LoadingMessage$1 = /*#__PURE__*/styled.div.withConfig({
|
|
70834
70924
|
displayName: "Store__LoadingMessage",
|
|
70835
|
-
componentId: "sc-64dj00-
|
|
70925
|
+
componentId: "sc-64dj00-9"
|
|
70836
70926
|
})(["text-align:center;color:", ";padding:2rem;"], uiColors.white);
|
|
70837
70927
|
var ErrorMessage$3 = /*#__PURE__*/styled.div.withConfig({
|
|
70838
70928
|
displayName: "Store__ErrorMessage",
|
|
70839
|
-
componentId: "sc-64dj00-
|
|
70929
|
+
componentId: "sc-64dj00-10"
|
|
70840
70930
|
})(["text-align:center;color:", ";padding:2rem;"], uiColors.red);
|
|
70841
70931
|
|
|
70842
70932
|
var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
@@ -71128,7 +71218,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
71128
71218
|
}
|
|
71129
71219
|
return null;
|
|
71130
71220
|
};
|
|
71131
|
-
return React.createElement(ItemWrapper$
|
|
71221
|
+
return React.createElement(ItemWrapper$1, null, React.createElement(ItemIconContainer$3, null, React.createElement(SpriteContainer$6, null, React.createElement(ItemInfoWrapper, {
|
|
71132
71222
|
atlasIMG: atlasIMG,
|
|
71133
71223
|
atlasJSON: atlasJSON,
|
|
71134
71224
|
equipmentSet: equipmentSet,
|
|
@@ -71188,7 +71278,7 @@ var StyledArrow = /*#__PURE__*/styled(SelectArrow).withConfig({
|
|
|
71188
71278
|
displayName: "TradingItemRow__StyledArrow",
|
|
71189
71279
|
componentId: "sc-mja0b5-0"
|
|
71190
71280
|
})(["margin:0 1.5rem;"]);
|
|
71191
|
-
var ItemWrapper$
|
|
71281
|
+
var ItemWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
71192
71282
|
displayName: "TradingItemRow__ItemWrapper",
|
|
71193
71283
|
componentId: "sc-mja0b5-1"
|
|
71194
71284
|
})(["width:100%;display:flex;justify-content:space-between;margin-bottom:0.5rem;padding:0.25rem;&:hover{background-color:", ";}"], uiColors.darkGray);
|
|
@@ -71510,5 +71600,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
71510
71600
|
componentId: "sc-7tgzv2-6"
|
|
71511
71601
|
})(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
|
|
71512
71602
|
|
|
71513
|
-
export { ActionButtons, AsyncDropdown, BLUEPRINTS_PER_PAGE, BUY_ORDERS_PER_PAGE, BlueprintSearchModal, Button, ButtonTypes, BuyOrderPanel, BuyOrderRow, CTAButton, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DCWalletContent, DCWalletModal, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, GroupedMarketplaceRow, HISTORY_ITEMS_PER_PAGE, HistoryDialog, HistoryPanel, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, LoginStreakPanel, Marketplace, MarketplaceBuyModal, MarketplaceRows, MarketplaceSettingsPanel, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PaymentMethodModal, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TRANSACTION_TYPE_FILTER_ALL, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer$1 as TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
|
|
71603
|
+
export { ActionButtons, AsyncDropdown, BLUEPRINTS_PER_PAGE, BUY_ORDERS_PER_PAGE, BlueprintSearchModal, Button, ButtonTypes, BuyOrderPanel, BuyOrderRow, CTAButton, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DCWalletContent, DCWalletModal, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, GroupedBuyOrderRow, GroupedMarketplaceRow, HISTORY_ITEMS_PER_PAGE, HistoryDialog, HistoryPanel, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, LoginStreakPanel, Marketplace, MarketplaceBuyModal, MarketplaceRows, MarketplaceSettingsPanel, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PaymentMethodModal, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TRANSACTION_TYPE_FILTER_ALL, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer$1 as TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
|
|
71514
71604
|
//# sourceMappingURL=long-bow.esm.js.map
|