@aifeatures/react 0.23.0 → 0.24.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/dist/index.cjs +2 -2
- package/dist/index.d.cts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -92,6 +92,14 @@ declare namespace AifeaturesCaptcha {
|
|
|
92
92
|
var neverConsentGate: string;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/** The reserved form field the aifeatures form endpoint reads as marketing
|
|
96
|
+
* consent (stripped from the stored submission server-side). */
|
|
97
|
+
declare const MARKETING_OPT_IN_FIELD = "_marketing_opt_in";
|
|
98
|
+
/** The box's presence marker: a reserved hidden field posted whether or not
|
|
99
|
+
* the box is ticked, so the form endpoint can refuse a form that carries the
|
|
100
|
+
* box without the `opt_in` purpose on its first submission (stripped
|
|
101
|
+
* server-side like the box itself). */
|
|
102
|
+
declare const MARKETING_OPT_IN_BOX_FIELD = "_marketing_opt_in_box";
|
|
95
103
|
interface MarketingOptInProps {
|
|
96
104
|
/**
|
|
97
105
|
* Visible text saying what the visitor agrees to (e.g. "Email me news and
|
|
@@ -117,13 +125,18 @@ interface MarketingOptInProps {
|
|
|
117
125
|
* An unticked "email me" checkbox for marketing consent.
|
|
118
126
|
*
|
|
119
127
|
* Inside an aifeatures form it posts `_marketing_opt_in=true` only when the
|
|
120
|
-
* visitor ticks it
|
|
121
|
-
*
|
|
128
|
+
* visitor ticks it, plus an always-posted `_marketing_opt_in_box=1` marker
|
|
129
|
+
* saying the box is on the form. It always renders unchecked: `checked`
|
|
122
130
|
* and `defaultChecked` are ignored, because a pre-ticked box is not consent.
|
|
123
131
|
*
|
|
132
|
+
* The form's purpose must be `opt_in`: the form endpoint refuses every
|
|
133
|
+
* submission (400 `form_purpose_not_opt_in`, ticked or not) from a form that
|
|
134
|
+
* carries this box with any other purpose. Set it when adding the box, and
|
|
135
|
+
* set the purpose back to `general` when removing it.
|
|
136
|
+
*
|
|
124
137
|
* Use it on contact/quote/booking forms. A form whose only job is newsletter
|
|
125
138
|
* signup should use `<NewsletterSignup>` instead (submitting it IS the
|
|
126
|
-
* opt-in, so it needs no box).
|
|
139
|
+
* opt-in, so it needs no box; a newsletter form carrying the box is refused).
|
|
127
140
|
*
|
|
128
141
|
* @example
|
|
129
142
|
* ```tsx
|
|
@@ -2918,4 +2931,4 @@ declare namespace AccountReviews {
|
|
|
2918
2931
|
var neverConsentGate: string;
|
|
2919
2932
|
}
|
|
2920
2933
|
|
|
2921
|
-
export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, type FormSubmitMarketing, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, MarketingOptIn, type MarketingOptInProps, NewsletterSignup, type NewsletterSignupProps, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
|
|
2934
|
+
export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, type FormSubmitMarketing, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKETING_OPT_IN_BOX_FIELD, MARKETING_OPT_IN_FIELD, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, MarketingOptIn, type MarketingOptInProps, NewsletterSignup, type NewsletterSignupProps, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
|
package/dist/index.d.ts
CHANGED
|
@@ -92,6 +92,14 @@ declare namespace AifeaturesCaptcha {
|
|
|
92
92
|
var neverConsentGate: string;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/** The reserved form field the aifeatures form endpoint reads as marketing
|
|
96
|
+
* consent (stripped from the stored submission server-side). */
|
|
97
|
+
declare const MARKETING_OPT_IN_FIELD = "_marketing_opt_in";
|
|
98
|
+
/** The box's presence marker: a reserved hidden field posted whether or not
|
|
99
|
+
* the box is ticked, so the form endpoint can refuse a form that carries the
|
|
100
|
+
* box without the `opt_in` purpose on its first submission (stripped
|
|
101
|
+
* server-side like the box itself). */
|
|
102
|
+
declare const MARKETING_OPT_IN_BOX_FIELD = "_marketing_opt_in_box";
|
|
95
103
|
interface MarketingOptInProps {
|
|
96
104
|
/**
|
|
97
105
|
* Visible text saying what the visitor agrees to (e.g. "Email me news and
|
|
@@ -117,13 +125,18 @@ interface MarketingOptInProps {
|
|
|
117
125
|
* An unticked "email me" checkbox for marketing consent.
|
|
118
126
|
*
|
|
119
127
|
* Inside an aifeatures form it posts `_marketing_opt_in=true` only when the
|
|
120
|
-
* visitor ticks it
|
|
121
|
-
*
|
|
128
|
+
* visitor ticks it, plus an always-posted `_marketing_opt_in_box=1` marker
|
|
129
|
+
* saying the box is on the form. It always renders unchecked: `checked`
|
|
122
130
|
* and `defaultChecked` are ignored, because a pre-ticked box is not consent.
|
|
123
131
|
*
|
|
132
|
+
* The form's purpose must be `opt_in`: the form endpoint refuses every
|
|
133
|
+
* submission (400 `form_purpose_not_opt_in`, ticked or not) from a form that
|
|
134
|
+
* carries this box with any other purpose. Set it when adding the box, and
|
|
135
|
+
* set the purpose back to `general` when removing it.
|
|
136
|
+
*
|
|
124
137
|
* Use it on contact/quote/booking forms. A form whose only job is newsletter
|
|
125
138
|
* signup should use `<NewsletterSignup>` instead (submitting it IS the
|
|
126
|
-
* opt-in, so it needs no box).
|
|
139
|
+
* opt-in, so it needs no box; a newsletter form carrying the box is refused).
|
|
127
140
|
*
|
|
128
141
|
* @example
|
|
129
142
|
* ```tsx
|
|
@@ -2918,4 +2931,4 @@ declare namespace AccountReviews {
|
|
|
2918
2931
|
var neverConsentGate: string;
|
|
2919
2932
|
}
|
|
2920
2933
|
|
|
2921
|
-
export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, type FormSubmitMarketing, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, MarketingOptIn, type MarketingOptInProps, NewsletterSignup, type NewsletterSignupProps, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
|
|
2934
|
+
export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, type FormSubmitMarketing, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKETING_OPT_IN_BOX_FIELD, MARKETING_OPT_IN_FIELD, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, MarketingOptIn, type MarketingOptInProps, NewsletterSignup, type NewsletterSignupProps, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
|