@rpg-engine/long-bow 0.8.178 → 0.8.180
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/Store/CartView.d.ts +2 -0
- package/dist/components/Store/PaymentMethodModal.d.ts +2 -0
- package/dist/components/Store/Store.d.ts +2 -0
- package/dist/components/Store/StoreItemDetails.d.ts +1 -0
- package/dist/components/Store/StoreItemRow.d.ts +2 -0
- package/dist/components/Store/sections/StoreItemsSection.d.ts +2 -0
- package/dist/components/Store/sections/StorePacksSection.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +71 -34
- 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 +71 -34
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/CartView.tsx +9 -6
- package/src/components/Store/PaymentMethodModal.tsx +21 -2
- package/src/components/Store/Store.tsx +10 -2
- package/src/components/Store/StoreItemDetails.tsx +3 -1
- package/src/components/Store/StoreItemRow.tsx +5 -2
- package/src/components/Store/hooks/useStoreCart.ts +1 -2
- package/src/components/Store/sections/StoreItemsSection.tsx +5 -0
- package/src/components/Store/sections/StorePacksSection.tsx +9 -3
- package/src/stories/Features/store/Store.stories.tsx +286 -1
package/dist/long-bow.esm.js
CHANGED
|
@@ -69785,7 +69785,9 @@ var CartView = function CartView(_ref2) {
|
|
|
69785
69785
|
onBuyDC = _ref2.onBuyDC,
|
|
69786
69786
|
onCheckoutStart = _ref2.onCheckoutStart,
|
|
69787
69787
|
onPurchaseSuccess = _ref2.onPurchaseSuccess,
|
|
69788
|
-
onPurchaseError = _ref2.onPurchaseError
|
|
69788
|
+
onPurchaseError = _ref2.onPurchaseError,
|
|
69789
|
+
_ref2$currencySymbol = _ref2.currencySymbol,
|
|
69790
|
+
currencySymbol = _ref2$currencySymbol === void 0 ? '$' : _ref2$currencySymbol;
|
|
69789
69791
|
var _useState = useState(false),
|
|
69790
69792
|
isLoading = _useState[0],
|
|
69791
69793
|
setIsLoading = _useState[1];
|
|
@@ -69796,7 +69798,8 @@ var CartView = function CartView(_ref2) {
|
|
|
69796
69798
|
purchasedItems = _useState3[0],
|
|
69797
69799
|
setPurchasedItems = _useState3[1];
|
|
69798
69800
|
var total = cartItems.reduce(function (sum, cartItem) {
|
|
69799
|
-
|
|
69801
|
+
var _cartItem$item$region;
|
|
69802
|
+
return sum + ((_cartItem$item$region = cartItem.item.regionalPrice) != null ? _cartItem$item$region : cartItem.item.price) * cartItem.quantity;
|
|
69800
69803
|
}, 0);
|
|
69801
69804
|
var dcTotal = cartItems.reduce(function (sum, ci) {
|
|
69802
69805
|
var _ci$item$dcPrice;
|
|
@@ -69888,7 +69891,7 @@ var CartView = function CartView(_ref2) {
|
|
|
69888
69891
|
}, 0), ")"), React.createElement(CloseButton$e, {
|
|
69889
69892
|
onPointerDown: onClose
|
|
69890
69893
|
}, React.createElement(FaTimes, null))), React.createElement(CartItems, null, cartItems.length === 0 ? React.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
|
|
69891
|
-
var _cartItem$metadata, _cartItem$metadata2;
|
|
69894
|
+
var _cartItem$metadata, _cartItem$metadata2, _cartItem$item$region2, _cartItem$item$region3;
|
|
69892
69895
|
console.log('Item metadataType: , texturePath:', cartItem.item.metadataType, cartItem.item.texturePath);
|
|
69893
69896
|
var getSpriteKey = function getSpriteKey(textureKey) {
|
|
69894
69897
|
return textureKey + '/down/standing/0.png';
|
|
@@ -69903,7 +69906,7 @@ var CartView = function CartView(_ref2) {
|
|
|
69903
69906
|
height: 24,
|
|
69904
69907
|
imgScale: 1.5,
|
|
69905
69908
|
centered: true
|
|
69906
|
-
})), React.createElement(ItemDetails$3, null, React.createElement(ItemName$5, null, cartItem.item.name), ((_cartItem$metadata2 = cartItem.metadata) == null ? void 0 : _cartItem$metadata2.inputValue) && React.createElement(CartMeta, null, cartItem.metadata.inputValue), React.createElement(ItemInfo$2, null, React.createElement("span", null,
|
|
69909
|
+
})), React.createElement(ItemDetails$3, null, React.createElement(ItemName$5, null, cartItem.item.name), ((_cartItem$metadata2 = cartItem.metadata) == null ? void 0 : _cartItem$metadata2.inputValue) && React.createElement(CartMeta, null, cartItem.metadata.inputValue), React.createElement(ItemInfo$2, null, React.createElement("span", null, currencySymbol, formatPrice((_cartItem$item$region2 = cartItem.item.regionalPrice) != null ? _cartItem$item$region2 : cartItem.item.price)), React.createElement("span", null, "\xD7"), React.createElement("span", null, cartItem.quantity), React.createElement("span", null, "="), React.createElement("span", null, currencySymbol, formatPrice(((_cartItem$item$region3 = cartItem.item.regionalPrice) != null ? _cartItem$item$region3 : cartItem.item.price) * cartItem.quantity))), cartItem.metadata && cartItem.item.metadataType && React.createElement(MetadataDisplay, {
|
|
69907
69910
|
type: cartItem.item.metadataType,
|
|
69908
69911
|
metadata: cartItem.metadata
|
|
69909
69912
|
})), React.createElement(CTAButton, {
|
|
@@ -69917,11 +69920,11 @@ var CartView = function CartView(_ref2) {
|
|
|
69917
69920
|
onPointerDown: onBuyDC
|
|
69918
69921
|
}, React.createElement(FaCoins, null), React.createElement("span", null, "Save more with DC \u2014 volume discounts available"), React.createElement(DCNudgeLink, null, "Buy DC \u2192")), React.createElement(TrustBar, {
|
|
69919
69922
|
signals: trustSignals
|
|
69920
|
-
}), React.createElement(TotalInfo, null, React.createElement(OrderSummaryLabel, null, "Order Summary"), React.createElement(TotalRow, null, React.createElement("span", null, "Subtotal:"), React.createElement("span", null,
|
|
69923
|
+
}), React.createElement(TotalInfo, null, React.createElement(OrderSummaryLabel, null, "Order Summary"), React.createElement(TotalRow, null, React.createElement("span", null, "Subtotal:"), React.createElement("span", null, currencySymbol, formatPrice(total))), dcTotal > 0 && React.createElement(TotalRow, null, React.createElement("span", null, "DC:"), React.createElement("span", null, dcTotal.toLocaleString(), " DC")), React.createElement(TotalRow, {
|
|
69921
69924
|
"$isTotal": true
|
|
69922
|
-
}, React.createElement("span", null, "Total:"), React.createElement("span", null,
|
|
69925
|
+
}, React.createElement("span", null, "Total:"), React.createElement("span", null, currencySymbol, formatPrice(total))), paymentMethodLabel && React.createElement(PaymentMethodRow, null, React.createElement("span", null, "Paying with:"), React.createElement("span", null, paymentMethodLabel)), error && React.createElement(ErrorMessage$2, null, error)), React.createElement(CTAButton, {
|
|
69923
69926
|
icon: React.createElement(FaShoppingBag, null),
|
|
69924
|
-
label: isLoading ? 'Processing...' : "Pay
|
|
69927
|
+
label: isLoading ? 'Processing...' : "Pay " + currencySymbol + formatPrice(total),
|
|
69925
69928
|
onClick: handlePurchase,
|
|
69926
69929
|
fullWidth: true,
|
|
69927
69930
|
disabled: cartItems.length === 0 || isLoading
|
|
@@ -70431,7 +70434,8 @@ var useStoreCart = function useStoreCart() {
|
|
|
70431
70434
|
};
|
|
70432
70435
|
var getTotalPrice = function getTotalPrice() {
|
|
70433
70436
|
return Number(cartItems.reduce(function (sum, item) {
|
|
70434
|
-
|
|
70437
|
+
var _item$item$regionalPr;
|
|
70438
|
+
return sum + ((_item$item$regionalPr = item.item.regionalPrice) != null ? _item$item$regionalPr : item.item.price) * item.quantity;
|
|
70435
70439
|
}, 0).toFixed(2));
|
|
70436
70440
|
};
|
|
70437
70441
|
return {
|
|
@@ -70511,7 +70515,10 @@ var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
|
70511
70515
|
dcRequired = _ref.dcRequired,
|
|
70512
70516
|
onPayWithDC = _ref.onPayWithDC,
|
|
70513
70517
|
onPayWithCard = _ref.onPayWithCard,
|
|
70514
|
-
|
|
70518
|
+
onPayWithPix = _ref.onPayWithPix,
|
|
70519
|
+
onClose = _ref.onClose,
|
|
70520
|
+
_ref$showPix = _ref.showPix,
|
|
70521
|
+
showPix = _ref$showPix === void 0 ? false : _ref$showPix;
|
|
70515
70522
|
var _useState = useState('card'),
|
|
70516
70523
|
selected = _useState[0],
|
|
70517
70524
|
setSelected = _useState[1];
|
|
@@ -70527,10 +70534,12 @@ var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
|
70527
70534
|
var handleConfirm = useCallback(function () {
|
|
70528
70535
|
if (selected === 'dc' && !dcDisabled) {
|
|
70529
70536
|
onPayWithDC();
|
|
70537
|
+
} else if (selected === 'pix') {
|
|
70538
|
+
onPayWithPix();
|
|
70530
70539
|
} else {
|
|
70531
70540
|
onPayWithCard();
|
|
70532
70541
|
}
|
|
70533
|
-
}, [selected, dcDisabled, onPayWithDC, onPayWithCard]);
|
|
70542
|
+
}, [selected, dcDisabled, onPayWithDC, onPayWithCard, onPayWithPix]);
|
|
70534
70543
|
var dcSubText = dcRequired !== undefined ? dcBalance.toLocaleString() + " DC available \xB7 " + dcRequired.toLocaleString() + " DC needed" : dcBalance.toLocaleString() + " DC available";
|
|
70535
70544
|
return React.createElement(ModalPortal, null, React.createElement(Overlay$8, {
|
|
70536
70545
|
onPointerDown: onClose
|
|
@@ -70548,7 +70557,14 @@ var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
|
70548
70557
|
}
|
|
70549
70558
|
}, React.createElement(RadioCircle$1, {
|
|
70550
70559
|
"$selected": selected === 'card'
|
|
70551
|
-
}), React.createElement(OptionText$1, null, React.createElement(OptionLabel$2, null, "Credit Card"), React.createElement(OptionSub$1, null, "Stripe secure checkout"))), React.createElement(RadioOption$1, {
|
|
70560
|
+
}), React.createElement(OptionText$1, null, React.createElement(OptionLabel$2, null, "Credit Card"), React.createElement(OptionSub$1, null, "Stripe secure checkout"))), showPix && React.createElement(RadioOption$1, {
|
|
70561
|
+
"$selected": selected === 'pix',
|
|
70562
|
+
onPointerDown: function onPointerDown() {
|
|
70563
|
+
return setSelected('pix');
|
|
70564
|
+
}
|
|
70565
|
+
}, React.createElement(RadioCircle$1, {
|
|
70566
|
+
"$selected": selected === 'pix'
|
|
70567
|
+
}), React.createElement(OptionText$1, null, React.createElement(OptionLabel$2, null, "Pix"), React.createElement(OptionSub$1, null, "Instant payment via Pix"))), React.createElement(RadioOption$1, {
|
|
70552
70568
|
"$selected": selected === 'dc',
|
|
70553
70569
|
"$disabled": dcDisabled,
|
|
70554
70570
|
onPointerDown: dcDisabled ? undefined : function () {
|
|
@@ -71054,7 +71070,7 @@ var ViewersPill = /*#__PURE__*/styled.span.withConfig({
|
|
|
71054
71070
|
})(["animation:", " 2s ease-in-out infinite;"], pulse$2);
|
|
71055
71071
|
|
|
71056
71072
|
var StoreItemRow = function StoreItemRow(_ref) {
|
|
71057
|
-
var _item$requiredAccount, _item$store;
|
|
71073
|
+
var _item$requiredAccount, _item$store, _item$regionalPrice;
|
|
71058
71074
|
var item = _ref.item,
|
|
71059
71075
|
atlasJSON = _ref.atlasJSON,
|
|
71060
71076
|
atlasIMG = _ref.atlasIMG,
|
|
@@ -71072,7 +71088,9 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
71072
71088
|
originalPrice = _ref.originalPrice,
|
|
71073
71089
|
onView = _ref.onView,
|
|
71074
71090
|
_ref$positionInList = _ref.positionInList,
|
|
71075
|
-
positionInList = _ref$positionInList === void 0 ? 0 : _ref$positionInList
|
|
71091
|
+
positionInList = _ref$positionInList === void 0 ? 0 : _ref$positionInList,
|
|
71092
|
+
_ref$currencySymbol = _ref.currencySymbol,
|
|
71093
|
+
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol;
|
|
71076
71094
|
var _useState = useState(''),
|
|
71077
71095
|
textInputValue = _useState[0],
|
|
71078
71096
|
setTextInputValue = _useState[1];
|
|
@@ -71133,7 +71151,7 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
71133
71151
|
atlasJSON: atlasJSON,
|
|
71134
71152
|
spriteKey: "others/definya-coin.png",
|
|
71135
71153
|
imgScale: 0.8
|
|
71136
|
-
})), originalPrice.toLocaleString()) : "
|
|
71154
|
+
})), originalPrice.toLocaleString()) : "" + currencySymbol + originalPrice.toFixed(2)), item.currency === 'DC' ? React.createElement(ItemPrice$1, {
|
|
71137
71155
|
"$onSale": originalPrice != null,
|
|
71138
71156
|
style: {
|
|
71139
71157
|
display: 'flex',
|
|
@@ -71155,7 +71173,7 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
71155
71173
|
alignItems: 'center',
|
|
71156
71174
|
gap: '2px'
|
|
71157
71175
|
}
|
|
71158
|
-
},
|
|
71176
|
+
}, currencySymbol, ((_item$regionalPrice = item.regionalPrice) != null ? _item$regionalPrice : item.price).toFixed(2), item.dcPrice ? React.createElement(React.Fragment, null, React.createElement("span", {
|
|
71159
71177
|
style: {
|
|
71160
71178
|
margin: '0 4px'
|
|
71161
71179
|
}
|
|
@@ -71329,7 +71347,9 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
71329
71347
|
_ref$itemBadges = _ref.itemBadges,
|
|
71330
71348
|
itemBadges = _ref$itemBadges === void 0 ? {} : _ref$itemBadges,
|
|
71331
71349
|
onItemView = _ref.onItemView,
|
|
71332
|
-
onCategoryChange = _ref.onCategoryChange
|
|
71350
|
+
onCategoryChange = _ref.onCategoryChange,
|
|
71351
|
+
_ref$currencySymbol = _ref.currencySymbol,
|
|
71352
|
+
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol;
|
|
71333
71353
|
var _useStoreFiltering = useStoreFiltering(items),
|
|
71334
71354
|
searchQuery = _useStoreFiltering.searchQuery,
|
|
71335
71355
|
setSearchQuery = _useStoreFiltering.setSearchQuery,
|
|
@@ -71367,7 +71387,8 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
71367
71387
|
userAccountType: userAccountType || UserAccountTypes.Free,
|
|
71368
71388
|
showTextInput: true,
|
|
71369
71389
|
onView: onItemView,
|
|
71370
|
-
positionInList: position
|
|
71390
|
+
positionInList: position,
|
|
71391
|
+
currencySymbol: currencySymbol
|
|
71371
71392
|
}, meta));
|
|
71372
71393
|
}
|
|
71373
71394
|
// Fallback to standard arrow-based row
|
|
@@ -71380,7 +71401,8 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
71380
71401
|
onQuickBuy: onQuickBuy,
|
|
71381
71402
|
userAccountType: userAccountType || UserAccountTypes.Free,
|
|
71382
71403
|
onView: onItemView,
|
|
71383
|
-
positionInList: position
|
|
71404
|
+
positionInList: position,
|
|
71405
|
+
currencySymbol: currencySymbol
|
|
71384
71406
|
}, meta));
|
|
71385
71407
|
};
|
|
71386
71408
|
return React.createElement(StoreContainer, null, React.createElement(SearchHeader$2, null, React.createElement(SearchBarContainer$1, null, React.createElement(SearchBar, {
|
|
@@ -71447,7 +71469,9 @@ var PackRowItem = function PackRowItem(_ref) {
|
|
|
71447
71469
|
originalPrice = _ref.originalPrice,
|
|
71448
71470
|
onPackView = _ref.onPackView,
|
|
71449
71471
|
_ref$positionInList = _ref.positionInList,
|
|
71450
|
-
positionInList = _ref$positionInList === void 0 ? 0 : _ref$positionInList
|
|
71472
|
+
positionInList = _ref$positionInList === void 0 ? 0 : _ref$positionInList,
|
|
71473
|
+
_ref$currencySymbol = _ref.currencySymbol,
|
|
71474
|
+
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol;
|
|
71451
71475
|
var _useQuantityControl = useQuantityControl(),
|
|
71452
71476
|
quantity = _useQuantityControl.quantity,
|
|
71453
71477
|
handleQuantityChange = _useQuantityControl.handleQuantityChange,
|
|
@@ -71466,9 +71490,9 @@ var PackRowItem = function PackRowItem(_ref) {
|
|
|
71466
71490
|
onQuickBuy == null ? void 0 : onQuickBuy(pack, quantity);
|
|
71467
71491
|
resetQuantity();
|
|
71468
71492
|
};
|
|
71469
|
-
return React.createElement(PackRow, null, React.createElement(LeftSection$1, null, React.createElement(PackIconContainer, null, renderPackIcon(pack)), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPriceRow, null, originalPrice != null && React.createElement(PackOriginalPrice, null,
|
|
71493
|
+
return React.createElement(PackRow, null, React.createElement(LeftSection$1, null, React.createElement(PackIconContainer, null, renderPackIcon(pack)), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPriceRow, null, originalPrice != null && React.createElement(PackOriginalPrice, null, currencySymbol, originalPrice.toFixed(2)), React.createElement(PackPrice, {
|
|
71470
71494
|
"$onSale": originalPrice != null
|
|
71471
|
-
},
|
|
71495
|
+
}, currencySymbol, pack.priceUSD)), pack.description && React.createElement(PackDescription, null, pack.description), React.createElement(StoreBadges, {
|
|
71472
71496
|
badges: badges,
|
|
71473
71497
|
buyCount: buyCount,
|
|
71474
71498
|
viewersCount: viewersCount,
|
|
@@ -71510,7 +71534,9 @@ var StorePacksSection = function StorePacksSection(_ref2) {
|
|
|
71510
71534
|
atlasIMG = _ref2.atlasIMG,
|
|
71511
71535
|
_ref2$packBadges = _ref2.packBadges,
|
|
71512
71536
|
packBadges = _ref2$packBadges === void 0 ? {} : _ref2$packBadges,
|
|
71513
|
-
onPackView = _ref2.onPackView
|
|
71537
|
+
onPackView = _ref2.onPackView,
|
|
71538
|
+
_ref2$currencySymbol = _ref2.currencySymbol,
|
|
71539
|
+
currencySymbol = _ref2$currencySymbol === void 0 ? '$' : _ref2$currencySymbol;
|
|
71514
71540
|
var _usePackFiltering = usePackFiltering(packs),
|
|
71515
71541
|
searchQuery = _usePackFiltering.searchQuery,
|
|
71516
71542
|
setSearchQuery = _usePackFiltering.setSearchQuery,
|
|
@@ -71548,9 +71574,10 @@ var StorePacksSection = function StorePacksSection(_ref2) {
|
|
|
71548
71574
|
onQuickBuy: onQuickBuy,
|
|
71549
71575
|
renderPackIcon: renderPackIcon,
|
|
71550
71576
|
onPackView: onPackView,
|
|
71551
|
-
positionInList: position
|
|
71577
|
+
positionInList: position,
|
|
71578
|
+
currencySymbol: currencySymbol
|
|
71552
71579
|
}, meta));
|
|
71553
|
-
}, [onAddToCart, onQuickBuy, renderPackIcon, packBadges, onPackView, filteredPacks]);
|
|
71580
|
+
}, [onAddToCart, onQuickBuy, renderPackIcon, packBadges, onPackView, filteredPacks, currencySymbol]);
|
|
71554
71581
|
return React.createElement(ScrollableContent, {
|
|
71555
71582
|
items: filteredPacks,
|
|
71556
71583
|
renderItem: renderPack,
|
|
@@ -71616,10 +71643,13 @@ var QuantityInput$1 = /*#__PURE__*/styled.input.withConfig({
|
|
|
71616
71643
|
})(["width:40px;text-align:center;margin:0 auto;font-size:0.875rem;background:rgba(0,0,0,0.2);color:#ffffff;border:none;padding:0.25rem;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}"]);
|
|
71617
71644
|
|
|
71618
71645
|
var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
71646
|
+
var _item$regionalPrice;
|
|
71619
71647
|
var item = _ref.item,
|
|
71620
71648
|
onBack = _ref.onBack,
|
|
71621
71649
|
onAddToCart = _ref.onAddToCart,
|
|
71622
|
-
imageUrl = _ref.imageUrl
|
|
71650
|
+
imageUrl = _ref.imageUrl,
|
|
71651
|
+
_ref$currencySymbol = _ref.currencySymbol,
|
|
71652
|
+
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol;
|
|
71623
71653
|
var getImageSrc = function getImageSrc() {
|
|
71624
71654
|
if (!imageUrl) return '/placeholder-thumbnail.png';
|
|
71625
71655
|
if (typeof imageUrl === 'string') return imageUrl;
|
|
@@ -71630,7 +71660,7 @@ var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
|
71630
71660
|
}, React.createElement(FaArrowLeft, null), React.createElement("span", null, "Back"))), React.createElement(Content$5, null, React.createElement(DetailsGrid, null, React.createElement(ItemIcon, null, React.createElement("img", {
|
|
71631
71661
|
src: getImageSrc(),
|
|
71632
71662
|
alt: item.name
|
|
71633
|
-
})), React.createElement(ItemInfo$3, null, React.createElement(ItemName$8, null, item.name), React.createElement(ItemPrice$2, null,
|
|
71663
|
+
})), React.createElement(ItemInfo$3, null, React.createElement(ItemName$8, null, item.name), React.createElement(ItemPrice$2, null, currencySymbol, 'priceUSD' in item ? item.priceUSD : (_item$regionalPrice = item.regionalPrice) != null ? _item$regionalPrice : item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(Description$6, null, item.description))), React.createElement(Actions$1, null, React.createElement(CTAButton, {
|
|
71634
71664
|
icon: React.createElement(FaCartPlus, null),
|
|
71635
71665
|
label: "Add to Cart",
|
|
71636
71666
|
onClick: function onClick() {
|
|
@@ -71726,7 +71756,9 @@ var Store = function Store(_ref) {
|
|
|
71726
71756
|
onCheckoutStart = _ref.onCheckoutStart,
|
|
71727
71757
|
onPurchaseSuccess = _ref.onPurchaseSuccess,
|
|
71728
71758
|
onPurchaseError = _ref.onPurchaseError,
|
|
71729
|
-
onBuyDC = _ref.onBuyDC
|
|
71759
|
+
onBuyDC = _ref.onBuyDC,
|
|
71760
|
+
_ref$currencySymbol = _ref.currencySymbol,
|
|
71761
|
+
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol;
|
|
71730
71762
|
var _useState = useState(null),
|
|
71731
71763
|
selectedPack = _useState[0],
|
|
71732
71764
|
setSelectedPack = _useState[1];
|
|
@@ -71903,7 +71935,8 @@ var Store = function Store(_ref) {
|
|
|
71903
71935
|
atlasJSON: atlasJSON,
|
|
71904
71936
|
atlasIMG: atlasIMG,
|
|
71905
71937
|
packBadges: packBadges,
|
|
71906
|
-
onPackView: onPackView
|
|
71938
|
+
onPackView: onPackView,
|
|
71939
|
+
currencySymbol: currencySymbol
|
|
71907
71940
|
})
|
|
71908
71941
|
},
|
|
71909
71942
|
packs: {
|
|
@@ -71960,7 +71993,8 @@ var Store = function Store(_ref) {
|
|
|
71960
71993
|
atlasJSON: atlasJSON,
|
|
71961
71994
|
atlasIMG: atlasIMG,
|
|
71962
71995
|
packBadges: packBadges,
|
|
71963
|
-
onPackView: onPackView
|
|
71996
|
+
onPackView: onPackView,
|
|
71997
|
+
currencySymbol: currencySymbol
|
|
71964
71998
|
})
|
|
71965
71999
|
},
|
|
71966
72000
|
items: {
|
|
@@ -71982,7 +72016,8 @@ var Store = function Store(_ref) {
|
|
|
71982
72016
|
textInputItemKeys: textInputItemKeys,
|
|
71983
72017
|
itemBadges: itemBadges,
|
|
71984
72018
|
onItemView: onItemView,
|
|
71985
|
-
onCategoryChange: onCategoryChange
|
|
72019
|
+
onCategoryChange: onCategoryChange,
|
|
72020
|
+
currencySymbol: currencySymbol
|
|
71986
72021
|
})
|
|
71987
72022
|
},
|
|
71988
72023
|
wallet: {
|
|
@@ -72054,7 +72089,8 @@ var Store = function Store(_ref) {
|
|
|
72054
72089
|
onCheckoutStart: onCheckoutStart,
|
|
72055
72090
|
onPurchaseSuccess: onPurchaseSuccess,
|
|
72056
72091
|
onPurchaseError: onPurchaseError,
|
|
72057
|
-
onBuyDC: onBuyDC
|
|
72092
|
+
onBuyDC: onBuyDC,
|
|
72093
|
+
currencySymbol: currencySymbol
|
|
72058
72094
|
}) : selectedPack ? React.createElement(StoreItemDetails, {
|
|
72059
72095
|
item: _extends({}, selectedPack, {
|
|
72060
72096
|
name: selectedPack.title,
|
|
@@ -72066,7 +72102,8 @@ var Store = function Store(_ref) {
|
|
|
72066
72102
|
},
|
|
72067
72103
|
onAddToCart: function onAddToCart() {
|
|
72068
72104
|
return handleAddPackToCart(selectedPack);
|
|
72069
|
-
}
|
|
72105
|
+
},
|
|
72106
|
+
currencySymbol: currencySymbol
|
|
72070
72107
|
}) : React.createElement(Container$P, null, featuredItems && featuredItems.length > 0 && React.createElement(FeaturedBanner, {
|
|
72071
72108
|
items: featuredItems,
|
|
72072
72109
|
atlasJSON: atlasJSON,
|
|
@@ -72142,9 +72179,9 @@ var Store = function Store(_ref) {
|
|
|
72142
72179
|
}), React.createElement(CartButtonWrapper, null, React.createElement(CTAButton, {
|
|
72143
72180
|
icon: React.createElement(FaShoppingCart, null),
|
|
72144
72181
|
onClick: handleOpenCart
|
|
72145
|
-
}), getTotalItems() > 0 && React.createElement(CartBadge, null, getTotalItems()))), React.createElement(TabContent, null, (_tabsMap$activeTab = tabsMap[activeTab]) == null ? void 0 : _tabsMap$activeTab.content)), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null,
|
|
72182
|
+
}), getTotalItems() > 0 && React.createElement(CartBadge, null, getTotalItems()))), React.createElement(TabContent, null, (_tabsMap$activeTab = tabsMap[activeTab]) == null ? void 0 : _tabsMap$activeTab.content)), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, currencySymbol, getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
|
|
72146
72183
|
icon: React.createElement(FaShoppingCart, null),
|
|
72147
|
-
label: "Proceed to Checkout (
|
|
72184
|
+
label: "Proceed to Checkout (" + currencySymbol + getTotalPrice().toFixed(2) + ")",
|
|
72148
72185
|
onClick: handleOpenCart,
|
|
72149
72186
|
fullWidth: true
|
|
72150
72187
|
}))));
|