@rpg-engine/long-bow 0.8.133 → 0.8.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +79 -27
- 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 +80 -28
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/PaymentMethodModal.tsx +130 -51
package/dist/long-bow.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import { v4 } from 'uuid';
|
|
|
5
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, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, UserAccountTypes, PaymentCurrency, PeriodOfDay } from '@rpg-engine/shared';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
8
|
-
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaWallet, FaShoppingCart
|
|
8
|
+
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaWallet, FaShoppingCart } from 'react-icons/fa';
|
|
9
9
|
import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
|
|
10
10
|
import { IoMdContract, IoMdExpand } from 'react-icons/io';
|
|
11
11
|
import Draggable from 'react-draggable';
|
|
@@ -16,7 +16,6 @@ import { AiFillFilter, AiOutlineFilter, AiFillCaretRight } from 'react-icons/ai'
|
|
|
16
16
|
import { HexColorPicker } from 'react-colorful';
|
|
17
17
|
import 'rpgui/rpgui.css';
|
|
18
18
|
import 'rpgui/rpgui.min.js';
|
|
19
|
-
import { GiCrystalBall } from 'react-icons/gi';
|
|
20
19
|
import capitalize from 'lodash-es/capitalize';
|
|
21
20
|
|
|
22
21
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
@@ -59310,25 +59309,46 @@ var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
|
59310
59309
|
onPayWithDC = _ref.onPayWithDC,
|
|
59311
59310
|
onPayWithCard = _ref.onPayWithCard,
|
|
59312
59311
|
onClose = _ref.onClose;
|
|
59312
|
+
var _useState = useState('card'),
|
|
59313
|
+
selected = _useState[0],
|
|
59314
|
+
setSelected = _useState[1];
|
|
59313
59315
|
var stopPropagation = useCallback(function (e) {
|
|
59314
59316
|
e.stopPropagation();
|
|
59315
59317
|
}, []);
|
|
59318
|
+
var handleConfirm = useCallback(function () {
|
|
59319
|
+
if (selected === 'dc') {
|
|
59320
|
+
onPayWithDC();
|
|
59321
|
+
} else {
|
|
59322
|
+
onPayWithCard();
|
|
59323
|
+
}
|
|
59324
|
+
}, [selected, onPayWithDC, onPayWithCard]);
|
|
59316
59325
|
return React.createElement(ModalPortal, null, React.createElement(Overlay$4, {
|
|
59317
59326
|
onPointerDown: onClose
|
|
59318
59327
|
}), React.createElement(ModalContainer$1, null, React.createElement(ModalContent$1, {
|
|
59319
59328
|
onClick: stopPropagation,
|
|
59320
59329
|
onTouchStart: stopPropagation,
|
|
59321
59330
|
onPointerDown: stopPropagation
|
|
59322
|
-
}, React.createElement(Title$f, null, "How would you like to pay?"), React.createElement(
|
|
59323
|
-
|
|
59324
|
-
|
|
59325
|
-
}, React.createElement(
|
|
59326
|
-
|
|
59327
|
-
|
|
59328
|
-
|
|
59331
|
+
}, React.createElement(Header$a, null, React.createElement(Title$f, null, "How would you like to pay?"), React.createElement(CloseButton$a, {
|
|
59332
|
+
onPointerDown: onClose,
|
|
59333
|
+
"aria-label": "Close"
|
|
59334
|
+
}, React.createElement(FaTimes, null))), React.createElement(Options, null, React.createElement(RadioOption, {
|
|
59335
|
+
"$selected": selected === 'card',
|
|
59336
|
+
onPointerDown: function onPointerDown() {
|
|
59337
|
+
return setSelected('card');
|
|
59338
|
+
}
|
|
59339
|
+
}, React.createElement(RadioCircle, {
|
|
59340
|
+
"$selected": selected === 'card'
|
|
59341
|
+
}), React.createElement(OptionText, null, React.createElement(OptionLabel, null, "Credit Card"), React.createElement(OptionSub, null, "Stripe secure checkout"))), React.createElement(RadioOption, {
|
|
59342
|
+
"$selected": selected === 'dc',
|
|
59343
|
+
onPointerDown: function onPointerDown() {
|
|
59344
|
+
return setSelected('dc');
|
|
59345
|
+
}
|
|
59346
|
+
}, React.createElement(RadioCircle, {
|
|
59347
|
+
"$selected": selected === 'dc'
|
|
59348
|
+
}), React.createElement(OptionText, null, React.createElement(OptionLabel, null, "Definya Coin"), React.createElement(OptionSub, null, dcBalance.toLocaleString(), " DC available")))), React.createElement(ConfirmRow, null, React.createElement(Button, {
|
|
59329
59349
|
buttonType: ButtonTypes.RPGUIButton,
|
|
59330
|
-
onPointerDown:
|
|
59331
|
-
}, "
|
|
59350
|
+
onPointerDown: handleConfirm
|
|
59351
|
+
}, "Confirm")))));
|
|
59332
59352
|
};
|
|
59333
59353
|
var Overlay$4 = /*#__PURE__*/styled.div.withConfig({
|
|
59334
59354
|
displayName: "PaymentMethodModal__Overlay",
|
|
@@ -59341,27 +59361,59 @@ var ModalContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
59341
59361
|
var ModalContent$1 = /*#__PURE__*/styled.div.withConfig({
|
|
59342
59362
|
displayName: "PaymentMethodModal__ModalContent",
|
|
59343
59363
|
componentId: "sc-1dxy6lr-2"
|
|
59344
|
-
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:24px;min-width:
|
|
59364
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 24px;min-width:300px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:scaleIn 0.15s ease-out;@keyframes scaleIn{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}"]);
|
|
59365
|
+
var Header$a = /*#__PURE__*/styled.div.withConfig({
|
|
59366
|
+
displayName: "PaymentMethodModal__Header",
|
|
59367
|
+
componentId: "sc-1dxy6lr-3"
|
|
59368
|
+
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
59345
59369
|
var Title$f = /*#__PURE__*/styled.h3.withConfig({
|
|
59346
59370
|
displayName: "PaymentMethodModal__Title",
|
|
59347
|
-
componentId: "sc-1dxy6lr-3"
|
|
59348
|
-
})(["margin:0 0 8px;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#fef08a;text-align:center;"]);
|
|
59349
|
-
var OptionButton = /*#__PURE__*/styled.button.withConfig({
|
|
59350
|
-
displayName: "PaymentMethodModal__OptionButton",
|
|
59351
59371
|
componentId: "sc-1dxy6lr-4"
|
|
59352
|
-
})(["
|
|
59353
|
-
var
|
|
59354
|
-
displayName: "
|
|
59372
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
59373
|
+
var CloseButton$a = /*#__PURE__*/styled.button.withConfig({
|
|
59374
|
+
displayName: "PaymentMethodModal__CloseButton",
|
|
59355
59375
|
componentId: "sc-1dxy6lr-5"
|
|
59356
|
-
})(["
|
|
59357
|
-
var
|
|
59358
|
-
displayName: "
|
|
59376
|
+
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;&:hover{color:#ffffff;}"]);
|
|
59377
|
+
var Options = /*#__PURE__*/styled.div.withConfig({
|
|
59378
|
+
displayName: "PaymentMethodModal__Options",
|
|
59359
59379
|
componentId: "sc-1dxy6lr-6"
|
|
59360
|
-
})(["
|
|
59361
|
-
var
|
|
59362
|
-
displayName: "
|
|
59380
|
+
})(["display:flex;flex-direction:column;gap:8px;"]);
|
|
59381
|
+
var RadioOption = /*#__PURE__*/styled.div.withConfig({
|
|
59382
|
+
displayName: "PaymentMethodModal__RadioOption",
|
|
59363
59383
|
componentId: "sc-1dxy6lr-7"
|
|
59364
|
-
})(["display:flex;
|
|
59384
|
+
})(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:pointer;transition:border-color 0.15s,background 0.15s;&:hover{border-color:#f59e0b;}"], function (_ref2) {
|
|
59385
|
+
var $selected = _ref2.$selected;
|
|
59386
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
59387
|
+
}, function (_ref3) {
|
|
59388
|
+
var $selected = _ref3.$selected;
|
|
59389
|
+
return $selected ? 'rgba(245,158,11,0.1)' : 'transparent';
|
|
59390
|
+
});
|
|
59391
|
+
var RadioCircle = /*#__PURE__*/styled.div.withConfig({
|
|
59392
|
+
displayName: "PaymentMethodModal__RadioCircle",
|
|
59393
|
+
componentId: "sc-1dxy6lr-8"
|
|
59394
|
+
})(["width:16px;height:16px;border-radius:50%;border:2px solid ", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;&::after{content:'';width:8px;height:8px;border-radius:50%;background:#f59e0b;opacity:", ";transition:opacity 0.15s;}"], function (_ref4) {
|
|
59395
|
+
var $selected = _ref4.$selected;
|
|
59396
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
|
|
59397
|
+
}, function (_ref5) {
|
|
59398
|
+
var $selected = _ref5.$selected;
|
|
59399
|
+
return $selected ? 1 : 0;
|
|
59400
|
+
});
|
|
59401
|
+
var OptionText = /*#__PURE__*/styled.div.withConfig({
|
|
59402
|
+
displayName: "PaymentMethodModal__OptionText",
|
|
59403
|
+
componentId: "sc-1dxy6lr-9"
|
|
59404
|
+
})(["display:flex;flex-direction:column;gap:3px;"]);
|
|
59405
|
+
var OptionLabel = /*#__PURE__*/styled.span.withConfig({
|
|
59406
|
+
displayName: "PaymentMethodModal__OptionLabel",
|
|
59407
|
+
componentId: "sc-1dxy6lr-10"
|
|
59408
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
|
|
59409
|
+
var OptionSub = /*#__PURE__*/styled.span.withConfig({
|
|
59410
|
+
displayName: "PaymentMethodModal__OptionSub",
|
|
59411
|
+
componentId: "sc-1dxy6lr-11"
|
|
59412
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.55);"]);
|
|
59413
|
+
var ConfirmRow = /*#__PURE__*/styled.div.withConfig({
|
|
59414
|
+
displayName: "PaymentMethodModal__ConfirmRow",
|
|
59415
|
+
componentId: "sc-1dxy6lr-12"
|
|
59416
|
+
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
59365
59417
|
|
|
59366
59418
|
var TextArea = function TextArea(_ref) {
|
|
59367
59419
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
@@ -59397,7 +59449,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
59397
59449
|
return React.createElement(Draggable, {
|
|
59398
59450
|
scale: scale,
|
|
59399
59451
|
cancel: ".time-widget-close,.time-widget-container,.time-widget-container *"
|
|
59400
|
-
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$
|
|
59452
|
+
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$b, {
|
|
59401
59453
|
onPointerDown: onClose,
|
|
59402
59454
|
className: "time-widget-close"
|
|
59403
59455
|
}, "X"), React.createElement(DayNightContainer, {
|
|
@@ -59414,7 +59466,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
|
|
|
59414
59466
|
displayName: "TimeWidget__Time",
|
|
59415
59467
|
componentId: "sc-1ja236h-1"
|
|
59416
59468
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
59417
|
-
var CloseButton$
|
|
59469
|
+
var CloseButton$b = /*#__PURE__*/styled.p.withConfig({
|
|
59418
59470
|
displayName: "TimeWidget__CloseButton",
|
|
59419
59471
|
componentId: "sc-1ja236h-2"
|
|
59420
59472
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|