@ecomiq/storefront 3.0.2 → 3.1.1
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 +21 -0
- package/dist/{account-DTahJyuQ.js → account-CZZ-ku6L.js} +4 -4
- package/dist/account.d.ts +9 -0
- package/dist/analytics/{analytics-CG1Qagwl.js → analytics-CiG_O37p.js} +4 -4
- package/dist/analytics/{config-C1-n2Zx-.js → config-DN5B1GOG.js} +3 -3
- package/dist/analytics/{consent-B13rBpBs.js → consent-D0-iQ4bg.js} +1 -1
- package/dist/analytics/{consent-banner-9QvRRy8v.js → consent-banner-D36fpU89.js} +1 -1
- package/dist/analytics/{cookies-pLozllyB.js → cookies-CWsi-zSd.js} +1 -1
- package/dist/analytics/{events-Dt81tIp1.js → events-CWmKY7oX.js} +2 -1
- package/dist/analytics/{tracker-p4yaoOyk.js → tracker-DpfDB2sY.js} +1 -1
- package/dist/{bank-accounts-8PuqC0GW.js → bank-accounts-MpKIxHaX.js} +1 -1
- package/dist/{captcha-CsBwlX74.js → captcha-CZkpghTO.js} +1 -1
- package/dist/{cart-actions-C58VRCAp.js → cart-actions-IKRYGqfj.js} +32 -9
- package/dist/{cart-form-y9P1r_EX.js → cart-form-Bq_B-Rh6.js} +6 -4
- package/dist/cart-form.d.ts +2 -1
- package/dist/{cart-summary-ur2VWKr-.js → cart-summary-B6vtRGBO.js} +6 -1
- package/dist/cart-summary.d.ts +2 -1
- package/dist/{catalog-hooks-CV6zETMZ.js → catalog-hooks-DjmpXROv.js} +1 -1
- package/dist/{checkout-CrDtrDrV.js → checkout-DsI1MY14.js} +6 -6
- package/dist/{complaint-book-CQkiQ0M-.js → complaint-book-aAQfGBvo.js} +2 -2
- package/dist/{culqi-authentication-Ckq_e5B7.js → culqi-authentication-DHxjPJRE.js} +1 -1
- package/dist/{customer-document-fields-B4RtDYe-.js → customer-document-fields-BzLdztjM.js} +1 -1
- package/dist/{customer-login-form-Cg1xa3UR.js → customer-login-form-k_q7_7FX.js} +2 -2
- package/dist/{customer-registration-form-Cy7n-Y42.js → customer-registration-form-PrBqUuI9.js} +1 -1
- package/dist/entries/account.js +5 -5
- package/dist/entries/analytics.js +4 -4
- package/dist/entries/cart.d.ts +2 -1
- package/dist/entries/cart.js +6 -5
- package/dist/entries/checkout.js +8 -8
- package/dist/entries/order.js +8 -8
- package/dist/{form-contracts-BNpHaTGJ.js → form-contracts-0R112spH.js} +11 -4
- package/dist/form-contracts.d.ts +3 -3
- package/dist/index.js +29 -29
- package/dist/{invoice-fields-BmAF1Bdv.js → invoice-fields-BzDfV1nR.js} +1 -1
- package/dist/{mercadopago-dialog-BzboyTG1.js → mercadopago-dialog-CpGlgKBl.js} +2 -2
- package/dist/{optimistic-cart-BveVOHuh.js → optimistic-cart-DcJ8-tCw.js} +1 -1
- package/dist/{order-display-NqS81m9p.js → order-display-CUXVESaF.js} +19 -10
- package/dist/{order-draft-CvtfTp4H.js → order-draft-D8sqUUNp.js} +1 -1
- package/dist/{order-payment-continuation-B2oNgu94.js → order-payment-continuation-CS6omD7E.js} +3 -3
- package/dist/{order-payment-in-review-DB6bCNsB.js → order-payment-in-review-D5Y8bjGA.js} +1 -1
- package/dist/{order-status-YIcJmCVH.js → order-status-QsmEO-89.js} +3 -3
- package/dist/{page-seo-CXj_ZxJc.js → page-seo-BKG-Ta6t.js} +3 -3
- package/dist/{pages-DoVOQVlP.js → pages-DyItxkdE.js} +4 -4
- package/dist/{payment-dialog-frame-Yqptx9Ze.js → payment-dialog-frame-xtidt_eM.js} +1 -1
- package/dist/personalization-BSVlktZP.js +94 -0
- package/dist/personalization-fields-CwBR8oGr.js +363 -0
- package/dist/personalization-fields.d.ts +17 -0
- package/dist/{preview-C3sqXLu7.js → preview-JWdMO6kX.js} +6 -4
- package/dist/{preview-address-BQLjWNrr.js → preview-address-bvieGEKb.js} +1 -1
- package/dist/{preview-cart-D1tZo7HE.js → preview-cart-COIP3Vfh.js} +3 -2
- package/dist/{public-pages-BH4jw2xh.js → public-pages-Byh01h-6.js} +2 -2
- package/dist/{registration-B99Qz9FK.js → registration-h_00PAhj.js} +3 -3
- package/dist/{route-text-TU3xed68.js → route-text-B6pWdevi.js} +1 -1
- package/dist/{section-preview-NzNw6sAL.js → section-preview-BiYfeE-d.js} +2 -2
- package/dist/sections/account-addresses.js +2 -2
- package/dist/sections/account-order.js +11 -6
- package/dist/sections/account-orders.js +3 -3
- package/dist/sections/account-profile.js +2 -2
- package/dist/sections/checkout.js +18 -11
- package/dist/sections/complaint-book.js +3 -3
- package/dist/sections/design-system.js +1 -1
- package/dist/sections/draft-invoice.js +7 -2
- package/dist/{sections-DyCN6unE.js → sections-CgpjubkB.js} +1 -1
- package/dist/{seo-CXnoXxGZ.js → seo-D9UdUMg9.js} +2 -2
- package/dist/{session-l0xbh3uY.js → session-DR_9-bcf.js} +6 -6
- package/dist/{store-CuxOWbsb.js → store-uU2gWdMY.js} +2 -2
- package/dist/{storefront-language-3jED0mSM.js → storefront-language-Bnt-TU2F.js} +1 -1
- package/dist/{storefront-text-Cdo69zlx.js → storefront-text-Co7iUnLM.js} +2 -2
- package/dist/{storefront-text-en-Bzm4qMCo.js → storefront-text-en-DzYmdOuY.js} +5 -1
- package/dist/{storefront-text-pt-BeMGHI7h.js → storefront-text-pt-CizClH0I.js} +5 -1
- package/dist/{stripe-dialog-C7WM3gEI.js → stripe-dialog-D88qfkUS.js} +2 -2
- package/dist/{templates-B4TX5AB0.js → templates-AgGupnPA.js} +2 -2
- package/dist/{urls-wCZ6LnmG.js → urls-D4uinJVd.js} +1 -1
- package/dist/{use-checkout-C7IG5Xnz.js → use-checkout-Jdk8P12A.js} +1 -1
- package/dist/{use-checkout-payment-t1R-GdW1.js → use-checkout-payment-BGX-BE6D.js} +1 -1
- package/dist/{voucher-payment-DUopOxhl.js → voucher-payment-B3o9ybg6.js} +1 -1
- package/dist/{worker-xF0YKH8T.js → worker-cbXmLvfR.js} +2 -2
- package/package.json +2 -2
- package/src/sections/account-order.tsx +4 -2
- package/src/sections/checkout.tsx +4 -1
- package/src/sections/draft-invoice.tsx +2 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { loadStorefrontTranslations, storefrontText } from "./storefront-text-
|
|
2
|
-
import { captchaResponse } from "./captcha-
|
|
1
|
+
import { loadStorefrontTranslations, storefrontText } from "./storefront-text-Co7iUnLM.js";
|
|
2
|
+
import { captchaResponse } from "./captcha-CZkpghTO.js";
|
|
3
3
|
import { base64Url, customerCookies, customerSessionId, equalSecret } from "./customer-cookies-DHOgFAMV.js";
|
|
4
4
|
import { safeNext } from "./form-BtQcbXlJ.js";
|
|
5
|
-
import { PREVIEW_TOKEN } from "./preview-
|
|
5
|
+
import { PREVIEW_TOKEN } from "./preview-JWdMO6kX.js";
|
|
6
6
|
import { customerClientHeaders, customerCsrfTokenForRequest, rejectCrossOriginAction } from "./request-security-CRsRMgwj.js";
|
|
7
|
-
import { store } from "./store-
|
|
8
|
-
import { requestUrl } from "./urls-
|
|
9
|
-
import { worker } from "./worker-
|
|
7
|
+
import { store } from "./store-uU2gWdMY.js";
|
|
8
|
+
import { requestUrl } from "./urls-D4uinJVd.js";
|
|
9
|
+
import { worker } from "./worker-cbXmLvfR.js";
|
|
10
10
|
import { data, redirect } from "react-router";
|
|
11
11
|
import { ApiError } from "@ecomiq/core";
|
|
12
12
|
import { z } from "zod";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { apiCacheFetch, uncachedFetch } from "./api-cache-DsuIn5hX.js";
|
|
2
|
-
import { previewClient } from "./preview-
|
|
2
|
+
import { previewClient } from "./preview-JWdMO6kX.js";
|
|
3
3
|
import { productPreviewClient } from "./product-preview-BspMAecJ.js";
|
|
4
4
|
import { observeStorefrontClient } from "./telemetry-HuZXWBPi.js";
|
|
5
|
-
import { worker } from "./worker-
|
|
5
|
+
import { worker } from "./worker-cbXmLvfR.js";
|
|
6
6
|
import { data } from "react-router";
|
|
7
7
|
import { ApiError, GraphQLResponseError, createClient } from "@ecomiq/core";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/storefront-text.ts
|
|
2
2
|
async function loadStorefrontTranslations(language) {
|
|
3
3
|
const code = language.split("-")[0];
|
|
4
|
-
if (code === "en") return (await import("./storefront-text-en-
|
|
5
|
-
if (code === "pt") return (await import("./storefront-text-pt-
|
|
4
|
+
if (code === "en") return (await import("./storefront-text-en-DzYmdOuY.js")).default;
|
|
5
|
+
if (code === "pt") return (await import("./storefront-text-pt-CizClH0I.js")).default;
|
|
6
6
|
return {};
|
|
7
7
|
}
|
|
8
8
|
function storefrontText(translations, source, values = {}) {
|
|
@@ -1026,6 +1026,10 @@ const translations = {
|
|
|
1026
1026
|
"Guardado en favoritos": "Saved to favorites",
|
|
1027
1027
|
"Detalles del producto": "Product details",
|
|
1028
1028
|
"Cliente": "Customer",
|
|
1029
|
-
"Elegir": "Choose"
|
|
1029
|
+
"Elegir": "Choose",
|
|
1030
|
+
"Sin elegir": "None",
|
|
1031
|
+
"Elige al menos {value0}": "Choose at least {value0}",
|
|
1032
|
+
"Elige hasta {value0}": "Choose up to {value0}",
|
|
1033
|
+
"Personalización": "Customization"
|
|
1030
1034
|
};
|
|
1031
1035
|
export { translations as default };
|
|
@@ -1026,6 +1026,10 @@ const translations = {
|
|
|
1026
1026
|
"Guardado en favoritos": "Salvo nos favoritos",
|
|
1027
1027
|
"Detalles del producto": "Detalhes do produto",
|
|
1028
1028
|
"Cliente": "Cliente",
|
|
1029
|
-
"Elegir": "Escolher"
|
|
1029
|
+
"Elegir": "Escolher",
|
|
1030
|
+
"Sin elegir": "Nenhuma",
|
|
1031
|
+
"Elige al menos {value0}": "Escolha pelo menos {value0}",
|
|
1032
|
+
"Elige hasta {value0}": "Escolha até {value0}",
|
|
1033
|
+
"Personalización": "Personalização"
|
|
1030
1034
|
};
|
|
1031
1035
|
export { translations as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useStorefrontLocale, useStorefrontText } from "./storefront-language-
|
|
1
|
+
import { useStorefrontLocale, useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
|
|
2
2
|
import { money } from "./money-DtGOtDri.js";
|
|
3
|
-
import { PaymentDialogFrame } from "./payment-dialog-frame-
|
|
3
|
+
import { PaymentDialogFrame } from "./payment-dialog-frame-xtidt_eM.js";
|
|
4
4
|
import { confirmingPaymentUrl } from "./payment-return-5cjypwIw.js";
|
|
5
5
|
import { useNavigate } from "react-router";
|
|
6
6
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadSections, withSections } from "./sections-
|
|
2
|
-
import { worker } from "./worker-
|
|
1
|
+
import { loadSections, withSections } from "./sections-CgpjubkB.js";
|
|
2
|
+
import { worker } from "./worker-cbXmLvfR.js";
|
|
3
3
|
// src/templates.ts
|
|
4
4
|
const TEMPLATE = "ecomiqTemplate";
|
|
5
5
|
const NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readCatalog } from "./catalog-7gJ-l5hW.js";
|
|
2
2
|
import { documentUrl } from "./document-url-CGsAl5Tf.js";
|
|
3
|
-
import { store } from "./store-
|
|
3
|
+
import { store } from "./store-uU2gWdMY.js";
|
|
4
4
|
import { data, redirect } from "react-router";
|
|
5
5
|
import { sanitizeHtml } from "@ecomiq/core";
|
|
6
6
|
// src/urls.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { checkoutAddressDefaults, checkoutProgress, checkoutStep, defaultPaymentMethod, needsShipping } from "./checkout-
|
|
1
|
+
import { checkoutAddressDefaults, checkoutProgress, checkoutStep, defaultPaymentMethod, needsShipping } from "./checkout-DsI1MY14.js";
|
|
2
2
|
import { useCustomerCsrfToken } from "./customer-csrf-C1oDX-Py.js";
|
|
3
3
|
import { useFetcher, useNavigation, useSearchParams } from "react-router";
|
|
4
4
|
// src/use-checkout.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { findStripeWallet } from "./stripe-dialog-
|
|
1
|
+
import { findStripeWallet } from "./stripe-dialog-D88qfkUS.js";
|
|
2
2
|
import { usePaymentToken } from "./use-payment-token-CErx-tN-.js";
|
|
3
3
|
import { gathered } from "./checkout-form-CbOIdENC.js";
|
|
4
4
|
import { useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useStorefrontLocale, useStorefrontText } from "./storefront-language-
|
|
1
|
+
import { useStorefrontLocale, useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
|
|
2
2
|
import { money } from "./money-DtGOtDri.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
// src/voucher-payment.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cartCookie } from "./cart-D7DxZ2lD.js";
|
|
2
|
-
import "./preview-cart-
|
|
2
|
+
import "./preview-cart-COIP3Vfh.js";
|
|
3
3
|
import { productPreviewFrom, productPreviewResponse } from "./product-preview-BspMAecJ.js";
|
|
4
4
|
import { StorefrontSdkTiming, durationMetric } from "./telemetry-HuZXWBPi.js";
|
|
5
5
|
import { privateCustomerResponse, rejectCrossOriginAction, rejectCustomerCsrf } from "./request-security-CRsRMgwj.js";
|
|
6
|
-
import { seoResponse } from "./seo-
|
|
6
|
+
import { seoResponse } from "./seo-D9UdUMg9.js";
|
|
7
7
|
import { confirmingPaymentUrl } from "./payment-return-5cjypwIw.js";
|
|
8
8
|
import { RouterContextProvider, createContext, createRequestHandler } from "react-router";
|
|
9
9
|
import { STOREFRONT_CACHE_REVISION_HEADER, StorefrontCacheTokenSchema } from "@ecomiq/core/storefront-cache-revision";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecomiq/storefront",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Ecomiq para React Router: tienda, carrito, sesión de cliente y catálogo en un Worker",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"qrcode-generator": "^2.0.4",
|
|
95
95
|
"sharp": "^0.35.5",
|
|
96
96
|
"zod": "^4.6.6",
|
|
97
|
-
"@ecomiq/core": "^1.
|
|
97
|
+
"@ecomiq/core": "^1.1.1"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"react": "^19.2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatOrderDate, type CustomerOrderDetail, type CustomerOrderLineItem, type OrderStep } from "@ecomiq/core";
|
|
1
|
+
import { formatOrderDate, lineUnitPrice, type CustomerOrderDetail, type CustomerOrderLineItem, type OrderStep } from "@ecomiq/core";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Form, Link, useNavigation } from "react-router";
|
|
4
4
|
import { Button } from "@theme/ui/button";
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
useOrderStepDetail,
|
|
17
17
|
type OrderRequestActionData,
|
|
18
18
|
} from "../entries/account";
|
|
19
|
+
import { ItemPersonalization } from "../entries/cart";
|
|
19
20
|
|
|
20
21
|
export const catalog: SectionCatalog = {
|
|
21
22
|
name: "Detalle del pedido",
|
|
@@ -119,8 +120,9 @@ function ShipmentCard({ shipment, currency }: { shipment: Shipment; currency: st
|
|
|
119
120
|
<p className="font-medium">{item.title}</p>
|
|
120
121
|
)}
|
|
121
122
|
{item.variantTitle ? <p className="text-sm text-muted-foreground">{item.variantTitle}</p> : null}
|
|
123
|
+
<ItemPersonalization modifiers={item.modifiers} formatPrice={(value) => money(value, currency, locale)} />
|
|
122
124
|
<p className="text-sm text-muted-foreground">
|
|
123
|
-
{money(item
|
|
125
|
+
{money(lineUnitPrice(item), currency, locale)} × {item.quantity}
|
|
124
126
|
</p>
|
|
125
127
|
</div>
|
|
126
128
|
<p className="text-sm font-medium">{money(item.total, currency, locale)}</p>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { lineTotal } from "@ecomiq/core";
|
|
1
2
|
import type { ComponentProps, CSSProperties, ReactNode, SelectHTMLAttributes } from "react";
|
|
2
3
|
import { Link, useRouteLoaderData } from "react-router";
|
|
3
4
|
import { Button } from "@theme/ui/button";
|
|
@@ -23,6 +24,7 @@ import {
|
|
|
23
24
|
type CheckoutData,
|
|
24
25
|
type CheckoutStep,
|
|
25
26
|
} from "../entries/checkout";
|
|
27
|
+
import { ItemPersonalization } from "../entries/cart";
|
|
26
28
|
|
|
27
29
|
export const catalog: SectionCatalog = {
|
|
28
30
|
name: "Finalizar compra",
|
|
@@ -240,9 +242,10 @@ export function Checkout({ data, result, ...root }: { data: CheckoutData; result
|
|
|
240
242
|
<span className="flex min-w-0 flex-1 flex-col">
|
|
241
243
|
<span className="font-medium">{item.title}</span>
|
|
242
244
|
{item.variantLabel && item.variantLabel !== item.title ? <span className="text-xs text-muted-foreground">{item.variantLabel}</span> : null}
|
|
245
|
+
<ItemPersonalization modifiers={item.modifiers} formatPrice={format} className="mt-0.5" />
|
|
243
246
|
{item.sellerName ? <span className="text-xs text-muted-foreground">{storefrontTranslate("Vendido por")} {item.sellerName}</span> : null}
|
|
244
247
|
</span>
|
|
245
|
-
<span className="tabular-nums">{format(item
|
|
248
|
+
<span className="tabular-nums">{format(lineTotal(item))}</span>
|
|
246
249
|
</li>
|
|
247
250
|
))}
|
|
248
251
|
</ul>
|
|
@@ -2,6 +2,7 @@ import { Form, Link, useNavigation } from "react-router";
|
|
|
2
2
|
import { Button } from "@theme/ui/button";
|
|
3
3
|
import { useStorefrontText, CustomerCsrfField, money, setting, type SectionCatalog, type SectionRoot } from "../index";
|
|
4
4
|
import { orderSummaryLines, type OrderDraftActionData, type OrderDraftData } from "../entries/order";
|
|
5
|
+
import { ItemPersonalization } from "../entries/cart";
|
|
5
6
|
|
|
6
7
|
export const catalog: SectionCatalog = {
|
|
7
8
|
name: "Pedido por pagar",
|
|
@@ -48,6 +49,7 @@ export function DraftInvoice({ loaderData, actionData, ...root }: { loaderData:
|
|
|
48
49
|
<span className="flex flex-1 flex-col gap-0.5">
|
|
49
50
|
<span className="font-medium">{item.title}</span>
|
|
50
51
|
{item.subtitle ? <span className="text-sm text-muted-foreground">{item.subtitle}</span> : null}
|
|
52
|
+
<ItemPersonalization modifiers={item.modifiers} formatPrice={price} />
|
|
51
53
|
<span className="text-sm text-muted-foreground tabular-nums">×{item.quantity}</span>
|
|
52
54
|
</span>
|
|
53
55
|
<span className="font-medium tabular-nums">{price(item.total)}</span>
|