@rpg-engine/long-bow 0.8.233 → 0.8.235
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 +86 -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 +86 -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 +26 -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 +119 -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
|
+
})), 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,52 @@ 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;"]);
|
|
13243
13266
|
var GoldIcon$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13244
13267
|
displayName: "ManagmentPanel__GoldIcon",
|
|
13245
|
-
componentId: "sc-1yyi6jn-
|
|
13268
|
+
componentId: "sc-1yyi6jn-7"
|
|
13246
13269
|
})(["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
13270
|
var WealthWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
13248
13271
|
displayName: "ManagmentPanel__WealthWrapper",
|
|
13249
|
-
componentId: "sc-1yyi6jn-
|
|
13272
|
+
componentId: "sc-1yyi6jn-8"
|
|
13250
13273
|
})(["display:flex;flex-direction:column;gap:8px;flex-grow:1;& > :last-child{margin-top:auto;}"]);
|
|
13251
13274
|
var BalanceRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13252
13275
|
displayName: "ManagmentPanel__BalanceRow",
|
|
13253
|
-
componentId: "sc-1yyi6jn-
|
|
13276
|
+
componentId: "sc-1yyi6jn-9"
|
|
13254
13277
|
})(["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
13278
|
var BalanceAmount$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
13256
13279
|
displayName: "ManagmentPanel__BalanceAmount",
|
|
13257
|
-
componentId: "sc-1yyi6jn-
|
|
13280
|
+
componentId: "sc-1yyi6jn-10"
|
|
13258
13281
|
})(["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
13282
|
return props.$disabled ? uiColors.lightGray : '#fef08a';
|
|
13260
13283
|
});
|
|
13261
13284
|
var BalanceCurrencyLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
13262
13285
|
displayName: "ManagmentPanel__BalanceCurrencyLabel",
|
|
13263
|
-
componentId: "sc-1yyi6jn-
|
|
13286
|
+
componentId: "sc-1yyi6jn-11"
|
|
13264
13287
|
})(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;min-width:45px;text-align:right;"]);
|
|
13265
13288
|
var ItemComponentScrollWrapper$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13266
13289
|
displayName: "ManagmentPanel__ItemComponentScrollWrapper",
|
|
13267
|
-
componentId: "sc-1yyi6jn-
|
|
13290
|
+
componentId: "sc-1yyi6jn-12"
|
|
13268
13291
|
})(["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
13292
|
var SmallCTAButton = /*#__PURE__*/styled__default(CTAButton).withConfig({
|
|
13270
13293
|
displayName: "ManagmentPanel__SmallCTAButton",
|
|
13271
|
-
componentId: "sc-1yyi6jn-
|
|
13294
|
+
componentId: "sc-1yyi6jn-13"
|
|
13272
13295
|
})(["padding:8px 12px;height:32px;span{font-size:0.65rem;}svg{font-size:1.1rem;}"]);
|
|
13273
13296
|
var CurrencyToggleRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13274
13297
|
displayName: "ManagmentPanel__CurrencyToggleRow",
|
|
13275
|
-
componentId: "sc-1yyi6jn-
|
|
13298
|
+
componentId: "sc-1yyi6jn-14"
|
|
13276
13299
|
})(["display:flex;align-items:center;gap:6px;margin-top:8px;"]);
|
|
13277
13300
|
var CurrencyToggleLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
13278
13301
|
displayName: "ManagmentPanel__CurrencyToggleLabel",
|
|
13279
|
-
componentId: "sc-1yyi6jn-
|
|
13302
|
+
componentId: "sc-1yyi6jn-15"
|
|
13280
13303
|
})(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;white-space:nowrap;"]);
|
|
13281
13304
|
var CurrencyToggleButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
13282
13305
|
displayName: "ManagmentPanel__CurrencyToggleButton",
|
|
13283
|
-
componentId: "sc-1yyi6jn-
|
|
13306
|
+
componentId: "sc-1yyi6jn-16"
|
|
13284
13307
|
})(["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
13308
|
var $active = _ref3.$active;
|
|
13286
13309
|
return $active ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
@@ -13299,7 +13322,7 @@ var CurrencyToggleButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
|
13299
13322
|
});
|
|
13300
13323
|
var DCPreview = /*#__PURE__*/styled__default.span.withConfig({
|
|
13301
13324
|
displayName: "ManagmentPanel__DCPreview",
|
|
13302
|
-
componentId: "sc-1yyi6jn-
|
|
13325
|
+
componentId: "sc-1yyi6jn-17"
|
|
13303
13326
|
})(["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
13327
|
|
|
13305
13328
|
var CURRENCY_OPTIONS = [{
|
|
@@ -13942,7 +13965,9 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
13942
13965
|
characterAtlasIMG = _ref.characterAtlasIMG,
|
|
13943
13966
|
onCharacterList = _ref.onCharacterList,
|
|
13944
13967
|
enableHotkeys = _ref.enableHotkeys,
|
|
13945
|
-
disableHotkeys = _ref.disableHotkeys
|
|
13968
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
13969
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
13970
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
13946
13971
|
var _useState = React.useState(null),
|
|
13947
13972
|
selectedId = _useState[0],
|
|
13948
13973
|
setSelectedId = _useState[1];
|
|
@@ -14060,7 +14085,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
14060
14085
|
centered: true
|
|
14061
14086
|
})), React__default.createElement(PricePreviewAmount, null, React__default.createElement(MMORPGNumber, {
|
|
14062
14087
|
value: Number(price)
|
|
14063
|
-
}), " DC")), React__default.createElement(DCRateStrip, null)))));
|
|
14088
|
+
}), " 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
14089
|
};
|
|
14065
14090
|
var scaleIn$3 = /*#__PURE__*/styled.keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
14066
14091
|
var Overlay$8 = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -14075,25 +14100,29 @@ var ModalContent$6 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
14075
14100
|
displayName: "CharacterListingModal__ModalContent",
|
|
14076
14101
|
componentId: "sc-1uxkx35-2"
|
|
14077
14102
|
})(["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);
|
|
14103
|
+
var NetProceeds$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
14104
|
+
displayName: "CharacterListingModal__NetProceeds",
|
|
14105
|
+
componentId: "sc-1uxkx35-3"
|
|
14106
|
+
})(["margin:0;color:#fef08a;font-size:8px !important;line-height:1.5 !important;"]);
|
|
14078
14107
|
var Header$c = /*#__PURE__*/styled__default.div.withConfig({
|
|
14079
14108
|
displayName: "CharacterListingModal__Header",
|
|
14080
|
-
componentId: "sc-1uxkx35-
|
|
14109
|
+
componentId: "sc-1uxkx35-4"
|
|
14081
14110
|
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
14082
14111
|
var Title$d = /*#__PURE__*/styled__default.h3.withConfig({
|
|
14083
14112
|
displayName: "CharacterListingModal__Title",
|
|
14084
|
-
componentId: "sc-1uxkx35-
|
|
14113
|
+
componentId: "sc-1uxkx35-5"
|
|
14085
14114
|
})(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.65rem !important;color:#fef08a !important;"]);
|
|
14086
14115
|
var CloseButton$f = /*#__PURE__*/styled__default.button.withConfig({
|
|
14087
14116
|
displayName: "CharacterListingModal__CloseButton",
|
|
14088
|
-
componentId: "sc-1uxkx35-
|
|
14117
|
+
componentId: "sc-1uxkx35-6"
|
|
14089
14118
|
})(["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
14119
|
var CharacterList$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14091
14120
|
displayName: "CharacterListingModal__CharacterList",
|
|
14092
|
-
componentId: "sc-1uxkx35-
|
|
14121
|
+
componentId: "sc-1uxkx35-7"
|
|
14093
14122
|
})(["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
14123
|
var CharacterRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
14095
14124
|
displayName: "CharacterListingModal__CharacterRow",
|
|
14096
|
-
componentId: "sc-1uxkx35-
|
|
14125
|
+
componentId: "sc-1uxkx35-8"
|
|
14097
14126
|
})(["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
14127
|
var $selected = _ref2.$selected,
|
|
14099
14128
|
$disabled = _ref2.$disabled;
|
|
@@ -14119,7 +14148,7 @@ var CharacterRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
14119
14148
|
});
|
|
14120
14149
|
var RadioCircle$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14121
14150
|
displayName: "CharacterListingModal__RadioCircle",
|
|
14122
|
-
componentId: "sc-1uxkx35-
|
|
14151
|
+
componentId: "sc-1uxkx35-9"
|
|
14123
14152
|
})(["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
14153
|
var $selected = _ref8.$selected,
|
|
14125
14154
|
$disabled = _ref8.$disabled;
|
|
@@ -14133,55 +14162,55 @@ var RadioCircle$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
14133
14162
|
});
|
|
14134
14163
|
var ActiveTag = /*#__PURE__*/styled__default.span.withConfig({
|
|
14135
14164
|
displayName: "CharacterListingModal__ActiveTag",
|
|
14136
|
-
componentId: "sc-1uxkx35-
|
|
14165
|
+
componentId: "sc-1uxkx35-10"
|
|
14137
14166
|
})(["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
14167
|
var SpriteWrapper$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14139
14168
|
displayName: "CharacterListingModal__SpriteWrapper",
|
|
14140
|
-
componentId: "sc-1uxkx35-
|
|
14169
|
+
componentId: "sc-1uxkx35-11"
|
|
14141
14170
|
})(["display:flex;align-items:center;justify-content:center;image-rendering:pixelated;flex-shrink:0;width:40px;height:40px;"]);
|
|
14142
14171
|
var CharacterInfo$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14143
14172
|
displayName: "CharacterListingModal__CharacterInfo",
|
|
14144
|
-
componentId: "sc-1uxkx35-
|
|
14173
|
+
componentId: "sc-1uxkx35-12"
|
|
14145
14174
|
})(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
|
|
14146
14175
|
var CharacterName$3 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14147
14176
|
displayName: "CharacterListingModal__CharacterName",
|
|
14148
|
-
componentId: "sc-1uxkx35-
|
|
14177
|
+
componentId: "sc-1uxkx35-13"
|
|
14149
14178
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#f3f4f6 !important;"]);
|
|
14150
14179
|
var CharacterMeta$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14151
14180
|
displayName: "CharacterListingModal__CharacterMeta",
|
|
14152
|
-
componentId: "sc-1uxkx35-
|
|
14181
|
+
componentId: "sc-1uxkx35-14"
|
|
14153
14182
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
14154
14183
|
var PricePreview = /*#__PURE__*/styled__default.div.withConfig({
|
|
14155
14184
|
displayName: "CharacterListingModal__PricePreview",
|
|
14156
|
-
componentId: "sc-1uxkx35-
|
|
14185
|
+
componentId: "sc-1uxkx35-15"
|
|
14157
14186
|
})(["display:flex;align-items:center;gap:6px;"]);
|
|
14158
14187
|
var DCCoinWrapper$4 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14159
14188
|
displayName: "CharacterListingModal__DCCoinWrapper",
|
|
14160
|
-
componentId: "sc-1uxkx35-
|
|
14189
|
+
componentId: "sc-1uxkx35-16"
|
|
14161
14190
|
})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;"]);
|
|
14162
14191
|
var PricePreviewAmount = /*#__PURE__*/styled__default.span.withConfig({
|
|
14163
14192
|
displayName: "CharacterListingModal__PricePreviewAmount",
|
|
14164
|
-
componentId: "sc-1uxkx35-
|
|
14193
|
+
componentId: "sc-1uxkx35-17"
|
|
14165
14194
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#fef08a !important;"]);
|
|
14166
14195
|
var PriceSection$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14167
14196
|
displayName: "CharacterListingModal__PriceSection",
|
|
14168
|
-
componentId: "sc-1uxkx35-
|
|
14197
|
+
componentId: "sc-1uxkx35-18"
|
|
14169
14198
|
})(["display:flex;flex-direction:column;gap:8px;border-top:1px solid rgba(255,255,255,0.06);padding-top:12px;"]);
|
|
14170
14199
|
var PriceLabel = /*#__PURE__*/styled__default.p.withConfig({
|
|
14171
14200
|
displayName: "CharacterListingModal__PriceLabel",
|
|
14172
|
-
componentId: "sc-1uxkx35-
|
|
14201
|
+
componentId: "sc-1uxkx35-19"
|
|
14173
14202
|
})(["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
14203
|
var PriceRow$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14175
14204
|
displayName: "CharacterListingModal__PriceRow",
|
|
14176
|
-
componentId: "sc-1uxkx35-
|
|
14205
|
+
componentId: "sc-1uxkx35-20"
|
|
14177
14206
|
})(["display:flex;gap:8px;align-items:center;.price-input{flex:1;height:12px;}"]);
|
|
14178
14207
|
var ListBtn = /*#__PURE__*/styled__default(CTAButton).withConfig({
|
|
14179
14208
|
displayName: "CharacterListingModal__ListBtn",
|
|
14180
|
-
componentId: "sc-1uxkx35-
|
|
14209
|
+
componentId: "sc-1uxkx35-21"
|
|
14181
14210
|
})(["flex-shrink:0;padding:10px 16px;height:32px;span{font-size:0.6rem;}svg{font-size:1.1rem;}"]);
|
|
14182
14211
|
var EmptyState$6 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14183
14212
|
displayName: "CharacterListingModal__EmptyState",
|
|
14184
|
-
componentId: "sc-1uxkx35-
|
|
14213
|
+
componentId: "sc-1uxkx35-22"
|
|
14185
14214
|
})(["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
14215
|
|
|
14187
14216
|
var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
@@ -14199,7 +14228,9 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
|
14199
14228
|
characterAtlasJSON = _ref.characterAtlasJSON,
|
|
14200
14229
|
characterAtlasIMG = _ref.characterAtlasIMG,
|
|
14201
14230
|
enableHotkeys = _ref.enableHotkeys,
|
|
14202
|
-
disableHotkeys = _ref.disableHotkeys
|
|
14231
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
14232
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
14233
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
14203
14234
|
var _useState = React.useState(null),
|
|
14204
14235
|
delistingId = _useState[0],
|
|
14205
14236
|
setDelistingId = _useState[1];
|
|
@@ -14242,7 +14273,8 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
|
14242
14273
|
setIsListingModalOpen(false);
|
|
14243
14274
|
},
|
|
14244
14275
|
enableHotkeys: enableHotkeys,
|
|
14245
|
-
disableHotkeys: disableHotkeys
|
|
14276
|
+
disableHotkeys: disableHotkeys,
|
|
14277
|
+
commissionPercent: commissionPercent
|
|
14246
14278
|
}), React__default.createElement(Toolbar, null, React__default.createElement(ListCharacterBtn, {
|
|
14247
14279
|
icon: React__default.createElement(ShoppingBag.ShoppingBag, {
|
|
14248
14280
|
width: 16,
|
|
@@ -14401,7 +14433,9 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
|
|
|
14401
14433
|
characterAtlasJSON = _ref.characterAtlasJSON,
|
|
14402
14434
|
characterAtlasIMG = _ref.characterAtlasIMG,
|
|
14403
14435
|
enableHotkeys = _ref.enableHotkeys,
|
|
14404
|
-
disableHotkeys = _ref.disableHotkeys
|
|
14436
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
14437
|
+
_ref$commissionPercen = _ref.commissionPercent,
|
|
14438
|
+
commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
|
|
14405
14439
|
var _useState = React.useState('browse'),
|
|
14406
14440
|
subTab = _useState[0],
|
|
14407
14441
|
setSubTab = _useState[1];
|
|
@@ -14448,7 +14482,8 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
|
|
|
14448
14482
|
characterAtlasJSON: characterAtlasJSON != null ? characterAtlasJSON : atlasJSON,
|
|
14449
14483
|
characterAtlasIMG: characterAtlasIMG != null ? characterAtlasIMG : atlasIMG,
|
|
14450
14484
|
enableHotkeys: enableHotkeys,
|
|
14451
|
-
disableHotkeys: disableHotkeys
|
|
14485
|
+
disableHotkeys: disableHotkeys,
|
|
14486
|
+
commissionPercent: commissionPercent
|
|
14452
14487
|
}));
|
|
14453
14488
|
};
|
|
14454
14489
|
var CharacterSubTabs = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -14668,7 +14703,8 @@ var Marketplace = function Marketplace(props) {
|
|
|
14668
14703
|
characterAtlasJSON: characterAtlasJSON,
|
|
14669
14704
|
characterAtlasIMG: characterAtlasIMG,
|
|
14670
14705
|
enableHotkeys: props.enableHotkeys,
|
|
14671
|
-
disableHotkeys: props.disableHotkeys
|
|
14706
|
+
disableHotkeys: props.disableHotkeys,
|
|
14707
|
+
commissionPercent: props.commissionPercent
|
|
14672
14708
|
}), activeTab === 'sell' && React__default.createElement(ManagmentPanel, Object.assign({}, props, {
|
|
14673
14709
|
acceptedCurrency: acceptedCurrency
|
|
14674
14710
|
})), activeTab === 'buy-orders' && React__default.createElement(React__default.Fragment, null, React__default.createElement(BuyOrderPanel, {
|