@betterstore/react 0.3.8 → 0.3.9

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fixes
8
+
3
9
  ## 0.3.8
4
10
 
5
11
  ### Patch Changes
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: "San Francisco",
3229
+ cityPlaceholder: "Zadejte město",
3230
3230
  country: "Země",
3231
- countryPlaceholder: "Vstoupit do své země",
3231
+ countryPlaceholder: "Zadejte svou zemi",
3232
3232
  description: "Níže vyplňte údaje o vaší adrese.",
3233
3233
  line1: "Adresa ulice",
3234
- line1Placeholder: "123 Hlavní ulice",
3234
+ line1Placeholder: "Zadejte ulici a číslo",
3235
3235
  line2: "Byt, apartmá, jednotka atd. (Volitelné)",
3236
- line2Placeholder: "APT 4B, Suite 123, atd.",
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" }, "Discount Code"),
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 ? 0 : shippingPrice);
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) => {
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: "San Francisco",
3206
+ cityPlaceholder: "Zadejte město",
3207
3207
  country: "Země",
3208
- countryPlaceholder: "Vstoupit do své země",
3208
+ countryPlaceholder: "Zadejte svou zemi",
3209
3209
  description: "Níže vyplňte údaje o vaší adrese.",
3210
3210
  line1: "Adresa ulice",
3211
- line1Placeholder: "123 Hlavní ulice",
3211
+ line1Placeholder: "Zadejte ulici a číslo",
3212
3212
  line2: "Byt, apartmá, jednotka atd. (Volitelné)",
3213
- line2Placeholder: "APT 4B, Suite 123, atd.",
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" }, "Discount Code"),
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 ? 0 : shippingPrice);
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) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/react",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {