@magicx-eng/ai-autocomplete-react 0.47.1 → 0.48.1
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/README.md +63 -532
- package/REFERENCE.md +594 -0
- package/dist/index.d.mts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +325 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +325 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutocompleteResult, OptionOverrides, APIConfig, CurrencyOptions, AppearanceMode, CompletedParamState, ProductsLayout, ProductImageFallback, ProductsConfig, Product, MatchedItem, Suggestion, SuggestionOption, FormatType, DateMonthView, DateRange, TimeView, SkippedParamState, IdentifiedParamState, CoreState, Segment, CustomFieldsReport } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
2
|
-
export { APIConfig, APIKeyConfig, AccessTokenConfig, AccessTokenResult, AppearanceMode, AutocompleteResult, CompletedParam, CompletedParamState, CurrencyOptions, CustomFieldsReport, DATE_RANGE_META_END, DATE_RANGE_META_START, DEFAULT_OPTION_COUNT_UNIT, DateMonthView, DateRange, ExpressedFilter, FilterOp, FormatType, IdentifiedParam, IdentifiedParamState, MatchedItem, MatchedItems, OptionOverrides, PRODUCT_PATH_PREFIX, Product, ProductImageFallback, ProductsConfig, ProductsLayout, Segment, SkippedParamState, SubmitResultExtras, Suggestion, SuggestionOption, TIME_META_KEY, TaskKind, TimeView, WEEKDAY_LABELS, buildSubmitResult, cellDay, cellIso, dateCellMarks, formatDate, formatDateRange, formatOptionCount, formatTime, isoDate, monthLabel, optionCountLabel, optionHasImage, optionImageSources, optionImageSrc, optionLabel, optionsShowLeadingVisuals, parseDate, parseLooseDate, parseLooseDateRange, parseTime, productFromMatchedItem, productImageSources, productsFromCustomFields, sanitizeOptionIconSvg, selectedRangeFor, visibleDateRange, withSkippedParams } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
1
|
+
import { AutocompleteResult, OptionOverrides, APIConfig, CurrencyOptions, AppearanceMode, CompletedParamState, ProductsLayout, ProductImageFallback, ProductsConfig, Product, MatchedItem, Suggestion, SuggestionOption, SelectOptionOptions, FormatType, DateMonthView, DateRange, TimeView, LocationView, SkippedParamState, IdentifiedParamState, CoreState, Segment, CustomFieldsReport } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
2
|
+
export { APIConfig, APIKeyConfig, AccessTokenConfig, AccessTokenResult, AppearanceMode, AutocompleteResult, CompletedParam, CompletedParamState, CurrencyOptions, CustomFieldsReport, DATE_RANGE_META_END, DATE_RANGE_META_START, DEFAULT_OPTION_COUNT_UNIT, DateMonthView, DateRange, ExpressedFilter, FilterOp, FormatType, IdentifiedParam, IdentifiedParamState, LOCATION_META_KEY, LocationPlace, LocationView, MatchedItem, MatchedItems, OptionOverrides, PRODUCT_PATH_PREFIX, Product, ProductImageFallback, ProductsConfig, ProductsLayout, Segment, SelectOptionOptions, SkippedParamState, SubmitResultExtras, Suggestion, SuggestionOption, TIME_META_KEY, TaskKind, TimeView, WEEKDAY_LABELS, buildSubmitResult, cellDay, cellIso, dateCellMarks, formatDate, formatDateRange, formatOptionCount, formatPlace, formatTime, isoDate, monthLabel, optionCountLabel, optionHasImage, optionImageSources, optionImageSrc, optionLabel, optionsShowLeadingVisuals, parseDate, parseLooseDate, parseLooseDateRange, parseTime, productFromMatchedItem, productImageSources, productsFromCustomFields, sanitizeOptionIconSvg, selectedRangeFor, visibleDateRange, withSkippedParams } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, KeyboardEvent, ChangeEvent } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -87,6 +87,13 @@ interface AIAutocompleteProps {
|
|
|
87
87
|
closeDropdownOnBlur?: boolean;
|
|
88
88
|
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
89
89
|
showNonTappableOptions?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* When true (default), a location parameter without options searches the
|
|
92
|
+
* server's location search (cities, addresses, landmarks) as the user types
|
|
93
|
+
* in its field. Set to false to keep the field but take typed text only, so
|
|
94
|
+
* nothing the user types is sent for a lookup.
|
|
95
|
+
*/
|
|
96
|
+
locationSearch?: boolean;
|
|
90
97
|
/** When true (default), an option that carries an `icon_svg` draws its icon before its text in the dropdown. Set to false to render option rows as text only. */
|
|
91
98
|
showOptionIcons?: boolean;
|
|
92
99
|
/** When true (default), a completed chip in the input draws the icon of the option that answered it. Set to false to render chips as text only. */
|
|
@@ -266,6 +273,13 @@ interface UseAIAutocompleteOptions {
|
|
|
266
273
|
closeDropdownOnBlur?: boolean;
|
|
267
274
|
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
268
275
|
showNonTappableOptions?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* When true (default), a location parameter without options searches the
|
|
278
|
+
* server's location search (cities, addresses, landmarks) as the user types
|
|
279
|
+
* in its field. Set to false to keep the field but take typed text only, so
|
|
280
|
+
* nothing the user types is sent for a lookup.
|
|
281
|
+
*/
|
|
282
|
+
locationSearch?: boolean;
|
|
269
283
|
/**
|
|
270
284
|
* When true (default), `dropdownProps` asks the dropdown to draw each
|
|
271
285
|
* option's `icon_svg` before its text. Set to false for text-only rows.
|
|
@@ -416,7 +430,10 @@ interface UseAIAutocompleteReturn {
|
|
|
416
430
|
* Does nothing without mapProducts or with a custom products integration.
|
|
417
431
|
*/
|
|
418
432
|
refreshProducts: () => void;
|
|
419
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* Prepare the typed word before you build a submit result from your own button.
|
|
435
|
+
* A typed value with no pill yet joins `identifiedParams` only in this call. Read `getState()` after it.
|
|
436
|
+
*/
|
|
420
437
|
prepareSubmit: () => void;
|
|
421
438
|
/** Read the current state, including changes from prepareSubmit(). */
|
|
422
439
|
getState: () => CoreState;
|
|
@@ -522,7 +539,12 @@ interface UseAIAutocompleteReturn {
|
|
|
522
539
|
interface AIAutocompleteDropdownProps {
|
|
523
540
|
suggestions: Suggestion[];
|
|
524
541
|
activeIndex: number;
|
|
525
|
-
|
|
542
|
+
/**
|
|
543
|
+
* An option row was picked. In a multi_select question `how.commit` is true
|
|
544
|
+
* when the tap landed on the row's text rather than its checkbox: answer
|
|
545
|
+
* with the option right away instead of only ticking it.
|
|
546
|
+
*/
|
|
547
|
+
onSelect: (option: SuggestionOption, how?: SelectOptionOptions) => void;
|
|
526
548
|
onHighlight: (index: number) => void;
|
|
527
549
|
/**
|
|
528
550
|
* The pointer left option `index`. Clear the highlight if it is still on
|
|
@@ -635,7 +657,9 @@ interface AIAutocompleteDropdownProps {
|
|
|
635
657
|
* core swaps them before they reach here. A `"date-range"` parameter is
|
|
636
658
|
* answered by two taps of that calendar, a start and an end, committed as one
|
|
637
659
|
* span. `"time"` renders the time wheel in place of the options grid, drawn
|
|
638
|
-
* from `timeView`.
|
|
660
|
+
* from `timeView`. `"location"` (a location parameter that came with no
|
|
661
|
+
* options) renders a search field over the server's location search, drawn
|
|
662
|
+
* from `locationView`. Provided by `dropdownProps` from the hook.
|
|
639
663
|
* Default: `"options"`.
|
|
640
664
|
*/
|
|
641
665
|
formatType?: FormatType;
|
|
@@ -661,6 +685,21 @@ interface AIAutocompleteDropdownProps {
|
|
|
661
685
|
onTimeChange?: (minutes: number) => void;
|
|
662
686
|
/** The time wheel's Done — answer the pill. Provided by `dropdownProps` from the hook. */
|
|
663
687
|
onTimeCommit?: () => void;
|
|
688
|
+
/** What the location search field shows. Null unless `formatType` is `"location"`. Provided by `dropdownProps` from the hook. */
|
|
689
|
+
locationView?: LocationView | null;
|
|
690
|
+
/** The location field's text changed. Provided by `dropdownProps` from the hook. */
|
|
691
|
+
onLocationQuery?: (query: string) => void;
|
|
692
|
+
/** ArrowDown / ArrowUp in the location field. Provided by `dropdownProps` from the hook. */
|
|
693
|
+
onLocationMove?: (delta: number) => void;
|
|
694
|
+
/** Answer the location pill: the place at `index`, else the highlighted place, else the typed text. Provided by `dropdownProps` from the hook. */
|
|
695
|
+
onLocationCommit?: (index?: number) => void;
|
|
696
|
+
/** The location field took or let go of focus. Provided by `dropdownProps` from the hook. */
|
|
697
|
+
onLocationFocusChange?: (focused: boolean) => void;
|
|
698
|
+
/**
|
|
699
|
+
* Whether the widget has focus. A location field takes focus while it does,
|
|
700
|
+
* so the user types straight into it. Provided by `dropdownProps` from the hook.
|
|
701
|
+
*/
|
|
702
|
+
isFocused?: boolean;
|
|
664
703
|
/**
|
|
665
704
|
* Color mode for a **standalone** dropdown. When set, the dropdown scopes the
|
|
666
705
|
* SDK's design tokens to its own root (adds the `magicx-aia` class +
|
|
@@ -676,8 +715,8 @@ interface AIAutocompleteDropdownProps {
|
|
|
676
715
|
|
|
677
716
|
declare const AIAutocomplete: react.ForwardRefExoticComponent<AIAutocompleteProps & react.RefAttributes<AIAutocompleteHandle>>;
|
|
678
717
|
|
|
679
|
-
declare function AIAutocompleteDropdown({ suggestions, activeIndex, onSelect, onHighlight, onUnhighlight, isOpen, id, className, pills, onPillClick, showPills, onSkip, showSkipButton, showOptionIcons, showOptionImages, showOptionCounts, skipDisabled, activeSelected, isLoading, skeletonExiting, isInputEmpty, language, products, onProductSelect, onProductAddToCart, onProductFocusChange, productsLayout, productImageFallback, formatType, dateView, selectedDateIso, selectedDateRange, dateRangeStart, onPreviousMonth, onNextMonth, timeView, multiSelectView, onMultiSelectCommit, onTimeChange, onTimeCommit, optionsPosition, mode, }: AIAutocompleteDropdownProps): react_jsx_runtime.JSX.Element;
|
|
718
|
+
declare function AIAutocompleteDropdown({ suggestions, activeIndex, onSelect, onHighlight, onUnhighlight, isOpen, id, className, pills, onPillClick, showPills, onSkip, showSkipButton, showOptionIcons, showOptionImages, showOptionCounts, skipDisabled, activeSelected, isLoading, skeletonExiting, isInputEmpty, language, products, onProductSelect, onProductAddToCart, onProductFocusChange, productsLayout, productImageFallback, formatType, dateView, selectedDateIso, selectedDateRange, dateRangeStart, onPreviousMonth, onNextMonth, timeView, multiSelectView, onMultiSelectCommit, onTimeChange, onTimeCommit, locationView, onLocationQuery, onLocationMove, onLocationCommit, onLocationFocusChange, isFocused, optionsPosition, mode, }: AIAutocompleteDropdownProps): react_jsx_runtime.JSX.Element;
|
|
680
719
|
|
|
681
|
-
declare function useAIAutocomplete({ onSubmit, onResult, onError, optionOverrides, maskCompletedText, apiConfig, additionalContext, language, currency, productId, visitorId, columns, dropdownTrigger, optionsPosition, closeDropdownOnBlur, showNonTappableOptions, showOptionIcons, showOptionImages, showOptionCounts, showSkipButton, showProducts, productImageFallback, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, products, mapProducts, onProductSelect, onProductAddToCart, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
720
|
+
declare function useAIAutocomplete({ onSubmit, onResult, onError, optionOverrides, maskCompletedText, apiConfig, additionalContext, language, currency, productId, visitorId, columns, dropdownTrigger, optionsPosition, closeDropdownOnBlur, showNonTappableOptions, locationSearch, showOptionIcons, showOptionImages, showOptionCounts, showSkipButton, showProducts, productImageFallback, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, products, mapProducts, onProductSelect, onProductAddToCart, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
682
721
|
|
|
683
722
|
export { AIAutocomplete, AIAutocompleteDropdown, type AIAutocompleteDropdownProps, type AIAutocompleteHandle, type AIAutocompleteProps, type UseAIAutocompleteOptions, type UseAIAutocompleteReturn, useAIAutocomplete };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutocompleteResult, OptionOverrides, APIConfig, CurrencyOptions, AppearanceMode, CompletedParamState, ProductsLayout, ProductImageFallback, ProductsConfig, Product, MatchedItem, Suggestion, SuggestionOption, FormatType, DateMonthView, DateRange, TimeView, SkippedParamState, IdentifiedParamState, CoreState, Segment, CustomFieldsReport } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
2
|
-
export { APIConfig, APIKeyConfig, AccessTokenConfig, AccessTokenResult, AppearanceMode, AutocompleteResult, CompletedParam, CompletedParamState, CurrencyOptions, CustomFieldsReport, DATE_RANGE_META_END, DATE_RANGE_META_START, DEFAULT_OPTION_COUNT_UNIT, DateMonthView, DateRange, ExpressedFilter, FilterOp, FormatType, IdentifiedParam, IdentifiedParamState, MatchedItem, MatchedItems, OptionOverrides, PRODUCT_PATH_PREFIX, Product, ProductImageFallback, ProductsConfig, ProductsLayout, Segment, SkippedParamState, SubmitResultExtras, Suggestion, SuggestionOption, TIME_META_KEY, TaskKind, TimeView, WEEKDAY_LABELS, buildSubmitResult, cellDay, cellIso, dateCellMarks, formatDate, formatDateRange, formatOptionCount, formatTime, isoDate, monthLabel, optionCountLabel, optionHasImage, optionImageSources, optionImageSrc, optionLabel, optionsShowLeadingVisuals, parseDate, parseLooseDate, parseLooseDateRange, parseTime, productFromMatchedItem, productImageSources, productsFromCustomFields, sanitizeOptionIconSvg, selectedRangeFor, visibleDateRange, withSkippedParams } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
1
|
+
import { AutocompleteResult, OptionOverrides, APIConfig, CurrencyOptions, AppearanceMode, CompletedParamState, ProductsLayout, ProductImageFallback, ProductsConfig, Product, MatchedItem, Suggestion, SuggestionOption, SelectOptionOptions, FormatType, DateMonthView, DateRange, TimeView, LocationView, SkippedParamState, IdentifiedParamState, CoreState, Segment, CustomFieldsReport } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
2
|
+
export { APIConfig, APIKeyConfig, AccessTokenConfig, AccessTokenResult, AppearanceMode, AutocompleteResult, CompletedParam, CompletedParamState, CurrencyOptions, CustomFieldsReport, DATE_RANGE_META_END, DATE_RANGE_META_START, DEFAULT_OPTION_COUNT_UNIT, DateMonthView, DateRange, ExpressedFilter, FilterOp, FormatType, IdentifiedParam, IdentifiedParamState, LOCATION_META_KEY, LocationPlace, LocationView, MatchedItem, MatchedItems, OptionOverrides, PRODUCT_PATH_PREFIX, Product, ProductImageFallback, ProductsConfig, ProductsLayout, Segment, SelectOptionOptions, SkippedParamState, SubmitResultExtras, Suggestion, SuggestionOption, TIME_META_KEY, TaskKind, TimeView, WEEKDAY_LABELS, buildSubmitResult, cellDay, cellIso, dateCellMarks, formatDate, formatDateRange, formatOptionCount, formatPlace, formatTime, isoDate, monthLabel, optionCountLabel, optionHasImage, optionImageSources, optionImageSrc, optionLabel, optionsShowLeadingVisuals, parseDate, parseLooseDate, parseLooseDateRange, parseTime, productFromMatchedItem, productImageSources, productsFromCustomFields, sanitizeOptionIconSvg, selectedRangeFor, visibleDateRange, withSkippedParams } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, KeyboardEvent, ChangeEvent } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -87,6 +87,13 @@ interface AIAutocompleteProps {
|
|
|
87
87
|
closeDropdownOnBlur?: boolean;
|
|
88
88
|
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
89
89
|
showNonTappableOptions?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* When true (default), a location parameter without options searches the
|
|
92
|
+
* server's location search (cities, addresses, landmarks) as the user types
|
|
93
|
+
* in its field. Set to false to keep the field but take typed text only, so
|
|
94
|
+
* nothing the user types is sent for a lookup.
|
|
95
|
+
*/
|
|
96
|
+
locationSearch?: boolean;
|
|
90
97
|
/** When true (default), an option that carries an `icon_svg` draws its icon before its text in the dropdown. Set to false to render option rows as text only. */
|
|
91
98
|
showOptionIcons?: boolean;
|
|
92
99
|
/** When true (default), a completed chip in the input draws the icon of the option that answered it. Set to false to render chips as text only. */
|
|
@@ -266,6 +273,13 @@ interface UseAIAutocompleteOptions {
|
|
|
266
273
|
closeDropdownOnBlur?: boolean;
|
|
267
274
|
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
268
275
|
showNonTappableOptions?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* When true (default), a location parameter without options searches the
|
|
278
|
+
* server's location search (cities, addresses, landmarks) as the user types
|
|
279
|
+
* in its field. Set to false to keep the field but take typed text only, so
|
|
280
|
+
* nothing the user types is sent for a lookup.
|
|
281
|
+
*/
|
|
282
|
+
locationSearch?: boolean;
|
|
269
283
|
/**
|
|
270
284
|
* When true (default), `dropdownProps` asks the dropdown to draw each
|
|
271
285
|
* option's `icon_svg` before its text. Set to false for text-only rows.
|
|
@@ -416,7 +430,10 @@ interface UseAIAutocompleteReturn {
|
|
|
416
430
|
* Does nothing without mapProducts or with a custom products integration.
|
|
417
431
|
*/
|
|
418
432
|
refreshProducts: () => void;
|
|
419
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* Prepare the typed word before you build a submit result from your own button.
|
|
435
|
+
* A typed value with no pill yet joins `identifiedParams` only in this call. Read `getState()` after it.
|
|
436
|
+
*/
|
|
420
437
|
prepareSubmit: () => void;
|
|
421
438
|
/** Read the current state, including changes from prepareSubmit(). */
|
|
422
439
|
getState: () => CoreState;
|
|
@@ -522,7 +539,12 @@ interface UseAIAutocompleteReturn {
|
|
|
522
539
|
interface AIAutocompleteDropdownProps {
|
|
523
540
|
suggestions: Suggestion[];
|
|
524
541
|
activeIndex: number;
|
|
525
|
-
|
|
542
|
+
/**
|
|
543
|
+
* An option row was picked. In a multi_select question `how.commit` is true
|
|
544
|
+
* when the tap landed on the row's text rather than its checkbox: answer
|
|
545
|
+
* with the option right away instead of only ticking it.
|
|
546
|
+
*/
|
|
547
|
+
onSelect: (option: SuggestionOption, how?: SelectOptionOptions) => void;
|
|
526
548
|
onHighlight: (index: number) => void;
|
|
527
549
|
/**
|
|
528
550
|
* The pointer left option `index`. Clear the highlight if it is still on
|
|
@@ -635,7 +657,9 @@ interface AIAutocompleteDropdownProps {
|
|
|
635
657
|
* core swaps them before they reach here. A `"date-range"` parameter is
|
|
636
658
|
* answered by two taps of that calendar, a start and an end, committed as one
|
|
637
659
|
* span. `"time"` renders the time wheel in place of the options grid, drawn
|
|
638
|
-
* from `timeView`.
|
|
660
|
+
* from `timeView`. `"location"` (a location parameter that came with no
|
|
661
|
+
* options) renders a search field over the server's location search, drawn
|
|
662
|
+
* from `locationView`. Provided by `dropdownProps` from the hook.
|
|
639
663
|
* Default: `"options"`.
|
|
640
664
|
*/
|
|
641
665
|
formatType?: FormatType;
|
|
@@ -661,6 +685,21 @@ interface AIAutocompleteDropdownProps {
|
|
|
661
685
|
onTimeChange?: (minutes: number) => void;
|
|
662
686
|
/** The time wheel's Done — answer the pill. Provided by `dropdownProps` from the hook. */
|
|
663
687
|
onTimeCommit?: () => void;
|
|
688
|
+
/** What the location search field shows. Null unless `formatType` is `"location"`. Provided by `dropdownProps` from the hook. */
|
|
689
|
+
locationView?: LocationView | null;
|
|
690
|
+
/** The location field's text changed. Provided by `dropdownProps` from the hook. */
|
|
691
|
+
onLocationQuery?: (query: string) => void;
|
|
692
|
+
/** ArrowDown / ArrowUp in the location field. Provided by `dropdownProps` from the hook. */
|
|
693
|
+
onLocationMove?: (delta: number) => void;
|
|
694
|
+
/** Answer the location pill: the place at `index`, else the highlighted place, else the typed text. Provided by `dropdownProps` from the hook. */
|
|
695
|
+
onLocationCommit?: (index?: number) => void;
|
|
696
|
+
/** The location field took or let go of focus. Provided by `dropdownProps` from the hook. */
|
|
697
|
+
onLocationFocusChange?: (focused: boolean) => void;
|
|
698
|
+
/**
|
|
699
|
+
* Whether the widget has focus. A location field takes focus while it does,
|
|
700
|
+
* so the user types straight into it. Provided by `dropdownProps` from the hook.
|
|
701
|
+
*/
|
|
702
|
+
isFocused?: boolean;
|
|
664
703
|
/**
|
|
665
704
|
* Color mode for a **standalone** dropdown. When set, the dropdown scopes the
|
|
666
705
|
* SDK's design tokens to its own root (adds the `magicx-aia` class +
|
|
@@ -676,8 +715,8 @@ interface AIAutocompleteDropdownProps {
|
|
|
676
715
|
|
|
677
716
|
declare const AIAutocomplete: react.ForwardRefExoticComponent<AIAutocompleteProps & react.RefAttributes<AIAutocompleteHandle>>;
|
|
678
717
|
|
|
679
|
-
declare function AIAutocompleteDropdown({ suggestions, activeIndex, onSelect, onHighlight, onUnhighlight, isOpen, id, className, pills, onPillClick, showPills, onSkip, showSkipButton, showOptionIcons, showOptionImages, showOptionCounts, skipDisabled, activeSelected, isLoading, skeletonExiting, isInputEmpty, language, products, onProductSelect, onProductAddToCart, onProductFocusChange, productsLayout, productImageFallback, formatType, dateView, selectedDateIso, selectedDateRange, dateRangeStart, onPreviousMonth, onNextMonth, timeView, multiSelectView, onMultiSelectCommit, onTimeChange, onTimeCommit, optionsPosition, mode, }: AIAutocompleteDropdownProps): react_jsx_runtime.JSX.Element;
|
|
718
|
+
declare function AIAutocompleteDropdown({ suggestions, activeIndex, onSelect, onHighlight, onUnhighlight, isOpen, id, className, pills, onPillClick, showPills, onSkip, showSkipButton, showOptionIcons, showOptionImages, showOptionCounts, skipDisabled, activeSelected, isLoading, skeletonExiting, isInputEmpty, language, products, onProductSelect, onProductAddToCart, onProductFocusChange, productsLayout, productImageFallback, formatType, dateView, selectedDateIso, selectedDateRange, dateRangeStart, onPreviousMonth, onNextMonth, timeView, multiSelectView, onMultiSelectCommit, onTimeChange, onTimeCommit, locationView, onLocationQuery, onLocationMove, onLocationCommit, onLocationFocusChange, isFocused, optionsPosition, mode, }: AIAutocompleteDropdownProps): react_jsx_runtime.JSX.Element;
|
|
680
719
|
|
|
681
|
-
declare function useAIAutocomplete({ onSubmit, onResult, onError, optionOverrides, maskCompletedText, apiConfig, additionalContext, language, currency, productId, visitorId, columns, dropdownTrigger, optionsPosition, closeDropdownOnBlur, showNonTappableOptions, showOptionIcons, showOptionImages, showOptionCounts, showSkipButton, showProducts, productImageFallback, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, products, mapProducts, onProductSelect, onProductAddToCart, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
720
|
+
declare function useAIAutocomplete({ onSubmit, onResult, onError, optionOverrides, maskCompletedText, apiConfig, additionalContext, language, currency, productId, visitorId, columns, dropdownTrigger, optionsPosition, closeDropdownOnBlur, showNonTappableOptions, locationSearch, showOptionIcons, showOptionImages, showOptionCounts, showSkipButton, showProducts, productImageFallback, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, products, mapProducts, onProductSelect, onProductAddToCart, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
682
721
|
|
|
683
722
|
export { AIAutocomplete, AIAutocompleteDropdown, type AIAutocompleteDropdownProps, type AIAutocompleteHandle, type AIAutocompleteProps, type UseAIAutocompleteOptions, type UseAIAutocompleteReturn, useAIAutocomplete };
|