@reblu/site-blocks 0.32.0 → 0.34.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 +41 -0
- package/README.md +187 -3
- package/dist/client.cjs +459 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +142 -3
- package/dist/client.d.ts +142 -3
- package/dist/client.js +453 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +623 -477
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -79
- package/dist/index.d.ts +64 -79
- package/dist/index.js +619 -478
- package/dist/index.js.map +1 -1
- package/dist/{full-invoice-fields-DMX0sjPG.d.cts → page-links-C0nXQzAW.d.cts} +105 -2
- package/dist/{full-invoice-fields-DMX0sjPG.d.ts → page-links-C0nXQzAW.d.ts} +105 -2
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ShopErrorCode, AcademyCourseDetail, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, Review,
|
|
1
|
+
import { ShopErrorCode, AcademyCourseDetail, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, Review, 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.cjs';
|
|
4
4
|
export { FaqPageJsonLd, MarkdownToPlainTextOptions, buildFaqPageJsonLd, collectFaqItems, markdownToPlainText } from './seo.cjs';
|
|
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, a as FullInvoiceValue } from './
|
|
9
|
-
export { b as
|
|
8
|
+
import { H as HeadingLevel, a as FullInvoiceValue } from './page-links-C0nXQzAW.cjs';
|
|
9
|
+
export { B as BlockRendererProps, b as CanonicalBlockType, c as CheckoutTermsAcceptance, d as CheckoutTermsAcceptanceProps, C as CheckoutTermsCopy, D as DEFAULT_INVOICE_COUNTRIES, E as EMPTY_FULL_INVOICE_VALUE, e as FullInvoiceErrors, f as FullInvoiceFields, F as FullInvoiceFieldsLabels, g as FullInvoiceFieldsProps, h as FullInvoiceIdType, L as LinkFilterOption, i as PageBlocks, j as PageBlocksComponents, k as PageBlocksProps, P as PageLinkRef, R as RenderableBlock, l as filterByLink, m as isOverSimplifiedInvoiceCap, n as linkFilterOptions, o as linkKey, s as shopIssuesInvoices, t as toCheckoutInvoiceFields, p as toCheckoutTermsFields } from './page-links-C0nXQzAW.cjs';
|
|
10
10
|
|
|
11
11
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
12
12
|
|
|
@@ -547,6 +547,57 @@ interface ProfileCardProps {
|
|
|
547
547
|
}
|
|
548
548
|
declare function ProfileCard({ name, role, imageUrl, specialties, bio, fields, href, className, }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
549
549
|
|
|
550
|
+
/**
|
|
551
|
+
* REB-1100 — drop-ins for the page links of `client.pages.get(slug)`:
|
|
552
|
+
*
|
|
553
|
+
* - `LinkedPagesGrid` over `page.links` (the pages this page picked, e.g. a
|
|
554
|
+
* profile's areas) or `page.relatedPages` (derived: the pages of those
|
|
555
|
+
* areas, or the pages that belong to this one);
|
|
556
|
+
* - `TeamGrid` over `page.team` (derived: the team profiles linked to this
|
|
557
|
+
* page or to the pages it belongs to).
|
|
558
|
+
*
|
|
559
|
+
* Both render nothing for an empty or absent list, so a SITE can drop them in
|
|
560
|
+
* before the API emits the fields. Token-driven, RSC-safe.
|
|
561
|
+
*/
|
|
562
|
+
interface LinkedPageCardItem {
|
|
563
|
+
slug: string;
|
|
564
|
+
title: string;
|
|
565
|
+
excerpt?: string | null;
|
|
566
|
+
coverImageUrl?: string | null;
|
|
567
|
+
category?: {
|
|
568
|
+
name: string;
|
|
569
|
+
slug: string;
|
|
570
|
+
} | null;
|
|
571
|
+
}
|
|
572
|
+
interface LinkedPagesGridProps<T extends LinkedPageCardItem = LinkedPageCardItem> {
|
|
573
|
+
pages: T[] | null | undefined;
|
|
574
|
+
/** Builds a card's href. Defaults to `/{slug}`. */
|
|
575
|
+
pageHref?: (page: T) => string;
|
|
576
|
+
/** Optional `<h2>` above the grid, e.g. «Áreas». */
|
|
577
|
+
heading?: string;
|
|
578
|
+
className?: string;
|
|
579
|
+
}
|
|
580
|
+
declare function LinkedPagesGrid<T extends LinkedPageCardItem>({ pages, pageHref, heading, className, }: LinkedPagesGridProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
581
|
+
interface TeamGridMember {
|
|
582
|
+
slug: string;
|
|
583
|
+
title: string;
|
|
584
|
+
role?: string | null;
|
|
585
|
+
coverImageUrl?: string | null;
|
|
586
|
+
category?: {
|
|
587
|
+
name: string;
|
|
588
|
+
slug: string;
|
|
589
|
+
} | null;
|
|
590
|
+
}
|
|
591
|
+
interface TeamGridProps<T extends TeamGridMember = TeamGridMember> {
|
|
592
|
+
members: T[] | null | undefined;
|
|
593
|
+
/** Builds a member's profile href. Omit to render non-linking cards. */
|
|
594
|
+
memberHref?: (member: T) => string;
|
|
595
|
+
/** Optional `<h2>` above the grid, e.g. «Equipo». */
|
|
596
|
+
heading?: string;
|
|
597
|
+
className?: string;
|
|
598
|
+
}
|
|
599
|
+
declare function TeamGrid<T extends TeamGridMember>({ members, memberHref, heading, className, }: TeamGridProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
600
|
+
|
|
550
601
|
/**
|
|
551
602
|
* `ProfessionalFields` — the tenant-defined professional fields of a team
|
|
552
603
|
* profile (REB-1099), e.g. a registration number, as a `<dl>`.
|
|
@@ -832,78 +883,6 @@ interface ReviewsProps {
|
|
|
832
883
|
}
|
|
833
884
|
declare function Reviews({ reviews, heading, headingId, headingLevel, notice, noticePosition, linkLabel, newWindowLabel, locale, className, headingClassName, gridClassName, cardClassName, noticeClassName, }: ReviewsProps): react_jsx_runtime.JSX.Element | null;
|
|
834
885
|
|
|
835
|
-
/**
|
|
836
|
-
* REB-850 — `PageBlocks`: the shared renderer for a page's registry blocks
|
|
837
|
-
* (`PageDetail.blocks`, REB-75), so a SITE stops hand-writing its own.
|
|
838
|
-
*
|
|
839
|
-
* A SERVER COMPONENT by default: no hooks, no `'use client'`, reachable from the
|
|
840
|
-
* RSC-safe root entry (`test/rsc-safety.test.ts` renders it under
|
|
841
|
-
* `--conditions=react-server`).
|
|
842
|
-
*
|
|
843
|
-
* Each block is wrapped in a `<section>` carrying the parent section's
|
|
844
|
-
* mirrored fields (REB-849): `heading`, `backgroundColor` and `cta`. The body
|
|
845
|
-
* comes from a per-type renderer that the `components` map can replace.
|
|
846
|
-
*
|
|
847
|
-
* Fail-closed rules:
|
|
848
|
-
* • an unknown `blockType` renders nothing (the whole section) and never throws;
|
|
849
|
-
* • an embed whose `resolved` is `null`/absent renders nothing — no heading,
|
|
850
|
-
* no dead link;
|
|
851
|
-
* • deprecated alias types (`doctor_embed`, `specialty_embed` — REB-852)
|
|
852
|
-
* render through their generic type's renderer (`profile_embed`, `page_embed`).
|
|
853
|
-
*/
|
|
854
|
-
type DeprecatedAlias = 'doctor_embed' | 'specialty_embed';
|
|
855
|
-
/** Block types a renderer is registered under — deprecated aliases resolve to these. */
|
|
856
|
-
type CanonicalBlockType = Exclude<BlockType, DeprecatedAlias>;
|
|
857
|
-
type EmbedType = 'page_embed' | 'profile_embed';
|
|
858
|
-
type WireTypesOf<T extends CanonicalBlockType> = T extends 'profile_embed' ? 'profile_embed' | 'doctor_embed' : T extends 'page_embed' ? 'page_embed' | 'specialty_embed' : T;
|
|
859
|
-
/**
|
|
860
|
-
* The block a renderer for `T` receives — including its deprecated alias, and
|
|
861
|
-
* with `resolved` guaranteed non-null for embeds (unresolved ones never render).
|
|
862
|
-
*/
|
|
863
|
-
type RenderableBlock<T extends CanonicalBlockType> = T extends EmbedType ? Extract<PageBlock, {
|
|
864
|
-
blockType: WireTypesOf<T>;
|
|
865
|
-
}> & {
|
|
866
|
-
resolved: ResolvedEmbed;
|
|
867
|
-
} : Extract<PageBlock, {
|
|
868
|
-
blockType: WireTypesOf<T>;
|
|
869
|
-
}>;
|
|
870
|
-
interface BlockRendererProps<T extends CanonicalBlockType> {
|
|
871
|
-
block: RenderableBlock<T>;
|
|
872
|
-
/** Level for headings INSIDE the block — one below the section heading when there is one. */
|
|
873
|
-
headingLevel: HeadingLevel;
|
|
874
|
-
/** Builds an embed's href (the `embedHref` prop, or the default `/${slug}`). */
|
|
875
|
-
embedHref: (resolved: ResolvedEmbed) => string;
|
|
876
|
-
/**
|
|
877
|
-
* REB-1268 — set only for block types that draw the SECTION heading
|
|
878
|
-
* themselves (`image_text`, whose heading sits beside the image): the id the
|
|
879
|
-
* section's `aria-labelledby` points at. `headingLevel` is then the section
|
|
880
|
-
* heading's own level. Undefined for every other block type.
|
|
881
|
-
*/
|
|
882
|
-
headingId?: string;
|
|
883
|
-
}
|
|
884
|
-
/** Per-block-type renderer overrides, keyed by canonical type. */
|
|
885
|
-
type PageBlocksComponents = Partial<{
|
|
886
|
-
[T in CanonicalBlockType]: ComponentType<BlockRendererProps<T>>;
|
|
887
|
-
}>;
|
|
888
|
-
interface PageBlocksProps {
|
|
889
|
-
blocks: readonly PageBlock[] | null | undefined;
|
|
890
|
-
/** Replace the body renderer of any block type. */
|
|
891
|
-
components?: PageBlocksComponents;
|
|
892
|
-
/** Level of each section heading. Default `2` (the page title is the `h1`). */
|
|
893
|
-
headingLevel?: HeadingLevel;
|
|
894
|
-
/** Href for an embedded page. Default `/${resolved.slug}`. */
|
|
895
|
-
embedHref?: (resolved: ResolvedEmbed) => string;
|
|
896
|
-
/**
|
|
897
|
-
* Namespace for the section heading ids (`aria-labelledby` targets). Pass a
|
|
898
|
-
* distinct value when one document renders `PageBlocks` more than once with
|
|
899
|
-
* overlapping blocks. Sanitised to a valid IDREF. Default `'page-block'`.
|
|
900
|
-
*/
|
|
901
|
-
idPrefix?: string;
|
|
902
|
-
className?: string;
|
|
903
|
-
sectionClassName?: string;
|
|
904
|
-
}
|
|
905
|
-
declare function PageBlocks({ blocks, components, headingLevel, embedHref, idPrefix, className, sectionClassName, }: PageBlocksProps): react_jsx_runtime.JSX.Element | null;
|
|
906
|
-
|
|
907
886
|
/**
|
|
908
887
|
* REB-1265..1268 — drop-in components for the content blocks a tenant
|
|
909
888
|
* authors in the nexus page editor. Each one takes the block's `data` fields
|
|
@@ -1637,12 +1616,18 @@ interface OrderConfirmationProps {
|
|
|
1637
1616
|
cartHref?: string;
|
|
1638
1617
|
/** Called by the "Volver a comprobar" button on `pending_timeout`/`error`. Omit to render no button. */
|
|
1639
1618
|
onRecheck?: () => void;
|
|
1619
|
+
/**
|
|
1620
|
+
* REB-1236 — show `order.purchaseTexts` (what happens next for each purchase
|
|
1621
|
+
* type, the tenant's texts from nexus) on a confirmed order. Default `true`;
|
|
1622
|
+
* a server without the field renders nothing extra.
|
|
1623
|
+
*/
|
|
1624
|
+
showPurchaseTexts?: boolean;
|
|
1640
1625
|
labels?: Partial<OrderConfirmationLabels>;
|
|
1641
1626
|
currencyCode?: string;
|
|
1642
1627
|
locale?: string;
|
|
1643
1628
|
className?: string;
|
|
1644
1629
|
}
|
|
1645
|
-
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
1630
|
+
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, showPurchaseTexts, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
1646
1631
|
|
|
1647
1632
|
/** The shipping address fields the buyer types (country defaults server-side). */
|
|
1648
1633
|
interface CheckoutAddressValue {
|
|
@@ -1726,8 +1711,8 @@ declare function quoteRequiresDelivery(quote: Pick<ShopQuote, 'lines'> | null |
|
|
|
1726
1711
|
* The quote and checkout body fields for the delivery choice. Home delivery
|
|
1727
1712
|
* carries the address (blank optional fields left out); pickup the point. With
|
|
1728
1713
|
* no choice (a cart with nothing to ship) it still sends home delivery: the
|
|
1729
|
-
* server records no delivery for such a cart
|
|
1730
|
-
*
|
|
1714
|
+
* server records no delivery for such a cart. (Since REB-1227 the server reads
|
|
1715
|
+
* a missing choice on a cart that ships as home delivery, address required.)
|
|
1731
1716
|
*
|
|
1732
1717
|
* Pass `requiresDelivery` (`quoteRequiresDelivery(quote)`): when the cart
|
|
1733
1718
|
* ships nothing the choice block is hidden and the address stays blank, so no
|
|
@@ -1915,4 +1900,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1915
1900
|
}
|
|
1916
1901
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1917
1902
|
|
|
1918
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, BeforeAfterPairs, type BeforeAfterPairsProps,
|
|
1903
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, BeforeAfterPairs, type BeforeAfterPairsProps, CARD_ICON_NAMES, 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 LinkedPageCardItem, LinkedPagesGrid, type LinkedPagesGridProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, Reviews, type ReviewsProps, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, TeamGrid, type TeamGridMember, type TeamGridProps, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ShopErrorCode, AcademyCourseDetail, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, Review,
|
|
1
|
+
import { ShopErrorCode, AcademyCourseDetail, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, Review, 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, a as FullInvoiceValue } from './
|
|
9
|
-
export { b as
|
|
8
|
+
import { H as HeadingLevel, a as FullInvoiceValue } from './page-links-C0nXQzAW.js';
|
|
9
|
+
export { B as BlockRendererProps, b as CanonicalBlockType, c as CheckoutTermsAcceptance, d as CheckoutTermsAcceptanceProps, C as CheckoutTermsCopy, D as DEFAULT_INVOICE_COUNTRIES, E as EMPTY_FULL_INVOICE_VALUE, e as FullInvoiceErrors, f as FullInvoiceFields, F as FullInvoiceFieldsLabels, g as FullInvoiceFieldsProps, h as FullInvoiceIdType, L as LinkFilterOption, i as PageBlocks, j as PageBlocksComponents, k as PageBlocksProps, P as PageLinkRef, R as RenderableBlock, l as filterByLink, m as isOverSimplifiedInvoiceCap, n as linkFilterOptions, o as linkKey, s as shopIssuesInvoices, t as toCheckoutInvoiceFields, p as toCheckoutTermsFields } from './page-links-C0nXQzAW.js';
|
|
10
10
|
|
|
11
11
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
12
12
|
|
|
@@ -547,6 +547,57 @@ interface ProfileCardProps {
|
|
|
547
547
|
}
|
|
548
548
|
declare function ProfileCard({ name, role, imageUrl, specialties, bio, fields, href, className, }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
549
549
|
|
|
550
|
+
/**
|
|
551
|
+
* REB-1100 — drop-ins for the page links of `client.pages.get(slug)`:
|
|
552
|
+
*
|
|
553
|
+
* - `LinkedPagesGrid` over `page.links` (the pages this page picked, e.g. a
|
|
554
|
+
* profile's areas) or `page.relatedPages` (derived: the pages of those
|
|
555
|
+
* areas, or the pages that belong to this one);
|
|
556
|
+
* - `TeamGrid` over `page.team` (derived: the team profiles linked to this
|
|
557
|
+
* page or to the pages it belongs to).
|
|
558
|
+
*
|
|
559
|
+
* Both render nothing for an empty or absent list, so a SITE can drop them in
|
|
560
|
+
* before the API emits the fields. Token-driven, RSC-safe.
|
|
561
|
+
*/
|
|
562
|
+
interface LinkedPageCardItem {
|
|
563
|
+
slug: string;
|
|
564
|
+
title: string;
|
|
565
|
+
excerpt?: string | null;
|
|
566
|
+
coverImageUrl?: string | null;
|
|
567
|
+
category?: {
|
|
568
|
+
name: string;
|
|
569
|
+
slug: string;
|
|
570
|
+
} | null;
|
|
571
|
+
}
|
|
572
|
+
interface LinkedPagesGridProps<T extends LinkedPageCardItem = LinkedPageCardItem> {
|
|
573
|
+
pages: T[] | null | undefined;
|
|
574
|
+
/** Builds a card's href. Defaults to `/{slug}`. */
|
|
575
|
+
pageHref?: (page: T) => string;
|
|
576
|
+
/** Optional `<h2>` above the grid, e.g. «Áreas». */
|
|
577
|
+
heading?: string;
|
|
578
|
+
className?: string;
|
|
579
|
+
}
|
|
580
|
+
declare function LinkedPagesGrid<T extends LinkedPageCardItem>({ pages, pageHref, heading, className, }: LinkedPagesGridProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
581
|
+
interface TeamGridMember {
|
|
582
|
+
slug: string;
|
|
583
|
+
title: string;
|
|
584
|
+
role?: string | null;
|
|
585
|
+
coverImageUrl?: string | null;
|
|
586
|
+
category?: {
|
|
587
|
+
name: string;
|
|
588
|
+
slug: string;
|
|
589
|
+
} | null;
|
|
590
|
+
}
|
|
591
|
+
interface TeamGridProps<T extends TeamGridMember = TeamGridMember> {
|
|
592
|
+
members: T[] | null | undefined;
|
|
593
|
+
/** Builds a member's profile href. Omit to render non-linking cards. */
|
|
594
|
+
memberHref?: (member: T) => string;
|
|
595
|
+
/** Optional `<h2>` above the grid, e.g. «Equipo». */
|
|
596
|
+
heading?: string;
|
|
597
|
+
className?: string;
|
|
598
|
+
}
|
|
599
|
+
declare function TeamGrid<T extends TeamGridMember>({ members, memberHref, heading, className, }: TeamGridProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
600
|
+
|
|
550
601
|
/**
|
|
551
602
|
* `ProfessionalFields` — the tenant-defined professional fields of a team
|
|
552
603
|
* profile (REB-1099), e.g. a registration number, as a `<dl>`.
|
|
@@ -832,78 +883,6 @@ interface ReviewsProps {
|
|
|
832
883
|
}
|
|
833
884
|
declare function Reviews({ reviews, heading, headingId, headingLevel, notice, noticePosition, linkLabel, newWindowLabel, locale, className, headingClassName, gridClassName, cardClassName, noticeClassName, }: ReviewsProps): react_jsx_runtime.JSX.Element | null;
|
|
834
885
|
|
|
835
|
-
/**
|
|
836
|
-
* REB-850 — `PageBlocks`: the shared renderer for a page's registry blocks
|
|
837
|
-
* (`PageDetail.blocks`, REB-75), so a SITE stops hand-writing its own.
|
|
838
|
-
*
|
|
839
|
-
* A SERVER COMPONENT by default: no hooks, no `'use client'`, reachable from the
|
|
840
|
-
* RSC-safe root entry (`test/rsc-safety.test.ts` renders it under
|
|
841
|
-
* `--conditions=react-server`).
|
|
842
|
-
*
|
|
843
|
-
* Each block is wrapped in a `<section>` carrying the parent section's
|
|
844
|
-
* mirrored fields (REB-849): `heading`, `backgroundColor` and `cta`. The body
|
|
845
|
-
* comes from a per-type renderer that the `components` map can replace.
|
|
846
|
-
*
|
|
847
|
-
* Fail-closed rules:
|
|
848
|
-
* • an unknown `blockType` renders nothing (the whole section) and never throws;
|
|
849
|
-
* • an embed whose `resolved` is `null`/absent renders nothing — no heading,
|
|
850
|
-
* no dead link;
|
|
851
|
-
* • deprecated alias types (`doctor_embed`, `specialty_embed` — REB-852)
|
|
852
|
-
* render through their generic type's renderer (`profile_embed`, `page_embed`).
|
|
853
|
-
*/
|
|
854
|
-
type DeprecatedAlias = 'doctor_embed' | 'specialty_embed';
|
|
855
|
-
/** Block types a renderer is registered under — deprecated aliases resolve to these. */
|
|
856
|
-
type CanonicalBlockType = Exclude<BlockType, DeprecatedAlias>;
|
|
857
|
-
type EmbedType = 'page_embed' | 'profile_embed';
|
|
858
|
-
type WireTypesOf<T extends CanonicalBlockType> = T extends 'profile_embed' ? 'profile_embed' | 'doctor_embed' : T extends 'page_embed' ? 'page_embed' | 'specialty_embed' : T;
|
|
859
|
-
/**
|
|
860
|
-
* The block a renderer for `T` receives — including its deprecated alias, and
|
|
861
|
-
* with `resolved` guaranteed non-null for embeds (unresolved ones never render).
|
|
862
|
-
*/
|
|
863
|
-
type RenderableBlock<T extends CanonicalBlockType> = T extends EmbedType ? Extract<PageBlock, {
|
|
864
|
-
blockType: WireTypesOf<T>;
|
|
865
|
-
}> & {
|
|
866
|
-
resolved: ResolvedEmbed;
|
|
867
|
-
} : Extract<PageBlock, {
|
|
868
|
-
blockType: WireTypesOf<T>;
|
|
869
|
-
}>;
|
|
870
|
-
interface BlockRendererProps<T extends CanonicalBlockType> {
|
|
871
|
-
block: RenderableBlock<T>;
|
|
872
|
-
/** Level for headings INSIDE the block — one below the section heading when there is one. */
|
|
873
|
-
headingLevel: HeadingLevel;
|
|
874
|
-
/** Builds an embed's href (the `embedHref` prop, or the default `/${slug}`). */
|
|
875
|
-
embedHref: (resolved: ResolvedEmbed) => string;
|
|
876
|
-
/**
|
|
877
|
-
* REB-1268 — set only for block types that draw the SECTION heading
|
|
878
|
-
* themselves (`image_text`, whose heading sits beside the image): the id the
|
|
879
|
-
* section's `aria-labelledby` points at. `headingLevel` is then the section
|
|
880
|
-
* heading's own level. Undefined for every other block type.
|
|
881
|
-
*/
|
|
882
|
-
headingId?: string;
|
|
883
|
-
}
|
|
884
|
-
/** Per-block-type renderer overrides, keyed by canonical type. */
|
|
885
|
-
type PageBlocksComponents = Partial<{
|
|
886
|
-
[T in CanonicalBlockType]: ComponentType<BlockRendererProps<T>>;
|
|
887
|
-
}>;
|
|
888
|
-
interface PageBlocksProps {
|
|
889
|
-
blocks: readonly PageBlock[] | null | undefined;
|
|
890
|
-
/** Replace the body renderer of any block type. */
|
|
891
|
-
components?: PageBlocksComponents;
|
|
892
|
-
/** Level of each section heading. Default `2` (the page title is the `h1`). */
|
|
893
|
-
headingLevel?: HeadingLevel;
|
|
894
|
-
/** Href for an embedded page. Default `/${resolved.slug}`. */
|
|
895
|
-
embedHref?: (resolved: ResolvedEmbed) => string;
|
|
896
|
-
/**
|
|
897
|
-
* Namespace for the section heading ids (`aria-labelledby` targets). Pass a
|
|
898
|
-
* distinct value when one document renders `PageBlocks` more than once with
|
|
899
|
-
* overlapping blocks. Sanitised to a valid IDREF. Default `'page-block'`.
|
|
900
|
-
*/
|
|
901
|
-
idPrefix?: string;
|
|
902
|
-
className?: string;
|
|
903
|
-
sectionClassName?: string;
|
|
904
|
-
}
|
|
905
|
-
declare function PageBlocks({ blocks, components, headingLevel, embedHref, idPrefix, className, sectionClassName, }: PageBlocksProps): react_jsx_runtime.JSX.Element | null;
|
|
906
|
-
|
|
907
886
|
/**
|
|
908
887
|
* REB-1265..1268 — drop-in components for the content blocks a tenant
|
|
909
888
|
* authors in the nexus page editor. Each one takes the block's `data` fields
|
|
@@ -1637,12 +1616,18 @@ interface OrderConfirmationProps {
|
|
|
1637
1616
|
cartHref?: string;
|
|
1638
1617
|
/** Called by the "Volver a comprobar" button on `pending_timeout`/`error`. Omit to render no button. */
|
|
1639
1618
|
onRecheck?: () => void;
|
|
1619
|
+
/**
|
|
1620
|
+
* REB-1236 — show `order.purchaseTexts` (what happens next for each purchase
|
|
1621
|
+
* type, the tenant's texts from nexus) on a confirmed order. Default `true`;
|
|
1622
|
+
* a server without the field renders nothing extra.
|
|
1623
|
+
*/
|
|
1624
|
+
showPurchaseTexts?: boolean;
|
|
1640
1625
|
labels?: Partial<OrderConfirmationLabels>;
|
|
1641
1626
|
currencyCode?: string;
|
|
1642
1627
|
locale?: string;
|
|
1643
1628
|
className?: string;
|
|
1644
1629
|
}
|
|
1645
|
-
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
1630
|
+
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, showPurchaseTexts, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
1646
1631
|
|
|
1647
1632
|
/** The shipping address fields the buyer types (country defaults server-side). */
|
|
1648
1633
|
interface CheckoutAddressValue {
|
|
@@ -1726,8 +1711,8 @@ declare function quoteRequiresDelivery(quote: Pick<ShopQuote, 'lines'> | null |
|
|
|
1726
1711
|
* The quote and checkout body fields for the delivery choice. Home delivery
|
|
1727
1712
|
* carries the address (blank optional fields left out); pickup the point. With
|
|
1728
1713
|
* no choice (a cart with nothing to ship) it still sends home delivery: the
|
|
1729
|
-
* server records no delivery for such a cart
|
|
1730
|
-
*
|
|
1714
|
+
* server records no delivery for such a cart. (Since REB-1227 the server reads
|
|
1715
|
+
* a missing choice on a cart that ships as home delivery, address required.)
|
|
1731
1716
|
*
|
|
1732
1717
|
* Pass `requiresDelivery` (`quoteRequiresDelivery(quote)`): when the cart
|
|
1733
1718
|
* ships nothing the choice block is hidden and the address stays blank, so no
|
|
@@ -1915,4 +1900,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1915
1900
|
}
|
|
1916
1901
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1917
1902
|
|
|
1918
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, BeforeAfterPairs, type BeforeAfterPairsProps,
|
|
1903
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, BeforeAfterPairs, type BeforeAfterPairsProps, CARD_ICON_NAMES, 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 LinkedPageCardItem, LinkedPagesGrid, type LinkedPagesGridProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, Reviews, type ReviewsProps, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, TeamGrid, type TeamGridMember, type TeamGridProps, 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 };
|