@betterstore/react 0.3.10 → 0.3.11

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.11
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fix
8
+
3
9
  ## 0.3.10
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -35604,7 +35604,9 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
35604
35604
  };
35605
35605
  React.useEffect(() => {
35606
35606
  const asyncFunc = () => __awaiter(this, void 0, void 0, function* () {
35607
- const { paymentSecret, publicKey, checkoutSession: newCheckout, } = yield storeClient.generateCheckoutPaymentSecret(clientSecret, checkoutId);
35607
+ const _a = yield storeClient.generateCheckoutPaymentSecret(clientSecret, checkoutId), { paymentSecret, publicKey, checkoutSession: newCheckout } = _a, rest = __rest(_a, ["paymentSecret", "publicKey", "checkoutSession"]);
35608
+ console.log("newCheckout", newCheckout);
35609
+ console.log("rest", rest);
35608
35610
  setPaymentSecret(paymentSecret);
35609
35611
  setPublicKey(publicKey);
35610
35612
  setCheckout(newCheckout);
@@ -35701,7 +35703,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
35701
35703
  return currentCombinations;
35702
35704
  return intersection.filter((combination) => currentCombinations.some((currentCombination) => JSON.stringify(currentCombination) === JSON.stringify(combination)));
35703
35705
  }, []);
35704
- const canCombine = sharedCombinations.length > 0;
35706
+ const canCombine = appliedDiscounts.length === 0 || sharedCombinations.length > 0;
35705
35707
  return (React.createElement("div", { className: "grid gap-5" },
35706
35708
  React.createElement("div", { className: "flex justify-between items-center" },
35707
35709
  React.createElement("div", { onClick: () => setIsOpen(!isOpen), className: "flex items-center gap-2 cursor-pointer" },
package/dist/index.mjs CHANGED
@@ -35581,7 +35581,9 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
35581
35581
  };
35582
35582
  useEffect(() => {
35583
35583
  const asyncFunc = () => __awaiter(this, void 0, void 0, function* () {
35584
- const { paymentSecret, publicKey, checkoutSession: newCheckout, } = yield storeClient.generateCheckoutPaymentSecret(clientSecret, checkoutId);
35584
+ const _a = yield storeClient.generateCheckoutPaymentSecret(clientSecret, checkoutId), { paymentSecret, publicKey, checkoutSession: newCheckout } = _a, rest = __rest(_a, ["paymentSecret", "publicKey", "checkoutSession"]);
35585
+ console.log("newCheckout", newCheckout);
35586
+ console.log("rest", rest);
35585
35587
  setPaymentSecret(paymentSecret);
35586
35588
  setPublicKey(publicKey);
35587
35589
  setCheckout(newCheckout);
@@ -35678,7 +35680,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
35678
35680
  return currentCombinations;
35679
35681
  return intersection.filter((combination) => currentCombinations.some((currentCombination) => JSON.stringify(currentCombination) === JSON.stringify(combination)));
35680
35682
  }, []);
35681
- const canCombine = sharedCombinations.length > 0;
35683
+ const canCombine = appliedDiscounts.length === 0 || sharedCombinations.length > 0;
35682
35684
  return (React__default.createElement("div", { className: "grid gap-5" },
35683
35685
  React__default.createElement("div", { className: "flex justify-between items-center" },
35684
35686
  React__default.createElement("div", { onClick: () => setIsOpen(!isOpen), className: "flex items-center gap-2 cursor-pointer" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/react",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -19,7 +19,7 @@
19
19
  "author": "Better Store",
20
20
  "license": "MIT",
21
21
  "devDependencies": {
22
- "@betterstore/sdk": "^0.3.61",
22
+ "@betterstore/sdk": "^0.3.62",
23
23
  "@changesets/cli": "^2.28.1",
24
24
  "@rollup/plugin-commonjs": "^28.0.3",
25
25
  "@rollup/plugin-json": "^6.1.0",