@depict-ai/react-ui 0.0.104 → 0.0.105
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.d.ts +2 -3
- package/dist/main.js +13 -16
- package/dist/module.js +15 -18
- package/dist-server/index.d.ts +1 -1
- package/dist-server/main.js +1 -1
- package/dist-server/module.js +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BaseProductListingConfig, BaseProviderConfig, BaseSearchProviderConfig,
|
|
|
2
2
|
import { Display } from "@depict-ai/utilishared";
|
|
3
3
|
import React, { ReactNode, PropsWithChildren, ReactElement } from "react";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales";
|
|
5
|
-
export const version = "0.0.
|
|
5
|
+
export const version = "0.0.105";
|
|
6
6
|
interface PLPConfig<T extends Display> extends BaseProductListingConfig {
|
|
7
7
|
/**
|
|
8
8
|
* The product card to use for rendering products.
|
|
@@ -81,9 +81,8 @@ type ProviderConfig = BaseProviderConfig & {
|
|
|
81
81
|
*/
|
|
82
82
|
userId?: string;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* Options that are required for search functionality.
|
|
85
85
|
*/
|
|
86
|
-
metaData?: Record<string, string>;
|
|
87
86
|
search?: BaseSearchProviderConfig;
|
|
88
87
|
};
|
|
89
88
|
/**
|
package/dist/main.js
CHANGED
|
@@ -28,7 +28,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
|
|
|
28
28
|
$parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
|
|
29
29
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
30
30
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
31
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.
|
|
31
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.105";
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -92,6 +92,8 @@ const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
|
92
92
|
search: null,
|
|
93
93
|
category: null,
|
|
94
94
|
api: null,
|
|
95
|
+
userId: undefined,
|
|
96
|
+
sessionId: undefined,
|
|
95
97
|
metaData: undefined,
|
|
96
98
|
category_path: null,
|
|
97
99
|
search_page_path_: (0, $4GYXz$solidjs.createSignal)(),
|
|
@@ -191,23 +193,14 @@ const $bc389476eeb2b615$export$599d4515591ef232 = (relativeUrl, isReplace)=>{
|
|
|
191
193
|
|
|
192
194
|
|
|
193
195
|
|
|
194
|
-
|
|
195
|
-
const $24b00503eef73528$var$orig_user_id_fn = (0, $4GYXz$depictaiutilishared.get_user_id);
|
|
196
196
|
function $24b00503eef73528$export$9fac37a9c21c2f3b(props) {
|
|
197
|
-
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId } = props;
|
|
197
|
+
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId , sessionId: sessionId } = props;
|
|
198
198
|
const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.en);
|
|
199
199
|
const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
|
|
200
|
-
// Will run on other prop changes
|
|
201
|
-
(0, $
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
metaData
|
|
205
|
-
]);
|
|
206
|
-
(0, $4GYXz$react.useEffect)(()=>{
|
|
207
|
-
(0, $4GYXz$depictaiutilishared.set_user_id_fn)(userId ? ()=>userId : $24b00503eef73528$var$orig_user_id_fn);
|
|
208
|
-
}, [
|
|
209
|
-
userId
|
|
210
|
-
]);
|
|
200
|
+
// Will run on other prop changes, but harmless
|
|
201
|
+
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).userId = userId;
|
|
202
|
+
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).sessionId = sessionId;
|
|
203
|
+
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).metaData = metaData;
|
|
211
204
|
if (!market || !merchant) {
|
|
212
205
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).required_state_set_[1](false);
|
|
213
206
|
return (0, $4GYXz$react.createElement)((0, $4GYXz$react.Fragment), null, children);
|
|
@@ -223,7 +216,11 @@ function $24b00503eef73528$export$9fac37a9c21c2f3b(props) {
|
|
|
223
216
|
});
|
|
224
217
|
else (0, $bc389476eeb2b615$export$599d4515591ef232)(new_relative_url, is_replace);
|
|
225
218
|
};
|
|
226
|
-
if (!api) (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).api = new (0, $4GYXz$depictaiui.DepictAPI)(
|
|
219
|
+
if (!api) (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).api = new (0, $4GYXz$depictaiui.DepictAPI)({
|
|
220
|
+
get_metadata: async ()=>(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).metaData,
|
|
221
|
+
get_user_id: ()=>(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).userId,
|
|
222
|
+
get_session_id: ()=>(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).sessionId
|
|
223
|
+
});
|
|
227
224
|
if (searchPagePath) {
|
|
228
225
|
set_search_page_path($24b00503eef73528$var$ensure_correct_formatting(searchPagePath));
|
|
229
226
|
if (!search) (0, $4GYXz$solidjs.createRoot)(()=>(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search = new (0, $4GYXz$depictaiui.DepictSearch)({
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {add_to_version_info as $TZSbU$add_to_version_info,
|
|
1
|
+
import {add_to_version_info as $TZSbU$add_to_version_info, catchify as $TZSbU$catchify, observer as $TZSbU$observer, history_replacer as $TZSbU$history_replacer, queueMacroTask as $TZSbU$queueMacroTask, instant_exec_on_suspect_history_change as $TZSbU$instant_exec_on_suspect_history_change, ContainedPlaceholderImage as $TZSbU$ContainedPlaceholderImage, Placeholder as $TZSbU$Placeholder} from "@depict-ai/utilishared";
|
|
2
2
|
import {CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, fetchDepictRecommendations as $43099132aad1ceb6$re_export$fetchDepictRecommendations, DepictAPI as $TZSbU$DepictAPI, DepictSearch as $TZSbU$DepictSearch, DepictCategory as $TZSbU$DepictCategory, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage, CategoryPage as $TZSbU$CategoryPage, BreadCrumbs as $TZSbU$BreadCrumbs, QuickLinks as $TZSbU$QuickLinks, open_modal_with_alignment as $TZSbU$open_modal_with_alignment, SearchField as $TZSbU$SearchField} from "@depict-ai/ui";
|
|
3
3
|
import {createRoot as $TZSbU$createRoot, untrack as $TZSbU$untrack, createSignal as $TZSbU$createSignal, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, onCleanup as $TZSbU$onCleanup, createComputed as $TZSbU$createComputed} from "solid-js";
|
|
4
|
-
import {
|
|
4
|
+
import {createElement as $TZSbU$createElement, Fragment as $TZSbU$Fragment, useState as $TZSbU$useState, useRef as $TZSbU$useRef, useEffect as $TZSbU$useEffect, forwardRef as $TZSbU$forwardRef} from "react";
|
|
5
5
|
import {en as $TZSbU$en} from "@depict-ai/ui/locales";
|
|
6
6
|
import {render as $TZSbU$render} from "solid-js/web";
|
|
7
7
|
import {jsx as $TZSbU$jsx} from "react/jsx-runtime";
|
|
@@ -9,7 +9,7 @@ import {createPortal as $TZSbU$createPortal} from "react-dom";
|
|
|
9
9
|
|
|
10
10
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
11
11
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
12
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.
|
|
12
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.105";
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -73,6 +73,8 @@ const $42858f023ef23dab$export$8e769ad4338a911e = {
|
|
|
73
73
|
search: null,
|
|
74
74
|
category: null,
|
|
75
75
|
api: null,
|
|
76
|
+
userId: undefined,
|
|
77
|
+
sessionId: undefined,
|
|
76
78
|
metaData: undefined,
|
|
77
79
|
category_path: null,
|
|
78
80
|
search_page_path_: (0, $TZSbU$createSignal)(),
|
|
@@ -172,23 +174,14 @@ const $7216ca4c8308a0f9$export$599d4515591ef232 = (relativeUrl, isReplace)=>{
|
|
|
172
174
|
|
|
173
175
|
|
|
174
176
|
|
|
175
|
-
|
|
176
|
-
const $5376eb2a386cd90d$var$orig_user_id_fn = (0, $TZSbU$get_user_id);
|
|
177
177
|
function $5376eb2a386cd90d$export$9fac37a9c21c2f3b(props) {
|
|
178
|
-
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId } = props;
|
|
178
|
+
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId , sessionId: sessionId } = props;
|
|
179
179
|
const usedLocale = locale ?? (0, $TZSbU$en);
|
|
180
180
|
const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
|
|
181
|
-
// Will run on other prop changes
|
|
182
|
-
(0, $
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
metaData
|
|
186
|
-
]);
|
|
187
|
-
(0, $TZSbU$useEffect)(()=>{
|
|
188
|
-
(0, $TZSbU$set_user_id_fn)(userId ? ()=>userId : $5376eb2a386cd90d$var$orig_user_id_fn);
|
|
189
|
-
}, [
|
|
190
|
-
userId
|
|
191
|
-
]);
|
|
181
|
+
// Will run on other prop changes, but harmless
|
|
182
|
+
(0, $42858f023ef23dab$export$8e769ad4338a911e).userId = userId;
|
|
183
|
+
(0, $42858f023ef23dab$export$8e769ad4338a911e).sessionId = sessionId;
|
|
184
|
+
(0, $42858f023ef23dab$export$8e769ad4338a911e).metaData = metaData;
|
|
192
185
|
if (!market || !merchant) {
|
|
193
186
|
(0, $42858f023ef23dab$export$8e769ad4338a911e).required_state_set_[1](false);
|
|
194
187
|
return (0, $TZSbU$createElement)((0, $TZSbU$Fragment), null, children);
|
|
@@ -204,7 +197,11 @@ function $5376eb2a386cd90d$export$9fac37a9c21c2f3b(props) {
|
|
|
204
197
|
});
|
|
205
198
|
else (0, $7216ca4c8308a0f9$export$599d4515591ef232)(new_relative_url, is_replace);
|
|
206
199
|
};
|
|
207
|
-
if (!api) (0, $42858f023ef23dab$export$8e769ad4338a911e).api = new (0, $TZSbU$DepictAPI)(
|
|
200
|
+
if (!api) (0, $42858f023ef23dab$export$8e769ad4338a911e).api = new (0, $TZSbU$DepictAPI)({
|
|
201
|
+
get_metadata: async ()=>(0, $42858f023ef23dab$export$8e769ad4338a911e).metaData,
|
|
202
|
+
get_user_id: ()=>(0, $42858f023ef23dab$export$8e769ad4338a911e).userId,
|
|
203
|
+
get_session_id: ()=>(0, $42858f023ef23dab$export$8e769ad4338a911e).sessionId
|
|
204
|
+
});
|
|
208
205
|
if (searchPagePath) {
|
|
209
206
|
set_search_page_path($5376eb2a386cd90d$var$ensure_correct_formatting(searchPagePath));
|
|
210
207
|
if (!search) (0, $TZSbU$createRoot)(()=>(0, $42858f023ef23dab$export$8e769ad4338a911e).search = new (0, $TZSbU$DepictSearch)({
|
package/dist-server/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface UseSearchFieldReturn {
|
|
|
9
9
|
*/
|
|
10
10
|
SearchField: () => ReactElement;
|
|
11
11
|
}
|
|
12
|
-
export const version = "0.0.
|
|
12
|
+
export const version = "0.0.105";
|
|
13
13
|
export const fetchDepictRecommendations: any;
|
|
14
14
|
export function DepictProvider(props: any): any;
|
|
15
15
|
export function SearchPage(): any;
|
package/dist-server/main.js
CHANGED
|
@@ -20,7 +20,7 @@ $parcel$export(module.exports, "useSearchModal", () => $41e7e5d85b5e0d49$export$
|
|
|
20
20
|
$parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.
|
|
23
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.105";
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
const $41e7e5d85b5e0d49$export$58e808b1db15d3bc = ()=>{
|
package/dist-server/module.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/react-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.105",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"/locales"
|
|
97
97
|
],
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@depict-ai/plp-styling": "^
|
|
100
|
-
"@depict-ai/ui": "^
|
|
101
|
-
"@depict-ai/utilishared": "^
|
|
99
|
+
"@depict-ai/plp-styling": "^1.0.1",
|
|
100
|
+
"@depict-ai/ui": "^1.0.1",
|
|
101
|
+
"@depict-ai/utilishared": "^1.0.1",
|
|
102
102
|
"solid-js": "^1.7.3"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"@babel/preset-typescript": "latest",
|
|
112
112
|
"@babel/runtime": "latest",
|
|
113
113
|
"@babel/runtime-corejs3": "latest",
|
|
114
|
-
"@depict-ai/plp-styling": "^
|
|
114
|
+
"@depict-ai/plp-styling": "^1.0.1",
|
|
115
115
|
"@jest/globals": "^29.3.1",
|
|
116
116
|
"@parcel/babel-preset-env": "latest",
|
|
117
117
|
"@parcel/resolver-default": "^2.8.0",
|