@magicx-eng/ai-autocomplete-react 0.66.2 → 0.67.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/README.md +2 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +105 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -329,6 +329,8 @@ The dropdown shows a row of product cards under the options whenever there are p
|
|
|
329
329
|
|
|
330
330
|
Each response that read the catalog says which of the query's constraints it applied (`applied_filters`), which it dropped (`dropped_filters`) and how many items are left (`items.total`). Read it from `customFields` from the hook, or from `custom_fields` on `AutocompleteResult`. `null` means no catalog was read for that response. Details: [REFERENCE.md](https://unpkg.com/@magicx-eng/ai-autocomplete-react/REFERENCE.md), under "The catalog report".
|
|
331
331
|
|
|
332
|
+
When the search finds no item, `blocking_filters` names each condition whose removal finds items, with the count. The SDK greys out those chips and gives each a "×" that removes it, even with `showChipRemove` off. The chips are `blockingChips` from the hook; the opacity is the `--aia-blocking-chip-opacity` token (default `0.5`).
|
|
333
|
+
|
|
332
334
|
#### Change product cards before display
|
|
333
335
|
|
|
334
336
|
`mapProducts(products, items)` changes the cards before they show (to put in the shopper's own prices, say), and `refreshProducts()` maps them again when your data arrives. Details: [REFERENCE.md](https://unpkg.com/@magicx-eng/ai-autocomplete-react/REFERENCE.md), under "Change product cards before display".
|
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, 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, FocusInputOnSelect, 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, focusesInputOnSelect, formatDate, formatDateRange, formatOptionCount, formatPlace, formatTime, isTouchPrimary, 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, BlockingChip, CustomFieldsReport } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
2
|
+
export { APIConfig, APIKeyConfig, AccessTokenConfig, AccessTokenResult, AppearanceMode, AutocompleteResult, BlockingChip, BlockingFilter, CompletedParam, CompletedParamState, CurrencyOptions, CustomFieldsReport, DATE_RANGE_META_END, DATE_RANGE_META_START, DEFAULT_OPTION_COUNT_UNIT, DateMonthView, DateRange, ExpressedFilter, FilterOp, FocusInputOnSelect, 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, focusesInputOnSelect, formatDate, formatDateRange, formatOptionCount, formatPlace, formatTime, isTouchPrimary, 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';
|
|
@@ -687,6 +687,8 @@ interface UseAIAutocompleteReturn {
|
|
|
687
687
|
* pill has been tapped (the dropdown is open).
|
|
688
688
|
*/
|
|
689
689
|
isActivePillSelected: boolean;
|
|
690
|
+
/** The chips whose removal finds items when the search found none, largest total first. */
|
|
691
|
+
blockingChips: BlockingChip[];
|
|
690
692
|
placeholderText: string;
|
|
691
693
|
listboxId: string;
|
|
692
694
|
error: Error | null;
|
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, 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, FocusInputOnSelect, 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, focusesInputOnSelect, formatDate, formatDateRange, formatOptionCount, formatPlace, formatTime, isTouchPrimary, 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, BlockingChip, CustomFieldsReport } from '@magicx-eng/ai-autocomplete-vanilla';
|
|
2
|
+
export { APIConfig, APIKeyConfig, AccessTokenConfig, AccessTokenResult, AppearanceMode, AutocompleteResult, BlockingChip, BlockingFilter, CompletedParam, CompletedParamState, CurrencyOptions, CustomFieldsReport, DATE_RANGE_META_END, DATE_RANGE_META_START, DEFAULT_OPTION_COUNT_UNIT, DateMonthView, DateRange, ExpressedFilter, FilterOp, FocusInputOnSelect, 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, focusesInputOnSelect, formatDate, formatDateRange, formatOptionCount, formatPlace, formatTime, isTouchPrimary, 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';
|
|
@@ -687,6 +687,8 @@ interface UseAIAutocompleteReturn {
|
|
|
687
687
|
* pill has been tapped (the dropdown is open).
|
|
688
688
|
*/
|
|
689
689
|
isActivePillSelected: boolean;
|
|
690
|
+
/** The chips whose removal finds items when the search found none, largest total first. */
|
|
691
|
+
blockingChips: BlockingChip[];
|
|
690
692
|
placeholderText: string;
|
|
691
693
|
listboxId: string;
|
|
692
694
|
error: Error | null;
|