@rpg-engine/long-bow 0.8.233 → 0.8.234
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/DCWallet/DCTransferPanel.d.ts +3 -0
- package/dist/components/DCWallet/DCWalletContent.d.ts +3 -0
- package/dist/components/Marketplace/CharacterListingModal.d.ts +1 -0
- package/dist/components/Marketplace/CharacterTradePanel.d.ts +1 -0
- package/dist/components/Marketplace/ManagmentPanel.d.ts +1 -0
- package/dist/components/Marketplace/Marketplace.d.ts +1 -0
- package/dist/components/Marketplace/MyCharacterListingsPanel.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +90 -50
- 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 +90 -50
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DCWallet/DCTransferPanel.tsx +34 -4
- package/src/components/DCWallet/DCWalletContent.tsx +9 -1
- package/src/components/DCWallet/__test__/DCTransferPanel.spec.tsx +115 -0
- package/src/components/Marketplace/CharacterListingModal.tsx +16 -0
- package/src/components/Marketplace/CharacterTradePanel.tsx +3 -0
- package/src/components/Marketplace/ManagmentPanel.tsx +38 -1
- package/src/components/Marketplace/Marketplace.tsx +2 -1
- package/src/components/Marketplace/MyCharacterListingsPanel.tsx +3 -0
- package/src/components/Marketplace/__test__/CharacterListingModal.spec.tsx +114 -0
- package/src/components/Marketplace/__test__/ManagmentPanel.spec.tsx +125 -0
- package/src/stories/Features/trading/Marketplace.stories.tsx +2 -1
|
@@ -9,9 +9,12 @@ export interface IDCTransferPanelProps {
|
|
|
9
9
|
transferResult: {
|
|
10
10
|
success: boolean;
|
|
11
11
|
message: string;
|
|
12
|
+
amount?: number;
|
|
13
|
+
fee?: number;
|
|
12
14
|
} | null;
|
|
13
15
|
onSendTransfer: (recipientName: string, amount: number) => void;
|
|
14
16
|
onClearTransferResult: () => void;
|
|
17
|
+
feePercent?: number;
|
|
15
18
|
characterName?: string;
|
|
16
19
|
onInputFocus?: () => void;
|
|
17
20
|
onInputBlur?: () => void;
|
|
@@ -14,7 +14,10 @@ export interface IDCWalletContentProps {
|
|
|
14
14
|
transferResult: {
|
|
15
15
|
success: boolean;
|
|
16
16
|
message: string;
|
|
17
|
+
amount?: number;
|
|
18
|
+
fee?: number;
|
|
17
19
|
} | null;
|
|
20
|
+
feePercent?: number;
|
|
18
21
|
onSendTransfer: (recipientName: string, amount: number) => void;
|
|
19
22
|
onClearTransferResult: () => void;
|
|
20
23
|
characterName?: string;
|
|
@@ -13,6 +13,7 @@ export interface ICharacterListingModalProps {
|
|
|
13
13
|
characterAtlasJSON: any;
|
|
14
14
|
characterAtlasIMG: any;
|
|
15
15
|
onCharacterList: (characterId: string, price: number) => void;
|
|
16
|
+
commissionPercent?: number;
|
|
16
17
|
enableHotkeys?: () => void;
|
|
17
18
|
disableHotkeys?: () => void;
|
|
18
19
|
}
|
|
@@ -20,5 +20,6 @@ export interface IMyCharacterListingsPanelProps {
|
|
|
20
20
|
characterAtlasIMG: any;
|
|
21
21
|
enableHotkeys?: () => void;
|
|
22
22
|
disableHotkeys?: () => void;
|
|
23
|
+
commissionPercent?: number;
|
|
23
24
|
}
|
|
24
25
|
export declare const MyCharacterListingsPanel: React.FC<IMyCharacterListingsPanelProps>;
|
|
@@ -5849,7 +5849,9 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
5849
5849
|
onInputFocus = _ref.onInputFocus,
|
|
5850
5850
|
onInputBlur = _ref.onInputBlur,
|
|
5851
5851
|
onSearchCharacter = _ref.onSearchCharacter,
|
|
5852
|
-
searchResults = _ref.searchResults
|
|
5852
|
+
searchResults = _ref.searchResults,
|
|
5853
|
+
_ref$feePercent = _ref.feePercent,
|
|
5854
|
+
feePercent = _ref$feePercent === void 0 ? 0 : _ref$feePercent;
|
|
5853
5855
|
var _useState = React.useState(''),
|
|
5854
5856
|
recipientName = _useState[0],
|
|
5855
5857
|
setRecipientName = _useState[1];
|
|
@@ -5909,7 +5911,8 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
5909
5911
|
setValidationError('Amount must be a positive integer.');
|
|
5910
5912
|
return false;
|
|
5911
5913
|
}
|
|
5912
|
-
|
|
5914
|
+
var fee = Math.floor(parsedAmount * feePercent);
|
|
5915
|
+
if (parsedAmount + fee > dcBalance) {
|
|
5913
5916
|
setValidationError('Insufficient DC balance.');
|
|
5914
5917
|
return false;
|
|
5915
5918
|
}
|
|
@@ -5919,13 +5922,16 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
5919
5922
|
var handleSendClick = React.useCallback(function () {
|
|
5920
5923
|
if (!validate()) return;
|
|
5921
5924
|
setShowConfirm(true);
|
|
5922
|
-
}, [recipientName, amount, dcBalance, characterName]);
|
|
5925
|
+
}, [recipientName, amount, dcBalance, characterName, feePercent]);
|
|
5923
5926
|
var handleConfirmTransfer = React.useCallback(function () {
|
|
5924
5927
|
setShowConfirm(false);
|
|
5925
5928
|
onSendTransfer(recipientName.trim(), parseInt(amount, 10));
|
|
5926
5929
|
setRecipientName('');
|
|
5927
5930
|
setAmount('');
|
|
5928
5931
|
}, [recipientName, amount, onSendTransfer]);
|
|
5932
|
+
var transferAmount = parseInt(amount, 10);
|
|
5933
|
+
var transferFee = Math.floor(transferAmount * feePercent);
|
|
5934
|
+
var transferTotal = transferAmount + transferFee;
|
|
5929
5935
|
return React__default.createElement(PanelContainer$1, null, React__default.createElement(FieldLabel, null, "Recipient Character Name"), React__default.createElement(AutocompleteWrapper, {
|
|
5930
5936
|
ref: dropdownRef
|
|
5931
5937
|
}, React__default.createElement(StyledInput, {
|
|
@@ -5971,7 +5977,7 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
5971
5977
|
onBlur: onInputBlur,
|
|
5972
5978
|
placeholder: "0",
|
|
5973
5979
|
disabled: transferLoading
|
|
5974
|
-
}), validationError && React__default.createElement(ErrorMessage, null, validationError), React__default.createElement(ButtonRow, null, React__default.createElement(CTAButton, {
|
|
5980
|
+
}), feePercent > 0 && React__default.createElement(FeeDisclosure, null, feePercent * 100, "% transfer fee is added to the sender debit."), validationError && React__default.createElement(ErrorMessage, null, validationError), React__default.createElement(ButtonRow, null, React__default.createElement(CTAButton, {
|
|
5975
5981
|
icon: React__default.createElement(fa.FaPaperPlane, null),
|
|
5976
5982
|
label: transferLoading ? 'Sending...' : 'Send',
|
|
5977
5983
|
onClick: handleSendClick,
|
|
@@ -5979,8 +5985,8 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
5979
5985
|
fullWidth: true
|
|
5980
5986
|
})), transferLoading && React__default.createElement(Spinner$1, null), transferResult && React__default.createElement(ResultMessage, {
|
|
5981
5987
|
"$success": transferResult.success
|
|
5982
|
-
}, transferResult.message), showConfirm && React__default.createElement(ConfirmModal, {
|
|
5983
|
-
message: "Transfer " +
|
|
5988
|
+
}, transferResult.message, !!transferResult.fee && " \xB7 " + transferResult.fee.toLocaleString() + " DC fee"), showConfirm && React__default.createElement(ConfirmModal, {
|
|
5989
|
+
message: feePercent > 0 ? "Transfer " + transferAmount.toLocaleString() + " DC to \"" + recipientName.trim() + "\"? Fee: " + transferFee.toLocaleString() + " DC \xB7 Total: " + transferTotal.toLocaleString() + " DC" : "Transfer " + transferAmount.toLocaleString() + " DC to \"" + recipientName.trim() + "\"?",
|
|
5984
5990
|
onConfirm: handleConfirmTransfer,
|
|
5985
5991
|
onClose: function onClose() {
|
|
5986
5992
|
return setShowConfirm(false);
|
|
@@ -6021,17 +6027,21 @@ var ErrorMessage = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
6021
6027
|
displayName: "DCTransferPanel__ErrorMessage",
|
|
6022
6028
|
componentId: "sc-k1vvb1-6"
|
|
6023
6029
|
})(["font-size:9px !important;color:", " !important;font-family:'Press Start 2P',cursive !important;"], uiColors.red);
|
|
6030
|
+
var FeeDisclosure = /*#__PURE__*/styled__default.p.withConfig({
|
|
6031
|
+
displayName: "DCTransferPanel__FeeDisclosure",
|
|
6032
|
+
componentId: "sc-k1vvb1-7"
|
|
6033
|
+
})(["margin:0;color:rgba(254,240,138,0.65);font-size:7px !important;line-height:1.4 !important;"]);
|
|
6024
6034
|
var AutocompleteWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
6025
6035
|
displayName: "DCTransferPanel__AutocompleteWrapper",
|
|
6026
|
-
componentId: "sc-k1vvb1-
|
|
6036
|
+
componentId: "sc-k1vvb1-8"
|
|
6027
6037
|
})(["position:relative;width:100%;"]);
|
|
6028
6038
|
var DropdownList = /*#__PURE__*/styled__default.ul.withConfig({
|
|
6029
6039
|
displayName: "DCTransferPanel__DropdownList",
|
|
6030
|
-
componentId: "sc-k1vvb1-
|
|
6040
|
+
componentId: "sc-k1vvb1-9"
|
|
6031
6041
|
})(["position:absolute;top:100%;left:0;right:0;background:rgba(10,10,30,0.95);border:1px solid #f59e0b;border-top:none;list-style:none;padding:0;margin:0;max-height:120px;overflow-y:auto;z-index:10;"]);
|
|
6032
6042
|
var DropdownItem = /*#__PURE__*/styled__default.li.withConfig({
|
|
6033
6043
|
displayName: "DCTransferPanel__DropdownItem",
|
|
6034
|
-
componentId: "sc-k1vvb1-
|
|
6044
|
+
componentId: "sc-k1vvb1-10"
|
|
6035
6045
|
})(["padding:6px 8px;font-size:11px;font-family:'Press Start 2P',cursive;color:", ";cursor:pointer;&:hover{background:rgba(245,158,11,0.3);}"], uiColors.white);
|
|
6036
6046
|
|
|
6037
6047
|
var DC_TO_USD$1 = 100;
|
|
@@ -6050,7 +6060,9 @@ var DCWalletContent = function DCWalletContent(_ref) {
|
|
|
6050
6060
|
onInputBlur = _ref.onInputBlur,
|
|
6051
6061
|
onBuyDC = _ref.onBuyDC,
|
|
6052
6062
|
onSearchCharacter = _ref.onSearchCharacter,
|
|
6053
|
-
searchResults = _ref.searchResults
|
|
6063
|
+
searchResults = _ref.searchResults,
|
|
6064
|
+
_ref$feePercent = _ref.feePercent,
|
|
6065
|
+
feePercent = _ref$feePercent === void 0 ? 0 : _ref$feePercent;
|
|
6054
6066
|
var usdValue = (dcBalance / DC_TO_USD$1).toFixed(2);
|
|
6055
6067
|
var tabs = [{
|
|
6056
6068
|
id: 'transfer',
|
|
@@ -6059,6 +6071,7 @@ var DCWalletContent = function DCWalletContent(_ref) {
|
|
|
6059
6071
|
dcBalance: dcBalance,
|
|
6060
6072
|
transferLoading: transferLoading,
|
|
6061
6073
|
transferResult: transferResult,
|
|
6074
|
+
feePercent: feePercent,
|
|
6062
6075
|
onSendTransfer: onSendTransfer,
|
|
6063
6076
|
onClearTransferResult: onClearTransferResult,
|
|
6064
6077
|
characterName: characterName,
|
|
@@ -13063,7 +13076,9 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
13063
13076
|
onMoneyWithdraw = _ref.onMoneyWithdraw,
|
|
13064
13077
|
currentPage = _ref.currentPage,
|
|
13065
13078
|
_ref$dcToGoldSwapRate = _ref.dcToGoldSwapRate,
|
|
13066
|
-
dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate
|
|
13079
|
+
dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate,
|
|
13080
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
13081
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
13067
13082
|
var _useState = React.useState(''),
|
|
13068
13083
|
price = _useState[0],
|
|
13069
13084
|
setPrice = _useState[1];
|
|
@@ -13081,6 +13096,10 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
13081
13096
|
var _itemsContainer$curre;
|
|
13082
13097
|
(_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
|
|
13083
13098
|
}, [currentPage]);
|
|
13099
|
+
var parsedPrice = Number(price);
|
|
13100
|
+
var netGoldProceeds = parsedPrice - Math.floor(parsedPrice * commissionPercent);
|
|
13101
|
+
var netDCProceeds = shared.goldToDC(netGoldProceeds);
|
|
13102
|
+
var netProceedsLabel = listingCurrency === shared.MarketplaceAcceptedCurrency.Gold ? netGoldProceeds.toLocaleString() + " gold" : listingCurrency === shared.MarketplaceAcceptedCurrency.Dc ? shared.formatDCAmount(netDCProceeds) + " DC" : netGoldProceeds.toLocaleString() + " gold or " + shared.formatDCAmount(netDCProceeds) + " DC";
|
|
13084
13103
|
return React__default.createElement(React__default.Fragment, null, isCreatingOffer && React__default.createElement(ConfirmModal, {
|
|
13085
13104
|
onClose: setIsCreatingOffer.bind(null, false),
|
|
13086
13105
|
onConfirm: function onConfirm() {
|
|
@@ -13154,7 +13173,7 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
13154
13173
|
setIsCreatingOffer(true);
|
|
13155
13174
|
}
|
|
13156
13175
|
}
|
|
13157
|
-
})), React__default.createElement(CurrencyToggleRow, null, React__default.createElement(CurrencyToggleLabel, null, "Accept:"), LISTING_CURRENCY_OPTIONS.map(function (opt) {
|
|
13176
|
+
})), commissionPercent > 0 && React__default.createElement(FeeDisclosure$1, null, commissionPercent * 100, "% marketplace commission is deducted from seller proceeds."), price && Number(price) > 0 && commissionPercent > 0 && React__default.createElement(NetProceeds, null, "You'll receive: ", netProceedsLabel, ' ', "(after ", commissionPercent * 100, "% commission)"), React__default.createElement(CurrencyToggleRow, null, React__default.createElement(CurrencyToggleLabel, null, "Accept:"), LISTING_CURRENCY_OPTIONS.map(function (opt) {
|
|
13158
13177
|
return React__default.createElement(CurrencyToggleButton, {
|
|
13159
13178
|
key: opt.value,
|
|
13160
13179
|
"$active": listingCurrency === opt.value,
|
|
@@ -13239,48 +13258,56 @@ var SellDescription = /*#__PURE__*/styled__default.p.withConfig({
|
|
|
13239
13258
|
var PriceInputWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
13240
13259
|
displayName: "ManagmentPanel__PriceInputWrapper",
|
|
13241
13260
|
componentId: "sc-1yyi6jn-5"
|
|
13242
|
-
})(["display:flex;flex-direction:column;flex-grow:1
|
|
13261
|
+
})(["display:flex;flex-direction:column;flex-grow:1;> p:first-child{margin:0 0 8px 0;font-size:0.6rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;}.price-input{width:60px;height:32px;flex-grow:1;font-size:0.7rem;}.offer-btn{padding:10px 14px;height:32px;}"]);
|
|
13262
|
+
var NetProceeds = /*#__PURE__*/styled__default.p.withConfig({
|
|
13263
|
+
displayName: "ManagmentPanel__NetProceeds",
|
|
13264
|
+
componentId: "sc-1yyi6jn-6"
|
|
13265
|
+
})(["margin:8px 0 0;color:#fef08a;font-size:8px !important;line-height:1.5 !important;"]);
|
|
13266
|
+
var FeeDisclosure$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
13267
|
+
displayName: "ManagmentPanel__FeeDisclosure",
|
|
13268
|
+
componentId: "sc-1yyi6jn-7"
|
|
13269
|
+
})(["margin:6px 0 0;color:rgba(254,240,138,0.65);font-size:7px !important;line-height:1.4 !important;"]);
|
|
13243
13270
|
var GoldIcon$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13244
13271
|
displayName: "ManagmentPanel__GoldIcon",
|
|
13245
|
-
componentId: "sc-1yyi6jn-
|
|
13272
|
+
componentId: "sc-1yyi6jn-8"
|
|
13246
13273
|
})(["position:relative;display:flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:4px;flex-shrink:0;top:-0.5rem;left:-0.5rem;"]);
|
|
13247
13274
|
var WealthWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
13248
13275
|
displayName: "ManagmentPanel__WealthWrapper",
|
|
13249
|
-
componentId: "sc-1yyi6jn-
|
|
13276
|
+
componentId: "sc-1yyi6jn-9"
|
|
13250
13277
|
})(["display:flex;flex-direction:column;gap:8px;flex-grow:1;& > :last-child{margin-top:auto;}"]);
|
|
13251
13278
|
var BalanceRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13252
13279
|
displayName: "ManagmentPanel__BalanceRow",
|
|
13253
|
-
componentId: "sc-1yyi6jn-
|
|
13280
|
+
componentId: "sc-1yyi6jn-10"
|
|
13254
13281
|
})(["display:flex;align-items:center;justify-content:flex-end;gap:10px;background:rgba(0,0,0,0.3);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:8px 12px;"]);
|
|
13255
13282
|
var BalanceAmount$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
13256
13283
|
displayName: "ManagmentPanel__BalanceAmount",
|
|
13257
|
-
componentId: "sc-1yyi6jn-
|
|
13284
|
+
componentId: "sc-1yyi6jn-11"
|
|
13258
13285
|
})(["font-family:'Press Start 2P',cursive;font-size:0.8rem;color:", ";text-shadow:0 2px 4px rgba(0,0,0,0.5);margin-left:auto;"], function (props) {
|
|
13259
13286
|
return props.$disabled ? uiColors.lightGray : '#fef08a';
|
|
13260
13287
|
});
|
|
13261
13288
|
var BalanceCurrencyLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
13262
13289
|
displayName: "ManagmentPanel__BalanceCurrencyLabel",
|
|
13263
|
-
componentId: "sc-1yyi6jn-
|
|
13290
|
+
componentId: "sc-1yyi6jn-12"
|
|
13264
13291
|
})(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;min-width:45px;text-align:right;"]);
|
|
13265
13292
|
var ItemComponentScrollWrapper$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13266
13293
|
displayName: "ManagmentPanel__ItemComponentScrollWrapper",
|
|
13267
|
-
componentId: "sc-1yyi6jn-
|
|
13294
|
+
componentId: "sc-1yyi6jn-13"
|
|
13268
13295
|
})(["overflow-y:scroll;overflow-x:hidden;height:335px;width:95%;margin:1rem auto 0 auto;background:rgba(0,0,0,0.2);border:1px solid rgba(255,255,255,0.05);border-radius:4px;@media (max-width:950px){height:195px;}"]);
|
|
13269
13296
|
var SmallCTAButton = /*#__PURE__*/styled__default(CTAButton).withConfig({
|
|
13270
13297
|
displayName: "ManagmentPanel__SmallCTAButton",
|
|
13271
|
-
componentId: "sc-1yyi6jn-
|
|
13298
|
+
componentId: "sc-1yyi6jn-14"
|
|
13272
13299
|
})(["padding:8px 12px;height:32px;span{font-size:0.65rem;}svg{font-size:1.1rem;}"]);
|
|
13273
13300
|
var CurrencyToggleRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13274
13301
|
displayName: "ManagmentPanel__CurrencyToggleRow",
|
|
13275
|
-
componentId: "sc-1yyi6jn-
|
|
13302
|
+
componentId: "sc-1yyi6jn-15"
|
|
13276
13303
|
})(["display:flex;align-items:center;gap:6px;margin-top:8px;"]);
|
|
13277
13304
|
var CurrencyToggleLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
13278
13305
|
displayName: "ManagmentPanel__CurrencyToggleLabel",
|
|
13279
|
-
componentId: "sc-1yyi6jn-
|
|
13306
|
+
componentId: "sc-1yyi6jn-16"
|
|
13280
13307
|
})(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;white-space:nowrap;"]);
|
|
13281
13308
|
var CurrencyToggleButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
13282
13309
|
displayName: "ManagmentPanel__CurrencyToggleButton",
|
|
13283
|
-
componentId: "sc-1yyi6jn-
|
|
13310
|
+
componentId: "sc-1yyi6jn-17"
|
|
13284
13311
|
})(["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) {
|
|
13285
13312
|
var $active = _ref3.$active;
|
|
13286
13313
|
return $active ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
@@ -13299,7 +13326,7 @@ var CurrencyToggleButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
|
13299
13326
|
});
|
|
13300
13327
|
var DCPreview = /*#__PURE__*/styled__default.span.withConfig({
|
|
13301
13328
|
displayName: "ManagmentPanel__DCPreview",
|
|
13302
|
-
componentId: "sc-1yyi6jn-
|
|
13329
|
+
componentId: "sc-1yyi6jn-18"
|
|
13303
13330
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:rgba(167,139,250,0.8) !important;white-space:nowrap;margin-left:auto;"]);
|
|
13304
13331
|
|
|
13305
13332
|
var CURRENCY_OPTIONS = [{
|
|
@@ -13942,7 +13969,9 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
13942
13969
|
characterAtlasIMG = _ref.characterAtlasIMG,
|
|
13943
13970
|
onCharacterList = _ref.onCharacterList,
|
|
13944
13971
|
enableHotkeys = _ref.enableHotkeys,
|
|
13945
|
-
disableHotkeys = _ref.disableHotkeys
|
|
13972
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
13973
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
13974
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
13946
13975
|
var _useState = React.useState(null),
|
|
13947
13976
|
selectedId = _useState[0],
|
|
13948
13977
|
setSelectedId = _useState[1];
|
|
@@ -14060,7 +14089,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
14060
14089
|
centered: true
|
|
14061
14090
|
})), React__default.createElement(PricePreviewAmount, null, React__default.createElement(MMORPGNumber, {
|
|
14062
14091
|
value: Number(price)
|
|
14063
|
-
}), " DC")), React__default.createElement(DCRateStrip, null)))));
|
|
14092
|
+
}), " DC")), price && Number(price) > 0 && commissionPercent > 0 && React__default.createElement(NetProceeds$1, null, "You'll receive:", ' ', (Number(price) - Math.floor(Number(price) * commissionPercent)).toLocaleString(), " DC", ' ', "(after ", commissionPercent * 100, "% commission)"), React__default.createElement(DCRateStrip, null)))));
|
|
14064
14093
|
};
|
|
14065
14094
|
var scaleIn$3 = /*#__PURE__*/styled.keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
14066
14095
|
var Overlay$8 = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -14075,25 +14104,29 @@ var ModalContent$6 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
14075
14104
|
displayName: "CharacterListingModal__ModalContent",
|
|
14076
14105
|
componentId: "sc-1uxkx35-2"
|
|
14077
14106
|
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:440px;max-width:92%;max-height:80dvh;display:flex;flex-direction:column;gap:16px;overflow:hidden;pointer-events:auto;animation:", " 0.15s ease-out;"], scaleIn$3);
|
|
14107
|
+
var NetProceeds$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
14108
|
+
displayName: "CharacterListingModal__NetProceeds",
|
|
14109
|
+
componentId: "sc-1uxkx35-3"
|
|
14110
|
+
})(["margin:0;color:#fef08a;font-size:8px !important;line-height:1.5 !important;"]);
|
|
14078
14111
|
var Header$c = /*#__PURE__*/styled__default.div.withConfig({
|
|
14079
14112
|
displayName: "CharacterListingModal__Header",
|
|
14080
|
-
componentId: "sc-1uxkx35-
|
|
14113
|
+
componentId: "sc-1uxkx35-4"
|
|
14081
14114
|
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
14082
14115
|
var Title$d = /*#__PURE__*/styled__default.h3.withConfig({
|
|
14083
14116
|
displayName: "CharacterListingModal__Title",
|
|
14084
|
-
componentId: "sc-1uxkx35-
|
|
14117
|
+
componentId: "sc-1uxkx35-5"
|
|
14085
14118
|
})(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.65rem !important;color:#fef08a !important;"]);
|
|
14086
14119
|
var CloseButton$f = /*#__PURE__*/styled__default.button.withConfig({
|
|
14087
14120
|
displayName: "CharacterListingModal__CloseButton",
|
|
14088
|
-
componentId: "sc-1uxkx35-
|
|
14121
|
+
componentId: "sc-1uxkx35-6"
|
|
14089
14122
|
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;pointer-events:auto;&:hover{color:#ffffff;}"]);
|
|
14090
14123
|
var CharacterList$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14091
14124
|
displayName: "CharacterListingModal__CharacterList",
|
|
14092
|
-
componentId: "sc-1uxkx35-
|
|
14125
|
+
componentId: "sc-1uxkx35-7"
|
|
14093
14126
|
})(["display:flex;flex-direction:column;gap:6px;overflow-y:auto;max-height:260px;padding:2px;&::-webkit-scrollbar{width:6px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.2);border-radius:4px;}&::-webkit-scrollbar-thumb{background:rgba(245,158,11,0.3);border-radius:4px;}"]);
|
|
14094
14127
|
var CharacterRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
14095
14128
|
displayName: "CharacterListingModal__CharacterRow",
|
|
14096
|
-
componentId: "sc-1uxkx35-
|
|
14129
|
+
componentId: "sc-1uxkx35-8"
|
|
14097
14130
|
})(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:", ";opacity:", ";transition:border-color 0.15s,background 0.15s;&:hover{border-color:", ";background:", ";}&:focus-visible{outline:2px solid rgba(245,158,11,0.6);outline-offset:2px;}"], function (_ref2) {
|
|
14098
14131
|
var $selected = _ref2.$selected,
|
|
14099
14132
|
$disabled = _ref2.$disabled;
|
|
@@ -14119,7 +14152,7 @@ var CharacterRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
14119
14152
|
});
|
|
14120
14153
|
var RadioCircle$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14121
14154
|
displayName: "CharacterListingModal__RadioCircle",
|
|
14122
|
-
componentId: "sc-1uxkx35-
|
|
14155
|
+
componentId: "sc-1uxkx35-9"
|
|
14123
14156
|
})(["width:14px;height:14px;border-radius:50%;border:2px solid ", ";flex-shrink:0;display:flex;align-items:center;justify-content:center;&::after{content:'';width:6px;height:6px;border-radius:50%;background:", ";opacity:", ";transition:opacity 0.15s;}"], function (_ref8) {
|
|
14124
14157
|
var $selected = _ref8.$selected,
|
|
14125
14158
|
$disabled = _ref8.$disabled;
|
|
@@ -14133,55 +14166,55 @@ var RadioCircle$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
14133
14166
|
});
|
|
14134
14167
|
var ActiveTag = /*#__PURE__*/styled__default.span.withConfig({
|
|
14135
14168
|
displayName: "CharacterListingModal__ActiveTag",
|
|
14136
|
-
componentId: "sc-1uxkx35-
|
|
14169
|
+
componentId: "sc-1uxkx35-10"
|
|
14137
14170
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.35rem !important;color:#666 !important;background:rgba(255,255,255,0.06);padding:3px 6px;border-radius:3px;white-space:nowrap;margin-left:auto;"]);
|
|
14138
14171
|
var SpriteWrapper$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14139
14172
|
displayName: "CharacterListingModal__SpriteWrapper",
|
|
14140
|
-
componentId: "sc-1uxkx35-
|
|
14173
|
+
componentId: "sc-1uxkx35-11"
|
|
14141
14174
|
})(["display:flex;align-items:center;justify-content:center;image-rendering:pixelated;flex-shrink:0;width:40px;height:40px;"]);
|
|
14142
14175
|
var CharacterInfo$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14143
14176
|
displayName: "CharacterListingModal__CharacterInfo",
|
|
14144
|
-
componentId: "sc-1uxkx35-
|
|
14177
|
+
componentId: "sc-1uxkx35-12"
|
|
14145
14178
|
})(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
|
|
14146
14179
|
var CharacterName$3 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14147
14180
|
displayName: "CharacterListingModal__CharacterName",
|
|
14148
|
-
componentId: "sc-1uxkx35-
|
|
14181
|
+
componentId: "sc-1uxkx35-13"
|
|
14149
14182
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#f3f4f6 !important;"]);
|
|
14150
14183
|
var CharacterMeta$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14151
14184
|
displayName: "CharacterListingModal__CharacterMeta",
|
|
14152
|
-
componentId: "sc-1uxkx35-
|
|
14185
|
+
componentId: "sc-1uxkx35-14"
|
|
14153
14186
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
14154
14187
|
var PricePreview = /*#__PURE__*/styled__default.div.withConfig({
|
|
14155
14188
|
displayName: "CharacterListingModal__PricePreview",
|
|
14156
|
-
componentId: "sc-1uxkx35-
|
|
14189
|
+
componentId: "sc-1uxkx35-15"
|
|
14157
14190
|
})(["display:flex;align-items:center;gap:6px;"]);
|
|
14158
14191
|
var DCCoinWrapper$4 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14159
14192
|
displayName: "CharacterListingModal__DCCoinWrapper",
|
|
14160
|
-
componentId: "sc-1uxkx35-
|
|
14193
|
+
componentId: "sc-1uxkx35-16"
|
|
14161
14194
|
})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;"]);
|
|
14162
14195
|
var PricePreviewAmount = /*#__PURE__*/styled__default.span.withConfig({
|
|
14163
14196
|
displayName: "CharacterListingModal__PricePreviewAmount",
|
|
14164
|
-
componentId: "sc-1uxkx35-
|
|
14197
|
+
componentId: "sc-1uxkx35-17"
|
|
14165
14198
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#fef08a !important;"]);
|
|
14166
14199
|
var PriceSection$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14167
14200
|
displayName: "CharacterListingModal__PriceSection",
|
|
14168
|
-
componentId: "sc-1uxkx35-
|
|
14201
|
+
componentId: "sc-1uxkx35-18"
|
|
14169
14202
|
})(["display:flex;flex-direction:column;gap:8px;border-top:1px solid rgba(255,255,255,0.06);padding-top:12px;"]);
|
|
14170
14203
|
var PriceLabel = /*#__PURE__*/styled__default.p.withConfig({
|
|
14171
14204
|
displayName: "CharacterListingModal__PriceLabel",
|
|
14172
|
-
componentId: "sc-1uxkx35-
|
|
14205
|
+
componentId: "sc-1uxkx35-19"
|
|
14173
14206
|
})(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
14174
14207
|
var PriceRow$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14175
14208
|
displayName: "CharacterListingModal__PriceRow",
|
|
14176
|
-
componentId: "sc-1uxkx35-
|
|
14209
|
+
componentId: "sc-1uxkx35-20"
|
|
14177
14210
|
})(["display:flex;gap:8px;align-items:center;.price-input{flex:1;height:12px;}"]);
|
|
14178
14211
|
var ListBtn = /*#__PURE__*/styled__default(CTAButton).withConfig({
|
|
14179
14212
|
displayName: "CharacterListingModal__ListBtn",
|
|
14180
|
-
componentId: "sc-1uxkx35-
|
|
14213
|
+
componentId: "sc-1uxkx35-21"
|
|
14181
14214
|
})(["flex-shrink:0;padding:10px 16px;height:32px;span{font-size:0.6rem;}svg{font-size:1.1rem;}"]);
|
|
14182
14215
|
var EmptyState$6 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14183
14216
|
displayName: "CharacterListingModal__EmptyState",
|
|
14184
|
-
componentId: "sc-1uxkx35-
|
|
14217
|
+
componentId: "sc-1uxkx35-22"
|
|
14185
14218
|
})(["display:flex;align-items:center;justify-content:center;padding:32px 16px;font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#666 !important;text-transform:uppercase;letter-spacing:1px;"]);
|
|
14186
14219
|
|
|
14187
14220
|
var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
@@ -14199,7 +14232,9 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
|
14199
14232
|
characterAtlasJSON = _ref.characterAtlasJSON,
|
|
14200
14233
|
characterAtlasIMG = _ref.characterAtlasIMG,
|
|
14201
14234
|
enableHotkeys = _ref.enableHotkeys,
|
|
14202
|
-
disableHotkeys = _ref.disableHotkeys
|
|
14235
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
14236
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
14237
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
14203
14238
|
var _useState = React.useState(null),
|
|
14204
14239
|
delistingId = _useState[0],
|
|
14205
14240
|
setDelistingId = _useState[1];
|
|
@@ -14242,7 +14277,8 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
|
14242
14277
|
setIsListingModalOpen(false);
|
|
14243
14278
|
},
|
|
14244
14279
|
enableHotkeys: enableHotkeys,
|
|
14245
|
-
disableHotkeys: disableHotkeys
|
|
14280
|
+
disableHotkeys: disableHotkeys,
|
|
14281
|
+
commissionPercent: commissionPercent
|
|
14246
14282
|
}), React__default.createElement(Toolbar, null, React__default.createElement(ListCharacterBtn, {
|
|
14247
14283
|
icon: React__default.createElement(ShoppingBag.ShoppingBag, {
|
|
14248
14284
|
width: 16,
|
|
@@ -14401,7 +14437,9 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
|
|
|
14401
14437
|
characterAtlasJSON = _ref.characterAtlasJSON,
|
|
14402
14438
|
characterAtlasIMG = _ref.characterAtlasIMG,
|
|
14403
14439
|
enableHotkeys = _ref.enableHotkeys,
|
|
14404
|
-
disableHotkeys = _ref.disableHotkeys
|
|
14440
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
14441
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
14442
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
14405
14443
|
var _useState = React.useState('browse'),
|
|
14406
14444
|
subTab = _useState[0],
|
|
14407
14445
|
setSubTab = _useState[1];
|
|
@@ -14448,7 +14486,8 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
|
|
|
14448
14486
|
characterAtlasJSON: characterAtlasJSON != null ? characterAtlasJSON : atlasJSON,
|
|
14449
14487
|
characterAtlasIMG: characterAtlasIMG != null ? characterAtlasIMG : atlasIMG,
|
|
14450
14488
|
enableHotkeys: enableHotkeys,
|
|
14451
|
-
disableHotkeys: disableHotkeys
|
|
14489
|
+
disableHotkeys: disableHotkeys,
|
|
14490
|
+
commissionPercent: commissionPercent
|
|
14452
14491
|
}));
|
|
14453
14492
|
};
|
|
14454
14493
|
var CharacterSubTabs = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -14668,7 +14707,8 @@ var Marketplace = function Marketplace(props) {
|
|
|
14668
14707
|
characterAtlasJSON: characterAtlasJSON,
|
|
14669
14708
|
characterAtlasIMG: characterAtlasIMG,
|
|
14670
14709
|
enableHotkeys: props.enableHotkeys,
|
|
14671
|
-
disableHotkeys: props.disableHotkeys
|
|
14710
|
+
disableHotkeys: props.disableHotkeys,
|
|
14711
|
+
commissionPercent: props.commissionPercent
|
|
14672
14712
|
}), activeTab === 'sell' && React__default.createElement(ManagmentPanel, Object.assign({}, props, {
|
|
14673
14713
|
acceptedCurrency: acceptedCurrency
|
|
14674
14714
|
})), activeTab === 'buy-orders' && React__default.createElement(React__default.Fragment, null, React__default.createElement(BuyOrderPanel, {
|