bitsnap-react 1.12.1 → 1.13.0
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/README.md +18 -5
- package/dist/CartProvider-F7ER3WSS.js +2 -0
- package/dist/{CartProvider-YPZ3HD7W.js.map → CartProvider-F7ER3WSS.js.map} +1 -1
- package/dist/CartProvider-N73XNL7S.mjs +2 -0
- package/dist/analytics.js +1 -1
- package/dist/analytics.mjs +1 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.mjs +1 -1
- package/dist/{chunk-MZSLLGFS.js → chunk-3A4YOO7Z.js} +2 -2
- package/dist/{chunk-MZSLLGFS.js.map → chunk-3A4YOO7Z.js.map} +1 -1
- package/dist/{chunk-VF62KDNS.mjs → chunk-3DGHF373.mjs} +2 -2
- package/dist/{chunk-GJNFDUJN.mjs → chunk-5GMWRCHK.mjs} +3 -3
- package/dist/chunk-5GMWRCHK.mjs.map +1 -0
- package/dist/{chunk-STVEBT6M.js → chunk-6CUCRTIK.js} +2 -2
- package/dist/{chunk-STVEBT6M.js.map → chunk-6CUCRTIK.js.map} +1 -1
- package/dist/{chunk-I6BRDRPB.js → chunk-EWLOGFF2.js} +2 -2
- package/dist/{chunk-I6BRDRPB.js.map → chunk-EWLOGFF2.js.map} +1 -1
- package/dist/chunk-GAVLY6RX.mjs +2 -0
- package/dist/chunk-GAVLY6RX.mjs.map +1 -0
- package/dist/{chunk-3ITTSNWG.js → chunk-IP4OOWZ6.js} +2 -2
- package/dist/{chunk-3ITTSNWG.js.map → chunk-IP4OOWZ6.js.map} +1 -1
- package/dist/{chunk-HBPSSGYN.mjs → chunk-K2EITRNW.mjs} +2 -2
- package/dist/{chunk-G3VVAVG7.mjs → chunk-KH7DFTJY.mjs} +2 -2
- package/dist/{chunk-DRAKVCD7.mjs → chunk-L6J6H73J.mjs} +2 -2
- package/dist/chunk-M4KEUK6I.js +2 -0
- package/dist/{chunk-4BV5IUZH.js.map → chunk-M4KEUK6I.js.map} +1 -1
- package/dist/{chunk-VDLJW4JJ.mjs → chunk-OC7YS3UY.mjs} +2 -2
- package/dist/{chunk-VRL3IF5J.js → chunk-TMBC2BHN.js} +3 -3
- package/dist/{chunk-VRL3IF5J.js.map → chunk-TMBC2BHN.js.map} +1 -1
- package/dist/{chunk-HDLCLZOK.js → chunk-TSJCVFOX.js} +2 -2
- package/dist/{chunk-HDLCLZOK.js.map → chunk-TSJCVFOX.js.map} +1 -1
- package/dist/{chunk-4ZFIL5S7.js → chunk-UFQVOGBS.js} +2 -2
- package/dist/{chunk-4ZFIL5S7.js.map → chunk-UFQVOGBS.js.map} +1 -1
- package/dist/{chunk-T2YSOHJM.mjs → chunk-YNGXQJPE.mjs} +2 -2
- package/dist/{chunk-T2YSOHJM.mjs.map → chunk-YNGXQJPE.mjs.map} +1 -1
- package/dist/course.js +1 -1
- package/dist/course.mjs +1 -1
- package/dist/embed/analytics.js +1 -1
- package/dist/index.d.mts +17 -7
- package/dist/index.d.ts +17 -7
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/methods-ADH5XI4I.js +2 -0
- package/dist/{methods-ISVX5JQ7.js.map → methods-ADH5XI4I.js.map} +1 -1
- package/dist/methods-BCR54EWX.mjs +2 -0
- package/dist/returns.js +1 -1
- package/dist/returns.mjs +1 -1
- package/package.json +1 -1
- package/dist/CartProvider-WPJWECBS.mjs +0 -2
- package/dist/CartProvider-YPZ3HD7W.js +0 -2
- package/dist/chunk-4BV5IUZH.js +0 -2
- package/dist/chunk-GJNFDUJN.mjs.map +0 -1
- package/dist/chunk-T3PAOMHI.mjs +0 -2
- package/dist/chunk-T3PAOMHI.mjs.map +0 -1
- package/dist/methods-FVDH6Y57.mjs +0 -2
- package/dist/methods-ISVX5JQ7.js +0 -2
- /package/dist/{CartProvider-WPJWECBS.mjs.map → CartProvider-N73XNL7S.mjs.map} +0 -0
- /package/dist/{chunk-VF62KDNS.mjs.map → chunk-3DGHF373.mjs.map} +0 -0
- /package/dist/{chunk-HBPSSGYN.mjs.map → chunk-K2EITRNW.mjs.map} +0 -0
- /package/dist/{chunk-G3VVAVG7.mjs.map → chunk-KH7DFTJY.mjs.map} +0 -0
- /package/dist/{chunk-DRAKVCD7.mjs.map → chunk-L6J6H73J.mjs.map} +0 -0
- /package/dist/{chunk-VDLJW4JJ.mjs.map → chunk-OC7YS3UY.mjs.map} +0 -0
- /package/dist/{methods-FVDH6Y57.mjs.map → methods-BCR54EWX.mjs.map} +0 -0
package/dist/chunk-T3PAOMHI.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-T2YSOHJM.mjs";var u="X-Bitsnap-Client",i=`bitsnap-react@${c}`,d="bs_client",z={[u]:i},b=e=>t=>(t.header.set(u,i),e(t));function j(e){let t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),r=t===-1?"":e.slice(t),a=n.includes("?")?/[?&]$/.test(n)?"":"&":"?";return`${n}${a}${d}=${encodeURIComponent(i)}${r}`}var g="https://bitsnap.pl",m=g;function K(e){console.log("setCustomHost",e),m=e}function h(e,t){return t.toLowerCase().startsWith("en")?e.en:e.pl}function k(e,t){let n={...e};if(t!=null)for(let[r,a]of Object.entries(t))a!=null&&(n[r]=a);return n}function l(e,t,n){return k(h(e,t),n)}function y(e,t){return e[t]??t}var T={en:{cart:"Cart",emptyCart:"Your cart is empty.",total:"Total:",delivery:"+ delivery",chooseCountry:"Choose a country",nextStep:"Next step",unavailableProducts:"Not all products are available.",checkoutFailed:"Something went wrong. Please try again later.",noPaymentGateway:"This shop doesn't accept online payments yet. Try again later or contact the seller.",gatewayNotConfigured:"Payments in this shop are not set up correctly. Try again later or contact the seller.",shippingNotConfigured:"Delivery in this shop is not configured yet. Try again later or contact the seller.",mixedRecurring:"Subscriptions and one-time products cannot be paid for together. Pay for them in separate orders.",currencyUnsupported:"The shop doesn't accept payments in this currency. Contact the seller.",priceChanged:"The product price has changed. Refresh the page to see the current price.",close:"Close cart",remove:"Remove",quantity:"Quantity",increaseQuantity:"Increase quantity",decreaseQuantity:"Decrease quantity",openCart:"Open cart",cartItemsCount:"Items in cart",lowestPrice30Days:"Lowest price in the last 30 days:",noPriceHistory:"No price data for the last 30 days",redirectFailed:"Could not redirect to the payment. Please try again later.",subscriptionUnsupported:"Subscriptions cannot be added to the cart yet.",searchCountry:"Find a country",noCountriesFound:"No countries found",countryRequired:"Choose a country to continue.",paymentForCart:"Cart payment",coupon:"Coupon",extrasCalculatedNext:"Discounts, shipping and taxes are calculated at the next step",loadFailed:"Could not load your cart.",retry:"Try again",paymentMethodLegend:"How would you like to pay?",paymentMethodOnline:"Pay online",paymentMethodOnlineDescription:"Card, BLIK code or instant bank payment. You pay right away.",paymentMethodManualTransfer:"Bank transfer",paymentMethodManualBlik:"BLIK \u2013 transfer to a phone number",paymentMethodManualBoth:"Bank transfer or BLIK to a phone number",paymentMethodManualDescription:"You pay in your bank's app. We show the payment details after you place the order, and the order waits for your payment.",paymentMethodManualBlikNote:"This is not a BLIK code payment \u2013 you do not enter a 6\u2011digit code."},pl:{cart:"Koszyk",emptyCart:"Brak produkt\xF3w w koszyku.",total:"Suma:",delivery:"+ dostawa",chooseCountry:"Wybierz kraj",nextStep:"Nast\u0119pny krok",unavailableProducts:"Nie wszystkie produkty s\u0105 dost\u0119pne w magazynie.",checkoutFailed:"Co\u015B posz\u0142o nie tak. Spr\xF3buj ponownie p\xF3\u017Aniej.",noPaymentGateway:"Ten sklep nie przyjmuje jeszcze p\u0142atno\u015Bci online. Spr\xF3buj ponownie p\xF3\u017Aniej lub skontaktuj si\u0119 ze sprzedawc\u0105.",gatewayNotConfigured:"P\u0142atno\u015Bci w tym sklepie nie s\u0105 poprawnie skonfigurowane. Spr\xF3buj ponownie p\xF3\u017Aniej lub skontaktuj si\u0119 ze sprzedawc\u0105.",shippingNotConfigured:"Dostawa w tym sklepie nie jest jeszcze skonfigurowana. Spr\xF3buj ponownie p\xF3\u017Aniej lub skontaktuj si\u0119 ze sprzedawc\u0105.",mixedRecurring:"Subskrypcji i produkt\xF3w jednorazowych nie mo\u017Cna op\u0142aci\u0107 razem. Op\u0142a\u0107 je w osobnych zam\xF3wieniach.",currencyUnsupported:"Sklep nie przyjmuje p\u0142atno\u015Bci w tej walucie. Skontaktuj si\u0119 ze sprzedawc\u0105.",priceChanged:"Cena produktu si\u0119 zmieni\u0142a. Od\u015Bwie\u017C stron\u0119, aby zobaczy\u0107 aktualn\u0105 cen\u0119.",close:"Zamknij koszyk",remove:"Usu\u0144",quantity:"Ilo\u015B\u0107",increaseQuantity:"Zwi\u0119ksz ilo\u015B\u0107",decreaseQuantity:"Zmniejsz ilo\u015B\u0107",openCart:"Otw\xF3rz koszyk",cartItemsCount:"Produkt\xF3w w koszyku",lowestPrice30Days:"Najni\u017Csza cena z 30 dni:",noPriceHistory:"Brak danych o cenie z ostatnich 30 dni",redirectFailed:"Nie uda\u0142o si\u0119 przekierowa\u0107 do p\u0142atno\u015Bci. Spr\xF3buj ponownie p\xF3\u017Aniej.",subscriptionUnsupported:"Subskrypcji nie mo\u017Cna jeszcze doda\u0107 do koszyka.",searchCountry:"Znajd\u017A kraj",noCountriesFound:"Nie znaleziono kraj\xF3w",countryRequired:"Wybierz kraj, aby przej\u015B\u0107 dalej.",paymentForCart:"P\u0142atno\u015B\u0107 za koszyk",coupon:"Kupon",extrasCalculatedNext:"Rabaty, dostawa i podatki w nast\u0119pnym kroku",loadFailed:"Nie uda\u0142o si\u0119 wczyta\u0107 koszyka.",retry:"Spr\xF3buj ponownie",paymentMethodLegend:"Jak chcesz zap\u0142aci\u0107?",paymentMethodOnline:"Zap\u0142a\u0107 online",paymentMethodOnlineDescription:"Karta, kod BLIK lub szybki przelew. P\u0142acisz od razu.",paymentMethodManualTransfer:"Przelew bankowy",paymentMethodManualBlik:"BLIK \u2013 przelew na telefon",paymentMethodManualBoth:"Przelew lub BLIK na telefon",paymentMethodManualDescription:"Zap\u0142acisz w aplikacji swojego banku. Dane do p\u0142atno\u015Bci poka\u017Cemy po z\u0142o\u017Ceniu zam\xF3wienia, a zam\xF3wienie poczeka na Twoj\u0105 wp\u0142at\u0119.",paymentMethodManualBlikNote:"To nie jest p\u0142atno\u015B\u0107 kodem BLIK \u2013 nie wpisujesz 6\u2011cyfrowego kodu."}};function x(e,t){return l(T,e,t)}function N(e,t,n){return y(x(t,n),e)}var s="pl-PL",p="bitsnap-locale",o;function B(e){let t=e?.trim();o=t?t.toLowerCase()==="en"?"en-US":t.toLowerCase()==="pl"?s:t:void 0,typeof localStorage<"u"&&(o==null?localStorage.removeItem(p):localStorage.setItem(p,o))}function R(){return o??(typeof localStorage<"u"?localStorage.getItem(p)??s:s)}import{clsx as C}from"clsx";import{twMerge as w}from"tailwind-merge";function O(...e){return w(C(e))}export{z as a,b,j as c,O as d,g as e,m as f,K as g,h,l as i,N as j,s as k,B as l,R as m};
|
|
2
|
-
//# sourceMappingURL=chunk-T3PAOMHI.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/client-header.ts","../src/components/checkout/constants.ts","../src/lib/texts.ts","../src/components/checkout/texts.ts","../src/components/checkout/locale.ts","../src/lib/utils.ts"],"sourcesContent":["import type { Interceptor } from \"@connectrpc/connect\";\nimport { SDK_VERSION } from \"../version\";\n\nexport const CLIENT_HEADER_NAME = \"X-Bitsnap-Client\";\nexport const CLIENT_HEADER_VALUE = `bitsnap-react@${SDK_VERSION}`;\n\nexport const CLIENT_QUERY_PARAM = \"bs_client\";\n\n/**\n * Spread into the `headers` of a fetch that already triggers a CORS preflight\n * (JSON POST, Connect RPC). Never use it on a simple cross-origin GET: the\n * custom header would force a preflight that older servers and merchant\n * proxies do not allow. Use `withClientParam` there.\n */\nexport const clientHeaders: Record<string, string> = {\n [CLIENT_HEADER_NAME]: CLIENT_HEADER_VALUE,\n};\n\n/** Connect interceptor adding the client header to every RPC. */\nexport const clientHeaderInterceptor: Interceptor = (next) => (req) => {\n req.header.set(CLIENT_HEADER_NAME, CLIENT_HEADER_VALUE);\n return next(req);\n};\n\n/** Adds `bs_client=<pkg>@<ver>` to a URL, for simple GETs that must stay preflight-free. */\nexport function withClientParam(url: string): string {\n const hash = url.indexOf(\"#\");\n const base = hash === -1 ? url : url.slice(0, hash);\n const fragment = hash === -1 ? \"\" : url.slice(hash);\n const separator = base.includes(\"?\") ? (/[?&]$/.test(base) ? \"\" : \"&\") : \"?\";\n return `${base}${separator}${CLIENT_QUERY_PARAM}=${encodeURIComponent(CLIENT_HEADER_VALUE)}${fragment}`;\n}\n","export const DEFAULT_HOST = \"https://bitsnap.pl\";\nexport let HOST = DEFAULT_HOST;\n\nexport function setCustomHost(host: string) {\n console.log(\"setCustomHost\", host);\n HOST = host;\n}\n","/**\n * Shared text machinery: typed string tables per locale, the locale fallback\n * and a merge with caller overrides. Each module (checkout, later returns)\n * supplies its own key type and default tables.\n */\n\n/** Strings of one locale, keyed by text key. */\nexport type TextTable<Key extends string> = Record<Key, string>;\n\n/** Default tables for the supported locales. */\nexport type LocaleTables<Key extends string> = {\n en: TextTable<Key>;\n pl: TextTable<Key>;\n};\n\n/**\n * Picks the table for a locale. Any locale starting with `en` (case\n * insensitive, so `en`, `en-US`, `EN-gb`) gets English; everything else,\n * including unknown locales, gets the Polish default.\n */\nexport function pickLocaleTable<Key extends string>(\n tables: LocaleTables<Key>,\n locale: string,\n): TextTable<Key> {\n return locale.toLowerCase().startsWith(\"en\") ? tables.en : tables.pl;\n}\n\n/**\n * Merges caller overrides over a table. Overrides apply regardless of the\n * locale; `undefined`/`null` entries are ignored so the default stays.\n */\nexport function mergeTexts<Key extends string>(\n table: TextTable<Key>,\n overrides?: Partial<TextTable<Key>>,\n): TextTable<Key> {\n const result: Record<string, string> = { ...table };\n\n if (overrides != null) {\n for (const [key, value] of Object.entries<string | undefined>(overrides)) {\n if (value != null) {\n result[key] = value;\n }\n }\n }\n\n return result as TextTable<Key>;\n}\n\n/** Locale table merged with the caller overrides. */\nexport function resolveTexts<Key extends string>(\n tables: LocaleTables<Key>,\n locale: string,\n overrides?: Partial<TextTable<Key>>,\n): TextTable<Key> {\n return mergeTexts(pickLocaleTable(tables, locale), overrides);\n}\n\n/** Looks up a single text. Unknown keys return the key itself. */\nexport function lookupText<Key extends string>(\n texts: TextTable<Key>,\n key: Key,\n): string {\n return (texts as Record<string, string | undefined>)[key] ?? key;\n}\n","import {\n lookupText,\n resolveTexts,\n type LocaleTables,\n} from \"@/src/lib/texts\";\n\n/**\n * Every string the checkout renders. Pass a partial object through the\n * `texts` prop of `BitsnapCheckout` to override any of them, whatever the\n * locale.\n */\nexport type CheckoutTexts = {\n /** Drawer title. */\n cart: string;\n /** Shown when the cart has no products. */\n emptyCart: string;\n /** Label next to the total price. */\n total: string;\n /** Delivery note next to the total price. */\n delivery: string;\n /** Country selector placeholder. */\n chooseCountry: string;\n /** Checkout button label. */\n nextStep: string;\n /** Error shown when some products are out of stock. */\n unavailableProducts: string;\n /** Error shown when the checkout fails and the server gave no reason. */\n checkoutFailed: string;\n /** Error shown when the shop has no payment gateway connected. */\n noPaymentGateway: string;\n /** Error shown when the payment gateway of the shop is not set up. */\n gatewayNotConfigured: string;\n /** Error shown when delivery of the shop is not set up. */\n shippingNotConfigured: string;\n /** Error shown when the cart mixes subscriptions with one-time products. */\n mixedRecurring: string;\n /** Error shown when the cart currency cannot be paid in. */\n currencyUnsupported: string;\n /** Error shown when a price changed after the product was added. */\n priceChanged: string;\n /** Accessible name of the close button of the drawer. */\n close: string;\n /** Remove button of a cart line (also read together with the product name). */\n remove: string;\n /** Accessible name of the quantity control and its input. */\n quantity: string;\n /** Accessible name of the \"+\" quantity button. */\n increaseQuantity: string;\n /** Accessible name of the \"-\" quantity button. */\n decreaseQuantity: string;\n /** Accessible name of the cart button when it only shows an icon. */\n openCart: string;\n /** Hidden label of the number of products badge; the number is appended after a colon. */\n cartItemsCount: string;\n /** Label before the lowest price of the last 30 days; the price is appended. */\n lowestPrice30Days: string;\n /** Shown instead of the lowest price when the price has no history. */\n noPriceHistory: string;\n /** Error shown when redirecting to the payment failed. */\n redirectFailed: string;\n /** Error shown when a subscription is added to the cart. */\n subscriptionUnsupported: string;\n /** Country search placeholder. */\n searchCountry: string;\n /** Shown when the country search has no match. */\n noCountriesFound: string;\n /** Hint under the checkout button when no country is chosen. */\n countryRequired: string;\n /** Title of the Apple Pay and Google Pay sheet total. */\n paymentForCart: string;\n /** Coupon label in the Google Pay sheet; the code is appended. */\n coupon: string;\n /** Note under the cart total. */\n extrasCalculatedNext: string;\n /** Error shown when the products of the cart could not be loaded. */\n loadFailed: string;\n /** Button that loads the cart again. */\n retry: string;\n /** Heading of the payment method choice (shown only when the shop offers paying by hand). */\n paymentMethodLegend: string;\n /** Option that pays through the shop's online gateway. */\n paymentMethodOnline: string;\n /** Hint under the online option. */\n paymentMethodOnlineDescription: string;\n /** Manual option when the seller takes bank transfers only. */\n paymentMethodManualTransfer: string;\n /** Manual option when the seller takes BLIK transfers to a phone number only. */\n paymentMethodManualBlik: string;\n /** Manual option when the seller takes both. */\n paymentMethodManualBoth: string;\n /** What paying by hand means: the details come after the order is placed. */\n paymentMethodManualDescription: string;\n /** Shown with a selected manual option that includes BLIK to a phone number. */\n paymentMethodManualBlikNote: string;\n};\n\nexport type CheckoutTextKey = keyof CheckoutTexts;\n\nexport const CHECKOUT_TEXT_TABLES: LocaleTables<CheckoutTextKey> = {\n en: {\n cart: \"Cart\",\n emptyCart: \"Your cart is empty.\",\n total: \"Total:\",\n delivery: \"+ delivery\",\n chooseCountry: \"Choose a country\",\n nextStep: \"Next step\",\n unavailableProducts: \"Not all products are available.\",\n checkoutFailed: \"Something went wrong. Please try again later.\",\n noPaymentGateway:\n \"This shop doesn't accept online payments yet. Try again later or contact the seller.\",\n gatewayNotConfigured:\n \"Payments in this shop are not set up correctly. Try again later or contact the seller.\",\n shippingNotConfigured:\n \"Delivery in this shop is not configured yet. Try again later or contact the seller.\",\n mixedRecurring:\n \"Subscriptions and one-time products cannot be paid for together. Pay for them in separate orders.\",\n currencyUnsupported:\n \"The shop doesn't accept payments in this currency. Contact the seller.\",\n priceChanged: \"The product price has changed. Refresh the page to see the current price.\",\n close: \"Close cart\",\n remove: \"Remove\",\n quantity: \"Quantity\",\n increaseQuantity: \"Increase quantity\",\n decreaseQuantity: \"Decrease quantity\",\n openCart: \"Open cart\",\n cartItemsCount: \"Items in cart\",\n lowestPrice30Days: \"Lowest price in the last 30 days:\",\n noPriceHistory: \"No price data for the last 30 days\",\n redirectFailed: \"Could not redirect to the payment. Please try again later.\",\n subscriptionUnsupported: \"Subscriptions cannot be added to the cart yet.\",\n searchCountry: \"Find a country\",\n noCountriesFound: \"No countries found\",\n countryRequired: \"Choose a country to continue.\",\n paymentForCart: \"Cart payment\",\n coupon: \"Coupon\",\n extrasCalculatedNext:\n \"Discounts, shipping and taxes are calculated at the next step\",\n loadFailed: \"Could not load your cart.\",\n retry: \"Try again\",\n paymentMethodLegend: \"How would you like to pay?\",\n paymentMethodOnline: \"Pay online\",\n paymentMethodOnlineDescription:\n \"Card, BLIK code or instant bank payment. You pay right away.\",\n paymentMethodManualTransfer: \"Bank transfer\",\n paymentMethodManualBlik: \"BLIK – transfer to a phone number\",\n paymentMethodManualBoth: \"Bank transfer or BLIK to a phone number\",\n paymentMethodManualDescription:\n \"You pay in your bank's app. We show the payment details after you place the order, and the order waits for your payment.\",\n paymentMethodManualBlikNote:\n \"This is not a BLIK code payment – you do not enter a 6‑digit code.\",\n },\n pl: {\n cart: \"Koszyk\",\n emptyCart: \"Brak produktów w koszyku.\",\n total: \"Suma:\",\n delivery: \"+ dostawa\",\n chooseCountry: \"Wybierz kraj\",\n nextStep: \"Następny krok\",\n unavailableProducts: \"Nie wszystkie produkty są dostępne w magazynie.\",\n checkoutFailed: \"Coś poszło nie tak. Spróbuj ponownie później.\",\n noPaymentGateway:\n \"Ten sklep nie przyjmuje jeszcze płatności online. Spróbuj ponownie później lub skontaktuj się ze sprzedawcą.\",\n gatewayNotConfigured:\n \"Płatności w tym sklepie nie są poprawnie skonfigurowane. Spróbuj ponownie później lub skontaktuj się ze sprzedawcą.\",\n shippingNotConfigured:\n \"Dostawa w tym sklepie nie jest jeszcze skonfigurowana. Spróbuj ponownie później lub skontaktuj się ze sprzedawcą.\",\n mixedRecurring:\n \"Subskrypcji i produktów jednorazowych nie można opłacić razem. Opłać je w osobnych zamówieniach.\",\n currencyUnsupported:\n \"Sklep nie przyjmuje płatności w tej walucie. Skontaktuj się ze sprzedawcą.\",\n priceChanged: \"Cena produktu się zmieniła. Odśwież stronę, aby zobaczyć aktualną cenę.\",\n close: \"Zamknij koszyk\",\n remove: \"Usuń\",\n quantity: \"Ilość\",\n increaseQuantity: \"Zwiększ ilość\",\n decreaseQuantity: \"Zmniejsz ilość\",\n openCart: \"Otwórz koszyk\",\n cartItemsCount: \"Produktów w koszyku\",\n lowestPrice30Days: \"Najniższa cena z 30 dni:\",\n noPriceHistory: \"Brak danych o cenie z ostatnich 30 dni\",\n redirectFailed:\n \"Nie udało się przekierować do płatności. Spróbuj ponownie później.\",\n subscriptionUnsupported: \"Subskrypcji nie można jeszcze dodać do koszyka.\",\n searchCountry: \"Znajdź kraj\",\n noCountriesFound: \"Nie znaleziono krajów\",\n countryRequired: \"Wybierz kraj, aby przejść dalej.\",\n paymentForCart: \"Płatność za koszyk\",\n coupon: \"Kupon\",\n extrasCalculatedNext: \"Rabaty, dostawa i podatki w następnym kroku\",\n loadFailed: \"Nie udało się wczytać koszyka.\",\n retry: \"Spróbuj ponownie\",\n paymentMethodLegend: \"Jak chcesz zapłacić?\",\n paymentMethodOnline: \"Zapłać online\",\n paymentMethodOnlineDescription:\n \"Karta, kod BLIK lub szybki przelew. Płacisz od razu.\",\n paymentMethodManualTransfer: \"Przelew bankowy\",\n paymentMethodManualBlik: \"BLIK – przelew na telefon\",\n paymentMethodManualBoth: \"Przelew lub BLIK na telefon\",\n paymentMethodManualDescription:\n \"Zapłacisz w aplikacji swojego banku. Dane do płatności pokażemy po złożeniu zamówienia, a zamówienie poczeka na Twoją wpłatę.\",\n paymentMethodManualBlikNote:\n \"To nie jest płatność kodem BLIK – nie wpisujesz 6‑cyfrowego kodu.\",\n },\n};\n\n/** Default texts for a locale merged with the caller overrides. */\nexport function resolveCheckoutTexts(\n locale: string,\n overrides?: Partial<CheckoutTexts>,\n): CheckoutTexts {\n return resolveTexts(CHECKOUT_TEXT_TABLES, locale, overrides);\n}\n\nexport function getCheckoutText(\n key: CheckoutTextKey,\n locale: string,\n overrides?: Partial<CheckoutTexts>,\n): string {\n return lookupText(resolveCheckoutTexts(locale, overrides), key);\n}\n","import { pickLocaleTable } from \"@/src/lib/texts\";\nimport { CHECKOUT_TEXT_TABLES } from \"./texts\";\n\nexport const DEFAULT_LOCALE = \"pl-PL\" as const;\nconst localeStorageKey = \"bitsnap-locale\";\n\nlet activeLocale: string | undefined;\n\nexport function setLocale(locale?: string): void {\n const value = locale?.trim();\n activeLocale = value\n ? value.toLowerCase() === \"en\"\n ? \"en-US\"\n : value.toLowerCase() === \"pl\"\n ? DEFAULT_LOCALE\n : value\n : undefined;\n if (typeof localStorage !== \"undefined\") {\n if (activeLocale == null) {\n localStorage.removeItem(localeStorageKey);\n } else {\n localStorage.setItem(localeStorageKey, activeLocale);\n }\n }\n}\n\nexport function getLocale(): string {\n if (activeLocale != null) {\n return activeLocale;\n }\n if (typeof localStorage !== \"undefined\") {\n return localStorage.getItem(localeStorageKey) ?? DEFAULT_LOCALE;\n }\n return DEFAULT_LOCALE;\n}\n\nexport function translate(key: string, locale: string = getLocale()): string {\n return (\n (pickLocaleTable(CHECKOUT_TEXT_TABLES, locale) as Record<string, string>)[\n key\n ] ?? key\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport type Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type Partial<T> = {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AAOI,EAAWN,EAAqBC,EAAQC,CAAS,EAAGG,CAAG,CAChE,CCxNO,IAAME,EAAiB,QACxBC,EAAmB,iBAErBC,EAEG,SAASC,EAAUC,EAAuB,CAC/C,IAAMC,EAAQD,GAAQ,KAAK,EAC3BF,EAAeG,EACXA,EAAM,YAAY,IAAM,KACtB,QACAA,EAAM,YAAY,IAAM,KACtBL,EACAK,EACJ,OACA,OAAO,aAAiB,MACtBH,GAAgB,KAClB,aAAa,WAAWD,CAAgB,EAExC,aAAa,QAAQA,EAAkBC,CAAY,EAGzD,CAEO,SAASI,GAAoB,CAClC,OAAIJ,IAGA,OAAO,aAAiB,IACnB,aAAa,QAAQD,CAAgB,GAAKD,EAE5CA,EACT,CClCA,OAA0B,QAAAO,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B","names":["CLIENT_HEADER_NAME","CLIENT_HEADER_VALUE","SDK_VERSION","CLIENT_QUERY_PARAM","clientHeaders","clientHeaderInterceptor","next","req","withClientParam","url","hash","base","fragment","separator","DEFAULT_HOST","HOST","setCustomHost","host","pickLocaleTable","tables","locale","mergeTexts","table","overrides","result","key","value","resolveTexts","lookupText","texts","CHECKOUT_TEXT_TABLES","resolveCheckoutTexts","locale","overrides","resolveTexts","getCheckoutText","key","lookupText","DEFAULT_LOCALE","localeStorageKey","activeLocale","setLocale","locale","value","getLocale","clsx","twMerge","cn","inputs"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as a,B as b,C as c,D as d,E as e,F as f}from"./chunk-GJNFDUJN.mjs";import"./chunk-G3VVAVG7.mjs";import"./chunk-KOVKUJAW.mjs";import"./chunk-HBPSSGYN.mjs";import"./chunk-VF62KDNS.mjs";import"./chunk-T3PAOMHI.mjs";import"./chunk-T2YSOHJM.mjs";import"./chunk-ADYVTMGH.mjs";import"./chunk-U6FLIRIV.mjs";export{a as Bitsnap,d as createCheckout,c as createPaymentURL,b as getPaymentMethodChoice,e as getReferenceIfPossible,f as injectReferenceToRequestIfNeeded};
|
|
2
|
-
//# sourceMappingURL=methods-FVDH6Y57.mjs.map
|
package/dist/methods-ISVX5JQ7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVRL3IF5Jjs = require('./chunk-VRL3IF5J.js');require('./chunk-STVEBT6M.js');require('./chunk-KOYBZORL.js');require('./chunk-I6BRDRPB.js');require('./chunk-4ZFIL5S7.js');require('./chunk-4BV5IUZH.js');require('./chunk-HDLCLZOK.js');require('./chunk-XIHGWNTS.js');require('./chunk-JSDGZ4NY.js');exports.Bitsnap = _chunkVRL3IF5Jjs.A; exports.createCheckout = _chunkVRL3IF5Jjs.D; exports.createPaymentURL = _chunkVRL3IF5Jjs.C; exports.getPaymentMethodChoice = _chunkVRL3IF5Jjs.B; exports.getReferenceIfPossible = _chunkVRL3IF5Jjs.E; exports.injectReferenceToRequestIfNeeded = _chunkVRL3IF5Jjs.F;
|
|
2
|
-
//# sourceMappingURL=methods-ISVX5JQ7.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|