@nuskin/react-search-sdk 1.0.0 → 1.0.1-code-cleanup.2
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 +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +558 -363
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +558 -363
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
# @nuskin/react-search-sdk
|
|
2
2
|
|
|
3
|
-
The search experience for the
|
|
3
|
+
The search experience for the Nu Skin storefront: typeahead and recent searches over the Equinox
|
|
4
4
|
catalog, and the NUi agent when a signed-in shopper searches for something with no products.
|
|
5
5
|
|
|
6
6
|
A host renders one component, `CommerceSearch`, and gives it the market, who the customer is, how to
|
|
7
7
|
navigate, and its logo. The package works out the rest itself: the market's catalog lookup, the
|
|
8
8
|
minimum search length, which NUi app to use, the panel's text and the analytics events. The panel UI
|
|
9
|
-
comes from
|
|
9
|
+
comes from `@nuskin/react-search-components` and the agent from
|
|
10
10
|
`@nuskin/react-nui-chat-sdk`.
|
|
11
11
|
|
|
12
12
|
## Requirements
|
package/dist/index.d.mts
CHANGED
|
@@ -16,8 +16,8 @@ type NavigationTarget = {
|
|
|
16
16
|
/**
|
|
17
17
|
* The account types the suggestions API distinguishes, sent as `X-Customer-Type`.
|
|
18
18
|
*
|
|
19
|
-
* TODO: this set is a best guess from the values the storefront sends
|
|
20
|
-
*
|
|
19
|
+
* TODO: PA-1254 validates this set, which is a best guess from the values the storefront sends,
|
|
20
|
+
* against the storefront's customer types and what the suggestions API accepts.
|
|
21
21
|
*/
|
|
22
22
|
type CustomerAccountType = 'guest' | 'Brand Affiliate' | 'Retail Customer' | 'Preferred Customer/Member';
|
|
23
23
|
/** Who is searching. */
|
|
@@ -58,6 +58,6 @@ interface CommerceSearchProps {
|
|
|
58
58
|
* The package works out the rest itself: the market's catalog lookup, the minimum search length,
|
|
59
59
|
* which NUi app to use, the panel's text and the analytics fields.
|
|
60
60
|
*/
|
|
61
|
-
declare function CommerceSearch(
|
|
61
|
+
declare function CommerceSearch(props: Readonly<CommerceSearchProps>): ReactElement | null;
|
|
62
62
|
|
|
63
63
|
export { CommerceSearch, type CommerceSearchCustomer, type CommerceSearchProps, type CustomerAccountType, type NavigationTarget };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ type NavigationTarget = {
|
|
|
16
16
|
/**
|
|
17
17
|
* The account types the suggestions API distinguishes, sent as `X-Customer-Type`.
|
|
18
18
|
*
|
|
19
|
-
* TODO: this set is a best guess from the values the storefront sends
|
|
20
|
-
*
|
|
19
|
+
* TODO: PA-1254 validates this set, which is a best guess from the values the storefront sends,
|
|
20
|
+
* against the storefront's customer types and what the suggestions API accepts.
|
|
21
21
|
*/
|
|
22
22
|
type CustomerAccountType = 'guest' | 'Brand Affiliate' | 'Retail Customer' | 'Preferred Customer/Member';
|
|
23
23
|
/** Who is searching. */
|
|
@@ -58,6 +58,6 @@ interface CommerceSearchProps {
|
|
|
58
58
|
* The package works out the rest itself: the market's catalog lookup, the minimum search length,
|
|
59
59
|
* which NUi app to use, the panel's text and the analytics fields.
|
|
60
60
|
*/
|
|
61
|
-
declare function CommerceSearch(
|
|
61
|
+
declare function CommerceSearch(props: Readonly<CommerceSearchProps>): ReactElement | null;
|
|
62
62
|
|
|
63
63
|
export { CommerceSearch, type CommerceSearchCustomer, type CommerceSearchProps, type CustomerAccountType, type NavigationTarget };
|