@reblu/site-blocks 0.30.0 → 0.31.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/CHANGELOG.md +25 -0
- package/README.md +185 -5
- package/dist/client.cjs +632 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +105 -3
- package/dist/client.d.ts +105 -3
- package/dist/client.js +629 -0
- package/dist/client.js.map +1 -1
- package/dist/full-invoice-fields-DMX0sjPG.d.cts +140 -0
- package/dist/full-invoice-fields-DMX0sjPG.d.ts +140 -0
- package/dist/index.cjs +827 -348
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +167 -130
- package/dist/index.d.ts +167 -130
- package/dist/index.js +815 -349
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/_heading-BsNbc1wc.d.cts +0 -4
- package/dist/_heading-BsNbc1wc.d.ts +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ShopErrorCode, AcademyCourseDetail, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, AcademyInstructorPublic, AcademyCategoryPublic, AcademyCatalogFiltersPublic, ShopBundleComponent, ShopStaffAutoDiscount, ShopOrder,
|
|
1
|
+
import { ShopErrorCode, AcademyCourseDetail, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, BeforeAfterData, CardIcon, IconCardsData, ImageTextData, ShopFacets, AcademyInstructorPublic, AcademyCategoryPublic, AcademyCatalogFiltersPublic, ShopBundleComponent, ShopStaffAutoDiscount, ShopOrder, ShopCheckoutDeliveryConfig, ShopCheckoutCopy, ShopFulfillmentInput, ShopQuote, ShopCheckoutInput, AcademyCheckoutRequest, Config, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
2
2
|
export { DATA_REQUEST_TYPES } from '@reblu/site-contracts';
|
|
3
3
|
import { FaqItem } from './seo.js';
|
|
4
4
|
export { FaqPageJsonLd, MarkdownToPlainTextOptions, buildFaqPageJsonLd, collectFaqItems, markdownToPlainText } from './seo.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { ReactNode, ComponentType, FormEvent } from 'react';
|
|
8
|
-
import { H as HeadingLevel } from './
|
|
8
|
+
import { H as HeadingLevel, a as FullInvoiceValue } from './full-invoice-fields-DMX0sjPG.js';
|
|
9
|
+
export { b as CheckoutTermsAcceptance, c as CheckoutTermsAcceptanceProps, C as CheckoutTermsCopy, D as DEFAULT_INVOICE_COUNTRIES, E as EMPTY_FULL_INVOICE_VALUE, d as FullInvoiceErrors, e as FullInvoiceFields, F as FullInvoiceFieldsLabels, f as FullInvoiceFieldsProps, g as FullInvoiceIdType, i as isOverSimplifiedInvoiceCap, s as shopIssuesInvoices, t as toCheckoutInvoiceFields, h as toCheckoutTermsFields } from './full-invoice-fields-DMX0sjPG.js';
|
|
9
10
|
|
|
10
11
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
11
12
|
|
|
@@ -816,6 +817,13 @@ interface BlockRendererProps<T extends CanonicalBlockType> {
|
|
|
816
817
|
headingLevel: HeadingLevel;
|
|
817
818
|
/** Builds an embed's href (the `embedHref` prop, or the default `/${slug}`). */
|
|
818
819
|
embedHref: (resolved: ResolvedEmbed) => string;
|
|
820
|
+
/**
|
|
821
|
+
* REB-1268 — set only for block types that draw the SECTION heading
|
|
822
|
+
* themselves (`image_text`, whose heading sits beside the image): the id the
|
|
823
|
+
* section's `aria-labelledby` points at. `headingLevel` is then the section
|
|
824
|
+
* heading's own level. Undefined for every other block type.
|
|
825
|
+
*/
|
|
826
|
+
headingId?: string;
|
|
819
827
|
}
|
|
820
828
|
/** Per-block-type renderer overrides, keyed by canonical type. */
|
|
821
829
|
type PageBlocksComponents = Partial<{
|
|
@@ -840,6 +848,94 @@ interface PageBlocksProps {
|
|
|
840
848
|
}
|
|
841
849
|
declare function PageBlocks({ blocks, components, headingLevel, embedHref, idPrefix, className, sectionClassName, }: PageBlocksProps): react_jsx_runtime.JSX.Element | null;
|
|
842
850
|
|
|
851
|
+
/**
|
|
852
|
+
* REB-1265..1268 — drop-in components for the content blocks a tenant
|
|
853
|
+
* authors in the nexus page editor. Each one takes the block's `data` fields
|
|
854
|
+
* as props, so a SITE can use it inside `PageBlocks` (the default renderer for
|
|
855
|
+
* its block type) or on its own, anywhere.
|
|
856
|
+
*
|
|
857
|
+
* Server Components: no hooks, no `'use client'`. Colours come from theme
|
|
858
|
+
* tokens only; every image is lazy-loaded. The platform ships no tenant copy:
|
|
859
|
+
* the only built-in strings are neutral UI labels, each overridable.
|
|
860
|
+
*/
|
|
861
|
+
/** Labels over each image of a pair. Override them for another language. */
|
|
862
|
+
declare const DEFAULT_BEFORE_AFTER_LABELS: Readonly<{
|
|
863
|
+
before: "Antes";
|
|
864
|
+
after: "Después";
|
|
865
|
+
}>;
|
|
866
|
+
interface BeforeAfterPairsProps {
|
|
867
|
+
/** The `before_after` block's `data.pairs`. */
|
|
868
|
+
pairs: BeforeAfterData['pairs'];
|
|
869
|
+
/** The `data.showCaption` toggle. The caption renders only when this is `true`. */
|
|
870
|
+
showCaption?: boolean;
|
|
871
|
+
/** The `data.caption` — free tenant text, shown under the pairs as written. */
|
|
872
|
+
caption?: string;
|
|
873
|
+
labels?: {
|
|
874
|
+
before: string;
|
|
875
|
+
after: string;
|
|
876
|
+
};
|
|
877
|
+
className?: string;
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Before/after image pairs. Each pair stacks on mobile and sits side by side
|
|
881
|
+
* from `sm`; pairs flow two per row from `lg`. The caption renders only when
|
|
882
|
+
* `showCaption` is true AND the text is not blank — there is no default text.
|
|
883
|
+
*/
|
|
884
|
+
declare function BeforeAfterPairs({ pairs, showCaption, caption, labels, className, }: BeforeAfterPairsProps): react_jsx_runtime.JSX.Element | null;
|
|
885
|
+
interface ChipListProps {
|
|
886
|
+
/** The `chips` block's `data.items` — short texts. Blank ones are skipped. */
|
|
887
|
+
items: readonly string[];
|
|
888
|
+
className?: string;
|
|
889
|
+
}
|
|
890
|
+
/** A short list of texts shown as chips that wrap onto new lines on small screens. */
|
|
891
|
+
declare function ChipList({ items, className }: ChipListProps): react_jsx_runtime.JSX.Element | null;
|
|
892
|
+
/** Every icon name this version can draw — the curated `icon_cards` set. */
|
|
893
|
+
declare const CARD_ICON_NAMES: readonly CardIcon[];
|
|
894
|
+
/** One curated icon as an inline SVG in `currentColor`; an unknown name draws nothing. */
|
|
895
|
+
declare function CardIconSvg({ icon, className }: {
|
|
896
|
+
icon: string;
|
|
897
|
+
className?: string;
|
|
898
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
899
|
+
interface IconCardGridProps {
|
|
900
|
+
/** The `icon_cards` block's `data.items`. */
|
|
901
|
+
items: IconCardsData['items'];
|
|
902
|
+
/** The `data.intro` — a line above the grid. */
|
|
903
|
+
intro?: string;
|
|
904
|
+
/** Level of each card title. Default `3` (under a section `h2`). */
|
|
905
|
+
headingLevel?: HeadingLevel;
|
|
906
|
+
className?: string;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Cards with an icon, a title and a short text, in a responsive grid: one
|
|
910
|
+
* column on mobile, two from `sm`, three from `lg`. An icon name this version
|
|
911
|
+
* does not know renders the card without an icon (fail-closed).
|
|
912
|
+
*/
|
|
913
|
+
declare function IconCardGrid({ items, intro, headingLevel, className }: IconCardGridProps): react_jsx_runtime.JSX.Element | null;
|
|
914
|
+
interface ImageTextSplitProps {
|
|
915
|
+
imageUrl: string;
|
|
916
|
+
alt?: string;
|
|
917
|
+
/** Side of the image from `md` up. */
|
|
918
|
+
imageSide: ImageTextData['imageSide'];
|
|
919
|
+
/** What comes first when stacked on mobile. Default `'image_first'`. */
|
|
920
|
+
mobileOrder?: ImageTextData['mobileOrder'];
|
|
921
|
+
/** Rich text (`data.html`) — sanitised here. */
|
|
922
|
+
html?: string;
|
|
923
|
+
kicker?: string;
|
|
924
|
+
/** Heading drawn at the top of the text column. */
|
|
925
|
+
heading?: string | null;
|
|
926
|
+
/** Level of `heading`. Default `2`. Headings inside `html` nest below it. */
|
|
927
|
+
headingLevel?: HeadingLevel;
|
|
928
|
+
/** `id` on the heading text, for an `aria-labelledby` on the caller's section. */
|
|
929
|
+
headingId?: string;
|
|
930
|
+
className?: string;
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* An image beside rich text. Stacked on mobile (image first unless
|
|
934
|
+
* `mobileOrder='text_first'`), side by side from `md` with the image on
|
|
935
|
+
* `imageSide`. The kicker and heading sit in the text column.
|
|
936
|
+
*/
|
|
937
|
+
declare function ImageTextSplit({ imageUrl, alt, imageSide, mobileOrder, html, kicker, heading, headingLevel, headingId, className, }: ImageTextSplitProps): react_jsx_runtime.JSX.Element;
|
|
938
|
+
|
|
843
939
|
/**
|
|
844
940
|
* `ShopFilters` — plug-and-play SITE filter chrome over `GET /api/site/shop/facets`
|
|
845
941
|
* (REB-809). Which axes appear, their order and labels come entirely from
|
|
@@ -1440,7 +1536,14 @@ interface OrderConfirmationLabels {
|
|
|
1440
1536
|
pollingTitle: string;
|
|
1441
1537
|
pollingDescription: string;
|
|
1442
1538
|
foundTitle: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* The confirmed-order line. `{number}` is replaced by the order number and
|
|
1541
|
+
* `{email}` by the buyer's email (REB-1200). When it carries `{email}`, the
|
|
1542
|
+
* separate «Te hemos enviado un email de confirmación a…» line is not shown.
|
|
1543
|
+
*/
|
|
1443
1544
|
foundDescription: string;
|
|
1545
|
+
/** REB-1200 — the confirmed line while the order itself is not loaded yet. */
|
|
1546
|
+
foundWithoutOrderDescription: string;
|
|
1444
1547
|
timeoutTitle: string;
|
|
1445
1548
|
timeoutDescription: string;
|
|
1446
1549
|
orderNumberLabel: string;
|
|
@@ -1485,102 +1588,6 @@ interface OrderConfirmationProps {
|
|
|
1485
1588
|
}
|
|
1486
1589
|
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
1487
1590
|
|
|
1488
|
-
/**
|
|
1489
|
-
* `FullInvoiceFields` — the shop checkout's full-invoice request, drop-in
|
|
1490
|
-
* (REB-73). Fully controlled (`value`/`onChange`), no hooks, no fetch: the
|
|
1491
|
-
* SITE owns the state and sends `toCheckoutInvoiceFields(value, overCap)`
|
|
1492
|
-
* with its checkout body.
|
|
1493
|
-
*
|
|
1494
|
-
* The rule it presents (owner decision 15-Oct-2026): «Si quieren factura
|
|
1495
|
-
* completa, si o si deben aportar el NIF, si no lo aportan se emite factura
|
|
1496
|
-
* simplificada». The identifier is a Spanish NIF/NIE/CIF or, for a foreign
|
|
1497
|
-
* buyer, an EU VAT id, a passport or an ID document of their country — with
|
|
1498
|
-
* the country that issued it. Over the shop's simplified-invoice cap
|
|
1499
|
-
* (`ShopConfig.simplifiedInvoiceCapCents`, see `isOverSimplifiedInvoiceCap`)
|
|
1500
|
-
* a full invoice is the only legal one: pass `overCap` and the fields become
|
|
1501
|
-
* required, without a toggle. The server validates the identifier and
|
|
1502
|
-
* refuses with `BILLING_DATA_REQUIRED` what this form cannot prevent.
|
|
1503
|
-
*
|
|
1504
|
-
* A shop that issues no invoices (`ShopConfig.simplifiedInvoiceCapCents` is
|
|
1505
|
-
* `null`, see `shopIssuesInvoices`) offers no opt-in: pass
|
|
1506
|
-
* `issuesInvoices={false}` and the block renders nothing — the server would
|
|
1507
|
-
* refuse `wantsFullInvoice: true` with `FULL_INVOICE_UNAVAILABLE`.
|
|
1508
|
-
*/
|
|
1509
|
-
type FullInvoiceIdType = NonNullable<ShopBillingInput['billingIdType']>;
|
|
1510
|
-
interface FullInvoiceValue {
|
|
1511
|
-
wantsFullInvoice: boolean;
|
|
1512
|
-
billingIdType: FullInvoiceIdType;
|
|
1513
|
-
/** ISO 3166-1 alpha-2 country that issued a foreign document. */
|
|
1514
|
-
billingIdCountry: string;
|
|
1515
|
-
billingNif: string;
|
|
1516
|
-
billingName: string;
|
|
1517
|
-
street: string;
|
|
1518
|
-
postalCode: string;
|
|
1519
|
-
city: string;
|
|
1520
|
-
/** ISO 3166-1 alpha-2 country of the billing address. */
|
|
1521
|
-
country: string;
|
|
1522
|
-
}
|
|
1523
|
-
declare const EMPTY_FULL_INVOICE_VALUE: FullInvoiceValue;
|
|
1524
|
-
type FullInvoiceErrors = Partial<Record<'billingIdType' | 'billingIdCountry' | 'billingNif' | 'billingName' | 'address', string>>;
|
|
1525
|
-
interface FullInvoiceFieldsLabels {
|
|
1526
|
-
toggle: string;
|
|
1527
|
-
underCapNotice: string;
|
|
1528
|
-
overCapNotice: string;
|
|
1529
|
-
idType: string;
|
|
1530
|
-
idCountry: string;
|
|
1531
|
-
chooseCountry: string;
|
|
1532
|
-
spanishNif: string;
|
|
1533
|
-
documentNumber: string;
|
|
1534
|
-
name: string;
|
|
1535
|
-
street: string;
|
|
1536
|
-
postalCode: string;
|
|
1537
|
-
city: string;
|
|
1538
|
-
country: string;
|
|
1539
|
-
idTypeOptions: Record<FullInvoiceIdType, string>;
|
|
1540
|
-
}
|
|
1541
|
-
/** ISO 3166-1 alpha-2 countries offered by default: Spain, the EU and frequent others. */
|
|
1542
|
-
declare const DEFAULT_INVOICE_COUNTRIES: ReadonlyArray<{
|
|
1543
|
-
code: string;
|
|
1544
|
-
name: string;
|
|
1545
|
-
}>;
|
|
1546
|
-
/**
|
|
1547
|
-
* Whether the shop issues invoices at all, read from the field the contract
|
|
1548
|
-
* defines for it: `ShopConfig.simplifiedInvoiceCapCents` is the effective cap
|
|
1549
|
-
* while invoicing is on and `null` otherwise (absent on an older base-api,
|
|
1550
|
-
* which accepts no opt-in either).
|
|
1551
|
-
*/
|
|
1552
|
-
declare function shopIssuesInvoices(config: {
|
|
1553
|
-
simplifiedInvoiceCapCents?: number | null;
|
|
1554
|
-
}): boolean;
|
|
1555
|
-
/** Whether a cart total (cents) is over the shop's simplified-invoice cap; `null` cap = no gate. */
|
|
1556
|
-
declare function isOverSimplifiedInvoiceCap(totalCents: number, capCents: number | null): boolean;
|
|
1557
|
-
/**
|
|
1558
|
-
* The checkout body fields for the request: `wantsFullInvoice` and the
|
|
1559
|
-
* `billing` block (identifier, its type and country, name and address). Empty
|
|
1560
|
-
* when the buyer asks for no full invoice within the cap, and always empty
|
|
1561
|
-
* when the shop issues no invoices (`issuesInvoices` false).
|
|
1562
|
-
*/
|
|
1563
|
-
declare function toCheckoutInvoiceFields(value: FullInvoiceValue, overCap: boolean, issuesInvoices?: boolean): Pick<ShopCheckoutInput, 'wantsFullInvoice' | 'billing'>;
|
|
1564
|
-
interface FullInvoiceFieldsProps {
|
|
1565
|
-
value: FullInvoiceValue;
|
|
1566
|
-
onChange: (next: FullInvoiceValue) => void;
|
|
1567
|
-
/** The cart total is over `ShopConfig.simplifiedInvoiceCapCents`. */
|
|
1568
|
-
overCap: boolean;
|
|
1569
|
-
/**
|
|
1570
|
-
* `false` when the shop issues no invoices (`shopIssuesInvoices(config)`):
|
|
1571
|
-
* the block renders nothing. Defaults to `true`.
|
|
1572
|
-
*/
|
|
1573
|
-
issuesInvoices?: boolean;
|
|
1574
|
-
errors?: FullInvoiceErrors;
|
|
1575
|
-
countries?: ReadonlyArray<{
|
|
1576
|
-
code: string;
|
|
1577
|
-
name: string;
|
|
1578
|
-
}>;
|
|
1579
|
-
labels?: Partial<FullInvoiceFieldsLabels>;
|
|
1580
|
-
className?: string;
|
|
1581
|
-
}
|
|
1582
|
-
declare function FullInvoiceFields({ value, onChange, overCap, issuesInvoices, errors, countries, labels, className, }: FullInvoiceFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
1583
|
-
|
|
1584
1591
|
/** The shipping address fields the buyer types (country defaults server-side). */
|
|
1585
1592
|
interface CheckoutAddressValue {
|
|
1586
1593
|
firstName: string;
|
|
@@ -1648,6 +1655,15 @@ declare function CheckoutDeliveryChoice({ delivery, copy, value, onChange, addre
|
|
|
1648
1655
|
* neither, or against an API that predates the delivery config.
|
|
1649
1656
|
*/
|
|
1650
1657
|
declare function defaultCheckoutFulfillment(delivery: ShopCheckoutDeliveryConfig | null | undefined): ShopFulfillmentInput | null;
|
|
1658
|
+
/**
|
|
1659
|
+
* Whether the delivery choice can be quoted (REB-1276): pickup needs a point.
|
|
1660
|
+
* Pass `null` to `useShopQuote` while this is `false` — the quote would only
|
|
1661
|
+
* answer 422 `PICKUP_LOCATION_INVALID` — and show
|
|
1662
|
+
* `CheckoutQuoteNotice` (see `checkoutQuoteNotice`) instead of the total.
|
|
1663
|
+
* `requiresDelivery = false` (a cart with nothing to ship) is always complete:
|
|
1664
|
+
* {@link toCheckoutFulfillmentFields} sends no pickup point for it.
|
|
1665
|
+
*/
|
|
1666
|
+
declare function isCheckoutDeliveryComplete(value: ShopFulfillmentInput | null, requiresDelivery?: boolean): boolean;
|
|
1651
1667
|
/** Whether the cart has something to deliver; `true` until a quote says otherwise. */
|
|
1652
1668
|
declare function quoteRequiresDelivery(quote: Pick<ShopQuote, 'lines'> | null | undefined): boolean;
|
|
1653
1669
|
/**
|
|
@@ -1707,43 +1723,44 @@ interface CheckoutQuoteSummaryProps {
|
|
|
1707
1723
|
* line kinds, the estimate) come from the API; `labels` replaces the rest.
|
|
1708
1724
|
*/
|
|
1709
1725
|
declare function CheckoutQuoteSummary({ quote, heading, headingLevel, labels, currencyCode, locale, className, }: CheckoutQuoteSummaryProps): react_jsx_runtime.JSX.Element;
|
|
1710
|
-
|
|
1726
|
+
/** Why the summary shows a notice instead of a total (REB-1276). */
|
|
1727
|
+
type CheckoutQuoteNoticeReason = 'PICKUP_LOCATION_REQUIRED';
|
|
1728
|
+
/** SDK texts of {@link CheckoutQuoteNotice}. */
|
|
1729
|
+
interface CheckoutQuoteNoticeLabels {
|
|
1730
|
+
pickupLocationRequired: string;
|
|
1731
|
+
}
|
|
1732
|
+
declare const DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS: CheckoutQuoteNoticeLabels;
|
|
1733
|
+
interface CheckoutQuoteNoticeInput {
|
|
1734
|
+
/** The current delivery choice. */
|
|
1735
|
+
fulfillment: ShopFulfillmentInput | null;
|
|
1736
|
+
/** `quoteRequiresDelivery(quote)`. @default true */
|
|
1737
|
+
requiresDelivery?: boolean;
|
|
1738
|
+
/** `useShopQuote().error` — only its `code` is read. */
|
|
1739
|
+
error?: {
|
|
1740
|
+
code: string | null;
|
|
1741
|
+
} | null;
|
|
1742
|
+
}
|
|
1711
1743
|
/**
|
|
1712
|
-
*
|
|
1713
|
-
*
|
|
1714
|
-
* the
|
|
1715
|
-
*
|
|
1716
|
-
*
|
|
1717
|
-
* tab when `isTermsLinkNewTab`), `{tenant}` the site name. A label without
|
|
1718
|
-
* `{terms}` gets the link appended.
|
|
1719
|
-
*
|
|
1720
|
-
* Renders nothing while the tenant has published no terms
|
|
1721
|
-
* (`termsVersion: null`): there is nothing to accept and checkout does not
|
|
1722
|
-
* ask. Send {@link toCheckoutTermsFields} with the checkout body; the server
|
|
1723
|
-
* refuses without it (`TERMS_NOT_ACCEPTED`) or with an old version
|
|
1724
|
-
* (`TERMS_VERSION_CHANGED`: reload the config and ask again).
|
|
1744
|
+
* The notice the summary shows instead of a total (REB-1276), or `null`:
|
|
1745
|
+
* a pickup choice with no point, and the quote error `PICKUP_LOCATION_INVALID`
|
|
1746
|
+
* (e.g. the point was deactivated meanwhile), both read «Elige un punto de
|
|
1747
|
+
* recogida» — never the generic «could not compute the total». Any other
|
|
1748
|
+
* error is left to the SITE (`null`).
|
|
1725
1749
|
*/
|
|
1726
|
-
|
|
1727
|
-
interface
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
checked: boolean;
|
|
1732
|
-
onCheckedChange: (checked: boolean) => void;
|
|
1733
|
-
/** E.g. «Debes aceptar las condiciones para continuar.» (the SITE's or the API's text). */
|
|
1734
|
-
error?: string | null;
|
|
1735
|
-
/** Appended inside the link when it opens a new tab (screen readers). @default '(se abre en una pestaña nueva)' */
|
|
1736
|
-
newTabHint?: string;
|
|
1737
|
-
/** The checkbox id (one box per page). @default 'checkout-terms' */
|
|
1738
|
-
id?: string;
|
|
1750
|
+
declare function checkoutQuoteNotice({ fulfillment, requiresDelivery, error, }: CheckoutQuoteNoticeInput): CheckoutQuoteNoticeReason | null;
|
|
1751
|
+
interface CheckoutQuoteNoticeProps {
|
|
1752
|
+
/** `checkoutQuoteNotice(...)`; `null` renders nothing. */
|
|
1753
|
+
reason: CheckoutQuoteNoticeReason | null;
|
|
1754
|
+
labels?: Partial<CheckoutQuoteNoticeLabels>;
|
|
1739
1755
|
className?: string;
|
|
1740
1756
|
}
|
|
1741
|
-
declare function CheckoutTermsAcceptance({ copy, termsHref, checked, onCheckedChange, error, newTabHint, id, className, }: CheckoutTermsAcceptanceProps): react_jsx_runtime.JSX.Element | null;
|
|
1742
1757
|
/**
|
|
1743
|
-
*
|
|
1744
|
-
*
|
|
1758
|
+
* `CheckoutQuoteNotice` (REB-1276) — what the summary says while the order
|
|
1759
|
+
* cannot be quoted yet: «Elige un punto de recogida». Render it in place of
|
|
1760
|
+
* `CheckoutQuoteSummary` and of the total error. A polite `role=status`: it
|
|
1761
|
+
* asks for a choice, it does not report a failure. Presentational, RSC-safe.
|
|
1745
1762
|
*/
|
|
1746
|
-
declare function
|
|
1763
|
+
declare function CheckoutQuoteNotice({ reason, labels, className }: CheckoutQuoteNoticeProps): react_jsx_runtime.JSX.Element | null;
|
|
1747
1764
|
|
|
1748
1765
|
/**
|
|
1749
1766
|
* `CheckoutPayAction` (REB-1198) — the last control of the single-step
|
|
@@ -1773,6 +1790,26 @@ interface CheckoutPayActionProps {
|
|
|
1773
1790
|
}
|
|
1774
1791
|
declare function CheckoutPayAction({ label, notice, submitting, submittingLabel, disabled, id, className, buttonClassName, noticeClassName, }: CheckoutPayActionProps): react_jsx_runtime.JSX.Element;
|
|
1775
1792
|
|
|
1793
|
+
/**
|
|
1794
|
+
* REB-1264 — pure, RSC-safe helpers of the guest course checkout
|
|
1795
|
+
* (`CourseGuestCheckoutForm`, `@reblu/site-blocks/client`). They ship from
|
|
1796
|
+
* the root entry so a Server Component can call them.
|
|
1797
|
+
*/
|
|
1798
|
+
/**
|
|
1799
|
+
* Whether the course is bought in one step by a guest
|
|
1800
|
+
* (`POST /api/site/academy/checkout`): on sale, needing no validation and not
|
|
1801
|
+
* free. Otherwise keep the enrollment request flow. The server decides in the
|
|
1802
|
+
* end — it answers `ENROLLMENT_REQUEST_REQUIRED` when this is out of date.
|
|
1803
|
+
*/
|
|
1804
|
+
declare function courseSellsAsGuest(course: Pick<AcademyCourseDetail, 'salesEnabled' | 'requiresValidation' | 'priceCents'>): boolean;
|
|
1805
|
+
/**
|
|
1806
|
+
* The guest checkout body fields for the full-invoice request — the academy
|
|
1807
|
+
* twin of `toCheckoutInvoiceFields` (its `billingAddress` has no
|
|
1808
|
+
* first/last name). Empty when the buyer asks for no full invoice within the
|
|
1809
|
+
* cap, and always empty when the tenant issues no invoices.
|
|
1810
|
+
*/
|
|
1811
|
+
declare function toAcademyCheckoutInvoiceFields(value: FullInvoiceValue, overCap: boolean, issuesInvoices?: boolean): Pick<AcademyCheckoutRequest, 'wantsFullInvoice' | 'billing'>;
|
|
1812
|
+
|
|
1776
1813
|
/**
|
|
1777
1814
|
* `ContactInterestField` — the contact form's tenant-configurable interest
|
|
1778
1815
|
* question, drop-in (REB-759). Fully controlled (`value`/`onChange`), no hooks,
|
|
@@ -1822,4 +1859,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1822
1859
|
}
|
|
1823
1860
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1824
1861
|
|
|
1825
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, CartLineIncludes, type CartLineIncludesEntry, type CartLineIncludesProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAddressErrors, type CheckoutAddressValue, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutDeliveryChoice, type CheckoutDeliveryChoiceLabels, type CheckoutDeliveryChoiceProps, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, CheckoutPayAction, type CheckoutPayActionProps,
|
|
1862
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, BeforeAfterPairs, type BeforeAfterPairsProps, type BlockRendererProps, CARD_ICON_NAMES, type CanonicalBlockType, CardIconSvg, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, CartLineIncludes, type CartLineIncludesEntry, type CartLineIncludesProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAddressErrors, type CheckoutAddressValue, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutDeliveryChoice, type CheckoutDeliveryChoiceLabels, type CheckoutDeliveryChoiceProps, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, CheckoutPayAction, type CheckoutPayActionProps, CheckoutQuoteNotice, type CheckoutQuoteNoticeInput, type CheckoutQuoteNoticeLabels, type CheckoutQuoteNoticeProps, type CheckoutQuoteNoticeReason, CheckoutQuoteSummary, type CheckoutQuoteSummaryLabels, type CheckoutQuoteSummaryProps, ChipList, type ChipListProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_BEFORE_AFTER_LABELS, DEFAULT_CHECKOUT_DELIVERY_CHOICE_LABELS, DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS, DEFAULT_CHECKOUT_QUOTE_SUMMARY_LABELS, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, DEFAULT_LESSON_PREVIEW_LABELS, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_CHECKOUT_ADDRESS, FaqAccordion, type FaqAccordionProps, FaqItem, FullInvoiceValue, HeadingLevel, IconCardGrid, type IconCardGridProps, ImageTextSplit, type ImageTextSplitProps, LegalDocument, type LegalDocumentProps, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, bundleComponentsToIncludes, checkoutQuoteNotice, courseSellsAsGuest, defaultCheckoutFulfillment, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isCheckoutDeliveryComplete, markdownToSafeHtml, quoteRequiresDelivery, readingTime, sanitizeHtml, shouldRenderShopFilters, toAcademyCheckoutInvoiceFields, toCheckoutFulfillmentFields };
|