@betterstore/react 0.3.8 → 0.3.10
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/CHANGELOG.md +12 -0
- package/dist/index.cjs.js +13 -13
- package/dist/index.mjs +13 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -3226,14 +3226,14 @@ const CheckoutEmbed$2 = {
|
|
|
3226
3226
|
addressPlaceholder: "Zadejte svou adresu",
|
|
3227
3227
|
button: "Uložit adresu",
|
|
3228
3228
|
city: "Město",
|
|
3229
|
-
cityPlaceholder: "
|
|
3229
|
+
cityPlaceholder: "Zadejte město",
|
|
3230
3230
|
country: "Země",
|
|
3231
|
-
countryPlaceholder: "
|
|
3231
|
+
countryPlaceholder: "Zadejte svou zemi",
|
|
3232
3232
|
description: "Níže vyplňte údaje o vaší adrese.",
|
|
3233
3233
|
line1: "Adresa ulice",
|
|
3234
|
-
line1Placeholder: "
|
|
3234
|
+
line1Placeholder: "Zadejte ulici a číslo",
|
|
3235
3235
|
line2: "Byt, apartmá, jednotka atd. (Volitelné)",
|
|
3236
|
-
line2Placeholder: "
|
|
3236
|
+
line2Placeholder: "Byt 4B, Pokoj 123, atd.",
|
|
3237
3237
|
state: "Stát (volitelné)",
|
|
3238
3238
|
statePlaceholder: "Kalifornie",
|
|
3239
3239
|
title: "Zadejte svou adresu",
|
|
@@ -3263,7 +3263,8 @@ const CheckoutEmbed$2 = {
|
|
|
3263
3263
|
discountCodePlaceholder: "Slevový kód nebo dárková karta",
|
|
3264
3264
|
discountCodeError: "Už dostáváte nejlepší nabídku!",
|
|
3265
3265
|
free: "Zdarma",
|
|
3266
|
-
discountCodeSuccess: "Slevový kód byl úspěšně použit."
|
|
3266
|
+
discountCodeSuccess: "Slevový kód byl úspěšně použit.",
|
|
3267
|
+
discountCodeLabel: "Slevový kód"
|
|
3267
3268
|
},
|
|
3268
3269
|
loading: "Načítání ...",
|
|
3269
3270
|
Payment: {
|
|
@@ -3315,7 +3316,8 @@ const CheckoutEmbed$1 = {
|
|
|
3315
3316
|
discountCodeApply: "Apply",
|
|
3316
3317
|
discountCodeError: "You're already getting the best offer!",
|
|
3317
3318
|
free: "Free",
|
|
3318
|
-
discountCodeSuccess: "Discount code applied successfully."
|
|
3319
|
+
discountCodeSuccess: "Discount code applied successfully.",
|
|
3320
|
+
discountCodeLabel: "Discount Code"
|
|
3319
3321
|
},
|
|
3320
3322
|
CustomerForm: {
|
|
3321
3323
|
address: {
|
|
@@ -35664,7 +35666,7 @@ function DiscountCode({ applyDiscountCode, revalidateDiscounts, }) {
|
|
|
35664
35666
|
}
|
|
35665
35667
|
});
|
|
35666
35668
|
return (React.createElement("form", { className: "pb-1", onSubmit: handleSubmit },
|
|
35667
|
-
React.createElement(Label, { className: "text-sm font-medium mb-2" }, "
|
|
35669
|
+
React.createElement(Label, { className: "text-sm font-medium mb-2" }, t("CheckoutEmbed.Summary.discountCodeLabel")),
|
|
35668
35670
|
React.createElement("div", { className: "flex items-center gap-2" },
|
|
35669
35671
|
React.createElement(Input, { "aria-invalid": !!error, value: discountCode, onChange: (e) => {
|
|
35670
35672
|
setError("");
|
|
@@ -35691,7 +35693,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
|
|
|
35691
35693
|
const filteredDiscounts = appliedDiscounts.filter((discount) => discount.discount.type !== "FREE_SHIPPING");
|
|
35692
35694
|
const totalWithDiscounts = total -
|
|
35693
35695
|
filteredDiscounts.reduce((acc, { amount }) => acc + amount, 0) -
|
|
35694
|
-
(isShippingFree ?
|
|
35696
|
+
(isShippingFree ? shippingPrice : 0);
|
|
35695
35697
|
const allowedCombinations = appliedDiscounts.map((discount) => discount.discount.allowedCombinations);
|
|
35696
35698
|
// Find the intersection of all allowed combinations
|
|
35697
35699
|
const sharedCombinations = allowedCombinations.reduce((intersection, currentCombinations) => {
|
|
@@ -35774,11 +35776,9 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
|
|
|
35774
35776
|
React.createElement("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-primary rounded-full flex items-center text-background justify-center text-sm" }, item.quantity)),
|
|
35775
35777
|
React.createElement("div", { className: "ml-4 flex-1" },
|
|
35776
35778
|
React.createElement("h3", { className: "text-lg font-medium" }, (_e = item.productData) === null || _e === void 0 ? void 0 : _e.title),
|
|
35777
|
-
React.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
|
|
35778
|
-
option.name
|
|
35779
|
-
"
|
|
35780
|
-
option.value,
|
|
35781
|
-
" "))))),
|
|
35779
|
+
React.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
|
|
35780
|
+
.map((option) => `${option.name}: ${option.value}`)
|
|
35781
|
+
.join(", "))),
|
|
35782
35782
|
React.createElement("div", { className: "text-right" }, isDiscounted ? (React.createElement("div", { className: "flex flex-col" },
|
|
35783
35783
|
React.createElement("p", { className: "text-sm font-medium -mb-0.5 line-through text-muted-foreground" }, storeHelpers.formatPrice((_f = productItem === null || productItem === void 0 ? void 0 : productItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate)),
|
|
35784
35784
|
React.createElement("p", { className: "text-lg font-medium" }, discountedPrice <= 0
|
package/dist/index.mjs
CHANGED
|
@@ -3203,14 +3203,14 @@ const CheckoutEmbed$2 = {
|
|
|
3203
3203
|
addressPlaceholder: "Zadejte svou adresu",
|
|
3204
3204
|
button: "Uložit adresu",
|
|
3205
3205
|
city: "Město",
|
|
3206
|
-
cityPlaceholder: "
|
|
3206
|
+
cityPlaceholder: "Zadejte město",
|
|
3207
3207
|
country: "Země",
|
|
3208
|
-
countryPlaceholder: "
|
|
3208
|
+
countryPlaceholder: "Zadejte svou zemi",
|
|
3209
3209
|
description: "Níže vyplňte údaje o vaší adrese.",
|
|
3210
3210
|
line1: "Adresa ulice",
|
|
3211
|
-
line1Placeholder: "
|
|
3211
|
+
line1Placeholder: "Zadejte ulici a číslo",
|
|
3212
3212
|
line2: "Byt, apartmá, jednotka atd. (Volitelné)",
|
|
3213
|
-
line2Placeholder: "
|
|
3213
|
+
line2Placeholder: "Byt 4B, Pokoj 123, atd.",
|
|
3214
3214
|
state: "Stát (volitelné)",
|
|
3215
3215
|
statePlaceholder: "Kalifornie",
|
|
3216
3216
|
title: "Zadejte svou adresu",
|
|
@@ -3240,7 +3240,8 @@ const CheckoutEmbed$2 = {
|
|
|
3240
3240
|
discountCodePlaceholder: "Slevový kód nebo dárková karta",
|
|
3241
3241
|
discountCodeError: "Už dostáváte nejlepší nabídku!",
|
|
3242
3242
|
free: "Zdarma",
|
|
3243
|
-
discountCodeSuccess: "Slevový kód byl úspěšně použit."
|
|
3243
|
+
discountCodeSuccess: "Slevový kód byl úspěšně použit.",
|
|
3244
|
+
discountCodeLabel: "Slevový kód"
|
|
3244
3245
|
},
|
|
3245
3246
|
loading: "Načítání ...",
|
|
3246
3247
|
Payment: {
|
|
@@ -3292,7 +3293,8 @@ const CheckoutEmbed$1 = {
|
|
|
3292
3293
|
discountCodeApply: "Apply",
|
|
3293
3294
|
discountCodeError: "You're already getting the best offer!",
|
|
3294
3295
|
free: "Free",
|
|
3295
|
-
discountCodeSuccess: "Discount code applied successfully."
|
|
3296
|
+
discountCodeSuccess: "Discount code applied successfully.",
|
|
3297
|
+
discountCodeLabel: "Discount Code"
|
|
3296
3298
|
},
|
|
3297
3299
|
CustomerForm: {
|
|
3298
3300
|
address: {
|
|
@@ -35641,7 +35643,7 @@ function DiscountCode({ applyDiscountCode, revalidateDiscounts, }) {
|
|
|
35641
35643
|
}
|
|
35642
35644
|
});
|
|
35643
35645
|
return (React__default.createElement("form", { className: "pb-1", onSubmit: handleSubmit },
|
|
35644
|
-
React__default.createElement(Label, { className: "text-sm font-medium mb-2" }, "
|
|
35646
|
+
React__default.createElement(Label, { className: "text-sm font-medium mb-2" }, t("CheckoutEmbed.Summary.discountCodeLabel")),
|
|
35645
35647
|
React__default.createElement("div", { className: "flex items-center gap-2" },
|
|
35646
35648
|
React__default.createElement(Input, { "aria-invalid": !!error, value: discountCode, onChange: (e) => {
|
|
35647
35649
|
setError("");
|
|
@@ -35668,7 +35670,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
|
|
|
35668
35670
|
const filteredDiscounts = appliedDiscounts.filter((discount) => discount.discount.type !== "FREE_SHIPPING");
|
|
35669
35671
|
const totalWithDiscounts = total -
|
|
35670
35672
|
filteredDiscounts.reduce((acc, { amount }) => acc + amount, 0) -
|
|
35671
|
-
(isShippingFree ?
|
|
35673
|
+
(isShippingFree ? shippingPrice : 0);
|
|
35672
35674
|
const allowedCombinations = appliedDiscounts.map((discount) => discount.discount.allowedCombinations);
|
|
35673
35675
|
// Find the intersection of all allowed combinations
|
|
35674
35676
|
const sharedCombinations = allowedCombinations.reduce((intersection, currentCombinations) => {
|
|
@@ -35751,11 +35753,9 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
|
|
|
35751
35753
|
React__default.createElement("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-primary rounded-full flex items-center text-background justify-center text-sm" }, item.quantity)),
|
|
35752
35754
|
React__default.createElement("div", { className: "ml-4 flex-1" },
|
|
35753
35755
|
React__default.createElement("h3", { className: "text-lg font-medium" }, (_e = item.productData) === null || _e === void 0 ? void 0 : _e.title),
|
|
35754
|
-
React__default.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
|
|
35755
|
-
option.name
|
|
35756
|
-
"
|
|
35757
|
-
option.value,
|
|
35758
|
-
" "))))),
|
|
35756
|
+
React__default.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
|
|
35757
|
+
.map((option) => `${option.name}: ${option.value}`)
|
|
35758
|
+
.join(", "))),
|
|
35759
35759
|
React__default.createElement("div", { className: "text-right" }, isDiscounted ? (React__default.createElement("div", { className: "flex flex-col" },
|
|
35760
35760
|
React__default.createElement("p", { className: "text-sm font-medium -mb-0.5 line-through text-muted-foreground" }, storeHelpers.formatPrice((_f = productItem === null || productItem === void 0 ? void 0 : productItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate)),
|
|
35761
35761
|
React__default.createElement("p", { className: "text-lg font-medium" }, discountedPrice <= 0
|