@reblu/site-blocks 0.21.0 → 0.23.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 +33 -0
- package/README.md +125 -0
- package/dist/index.cjs +367 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +101 -2
- package/dist/index.d.ts +101 -2
- package/dist/index.js +363 -178
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShopErrorCode, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
1
|
+
import { ShopErrorCode, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, AcademyInstructorPublic, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, 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';
|
|
@@ -814,6 +814,78 @@ interface ShopFiltersProps {
|
|
|
814
814
|
declare function shouldRenderShopFilters(facets: ShopFacets, active?: ShopFiltersActive): boolean;
|
|
815
815
|
declare function ShopFilters({ facets, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: ShopFiltersProps): react_jsx_runtime.JSX.Element | null;
|
|
816
816
|
|
|
817
|
+
/**
|
|
818
|
+
* `CourseCatalogFilters` — plug-and-play filter chrome for the academy course
|
|
819
|
+
* catalogue (REB-547): an instructor filter fed by `client.academy.instructors()`
|
|
820
|
+
* and a price filter (bands in integer cents plus «Gratis») that map 1:1 onto
|
|
821
|
+
* `client.academy.courses({ instructor, priceMin, priceMax, free })`.
|
|
822
|
+
*
|
|
823
|
+
* Same RSC-safe contract as `ShopFilters`: every option is a real `<a href>`
|
|
824
|
+
* built by the `hrefs` prop, so it renders from a Server Component with no
|
|
825
|
+
* event handler. `onChange` is additive and client-only: when given, a click is
|
|
826
|
+
* intercepted and reported as a patch instead of navigating.
|
|
827
|
+
*
|
|
828
|
+
* `free` and a price band are mutually exclusive in practice: the API applies
|
|
829
|
+
* `free=true` OVER any price range. So turning «Gratis» on clears the band, and
|
|
830
|
+
* picking a band turns «Gratis» off; a consumer building `hrefs` should do the
|
|
831
|
+
* same (drop `free` in `hrefs.price`, drop the range in `hrefs.free(true)`).
|
|
832
|
+
*
|
|
833
|
+
* Tokens only, Spanish defaults, every label overridable.
|
|
834
|
+
*/
|
|
835
|
+
/** One price band. `min`/`max` are integer cents; either may be omitted for an open end. */
|
|
836
|
+
interface CourseCatalogPriceBand {
|
|
837
|
+
min?: number;
|
|
838
|
+
max?: number;
|
|
839
|
+
/** Overrides the auto-generated `formatPrice`-based label. */
|
|
840
|
+
label?: string;
|
|
841
|
+
}
|
|
842
|
+
/** EUR defaults sized for courses — override via `priceBands` for another catalogue. */
|
|
843
|
+
declare const DEFAULT_COURSE_PRICE_BANDS: CourseCatalogPriceBand[];
|
|
844
|
+
/** The selection currently reflected in the URL (or component state). */
|
|
845
|
+
interface CourseCatalogFiltersActive {
|
|
846
|
+
/** An instructor id (`AcademyInstructorPublic.id`). */
|
|
847
|
+
instructor?: string;
|
|
848
|
+
priceMin?: number;
|
|
849
|
+
priceMax?: number;
|
|
850
|
+
free?: boolean;
|
|
851
|
+
}
|
|
852
|
+
/** Href generators — the RSC-safe navigation seam. Keep the other current params. */
|
|
853
|
+
interface CourseCatalogFiltersHrefs {
|
|
854
|
+
/** `id` undefined clears the instructor filter. */
|
|
855
|
+
instructor: (id: string | undefined) => string;
|
|
856
|
+
/** Both undefined clears the price range. Should also drop `free`. */
|
|
857
|
+
price: (min: number | undefined, max: number | undefined) => string;
|
|
858
|
+
/** `true` should also drop `priceMin`/`priceMax`. */
|
|
859
|
+
free: (next: boolean) => string;
|
|
860
|
+
clearAll: () => string;
|
|
861
|
+
}
|
|
862
|
+
interface CourseCatalogFiltersLabels {
|
|
863
|
+
instructor: string;
|
|
864
|
+
allInstructors: string;
|
|
865
|
+
price: string;
|
|
866
|
+
free: string;
|
|
867
|
+
clearAll: string;
|
|
868
|
+
priceUnder: (formattedMax: string) => string;
|
|
869
|
+
priceOver: (formattedMin: string) => string;
|
|
870
|
+
priceRange: (formattedMin: string, formattedMax: string) => string;
|
|
871
|
+
}
|
|
872
|
+
declare const DEFAULT_COURSE_CATALOG_FILTERS_LABELS: CourseCatalogFiltersLabels;
|
|
873
|
+
interface CourseCatalogFiltersProps {
|
|
874
|
+
/** From `client.academy.instructors()`. Unnamed instructors are not offered. */
|
|
875
|
+
instructors: AcademyInstructorPublic[];
|
|
876
|
+
hrefs: CourseCatalogFiltersHrefs;
|
|
877
|
+
active?: CourseCatalogFiltersActive;
|
|
878
|
+
/** Client-only: intercepts navigation with a callback instead. */
|
|
879
|
+
onChange?: (patch: Partial<CourseCatalogFiltersActive>) => void;
|
|
880
|
+
priceBands?: CourseCatalogPriceBand[];
|
|
881
|
+
labels?: Partial<CourseCatalogFiltersLabels>;
|
|
882
|
+
/** Forwarded to `formatPrice` for band labels (default EUR / es-ES). */
|
|
883
|
+
currencyCode?: string;
|
|
884
|
+
locale?: string;
|
|
885
|
+
className?: string;
|
|
886
|
+
}
|
|
887
|
+
declare function CourseCatalogFilters({ instructors, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: CourseCatalogFiltersProps): react_jsx_runtime.JSX.Element;
|
|
888
|
+
|
|
817
889
|
/**
|
|
818
890
|
* `CartLineList` — presentational cart lines (REB-829), container/
|
|
819
891
|
* presentational split: it takes `items` + optional `onQuantityChange`/
|
|
@@ -1323,6 +1395,33 @@ interface FullInvoiceFieldsProps {
|
|
|
1323
1395
|
}
|
|
1324
1396
|
declare function FullInvoiceFields({ value, onChange, overCap, issuesInvoices, errors, countries, labels, className, }: FullInvoiceFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
1325
1397
|
|
|
1398
|
+
/**
|
|
1399
|
+
* `ContactInterestField` — the contact form's tenant-configurable interest
|
|
1400
|
+
* question, drop-in (REB-759). Fully controlled (`value`/`onChange`), no hooks,
|
|
1401
|
+
* no fetch: the SITE owns the state and sends `value` as `interests` with its
|
|
1402
|
+
* `client.contactForm.submit(...)` body.
|
|
1403
|
+
*
|
|
1404
|
+
* Pass `config.contactInterest` from `/api/site/config`. The tenant names the
|
|
1405
|
+
* question and its options in nexus; when it has configured neither (or an
|
|
1406
|
+
* older base-api does not serve the field) this renders NOTHING. There is no
|
|
1407
|
+
* default catalogue, and a SITE must never supply one. The server keeps only
|
|
1408
|
+
* labels the tenant offers, so a stale page cannot store a removed option.
|
|
1409
|
+
*/
|
|
1410
|
+
type ContactInterest = NonNullable<Config['contactInterest']>;
|
|
1411
|
+
interface ContactInterestFieldProps {
|
|
1412
|
+
/** `config.contactInterest`: null/undefined renders nothing. */
|
|
1413
|
+
interest: ContactInterest | null | undefined;
|
|
1414
|
+
/** The chosen option labels. */
|
|
1415
|
+
value: readonly string[];
|
|
1416
|
+
/** Receives the chosen labels, in the tenant's option order. */
|
|
1417
|
+
onChange: (value: string[]) => void;
|
|
1418
|
+
/** Optional id prefix, for two forms on one page. */
|
|
1419
|
+
idPrefix?: string;
|
|
1420
|
+
disabled?: boolean;
|
|
1421
|
+
className?: string;
|
|
1422
|
+
}
|
|
1423
|
+
declare function ContactInterestField({ interest, value, onChange, idPrefix, disabled, className, }: ContactInterestFieldProps): react_jsx_runtime.JSX.Element | null;
|
|
1424
|
+
|
|
1326
1425
|
/**
|
|
1327
1426
|
* `OrderInvoiceLink` — the sale invoice of an order, drop-in (REB-73). Pure
|
|
1328
1427
|
* data in, RSC-safe (no hooks). Pass `order.invoice` from the order lookup
|
|
@@ -1345,4 +1444,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1345
1444
|
}
|
|
1346
1445
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1347
1446
|
|
|
1348
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, CourseDescription, type CourseDescriptionProps, DEFAULT_INVOICE_COUNTRIES, 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_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, 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, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|
|
1447
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_INVOICE_COUNTRIES, 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_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, 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, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShopErrorCode, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
1
|
+
import { ShopErrorCode, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, AcademyInstructorPublic, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, 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';
|
|
@@ -814,6 +814,78 @@ interface ShopFiltersProps {
|
|
|
814
814
|
declare function shouldRenderShopFilters(facets: ShopFacets, active?: ShopFiltersActive): boolean;
|
|
815
815
|
declare function ShopFilters({ facets, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: ShopFiltersProps): react_jsx_runtime.JSX.Element | null;
|
|
816
816
|
|
|
817
|
+
/**
|
|
818
|
+
* `CourseCatalogFilters` — plug-and-play filter chrome for the academy course
|
|
819
|
+
* catalogue (REB-547): an instructor filter fed by `client.academy.instructors()`
|
|
820
|
+
* and a price filter (bands in integer cents plus «Gratis») that map 1:1 onto
|
|
821
|
+
* `client.academy.courses({ instructor, priceMin, priceMax, free })`.
|
|
822
|
+
*
|
|
823
|
+
* Same RSC-safe contract as `ShopFilters`: every option is a real `<a href>`
|
|
824
|
+
* built by the `hrefs` prop, so it renders from a Server Component with no
|
|
825
|
+
* event handler. `onChange` is additive and client-only: when given, a click is
|
|
826
|
+
* intercepted and reported as a patch instead of navigating.
|
|
827
|
+
*
|
|
828
|
+
* `free` and a price band are mutually exclusive in practice: the API applies
|
|
829
|
+
* `free=true` OVER any price range. So turning «Gratis» on clears the band, and
|
|
830
|
+
* picking a band turns «Gratis» off; a consumer building `hrefs` should do the
|
|
831
|
+
* same (drop `free` in `hrefs.price`, drop the range in `hrefs.free(true)`).
|
|
832
|
+
*
|
|
833
|
+
* Tokens only, Spanish defaults, every label overridable.
|
|
834
|
+
*/
|
|
835
|
+
/** One price band. `min`/`max` are integer cents; either may be omitted for an open end. */
|
|
836
|
+
interface CourseCatalogPriceBand {
|
|
837
|
+
min?: number;
|
|
838
|
+
max?: number;
|
|
839
|
+
/** Overrides the auto-generated `formatPrice`-based label. */
|
|
840
|
+
label?: string;
|
|
841
|
+
}
|
|
842
|
+
/** EUR defaults sized for courses — override via `priceBands` for another catalogue. */
|
|
843
|
+
declare const DEFAULT_COURSE_PRICE_BANDS: CourseCatalogPriceBand[];
|
|
844
|
+
/** The selection currently reflected in the URL (or component state). */
|
|
845
|
+
interface CourseCatalogFiltersActive {
|
|
846
|
+
/** An instructor id (`AcademyInstructorPublic.id`). */
|
|
847
|
+
instructor?: string;
|
|
848
|
+
priceMin?: number;
|
|
849
|
+
priceMax?: number;
|
|
850
|
+
free?: boolean;
|
|
851
|
+
}
|
|
852
|
+
/** Href generators — the RSC-safe navigation seam. Keep the other current params. */
|
|
853
|
+
interface CourseCatalogFiltersHrefs {
|
|
854
|
+
/** `id` undefined clears the instructor filter. */
|
|
855
|
+
instructor: (id: string | undefined) => string;
|
|
856
|
+
/** Both undefined clears the price range. Should also drop `free`. */
|
|
857
|
+
price: (min: number | undefined, max: number | undefined) => string;
|
|
858
|
+
/** `true` should also drop `priceMin`/`priceMax`. */
|
|
859
|
+
free: (next: boolean) => string;
|
|
860
|
+
clearAll: () => string;
|
|
861
|
+
}
|
|
862
|
+
interface CourseCatalogFiltersLabels {
|
|
863
|
+
instructor: string;
|
|
864
|
+
allInstructors: string;
|
|
865
|
+
price: string;
|
|
866
|
+
free: string;
|
|
867
|
+
clearAll: string;
|
|
868
|
+
priceUnder: (formattedMax: string) => string;
|
|
869
|
+
priceOver: (formattedMin: string) => string;
|
|
870
|
+
priceRange: (formattedMin: string, formattedMax: string) => string;
|
|
871
|
+
}
|
|
872
|
+
declare const DEFAULT_COURSE_CATALOG_FILTERS_LABELS: CourseCatalogFiltersLabels;
|
|
873
|
+
interface CourseCatalogFiltersProps {
|
|
874
|
+
/** From `client.academy.instructors()`. Unnamed instructors are not offered. */
|
|
875
|
+
instructors: AcademyInstructorPublic[];
|
|
876
|
+
hrefs: CourseCatalogFiltersHrefs;
|
|
877
|
+
active?: CourseCatalogFiltersActive;
|
|
878
|
+
/** Client-only: intercepts navigation with a callback instead. */
|
|
879
|
+
onChange?: (patch: Partial<CourseCatalogFiltersActive>) => void;
|
|
880
|
+
priceBands?: CourseCatalogPriceBand[];
|
|
881
|
+
labels?: Partial<CourseCatalogFiltersLabels>;
|
|
882
|
+
/** Forwarded to `formatPrice` for band labels (default EUR / es-ES). */
|
|
883
|
+
currencyCode?: string;
|
|
884
|
+
locale?: string;
|
|
885
|
+
className?: string;
|
|
886
|
+
}
|
|
887
|
+
declare function CourseCatalogFilters({ instructors, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: CourseCatalogFiltersProps): react_jsx_runtime.JSX.Element;
|
|
888
|
+
|
|
817
889
|
/**
|
|
818
890
|
* `CartLineList` — presentational cart lines (REB-829), container/
|
|
819
891
|
* presentational split: it takes `items` + optional `onQuantityChange`/
|
|
@@ -1323,6 +1395,33 @@ interface FullInvoiceFieldsProps {
|
|
|
1323
1395
|
}
|
|
1324
1396
|
declare function FullInvoiceFields({ value, onChange, overCap, issuesInvoices, errors, countries, labels, className, }: FullInvoiceFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
1325
1397
|
|
|
1398
|
+
/**
|
|
1399
|
+
* `ContactInterestField` — the contact form's tenant-configurable interest
|
|
1400
|
+
* question, drop-in (REB-759). Fully controlled (`value`/`onChange`), no hooks,
|
|
1401
|
+
* no fetch: the SITE owns the state and sends `value` as `interests` with its
|
|
1402
|
+
* `client.contactForm.submit(...)` body.
|
|
1403
|
+
*
|
|
1404
|
+
* Pass `config.contactInterest` from `/api/site/config`. The tenant names the
|
|
1405
|
+
* question and its options in nexus; when it has configured neither (or an
|
|
1406
|
+
* older base-api does not serve the field) this renders NOTHING. There is no
|
|
1407
|
+
* default catalogue, and a SITE must never supply one. The server keeps only
|
|
1408
|
+
* labels the tenant offers, so a stale page cannot store a removed option.
|
|
1409
|
+
*/
|
|
1410
|
+
type ContactInterest = NonNullable<Config['contactInterest']>;
|
|
1411
|
+
interface ContactInterestFieldProps {
|
|
1412
|
+
/** `config.contactInterest`: null/undefined renders nothing. */
|
|
1413
|
+
interest: ContactInterest | null | undefined;
|
|
1414
|
+
/** The chosen option labels. */
|
|
1415
|
+
value: readonly string[];
|
|
1416
|
+
/** Receives the chosen labels, in the tenant's option order. */
|
|
1417
|
+
onChange: (value: string[]) => void;
|
|
1418
|
+
/** Optional id prefix, for two forms on one page. */
|
|
1419
|
+
idPrefix?: string;
|
|
1420
|
+
disabled?: boolean;
|
|
1421
|
+
className?: string;
|
|
1422
|
+
}
|
|
1423
|
+
declare function ContactInterestField({ interest, value, onChange, idPrefix, disabled, className, }: ContactInterestFieldProps): react_jsx_runtime.JSX.Element | null;
|
|
1424
|
+
|
|
1326
1425
|
/**
|
|
1327
1426
|
* `OrderInvoiceLink` — the sale invoice of an order, drop-in (REB-73). Pure
|
|
1328
1427
|
* data in, RSC-safe (no hooks). Pass `order.invoice` from the order lookup
|
|
@@ -1345,4 +1444,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1345
1444
|
}
|
|
1346
1445
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1347
1446
|
|
|
1348
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, CourseDescription, type CourseDescriptionProps, DEFAULT_INVOICE_COUNTRIES, 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_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, 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, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|
|
1447
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_INVOICE_COUNTRIES, 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_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, 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, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|