@rpg-engine/long-bow 0.8.166 → 0.8.168
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/MarketplaceRows.d.ts +2 -1
- package/dist/long-bow.cjs.development.js +179 -53
- 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 +180 -54
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/Features/trading/MarketplaceRows.stories.d.ts +1 -0
- package/package.json +2 -2
- package/src/components/Marketplace/BuyPanel.tsx +98 -27
- package/src/components/Marketplace/ManagmentPanel.tsx +59 -4
- package/src/components/Marketplace/MarketplaceRows.tsx +60 -27
- package/src/components/Marketplace/MarketplaceSettingsPanel.tsx +26 -31
- package/src/stories/Features/trading/Marketplace.stories.tsx +25 -6
- package/src/stories/Features/trading/MarketplaceRows.stories.tsx +15 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Component, useRef, useCallback, useMemo, me
|
|
|
2
2
|
import styled, { css, keyframes, createGlobalStyle } from 'styled-components';
|
|
3
3
|
import { BeatLoader } from 'react-spinners';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, MarketplaceBuyOrderStatus, formatDCAmount, goldToDC, MarketplaceTransactionType,
|
|
5
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, MarketplaceBuyOrderStatus, formatDCAmount, MarketplaceAcceptedCurrency, goldToDC, MarketplaceTransactionType, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, UserAccountTypes, PaymentCurrency, PeriodOfDay } from '@rpg-engine/shared';
|
|
6
6
|
export { MarketplaceAcceptedCurrency } from '@rpg-engine/shared';
|
|
7
7
|
import dayjs from 'dayjs';
|
|
8
8
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
@@ -45880,6 +45880,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
45880
45880
|
item = _ref.item,
|
|
45881
45881
|
itemPrice = _ref.itemPrice,
|
|
45882
45882
|
dcEquivalentPrice = _ref.dcEquivalentPrice,
|
|
45883
|
+
acceptedCurrency = _ref.acceptedCurrency,
|
|
45883
45884
|
equipmentSet = _ref.equipmentSet,
|
|
45884
45885
|
scale = _ref.scale,
|
|
45885
45886
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
@@ -45912,7 +45913,11 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
45912
45913
|
maxLines: 1,
|
|
45913
45914
|
maxWidth: "200px",
|
|
45914
45915
|
fontSize: "10px"
|
|
45915
|
-
}, item.name)
|
|
45916
|
+
}, item.name), acceptedCurrency === MarketplaceAcceptedCurrency.Dc && React.createElement(CurrencyBadge, {
|
|
45917
|
+
"$color": "#a78bfa"
|
|
45918
|
+
}, "DC only"), acceptedCurrency === MarketplaceAcceptedCurrency.Gold && React.createElement(CurrencyBadge, {
|
|
45919
|
+
"$color": "#fef08a"
|
|
45920
|
+
}, "Gold only")), React.createElement(PriceRow, null, acceptedCurrency !== MarketplaceAcceptedCurrency.Dc && React.createElement(GoldPriceRow$1, null, React.createElement(GoldIcon$1, null, React.createElement(SimpleTooltip, {
|
|
45916
45921
|
content: "Gold Coin",
|
|
45917
45922
|
direction: "top"
|
|
45918
45923
|
}, React.createElement(SpriteFromAtlas, {
|
|
@@ -45962,18 +45967,22 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
|
|
|
45962
45967
|
onBuy = _ref2.onBuy,
|
|
45963
45968
|
onDCCoinClick = _ref2.onDCCoinClick;
|
|
45964
45969
|
var makeRow = function makeRow(listing) {
|
|
45970
|
+
var listingCurrency = listing.acceptedCurrency || MarketplaceAcceptedCurrency.GoldOrDc;
|
|
45971
|
+
var isDcOnly = listingCurrency === MarketplaceAcceptedCurrency.Dc;
|
|
45972
|
+
var showDcPrice = isDcOnly || dcToGoldSwapRate > 0 && listingCurrency !== MarketplaceAcceptedCurrency.Gold;
|
|
45965
45973
|
return React.createElement(MarketplaceRows, {
|
|
45966
45974
|
key: listing._id,
|
|
45967
45975
|
atlasIMG: atlasIMG,
|
|
45968
45976
|
atlasJSON: atlasJSON,
|
|
45969
45977
|
item: listing.item,
|
|
45970
45978
|
itemPrice: listing.price,
|
|
45971
|
-
dcEquivalentPrice:
|
|
45979
|
+
dcEquivalentPrice: showDcPrice ? getDCEquivalentPrice(listing.price) : undefined,
|
|
45980
|
+
acceptedCurrency: listingCurrency,
|
|
45972
45981
|
equipmentSet: equipmentSet,
|
|
45973
45982
|
onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
|
|
45974
45983
|
return onBuy(listing._id);
|
|
45975
45984
|
},
|
|
45976
|
-
onDCCoinClick: onDCCoinClick,
|
|
45985
|
+
onDCCoinClick: isDcOnly ? undefined : onDCCoinClick,
|
|
45977
45986
|
disabled: listing.owner === characterId
|
|
45978
45987
|
});
|
|
45979
45988
|
};
|
|
@@ -46045,17 +46054,27 @@ var GemContainer = /*#__PURE__*/styled.p.withConfig({
|
|
|
46045
46054
|
displayName: "MarketplaceRows__GemContainer",
|
|
46046
46055
|
componentId: "sc-wmpr1o-13"
|
|
46047
46056
|
})(["position:absolute;display:block;top:-5px;left:-10px;font-size:", " !important;"], uiFonts.size.xsmall);
|
|
46057
|
+
var CurrencyBadge = /*#__PURE__*/styled.span.withConfig({
|
|
46058
|
+
displayName: "MarketplaceRows__CurrencyBadge",
|
|
46059
|
+
componentId: "sc-wmpr1o-14"
|
|
46060
|
+
})(["display:inline-block;margin-left:6px;padding:1px 4px;font-family:'Press Start 2P',cursive;font-size:0.38rem;color:", ";border:1px solid ", ";border-radius:3px;opacity:0.85;vertical-align:middle;text-transform:uppercase;letter-spacing:0.5px;"], function (_ref5) {
|
|
46061
|
+
var $color = _ref5.$color;
|
|
46062
|
+
return $color;
|
|
46063
|
+
}, function (_ref6) {
|
|
46064
|
+
var $color = _ref6.$color;
|
|
46065
|
+
return $color;
|
|
46066
|
+
});
|
|
46048
46067
|
var RarityContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
46049
46068
|
displayName: "MarketplaceRows__RarityContainer",
|
|
46050
|
-
componentId: "sc-wmpr1o-
|
|
46051
|
-
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (
|
|
46052
|
-
var item =
|
|
46069
|
+
componentId: "sc-wmpr1o-15"
|
|
46070
|
+
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref7) {
|
|
46071
|
+
var item = _ref7.item;
|
|
46053
46072
|
return rarityColor(item);
|
|
46054
|
-
}, function (
|
|
46055
|
-
var item =
|
|
46073
|
+
}, function (_ref8) {
|
|
46074
|
+
var item = _ref8.item;
|
|
46056
46075
|
return "0 0 5px 8px " + rarityColor(item);
|
|
46057
|
-
}, function (
|
|
46058
|
-
var item =
|
|
46076
|
+
}, function (_ref9) {
|
|
46077
|
+
var item = _ref9.item;
|
|
46059
46078
|
return "0 0 8px 6px " + rarityColor(item);
|
|
46060
46079
|
});
|
|
46061
46080
|
|
|
@@ -46171,6 +46190,9 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46171
46190
|
var _useState9 = useState(null),
|
|
46172
46191
|
fulfillingBuyOrderId = _useState9[0],
|
|
46173
46192
|
setFulfillingBuyOrderId = _useState9[1];
|
|
46193
|
+
var _useState10 = useState(null),
|
|
46194
|
+
currencyFilter = _useState10[0],
|
|
46195
|
+
setCurrencyFilter = _useState10[1];
|
|
46174
46196
|
var itemsContainer = useRef(null);
|
|
46175
46197
|
useEffect(function () {
|
|
46176
46198
|
var _itemsContainer$curre;
|
|
@@ -46183,9 +46205,19 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46183
46205
|
var getDCEquivalentPrice = function getDCEquivalentPrice(goldPrice) {
|
|
46184
46206
|
return dcToGoldSwapRate > 0 ? goldToDC(goldPrice) : 0;
|
|
46185
46207
|
};
|
|
46208
|
+
var handleBuyClick = function handleBuyClick(listingId) {
|
|
46209
|
+
// All currencies go through the confirmation modal
|
|
46210
|
+
setBuyingItemId(listingId);
|
|
46211
|
+
};
|
|
46186
46212
|
var groupedItems = useMemo(function () {
|
|
46213
|
+
var filtered = currencyFilter === null ? items : items.filter(function (i) {
|
|
46214
|
+
var c = i.acceptedCurrency || MarketplaceAcceptedCurrency.GoldOrDc;
|
|
46215
|
+
if (currencyFilter === 'gold') return c === MarketplaceAcceptedCurrency.Gold || c === MarketplaceAcceptedCurrency.GoldOrDc;
|
|
46216
|
+
if (currencyFilter === 'dc') return c === MarketplaceAcceptedCurrency.Dc || c === MarketplaceAcceptedCurrency.GoldOrDc;
|
|
46217
|
+
return true;
|
|
46218
|
+
});
|
|
46187
46219
|
var groups = new Map();
|
|
46188
|
-
for (var _iterator = _createForOfIteratorHelperLoose(
|
|
46220
|
+
for (var _iterator = _createForOfIteratorHelperLoose(filtered), _step; !(_step = _iterator()).done;) {
|
|
46189
46221
|
var entry = _step.value;
|
|
46190
46222
|
var key = entry.item.key;
|
|
46191
46223
|
if (!groups.has(key)) {
|
|
@@ -46202,7 +46234,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46202
46234
|
otherListings: sorted.slice(1)
|
|
46203
46235
|
};
|
|
46204
46236
|
});
|
|
46205
|
-
}, [items]);
|
|
46237
|
+
}, [items, currencyFilter]);
|
|
46206
46238
|
var visibleBuyOrders = useMemo(function () {
|
|
46207
46239
|
var normalizedName = name.trim().toLowerCase();
|
|
46208
46240
|
return openBuyOrders.filter(function (order) {
|
|
@@ -46252,27 +46284,32 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46252
46284
|
var showSellSection = browseMode === 'sell';
|
|
46253
46285
|
var showBuySection = browseMode === 'buy';
|
|
46254
46286
|
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && groupedBuyOrders.length > 0;
|
|
46255
|
-
return React.createElement(React.Fragment, null, buyingItemId && buyingItem &&
|
|
46256
|
-
|
|
46257
|
-
|
|
46258
|
-
|
|
46259
|
-
|
|
46260
|
-
|
|
46261
|
-
|
|
46262
|
-
|
|
46263
|
-
|
|
46264
|
-
|
|
46265
|
-
|
|
46266
|
-
|
|
46267
|
-
|
|
46268
|
-
|
|
46269
|
-
|
|
46270
|
-
|
|
46271
|
-
|
|
46272
|
-
|
|
46273
|
-
|
|
46274
|
-
|
|
46275
|
-
|
|
46287
|
+
return React.createElement(React.Fragment, null, buyingItemId && buyingItem && function () {
|
|
46288
|
+
var listingCurrency = buyingItem.acceptedCurrency || MarketplaceAcceptedCurrency.GoldOrDc;
|
|
46289
|
+
var isDcOnly = listingCurrency === MarketplaceAcceptedCurrency.Dc;
|
|
46290
|
+
var showPaymentChoiceModal = listingCurrency === MarketplaceAcceptedCurrency.GoldOrDc && hasDCBalance;
|
|
46291
|
+
return showPaymentChoiceModal ? React.createElement(MarketplaceBuyModal, {
|
|
46292
|
+
goldPrice: buyingItem.price,
|
|
46293
|
+
dcEquivalentPrice: getDCEquivalentPrice(buyingItem.price),
|
|
46294
|
+
dcBalance: dcBalance,
|
|
46295
|
+
onClose: function onClose() {
|
|
46296
|
+
return setBuyingItemId(null);
|
|
46297
|
+
},
|
|
46298
|
+
onConfirm: function onConfirm(paymentMethod) {
|
|
46299
|
+
onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy(buyingItemId, paymentMethod);
|
|
46300
|
+
setBuyingItemId(null);
|
|
46301
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
46302
|
+
}
|
|
46303
|
+
}) : React.createElement(ConfirmModal, {
|
|
46304
|
+
onClose: setBuyingItemId.bind(null, null),
|
|
46305
|
+
onConfirm: function onConfirm() {
|
|
46306
|
+
onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy(buyingItemId, isDcOnly ? 'dc' : undefined);
|
|
46307
|
+
setBuyingItemId(null);
|
|
46308
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
46309
|
+
},
|
|
46310
|
+
message: isDcOnly ? "Are you sure you want to buy this item with DC?" : "Are you sure you want to buy this item?"
|
|
46311
|
+
});
|
|
46312
|
+
}(), fulfillingBuyOrderId && React.createElement(ConfirmModal, {
|
|
46276
46313
|
onClose: setFulfillingBuyOrderId.bind(null, null),
|
|
46277
46314
|
onConfirm: function onConfirm() {
|
|
46278
46315
|
onFulfillBuyOrder == null ? void 0 : onFulfillBuyOrder(fulfillingBuyOrderId);
|
|
@@ -46312,7 +46349,18 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46312
46349
|
}, React.createElement(SortVertical, {
|
|
46313
46350
|
width: 18,
|
|
46314
46351
|
height: 18
|
|
46315
|
-
}))),
|
|
46352
|
+
}))), showSellSection && React.createElement(CurrencyFilterRow, null, React.createElement(CurrencyFilterLabel, null, "Currency:"), ['gold', 'dc'].map(function (c) {
|
|
46353
|
+
return React.createElement(CurrencyFilterButton, {
|
|
46354
|
+
key: c,
|
|
46355
|
+
"$active": currencyFilter === c,
|
|
46356
|
+
onPointerDown: function onPointerDown() {
|
|
46357
|
+
return setCurrencyFilter(function (prev) {
|
|
46358
|
+
return prev === c ? null : c;
|
|
46359
|
+
});
|
|
46360
|
+
},
|
|
46361
|
+
type: "button"
|
|
46362
|
+
}, c === 'gold' ? 'Gold' : 'DC');
|
|
46363
|
+
})), showFilters && React.createElement(OptionsWrapper, {
|
|
46316
46364
|
showFilters: showFilters
|
|
46317
46365
|
}, React.createElement(WrapperContainer$1, {
|
|
46318
46366
|
"$sell": showSellSection
|
|
@@ -46419,7 +46467,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46419
46467
|
dcToGoldSwapRate: dcToGoldSwapRate,
|
|
46420
46468
|
getDCEquivalentPrice: getDCEquivalentPrice,
|
|
46421
46469
|
characterId: characterId,
|
|
46422
|
-
onBuy:
|
|
46470
|
+
onBuy: handleBuyClick,
|
|
46423
46471
|
onDCCoinClick: onDCCoinClick
|
|
46424
46472
|
});
|
|
46425
46473
|
})), 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) {
|
|
@@ -46533,6 +46581,33 @@ var LoadingText$1 = /*#__PURE__*/styled.span.withConfig({
|
|
|
46533
46581
|
displayName: "BuyPanel__LoadingText",
|
|
46534
46582
|
componentId: "sc-1si8t7i-17"
|
|
46535
46583
|
})(["font-size:0.48rem;color:#8a8a8a;text-transform:uppercase;letter-spacing:1px;"]);
|
|
46584
|
+
var CurrencyFilterRow = /*#__PURE__*/styled.div.withConfig({
|
|
46585
|
+
displayName: "BuyPanel__CurrencyFilterRow",
|
|
46586
|
+
componentId: "sc-1si8t7i-18"
|
|
46587
|
+
})(["display:flex;align-items:center;gap:6px;width:95%;margin:0 auto 8px auto;"]);
|
|
46588
|
+
var CurrencyFilterLabel = /*#__PURE__*/styled.span.withConfig({
|
|
46589
|
+
displayName: "BuyPanel__CurrencyFilterLabel",
|
|
46590
|
+
componentId: "sc-1si8t7i-19"
|
|
46591
|
+
})(["font-size:0.45rem !important;color:#666 !important;text-transform:uppercase;letter-spacing:0.5px;white-space:nowrap;"]);
|
|
46592
|
+
var CurrencyFilterButton = /*#__PURE__*/styled.button.withConfig({
|
|
46593
|
+
displayName: "BuyPanel__CurrencyFilterButton",
|
|
46594
|
+
componentId: "sc-1si8t7i-20"
|
|
46595
|
+
})(["padding:3px 8px;font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;border-radius:4px;border:1px solid ", " !important;background:", " !important;color:", " !important;cursor:pointer;transition:border-color 0.15s,background 0.15s,color 0.15s;&:hover{border-color:", " !important;color:", " !important;}"], function (_ref9) {
|
|
46596
|
+
var $active = _ref9.$active;
|
|
46597
|
+
return $active ? '#f59e0b' : 'rgba(255,255,255,0.12)';
|
|
46598
|
+
}, function (_ref10) {
|
|
46599
|
+
var $active = _ref10.$active;
|
|
46600
|
+
return $active ? 'rgba(245,158,11,0.15)' : 'rgba(0,0,0,0.3)';
|
|
46601
|
+
}, function (_ref11) {
|
|
46602
|
+
var $active = _ref11.$active;
|
|
46603
|
+
return $active ? '#f59e0b' : '#777';
|
|
46604
|
+
}, function (_ref12) {
|
|
46605
|
+
var $active = _ref12.$active;
|
|
46606
|
+
return $active ? '#f59e0b' : 'rgba(255,255,255,0.3)';
|
|
46607
|
+
}, function (_ref13) {
|
|
46608
|
+
var $active = _ref13.$active;
|
|
46609
|
+
return $active ? '#f59e0b' : '#bbb';
|
|
46610
|
+
});
|
|
46536
46611
|
|
|
46537
46612
|
var _TRANSACTION_TYPE_COL;
|
|
46538
46613
|
var HISTORY_ITEMS_PER_PAGE = 10;
|
|
@@ -46742,6 +46817,16 @@ var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
46742
46817
|
componentId: "sc-74mioa-21"
|
|
46743
46818
|
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
46744
46819
|
|
|
46820
|
+
var LISTING_CURRENCY_OPTIONS = [{
|
|
46821
|
+
value: MarketplaceAcceptedCurrency.GoldOrDc,
|
|
46822
|
+
label: 'Both'
|
|
46823
|
+
}, {
|
|
46824
|
+
value: MarketplaceAcceptedCurrency.Gold,
|
|
46825
|
+
label: 'Gold'
|
|
46826
|
+
}, {
|
|
46827
|
+
value: MarketplaceAcceptedCurrency.Dc,
|
|
46828
|
+
label: 'DC'
|
|
46829
|
+
}];
|
|
46745
46830
|
var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
46746
46831
|
var items = _ref.items,
|
|
46747
46832
|
atlasIMG = _ref.atlasIMG,
|
|
@@ -46767,6 +46852,9 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
46767
46852
|
var _useState3 = useState(null),
|
|
46768
46853
|
removingItemId = _useState3[0],
|
|
46769
46854
|
setRemovingItemId = _useState3[1];
|
|
46855
|
+
var _useState4 = useState(acceptedCurrency || MarketplaceAcceptedCurrency.GoldOrDc),
|
|
46856
|
+
listingCurrency = _useState4[0],
|
|
46857
|
+
setListingCurrency = _useState4[1];
|
|
46770
46858
|
var itemsContainer = useRef(null);
|
|
46771
46859
|
useEffect(function () {
|
|
46772
46860
|
var _itemsContainer$curre;
|
|
@@ -46776,7 +46864,7 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
46776
46864
|
onClose: setIsCreatingOffer.bind(null, false),
|
|
46777
46865
|
onConfirm: function onConfirm() {
|
|
46778
46866
|
if (selectedItemToSell && price && Number(price)) {
|
|
46779
|
-
onAddItemToMarketplace(selectedItemToSell, Number(price),
|
|
46867
|
+
onAddItemToMarketplace(selectedItemToSell, Number(price), listingCurrency);
|
|
46780
46868
|
setPrice('');
|
|
46781
46869
|
onSelectedItemToSellRemove(selectedItemToSell);
|
|
46782
46870
|
setIsCreatingOffer(false);
|
|
@@ -46845,6 +46933,15 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
46845
46933
|
setIsCreatingOffer(true);
|
|
46846
46934
|
}
|
|
46847
46935
|
}
|
|
46936
|
+
})), React.createElement(CurrencyToggleRow, null, React.createElement(CurrencyToggleLabel, null, "Accept:"), LISTING_CURRENCY_OPTIONS.map(function (opt) {
|
|
46937
|
+
return React.createElement(CurrencyToggleButton, {
|
|
46938
|
+
key: opt.value,
|
|
46939
|
+
"$active": listingCurrency === opt.value,
|
|
46940
|
+
onPointerDown: function onPointerDown() {
|
|
46941
|
+
return setListingCurrency(opt.value);
|
|
46942
|
+
},
|
|
46943
|
+
type: "button"
|
|
46944
|
+
}, opt.label);
|
|
46848
46945
|
}))))), React.createElement(InnerOptionsWrapper, null, React.createElement(SectionLabel$1, {
|
|
46849
46946
|
style: {
|
|
46850
46947
|
marginBottom: '8px'
|
|
@@ -46880,13 +46977,15 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
46880
46977
|
}, items == null ? void 0 : items.map(function (_ref2, index) {
|
|
46881
46978
|
var item = _ref2.item,
|
|
46882
46979
|
price = _ref2.price,
|
|
46883
|
-
_id = _ref2._id
|
|
46980
|
+
_id = _ref2._id,
|
|
46981
|
+
listingCurrency = _ref2.acceptedCurrency;
|
|
46884
46982
|
return React.createElement(MarketplaceRows, {
|
|
46885
46983
|
key: item.key + "_" + index,
|
|
46886
46984
|
atlasIMG: atlasIMG,
|
|
46887
46985
|
atlasJSON: atlasJSON,
|
|
46888
46986
|
item: item,
|
|
46889
46987
|
itemPrice: price,
|
|
46988
|
+
acceptedCurrency: listingCurrency,
|
|
46890
46989
|
equipmentSet: equipmentSet,
|
|
46891
46990
|
onMarketPlaceItemRemove: setRemovingItemId.bind(null, _id)
|
|
46892
46991
|
});
|
|
@@ -46946,15 +47045,46 @@ var SmallCTAButton = /*#__PURE__*/styled(CTAButton).withConfig({
|
|
|
46946
47045
|
displayName: "ManagmentPanel__SmallCTAButton",
|
|
46947
47046
|
componentId: "sc-1yyi6jn-12"
|
|
46948
47047
|
})(["padding:8px 12px;height:32px;span{font-size:0.65rem;}svg{font-size:1.1rem;}"]);
|
|
47048
|
+
var CurrencyToggleRow = /*#__PURE__*/styled.div.withConfig({
|
|
47049
|
+
displayName: "ManagmentPanel__CurrencyToggleRow",
|
|
47050
|
+
componentId: "sc-1yyi6jn-13"
|
|
47051
|
+
})(["display:flex;align-items:center;gap:6px;margin-top:8px;"]);
|
|
47052
|
+
var CurrencyToggleLabel = /*#__PURE__*/styled.span.withConfig({
|
|
47053
|
+
displayName: "ManagmentPanel__CurrencyToggleLabel",
|
|
47054
|
+
componentId: "sc-1yyi6jn-14"
|
|
47055
|
+
})(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;white-space:nowrap;"]);
|
|
47056
|
+
var CurrencyToggleButton = /*#__PURE__*/styled.button.withConfig({
|
|
47057
|
+
displayName: "ManagmentPanel__CurrencyToggleButton",
|
|
47058
|
+
componentId: "sc-1yyi6jn-15"
|
|
47059
|
+
})(["padding:3px 8px;font-family:'Press Start 2P',cursive !important;font-size:0.45rem !important;border-radius:4px;border:1px solid ", " !important;background:", " !important;color:", " !important;cursor:pointer;transition:border-color 0.15s,background 0.15s,color 0.15s;&:hover{border-color:", " !important;color:", " !important;}"], function (_ref3) {
|
|
47060
|
+
var $active = _ref3.$active;
|
|
47061
|
+
return $active ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
47062
|
+
}, function (_ref4) {
|
|
47063
|
+
var $active = _ref4.$active;
|
|
47064
|
+
return $active ? 'rgba(245,158,11,0.15)' : 'rgba(0,0,0,0.3)';
|
|
47065
|
+
}, function (_ref5) {
|
|
47066
|
+
var $active = _ref5.$active;
|
|
47067
|
+
return $active ? '#f59e0b' : '#aaa';
|
|
47068
|
+
}, function (_ref6) {
|
|
47069
|
+
var $active = _ref6.$active;
|
|
47070
|
+
return $active ? '#f59e0b' : 'rgba(255,255,255,0.35)';
|
|
47071
|
+
}, function (_ref7) {
|
|
47072
|
+
var $active = _ref7.$active;
|
|
47073
|
+
return $active ? '#f59e0b' : '#ddd';
|
|
47074
|
+
});
|
|
46949
47075
|
|
|
46950
47076
|
var CURRENCY_OPTIONS = [{
|
|
46951
47077
|
value: MarketplaceAcceptedCurrency.GoldOrDc,
|
|
46952
|
-
label: '
|
|
46953
|
-
description: '
|
|
47078
|
+
label: 'Both',
|
|
47079
|
+
description: 'Gold & DC'
|
|
46954
47080
|
}, {
|
|
46955
47081
|
value: MarketplaceAcceptedCurrency.Gold,
|
|
46956
|
-
label: 'Gold
|
|
46957
|
-
description: '
|
|
47082
|
+
label: 'Gold',
|
|
47083
|
+
description: 'Gold only'
|
|
47084
|
+
}, {
|
|
47085
|
+
value: MarketplaceAcceptedCurrency.Dc,
|
|
47086
|
+
label: 'DC',
|
|
47087
|
+
description: 'DC only'
|
|
46958
47088
|
}];
|
|
46959
47089
|
var MarketplaceSettingsPanel = function MarketplaceSettingsPanel(_ref) {
|
|
46960
47090
|
var acceptedCurrency = _ref.acceptedCurrency,
|
|
@@ -46968,8 +47098,8 @@ var MarketplaceSettingsPanel = function MarketplaceSettingsPanel(_ref) {
|
|
|
46968
47098
|
}
|
|
46969
47099
|
}, React.createElement(OptionLabel$1, {
|
|
46970
47100
|
"$active": acceptedCurrency === option.value
|
|
46971
|
-
}, option.label), React.createElement(OptionDescription, null, option.description)
|
|
46972
|
-
})), React.createElement(Hint, null, "
|
|
47101
|
+
}, option.label), React.createElement(OptionDescription, null, option.description));
|
|
47102
|
+
})), React.createElement(Hint, null, "Default currency for new listings.")));
|
|
46973
47103
|
};
|
|
46974
47104
|
var Wrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
46975
47105
|
displayName: "MarketplaceSettingsPanel__Wrapper",
|
|
@@ -46986,11 +47116,11 @@ var SectionLabel$2 = /*#__PURE__*/styled.p.withConfig({
|
|
|
46986
47116
|
var OptionsGrid = /*#__PURE__*/styled.div.withConfig({
|
|
46987
47117
|
displayName: "MarketplaceSettingsPanel__OptionsGrid",
|
|
46988
47118
|
componentId: "sc-1lvibyi-3"
|
|
46989
|
-
})(["display:grid;grid-template-columns:1fr
|
|
47119
|
+
})(["display:grid;grid-template-columns:repeat(3,1fr);gap:12px;"]);
|
|
46990
47120
|
var OptionCard = /*#__PURE__*/styled.button.withConfig({
|
|
46991
47121
|
displayName: "MarketplaceSettingsPanel__OptionCard",
|
|
46992
47122
|
componentId: "sc-1lvibyi-4"
|
|
46993
|
-
})(["position:relative;display:flex;flex-direction:column;align-items:
|
|
47123
|
+
})(["position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:10px 8px;background:", " !important;border:2px solid ", " !important;border-radius:6px;cursor:pointer;text-align:center;transition:border-color 0.15s,background 0.15s;&:hover{border-color:", " !important;background:", " !important;}"], function (_ref2) {
|
|
46994
47124
|
var $active = _ref2.$active;
|
|
46995
47125
|
return $active ? 'rgba(245, 158, 11, 0.12)' : 'rgba(0, 0, 0, 0.25)';
|
|
46996
47126
|
}, function (_ref3) {
|
|
@@ -47006,21 +47136,17 @@ var OptionCard = /*#__PURE__*/styled.button.withConfig({
|
|
|
47006
47136
|
var OptionLabel$1 = /*#__PURE__*/styled.span.withConfig({
|
|
47007
47137
|
displayName: "MarketplaceSettingsPanel__OptionLabel",
|
|
47008
47138
|
componentId: "sc-1lvibyi-5"
|
|
47009
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.
|
|
47139
|
+
})(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:", " !important;letter-spacing:0.5px;"], function (_ref6) {
|
|
47010
47140
|
var $active = _ref6.$active;
|
|
47011
|
-
return $active ? '#f59e0b' : '#
|
|
47141
|
+
return $active ? '#f59e0b' : '#999';
|
|
47012
47142
|
});
|
|
47013
47143
|
var OptionDescription = /*#__PURE__*/styled.span.withConfig({
|
|
47014
47144
|
displayName: "MarketplaceSettingsPanel__OptionDescription",
|
|
47015
47145
|
componentId: "sc-1lvibyi-6"
|
|
47016
|
-
})(["font-size:0.
|
|
47017
|
-
var ActiveBadge = /*#__PURE__*/styled.span.withConfig({
|
|
47018
|
-
displayName: "MarketplaceSettingsPanel__ActiveBadge",
|
|
47019
|
-
componentId: "sc-1lvibyi-7"
|
|
47020
|
-
})(["position:absolute;top:8px;right:10px;font-size:0.45rem;color:#f59e0b;text-transform:uppercase;letter-spacing:0.5px;opacity:0.8;"]);
|
|
47146
|
+
})(["font-size:0.45rem !important;color:#555 !important;line-height:1.4;"]);
|
|
47021
47147
|
var Hint = /*#__PURE__*/styled.p.withConfig({
|
|
47022
47148
|
displayName: "MarketplaceSettingsPanel__Hint",
|
|
47023
|
-
componentId: "sc-1lvibyi-
|
|
47149
|
+
componentId: "sc-1lvibyi-7"
|
|
47024
47150
|
})(["margin:14px 0 0 0;font-size:0.48rem;color:#666;line-height:1.6;"]);
|
|
47025
47151
|
|
|
47026
47152
|
var Marketplace = function Marketplace(props) {
|