@reblu/site-blocks 0.18.0 → 0.20.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 +179 -2
- package/dist/_heading-BsNbc1wc.d.cts +4 -0
- package/dist/_heading-BsNbc1wc.d.ts +4 -0
- package/dist/client.cjs +449 -50
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +109 -2
- package/dist/client.d.ts +109 -2
- package/dist/client.js +446 -51
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +374 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -8
- package/dist/index.d.ts +51 -8
- package/dist/index.js +373 -309
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
1
|
+
import { ShopErrorCode, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, 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 } from './_heading-BsNbc1wc.cjs';
|
|
8
9
|
|
|
9
10
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
10
11
|
|
|
@@ -271,9 +272,6 @@ interface SafeHtmlProps {
|
|
|
271
272
|
}
|
|
272
273
|
declare function SafeHtml({ html, className, headingOffset, normalizeHeadings, }: SafeHtmlProps): react_jsx_runtime.JSX.Element | null;
|
|
273
274
|
|
|
274
|
-
/** A heading level a caller can configure — `h1`…`h6`. */
|
|
275
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
276
|
-
|
|
277
275
|
/**
|
|
278
276
|
* `CourseDescription` — the drop-in for `AcademyCourseDetail.description`
|
|
279
277
|
* (`client.academy.bySlug()`), REB-879. The description is rich-text Markdown
|
|
@@ -410,11 +408,35 @@ interface ProfileCardProps {
|
|
|
410
408
|
/** Short list of specialties / tags shown as chips. */
|
|
411
409
|
specialties?: string[];
|
|
412
410
|
bio?: string;
|
|
411
|
+
/**
|
|
412
|
+
* REB-1099 — the tenant's professional fields (`professional.fields` from
|
|
413
|
+
* `client.pages.list`). Only the `showOnCard` ones are shown.
|
|
414
|
+
*/
|
|
415
|
+
fields?: ProfessionalField[] | null;
|
|
413
416
|
/** Link target for the full profile. Omit to render non-linking. */
|
|
414
417
|
href?: string;
|
|
415
418
|
className?: string;
|
|
416
419
|
}
|
|
417
|
-
declare function ProfileCard({ name, role, imageUrl, specialties, bio, href, className }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare function ProfileCard({ name, role, imageUrl, specialties, bio, fields, href, className, }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* `ProfessionalFields` — the tenant-defined professional fields of a team
|
|
424
|
+
* profile (REB-1099), e.g. a registration number, as a `<dl>`.
|
|
425
|
+
*
|
|
426
|
+
* Feed it `professional.fields` from the SITE API as-is: the list card
|
|
427
|
+
* (`client.pages.list`) already carries only the card fields, the profile
|
|
428
|
+
* (`client.pages.bySlug`) carries every public one. `variant='card'` filters
|
|
429
|
+
* to `showOnCard` anyway, so one list can feed both places. The labels are the
|
|
430
|
+
* tenant's own; nothing here names a field. Renders nothing when there is
|
|
431
|
+
* nothing to show. RSC-safe.
|
|
432
|
+
*/
|
|
433
|
+
interface ProfessionalFieldsProps {
|
|
434
|
+
fields: ProfessionalField[] | null | undefined;
|
|
435
|
+
/** `'card'` keeps only `showOnCard` fields. Default `'profile'`: every field. */
|
|
436
|
+
variant?: 'card' | 'profile';
|
|
437
|
+
className?: string;
|
|
438
|
+
}
|
|
439
|
+
declare function ProfessionalFields({ fields, variant, className, }: ProfessionalFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
418
440
|
|
|
419
441
|
/**
|
|
420
442
|
* `ProductCard` — presentational shop product tile over `ShopProductListItem`.
|
|
@@ -832,6 +854,8 @@ interface CartSummaryLabels {
|
|
|
832
854
|
total: string;
|
|
833
855
|
/** REB-837 — default copy for `notice={true}`. */
|
|
834
856
|
cancelledNotice: string;
|
|
857
|
+
/** REB-1131 — the discount line when `autoDiscount` is set. */
|
|
858
|
+
staffDiscountApplied: string;
|
|
835
859
|
}
|
|
836
860
|
interface CartSummaryProps {
|
|
837
861
|
/** Integer cents. */
|
|
@@ -840,6 +864,14 @@ interface CartSummaryProps {
|
|
|
840
864
|
discount?: number;
|
|
841
865
|
/** The applied discount code, shown next to the discount amount. */
|
|
842
866
|
discountCode?: string;
|
|
867
|
+
/**
|
|
868
|
+
* REB-1131 — the automatic staff discount from the site API
|
|
869
|
+
* (`validateCart().autoDiscount`, or `autoDiscount` on apply-discount).
|
|
870
|
+
* When set, the discount line reads «Descuento de personal aplicado»
|
|
871
|
+
* (`labels.staffDiscountApplied`) and its amount is `discount` if given,
|
|
872
|
+
* else `autoDiscount.amount`. The code itself is not shown.
|
|
873
|
+
*/
|
|
874
|
+
autoDiscount?: Pick<ShopStaffAutoDiscount, 'amount'> | null;
|
|
843
875
|
/** Integer cents. Only rendered when `shippingEnabled` is true. */
|
|
844
876
|
shipping?: number | null;
|
|
845
877
|
/** Whether this tenant's shop even has shipping cost — hides the line entirely when false/omitted. */
|
|
@@ -859,7 +891,7 @@ interface CartSummaryProps {
|
|
|
859
891
|
locale?: string;
|
|
860
892
|
className?: string;
|
|
861
893
|
}
|
|
862
|
-
declare function CartSummary({ subtotal, discount, discountCode, shipping, shippingEnabled, total, notice, labels, currencyCode, locale, className, }: CartSummaryProps): react_jsx_runtime.JSX.Element;
|
|
894
|
+
declare function CartSummary({ subtotal, discount, discountCode, autoDiscount, shipping, shippingEnabled, total, notice, labels, currencyCode, locale, className, }: CartSummaryProps): react_jsx_runtime.JSX.Element;
|
|
863
895
|
|
|
864
896
|
/**
|
|
865
897
|
* `CartAdjustmentsNotice` (REB-981) — tells the visitor what cart validation
|
|
@@ -1035,6 +1067,8 @@ interface CheckoutFormLabels {
|
|
|
1035
1067
|
applyingDiscount: string;
|
|
1036
1068
|
removeDiscount: string;
|
|
1037
1069
|
discountAppliedSuffix: (formattedAmount: string) => string;
|
|
1070
|
+
/** REB-1131 — shown when `autoDiscount` is set. */
|
|
1071
|
+
staffDiscountApplied: string;
|
|
1038
1072
|
submit: string;
|
|
1039
1073
|
submitting: string;
|
|
1040
1074
|
}
|
|
@@ -1055,6 +1089,15 @@ interface CheckoutFormProps {
|
|
|
1055
1089
|
onApplyDiscount: () => void;
|
|
1056
1090
|
onRemoveDiscount: () => void;
|
|
1057
1091
|
appliedDiscount?: CheckoutAppliedDiscount | null;
|
|
1092
|
+
/**
|
|
1093
|
+
* REB-1131 — the automatic staff discount from the site API (`autoDiscount`
|
|
1094
|
+
* on validate-cart / apply-discount). When set, the discount section shows
|
|
1095
|
+
* «Descuento de personal aplicado» with its amount and no remove action
|
|
1096
|
+
* (it is not the buyer's to remove), and the code field stays available:
|
|
1097
|
+
* a typed code replaces it only when the server finds it larger. Takes
|
|
1098
|
+
* precedence over `appliedDiscount`.
|
|
1099
|
+
*/
|
|
1100
|
+
autoDiscount?: Pick<ShopStaffAutoDiscount, 'amount'> | null;
|
|
1058
1101
|
discountApplying?: boolean;
|
|
1059
1102
|
discountError?: string | null;
|
|
1060
1103
|
/**
|
|
@@ -1075,7 +1118,7 @@ interface CheckoutFormProps {
|
|
|
1075
1118
|
locale?: string;
|
|
1076
1119
|
className?: string;
|
|
1077
1120
|
}
|
|
1078
|
-
declare function CheckoutForm({ contact, onContactChange, contactErrors, phoneRegion, checkoutError, discountCode, onDiscountCodeChange, onApplyDiscount, onRemoveDiscount, appliedDiscount, discountApplying, discountError, loginPrompt, children, submitting, submitDisabled, onSubmit, labels, currencyCode, locale, className, }: CheckoutFormProps): react_jsx_runtime.JSX.Element;
|
|
1121
|
+
declare function CheckoutForm({ contact, onContactChange, contactErrors, phoneRegion, checkoutError, discountCode, onDiscountCodeChange, onApplyDiscount, onRemoveDiscount, appliedDiscount, autoDiscount, discountApplying, discountError, loginPrompt, children, submitting, submitDisabled, onSubmit, labels, currencyCode, locale, className, }: CheckoutFormProps): react_jsx_runtime.JSX.Element;
|
|
1079
1122
|
|
|
1080
1123
|
/**
|
|
1081
1124
|
* `OrderConfirmation` — presentational order-confirmation view (REB-829,
|
|
@@ -1259,4 +1302,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1259
1302
|
}
|
|
1260
1303
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1261
1304
|
|
|
1262
|
-
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_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,
|
|
1305
|
+
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_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, 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,10 +1,11 @@
|
|
|
1
|
-
import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
1
|
+
import { ShopErrorCode, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, 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 './_heading-BsNbc1wc.js';
|
|
8
9
|
|
|
9
10
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
10
11
|
|
|
@@ -271,9 +272,6 @@ interface SafeHtmlProps {
|
|
|
271
272
|
}
|
|
272
273
|
declare function SafeHtml({ html, className, headingOffset, normalizeHeadings, }: SafeHtmlProps): react_jsx_runtime.JSX.Element | null;
|
|
273
274
|
|
|
274
|
-
/** A heading level a caller can configure — `h1`…`h6`. */
|
|
275
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
276
|
-
|
|
277
275
|
/**
|
|
278
276
|
* `CourseDescription` — the drop-in for `AcademyCourseDetail.description`
|
|
279
277
|
* (`client.academy.bySlug()`), REB-879. The description is rich-text Markdown
|
|
@@ -410,11 +408,35 @@ interface ProfileCardProps {
|
|
|
410
408
|
/** Short list of specialties / tags shown as chips. */
|
|
411
409
|
specialties?: string[];
|
|
412
410
|
bio?: string;
|
|
411
|
+
/**
|
|
412
|
+
* REB-1099 — the tenant's professional fields (`professional.fields` from
|
|
413
|
+
* `client.pages.list`). Only the `showOnCard` ones are shown.
|
|
414
|
+
*/
|
|
415
|
+
fields?: ProfessionalField[] | null;
|
|
413
416
|
/** Link target for the full profile. Omit to render non-linking. */
|
|
414
417
|
href?: string;
|
|
415
418
|
className?: string;
|
|
416
419
|
}
|
|
417
|
-
declare function ProfileCard({ name, role, imageUrl, specialties, bio, href, className }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare function ProfileCard({ name, role, imageUrl, specialties, bio, fields, href, className, }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* `ProfessionalFields` — the tenant-defined professional fields of a team
|
|
424
|
+
* profile (REB-1099), e.g. a registration number, as a `<dl>`.
|
|
425
|
+
*
|
|
426
|
+
* Feed it `professional.fields` from the SITE API as-is: the list card
|
|
427
|
+
* (`client.pages.list`) already carries only the card fields, the profile
|
|
428
|
+
* (`client.pages.bySlug`) carries every public one. `variant='card'` filters
|
|
429
|
+
* to `showOnCard` anyway, so one list can feed both places. The labels are the
|
|
430
|
+
* tenant's own; nothing here names a field. Renders nothing when there is
|
|
431
|
+
* nothing to show. RSC-safe.
|
|
432
|
+
*/
|
|
433
|
+
interface ProfessionalFieldsProps {
|
|
434
|
+
fields: ProfessionalField[] | null | undefined;
|
|
435
|
+
/** `'card'` keeps only `showOnCard` fields. Default `'profile'`: every field. */
|
|
436
|
+
variant?: 'card' | 'profile';
|
|
437
|
+
className?: string;
|
|
438
|
+
}
|
|
439
|
+
declare function ProfessionalFields({ fields, variant, className, }: ProfessionalFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
418
440
|
|
|
419
441
|
/**
|
|
420
442
|
* `ProductCard` — presentational shop product tile over `ShopProductListItem`.
|
|
@@ -832,6 +854,8 @@ interface CartSummaryLabels {
|
|
|
832
854
|
total: string;
|
|
833
855
|
/** REB-837 — default copy for `notice={true}`. */
|
|
834
856
|
cancelledNotice: string;
|
|
857
|
+
/** REB-1131 — the discount line when `autoDiscount` is set. */
|
|
858
|
+
staffDiscountApplied: string;
|
|
835
859
|
}
|
|
836
860
|
interface CartSummaryProps {
|
|
837
861
|
/** Integer cents. */
|
|
@@ -840,6 +864,14 @@ interface CartSummaryProps {
|
|
|
840
864
|
discount?: number;
|
|
841
865
|
/** The applied discount code, shown next to the discount amount. */
|
|
842
866
|
discountCode?: string;
|
|
867
|
+
/**
|
|
868
|
+
* REB-1131 — the automatic staff discount from the site API
|
|
869
|
+
* (`validateCart().autoDiscount`, or `autoDiscount` on apply-discount).
|
|
870
|
+
* When set, the discount line reads «Descuento de personal aplicado»
|
|
871
|
+
* (`labels.staffDiscountApplied`) and its amount is `discount` if given,
|
|
872
|
+
* else `autoDiscount.amount`. The code itself is not shown.
|
|
873
|
+
*/
|
|
874
|
+
autoDiscount?: Pick<ShopStaffAutoDiscount, 'amount'> | null;
|
|
843
875
|
/** Integer cents. Only rendered when `shippingEnabled` is true. */
|
|
844
876
|
shipping?: number | null;
|
|
845
877
|
/** Whether this tenant's shop even has shipping cost — hides the line entirely when false/omitted. */
|
|
@@ -859,7 +891,7 @@ interface CartSummaryProps {
|
|
|
859
891
|
locale?: string;
|
|
860
892
|
className?: string;
|
|
861
893
|
}
|
|
862
|
-
declare function CartSummary({ subtotal, discount, discountCode, shipping, shippingEnabled, total, notice, labels, currencyCode, locale, className, }: CartSummaryProps): react_jsx_runtime.JSX.Element;
|
|
894
|
+
declare function CartSummary({ subtotal, discount, discountCode, autoDiscount, shipping, shippingEnabled, total, notice, labels, currencyCode, locale, className, }: CartSummaryProps): react_jsx_runtime.JSX.Element;
|
|
863
895
|
|
|
864
896
|
/**
|
|
865
897
|
* `CartAdjustmentsNotice` (REB-981) — tells the visitor what cart validation
|
|
@@ -1035,6 +1067,8 @@ interface CheckoutFormLabels {
|
|
|
1035
1067
|
applyingDiscount: string;
|
|
1036
1068
|
removeDiscount: string;
|
|
1037
1069
|
discountAppliedSuffix: (formattedAmount: string) => string;
|
|
1070
|
+
/** REB-1131 — shown when `autoDiscount` is set. */
|
|
1071
|
+
staffDiscountApplied: string;
|
|
1038
1072
|
submit: string;
|
|
1039
1073
|
submitting: string;
|
|
1040
1074
|
}
|
|
@@ -1055,6 +1089,15 @@ interface CheckoutFormProps {
|
|
|
1055
1089
|
onApplyDiscount: () => void;
|
|
1056
1090
|
onRemoveDiscount: () => void;
|
|
1057
1091
|
appliedDiscount?: CheckoutAppliedDiscount | null;
|
|
1092
|
+
/**
|
|
1093
|
+
* REB-1131 — the automatic staff discount from the site API (`autoDiscount`
|
|
1094
|
+
* on validate-cart / apply-discount). When set, the discount section shows
|
|
1095
|
+
* «Descuento de personal aplicado» with its amount and no remove action
|
|
1096
|
+
* (it is not the buyer's to remove), and the code field stays available:
|
|
1097
|
+
* a typed code replaces it only when the server finds it larger. Takes
|
|
1098
|
+
* precedence over `appliedDiscount`.
|
|
1099
|
+
*/
|
|
1100
|
+
autoDiscount?: Pick<ShopStaffAutoDiscount, 'amount'> | null;
|
|
1058
1101
|
discountApplying?: boolean;
|
|
1059
1102
|
discountError?: string | null;
|
|
1060
1103
|
/**
|
|
@@ -1075,7 +1118,7 @@ interface CheckoutFormProps {
|
|
|
1075
1118
|
locale?: string;
|
|
1076
1119
|
className?: string;
|
|
1077
1120
|
}
|
|
1078
|
-
declare function CheckoutForm({ contact, onContactChange, contactErrors, phoneRegion, checkoutError, discountCode, onDiscountCodeChange, onApplyDiscount, onRemoveDiscount, appliedDiscount, discountApplying, discountError, loginPrompt, children, submitting, submitDisabled, onSubmit, labels, currencyCode, locale, className, }: CheckoutFormProps): react_jsx_runtime.JSX.Element;
|
|
1121
|
+
declare function CheckoutForm({ contact, onContactChange, contactErrors, phoneRegion, checkoutError, discountCode, onDiscountCodeChange, onApplyDiscount, onRemoveDiscount, appliedDiscount, autoDiscount, discountApplying, discountError, loginPrompt, children, submitting, submitDisabled, onSubmit, labels, currencyCode, locale, className, }: CheckoutFormProps): react_jsx_runtime.JSX.Element;
|
|
1079
1122
|
|
|
1080
1123
|
/**
|
|
1081
1124
|
* `OrderConfirmation` — presentational order-confirmation view (REB-829,
|
|
@@ -1259,4 +1302,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1259
1302
|
}
|
|
1260
1303
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1261
1304
|
|
|
1262
|
-
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_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,
|
|
1305
|
+
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_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, 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 };
|