@depict-ai/react-ui 4.1.0 → 4.1.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/ES10/index.cjs +119 -100
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +119 -100
- package/latest/index.cjs +115 -95
- package/latest/index.d.ts +1 -1
- package/latest/index.js +115 -95
- package/package.json +2 -2
- package/server/ES10/index.cjs +1 -1
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +1 -1
- package/server/latest/index.cjs +1 -1
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +1 -1
package/latest/index.cjs
CHANGED
|
@@ -23,14 +23,14 @@ $parcel$export(module.exports, "QuickLinks", () => $f16af0e861aff3d0$export$466c
|
|
|
23
23
|
$parcel$export(module.exports, "BreadCrumbs", () => $d88e98b11c182b8e$export$5646050d516e06bc);
|
|
24
24
|
$parcel$export(module.exports, "ComponentAligner", () => $883a881f7926405d$export$80e99ee6b29cadd2);
|
|
25
25
|
$parcel$export(module.exports, "DepictProvider", () => $24b00503eef73528$export$9fac37a9c21c2f3b);
|
|
26
|
-
$parcel$export(module.exports, "CategoryPage", () => $
|
|
27
|
-
$parcel$export(module.exports, "SearchPage", () => $
|
|
26
|
+
$parcel$export(module.exports, "CategoryPage", () => $03d75efbc2476217$export$f7d2f673fc2f091d);
|
|
27
|
+
$parcel$export(module.exports, "SearchPage", () => $4e47e1e003da166e$export$a54ec244c8863715);
|
|
28
28
|
$parcel$export(module.exports, "ImagePlaceholder", () => $df522c8a81ed5a01$export$3f37af283f8fb843);
|
|
29
29
|
$parcel$export(module.exports, "TextPlaceholder", () => $7c8b440edc188ad5$export$89c6019e4baa40b1);
|
|
30
30
|
$parcel$export(module.exports, "RecommendationGrid", () => $48732d1a919ddb4c$export$b0a773486c1c2312);
|
|
31
31
|
$parcel$export(module.exports, "RecommendationSlider", () => $8ffd7da37fdd46be$export$82cfdc85a4d15688);
|
|
32
32
|
$parcel$export(module.exports, "useSearchModal", () => $ae73b15c325f1b21$export$912994940e660d32);
|
|
33
|
-
$parcel$export(module.exports, "useSearchField", () => $
|
|
33
|
+
$parcel$export(module.exports, "useSearchField", () => $c8b22e24c4b8035c$export$9bb30bbe003b82e0);
|
|
34
34
|
$parcel$export(module.exports, "useFetchRecommendations", () => $a134ea100690b628$export$6501da23a2770fc);
|
|
35
35
|
$parcel$export(module.exports, "usePerformanceClient", () => $25c0a91312868994$export$38b98fae14bd1f64);
|
|
36
36
|
$parcel$export(module.exports, "useCategoryFilterHelpers", () => $a2654d3e936d0024$export$72616730c1fad2f4);
|
|
@@ -42,7 +42,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
|
|
|
42
42
|
$parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
|
|
43
43
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
44
44
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
45
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "4.1.
|
|
45
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "4.1.1";
|
|
46
46
|
const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
47
47
|
usedLocale: $2IzJs$solidjs.createSignal((0, $2IzJs$depictaiuilocales.defaultLocale)),
|
|
48
48
|
search_instances: new Map(),
|
|
@@ -60,21 +60,21 @@ const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
|
60
60
|
enable_content_search: $2IzJs$solidjs.createSignal(),
|
|
61
61
|
disable_override_listing_id: $2IzJs$solidjs.createSignal()
|
|
62
62
|
};
|
|
63
|
-
let $
|
|
64
|
-
let $
|
|
65
|
-
function $
|
|
66
|
-
$
|
|
63
|
+
let $69121eedef466fe9$var$run_on_href_change;
|
|
64
|
+
let $69121eedef466fe9$var$old_href = location.href;
|
|
65
|
+
function $69121eedef466fe9$export$74f3924c5027fe1d(cb) {
|
|
66
|
+
$69121eedef466fe9$var$run_on_href_change = cb;
|
|
67
67
|
}
|
|
68
68
|
(0, $2IzJs$depictaiutilishared.instant_exec_on_suspect_history_change).add($2IzJs$depictaiutilishared.catchify(() => {
|
|
69
69
|
const {
|
|
70
70
|
href: href
|
|
71
71
|
} = location;
|
|
72
|
-
if ($
|
|
73
|
-
$
|
|
72
|
+
if ($69121eedef466fe9$var$run_on_href_change && $69121eedef466fe9$var$old_href !== href) $69121eedef466fe9$var$run_on_href_change(href);
|
|
73
|
+
$69121eedef466fe9$var$old_href = href;
|
|
74
74
|
}));
|
|
75
|
-
const $
|
|
76
|
-
const $
|
|
77
|
-
function $
|
|
75
|
+
const $69121eedef466fe9$export$775e6b3892b5ad52 = (url = location) => url.pathname == $2IzJs$solidjs.untrack((0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_[0]); // might have changed therefore get it from globalState
|
|
76
|
+
const $69121eedef466fe9$export$30c8a12df09be0e4 = (url = location) => (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).known_category_paths.has(url.pathname);
|
|
77
|
+
function $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
78
78
|
solid_component: solid_component,
|
|
79
79
|
props: props,
|
|
80
80
|
wrapper_type = "div",
|
|
@@ -107,7 +107,7 @@ function $b4d0d98857ed9934$export$f6e64e17bd69eeef({
|
|
|
107
107
|
const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
|
|
108
108
|
return dispose;
|
|
109
109
|
}, []);
|
|
110
|
-
return
|
|
110
|
+
return /*#__PURE__*/$2IzJs$react.createElement((0, $2IzJs$react.Fragment), null, /*#__PURE__*/$2IzJs$react.createElement(wrapper_type, {
|
|
111
111
|
ref: wrapper_element_ref,
|
|
112
112
|
style: wrapper_style,
|
|
113
113
|
...(hydrate_function_when_ssr ? {
|
|
@@ -119,43 +119,13 @@ function $b4d0d98857ed9934$export$f6e64e17bd69eeef({
|
|
|
119
119
|
} : {})
|
|
120
120
|
}), ...portals);
|
|
121
121
|
}
|
|
122
|
-
function $b4d0d98857ed9934$export$e5139bbbb9a05035(component, is_set) {
|
|
123
|
-
const unset = Symbol();
|
|
124
|
-
const [args, setArgs] = $2IzJs$solidjs.createSignal(unset);
|
|
125
|
-
const default_is_set = $2IzJs$solidjs.createMemo(() => !!((0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).merchant[0]() && (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).market[0]() && (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).usedLocale[0]()?.backend_locale_));
|
|
126
|
-
const should_show = $2IzJs$solidjs.createMemo(prev => {
|
|
127
|
-
if (!prev && (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).provider_is_updating[0]())
|
|
128
|
-
// Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
|
|
129
|
-
// If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
|
|
130
|
-
// Otherwise as soon as tenant and market is set we render the CategoryPage, but we might not have a DepictCategory yet, see https://depictaiworkspace.slack.com/archives/C04UZ2Z0RNE/p1690895918347289?thread_ts=1688391305.529449&cid=C04UZ2Z0RNE
|
|
131
|
-
return false;
|
|
132
|
-
return (is_set || default_is_set)();
|
|
133
|
-
});
|
|
134
|
-
// @ts-ignore
|
|
135
|
-
const renderedShow = $2IzJs$solidjs.createComponent((0, $2IzJs$solidjs.Show), {
|
|
136
|
-
get when() {
|
|
137
|
-
// Need to wait with rendering component until we've actually received the args
|
|
138
|
-
return should_show() && args() !== unset;
|
|
139
|
-
},
|
|
140
|
-
get children() {
|
|
141
|
-
return component(...$2IzJs$solidjs.untrack(args));
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
// Previously we did above logic in the function that we return here, but we can't do that since in solid-js insertExpression it says `while (typeof v === "function") v = v();`, that means that if a component returns a function containing a signal value, that signal value changing would lead to the entire component re-rendering.
|
|
145
|
-
// Instead, we have to create our show logic and everything that actually needs an owner above and only return a signal getter that isn't created with the same owner as it's called
|
|
146
|
-
// Relevant debugging playground links: https://playground.solidjs.com/anonymous/9b9bdca1-1fe6-4865-a6e7-850026d07a74, https://playground.solidjs.com/anonymous/cfd5e6cd-6931-43dd-aa9e-c73c855010c6, https://playground.solidjs.com/anonymous/c8b019a6-0cda-4863-8345-f42e1616d714
|
|
147
|
-
return (...args) => {
|
|
148
|
-
setArgs(args);
|
|
149
|
-
return renderedShow;
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
122
|
let $6319748b4f0426f0$var$set = false;
|
|
153
123
|
let $6319748b4f0426f0$var$padding_animation;
|
|
154
124
|
function $6319748b4f0426f0$export$6453cbc34515a94d() {
|
|
155
125
|
/// WARNING WARNING WARNING
|
|
156
126
|
// If you are debugging scroll restoration, make sure you're not in strict mode!!!!! Scroll restoration in nextjs won't work in strict mode because react will nuke all our elements from the DOM and render them again during going back
|
|
157
127
|
// Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
|
|
158
|
-
const are_on_search_or_category_page = () => $
|
|
128
|
+
const are_on_search_or_category_page = () => $69121eedef466fe9$export$775e6b3892b5ad52() || $69121eedef466fe9$export$30c8a12df09be0e4();
|
|
159
129
|
if ($6319748b4f0426f0$var$set) return; // Just being safe
|
|
160
130
|
$6319748b4f0426f0$var$set = true;
|
|
161
131
|
// We used to initialise this variable with false which in some cases (scroll to top button in FloatingButtons) would cause the scroll to be blocked when it shouldn't (see https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686141321127089?thread_ts=1686134246.109689&cid=C058KQ3MU8Z)
|
|
@@ -178,8 +148,8 @@ function $6319748b4f0426f0$export$6453cbc34515a94d() {
|
|
|
178
148
|
const [get_category_page_in_dom] = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).category_page_in_dom;
|
|
179
149
|
const search_page_in_dom = $2IzJs$solidjs.untrack(get_search_page_in_dom);
|
|
180
150
|
const category_page_in_dom = $2IzJs$solidjs.untrack(get_category_page_in_dom);
|
|
181
|
-
const new_is_search = $
|
|
182
|
-
const new_is_category = $
|
|
151
|
+
const new_is_search = $69121eedef466fe9$export$775e6b3892b5ad52();
|
|
152
|
+
const new_is_category = $69121eedef466fe9$export$30c8a12df09be0e4();
|
|
183
153
|
let accessor_to_wait_for;
|
|
184
154
|
if (search_page_in_dom && new_is_search || category_page_in_dom && new_is_category) {
|
|
185
155
|
// Already on the page we're going to
|
|
@@ -242,9 +212,9 @@ const $bc389476eeb2b615$export$599d4515591ef232 = (relativeUrl, isReplace, scrol
|
|
|
242
212
|
Page[Page["SEARCH"] = 1] = "SEARCH";
|
|
243
213
|
Page[Page["CATEGORY"] = 2] = "CATEGORY";
|
|
244
214
|
})(Page || (Page = {}));
|
|
245
|
-
const current_page = $
|
|
215
|
+
const current_page = $69121eedef466fe9$export$775e6b3892b5ad52() ? Page.SEARCH : $69121eedef466fe9$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
|
|
246
216
|
const target_u_o = new URL(relativeUrl, location.origin);
|
|
247
|
-
const target_page = $
|
|
217
|
+
const target_page = $69121eedef466fe9$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $69121eedef466fe9$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
|
|
248
218
|
window.next.router[isReplace ? "replace" : "push"](relativeUrl, undefined, {
|
|
249
219
|
shallow: current_page === target_page && target_page !== Page.OTHER,
|
|
250
220
|
scroll:
|
|
@@ -583,14 +553,41 @@ function $7ba951bfed42cf93$export$84601d922bd37be1(blocks, component_portals, se
|
|
|
583
553
|
};
|
|
584
554
|
});
|
|
585
555
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
556
|
+
function $1e18e5335ff79474$export$eb5844afe948564b(props) {
|
|
557
|
+
const default_is_set = $2IzJs$solidjs.createMemo(() => !!((0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).merchant[0]() && (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).market[0]() && (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).usedLocale[0]()?.backend_locale_));
|
|
558
|
+
const should_show = $2IzJs$solidjs.createMemo(prev => {
|
|
559
|
+
if (!prev && (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).provider_is_updating[0]())
|
|
560
|
+
// Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
|
|
561
|
+
// If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
|
|
562
|
+
// Otherwise as soon as tenant and market is set we render the CategoryPage, but we might not have a DepictCategory yet, see https://depictaiworkspace.slack.com/archives/C04UZ2Z0RNE/p1690895918347289?thread_ts=1688391305.529449&cid=C04UZ2Z0RNE
|
|
563
|
+
return false;
|
|
564
|
+
return (props.isSet || default_is_set)();
|
|
565
|
+
});
|
|
566
|
+
return $2IzJs$solidjsweb.createComponent((0, $2IzJs$solidjs.Show), {
|
|
567
|
+
get when() {
|
|
568
|
+
return should_show();
|
|
569
|
+
},
|
|
570
|
+
get children() {
|
|
571
|
+
return props.children;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
const $4e47e1e003da166e$var$rendered_components_with_state_key = new Set();
|
|
576
|
+
function $4e47e1e003da166e$export$a54ec244c8863715(props) {
|
|
577
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
578
|
+
solid_component: (...args) => {
|
|
579
|
+
// Work around some kind of babel bug where an optimisation turns ...args into `arguments` in the ES10 build which becomes the wrong arguments when read from teh getter
|
|
580
|
+
const ourArguments = args;
|
|
581
|
+
return $2IzJs$solidjsweb.createComponent((0, $1e18e5335ff79474$export$eb5844afe948564b), {
|
|
582
|
+
get children() {
|
|
583
|
+
return $4e47e1e003da166e$var$SolidSearchPage(...ourArguments);
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
},
|
|
590
587
|
props: props
|
|
591
588
|
});
|
|
592
589
|
}
|
|
593
|
-
function $
|
|
590
|
+
function $4e47e1e003da166e$var$SolidSearchPage(props, set_portals) {
|
|
594
591
|
const depict_search = $2IzJs$solidjs.createMemo(() => {
|
|
595
592
|
const instance = $2506fd72fd4393aa$export$f4d89133c6985668("search", props.stateKey, "SearchPage");
|
|
596
593
|
$2IzJs$solidjs.onCleanup(() => {
|
|
@@ -613,7 +610,7 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
613
610
|
// This is because on the front page the search_query updating is blocked because it's not the search page, and that means that `filtered_previous_searches` in Autocomplete.tsx doesn't filter out the current search query
|
|
614
611
|
// Because it's so minor and would be quite hard to fix (one would need a second "actual search query" signal just for this purpose) it's wontfix for now
|
|
615
612
|
// EDIT: now that we're resetting this in the onCleanup of the memo above this might no longer be the case
|
|
616
|
-
write_signal(!$
|
|
613
|
+
write_signal(!$69121eedef466fe9$export$775e6b3892b5ad52(location));
|
|
617
614
|
};
|
|
618
615
|
const [, set_search_page_in_dom] = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_in_dom;
|
|
619
616
|
const component_portals = new Set();
|
|
@@ -621,18 +618,18 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
621
618
|
set_search_page_in_dom(true);
|
|
622
619
|
$2IzJs$solidjs.onCleanup(() => set_search_page_in_dom(false));
|
|
623
620
|
// react is really slow with disposing components, we want to avoid a flash of another search query when you click on a product and navigate away
|
|
624
|
-
$
|
|
621
|
+
$69121eedef466fe9$export$74f3924c5027fe1d(update_updating_blocked_signal); // if we navigate, re-check
|
|
625
622
|
$2IzJs$solidjs.createComputed(() => {
|
|
626
623
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
|
|
627
624
|
update_updating_blocked_signal();
|
|
628
625
|
});
|
|
629
|
-
$
|
|
626
|
+
$4e47e1e003da166e$var$search_page_path_checker();
|
|
630
627
|
return $2IzJs$solidjs.createMemo(() => {
|
|
631
628
|
const stateKey = $2IzJs$solidjs.untrack(() => props.stateKey);
|
|
632
|
-
if ($
|
|
629
|
+
if ($4e47e1e003da166e$var$rendered_components_with_state_key.has(stateKey)) throw new Error(`You have multiple SearchPage components with the same stateKey: ${stateKey}. Each SearchPage component must have a unique stateKey.`);
|
|
633
630
|
const transformed_content_blocks = $7ba951bfed42cf93$export$84601d922bd37be1(() => props.contentBlocksByRow, component_portals, set_portals);
|
|
634
|
-
$
|
|
635
|
-
$2IzJs$solidjs.onCleanup(() => $
|
|
631
|
+
$4e47e1e003da166e$var$rendered_components_with_state_key.add(stateKey);
|
|
632
|
+
$2IzJs$solidjs.onCleanup(() => $4e47e1e003da166e$var$rendered_components_with_state_key.delete(stateKey));
|
|
636
633
|
return $2IzJs$depictaiui.SearchPage({
|
|
637
634
|
// Default config goes here
|
|
638
635
|
get include_input_field() {
|
|
@@ -662,7 +659,7 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
662
659
|
/**
|
|
663
660
|
* Users often set the searchPagePath to something without the market which breaks everything using the searchPagePath internally, notably refining the search query. Add a warning for them.
|
|
664
661
|
*/
|
|
665
|
-
function $
|
|
662
|
+
function $4e47e1e003da166e$var$search_page_path_checker() {
|
|
666
663
|
let has_warned = false;
|
|
667
664
|
$2IzJs$solidjs.createEffect(() => {
|
|
668
665
|
if (has_warned) return;
|
|
@@ -678,17 +675,25 @@ function $7ad7a3d0011b7b1b$var$search_page_path_checker() {
|
|
|
678
675
|
}
|
|
679
676
|
});
|
|
680
677
|
}
|
|
681
|
-
const $
|
|
682
|
-
function $
|
|
683
|
-
return $
|
|
678
|
+
const $03d75efbc2476217$var$rendered_components_with_state_key = new Set();
|
|
679
|
+
function $03d75efbc2476217$export$f7d2f673fc2f091d(props) {
|
|
680
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
684
681
|
// @ts-ignore
|
|
685
|
-
solid_component: (...args) =>
|
|
682
|
+
solid_component: (...args) => {
|
|
683
|
+
// Work around some kind of babel bug where an optimisation turns ...args into `arguments` in the ES10 build which becomes the wrong arguments when read from teh getter
|
|
684
|
+
const ourArguments = args;
|
|
685
|
+
return $2IzJs$solidjsweb.createComponent((0, $1e18e5335ff79474$export$eb5844afe948564b), {
|
|
686
|
+
get children() {
|
|
687
|
+
return $03d75efbc2476217$var$SolidCategoryPage(...ourArguments);
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
},
|
|
686
691
|
props: props,
|
|
687
692
|
wrapper_type: "div",
|
|
688
693
|
wrapper_style: {}
|
|
689
694
|
});
|
|
690
695
|
}
|
|
691
|
-
function $
|
|
696
|
+
function $03d75efbc2476217$var$SolidCategoryPage(props, set_portals) {
|
|
692
697
|
const depict_category = $2IzJs$solidjs.createMemo(() => $2506fd72fd4393aa$export$f4d89133c6985668("category", props.stateKey, "CategoryPage") // stateKey can change
|
|
693
698
|
);
|
|
694
699
|
|
|
@@ -708,11 +713,11 @@ function $5aa5fcb9f8a2bebc$var$SolidCategoryPage(props, set_portals) {
|
|
|
708
713
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).known_category_paths.add(location.pathname);
|
|
709
714
|
}
|
|
710
715
|
});
|
|
711
|
-
const
|
|
716
|
+
const Category = () => $2IzJs$solidjs.createMemo(() => {
|
|
712
717
|
const stateKey = $2IzJs$solidjs.untrack(() => props.stateKey);
|
|
713
|
-
if ($
|
|
714
|
-
$
|
|
715
|
-
$2IzJs$solidjs.onCleanup(() => $
|
|
718
|
+
if ($03d75efbc2476217$var$rendered_components_with_state_key.has(stateKey)) throw new Error(`You have multiple CategoryPage components with the same stateKey: ${stateKey}. Each CategoryPage component must have a unique stateKey.`);
|
|
719
|
+
$03d75efbc2476217$var$rendered_components_with_state_key.add(stateKey);
|
|
720
|
+
$2IzJs$solidjs.onCleanup(() => $03d75efbc2476217$var$rendered_components_with_state_key.delete(stateKey));
|
|
716
721
|
const transformed_content_blocks = $7ba951bfed42cf93$export$84601d922bd37be1(() => props.contentBlocksByRow, component_portals, set_portals);
|
|
717
722
|
return $2IzJs$depictaiui.CategoryPage({
|
|
718
723
|
depict_category: depict_category(),
|
|
@@ -747,15 +752,24 @@ function $5aa5fcb9f8a2bebc$var$SolidCategoryPage(props, set_portals) {
|
|
|
747
752
|
})
|
|
748
753
|
});
|
|
749
754
|
});
|
|
750
|
-
return $
|
|
755
|
+
return $2IzJs$solidjsweb.createComponent((0, $1e18e5335ff79474$export$eb5844afe948564b), {
|
|
756
|
+
isSet: category_state_set,
|
|
757
|
+
get children() {
|
|
758
|
+
return $2IzJs$solidjsweb.createComponent(Category, {});
|
|
759
|
+
}
|
|
760
|
+
});
|
|
751
761
|
}
|
|
752
762
|
function $d88e98b11c182b8e$export$5646050d516e06bc(react_props) {
|
|
753
|
-
return $
|
|
754
|
-
solid_component: $
|
|
763
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
764
|
+
solid_component: solidProps => $2IzJs$solidjsweb.createComponent((0, $1e18e5335ff79474$export$eb5844afe948564b), {
|
|
765
|
+
get children() {
|
|
766
|
+
return $2IzJs$solidjsweb.createComponent($d88e98b11c182b8e$var$VanillaBreadcrumbs, solidProps);
|
|
767
|
+
}
|
|
768
|
+
}),
|
|
755
769
|
props: react_props
|
|
756
770
|
});
|
|
757
771
|
}
|
|
758
|
-
function $d88e98b11c182b8e$var$
|
|
772
|
+
function $d88e98b11c182b8e$var$VanillaBreadcrumbs(props) {
|
|
759
773
|
// memo so stateKey can be dynamically changed
|
|
760
774
|
return $2IzJs$solidjs.createMemo(() => {
|
|
761
775
|
const depict_category = $2506fd72fd4393aa$export$f4d89133c6985668("category", props.stateKey, "BreadCrumbs");
|
|
@@ -765,12 +779,16 @@ function $d88e98b11c182b8e$var$vanilla_breadcrumbs(props) {
|
|
|
765
779
|
});
|
|
766
780
|
}
|
|
767
781
|
function $f16af0e861aff3d0$export$466cdc317043f6cb(react_props = {}) {
|
|
768
|
-
return $
|
|
769
|
-
solid_component: $
|
|
782
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
783
|
+
solid_component: solidProps => $2IzJs$solidjsweb.createComponent((0, $1e18e5335ff79474$export$eb5844afe948564b), {
|
|
784
|
+
get children() {
|
|
785
|
+
return $2IzJs$solidjsweb.createComponent($f16af0e861aff3d0$var$VanillaQuickLinks, solidProps);
|
|
786
|
+
}
|
|
787
|
+
}),
|
|
770
788
|
props: react_props
|
|
771
789
|
});
|
|
772
790
|
}
|
|
773
|
-
function $f16af0e861aff3d0$var$
|
|
791
|
+
function $f16af0e861aff3d0$var$VanillaQuickLinks(props) {
|
|
774
792
|
// memo so stateKey can be dynamically changed
|
|
775
793
|
return $2IzJs$solidjs.createMemo(() => {
|
|
776
794
|
const depict_category = $2506fd72fd4393aa$export$f4d89133c6985668("category", props.stateKey, "QuickLinks");
|
|
@@ -784,7 +802,7 @@ const $df522c8a81ed5a01$export$3f37af283f8fb843 = raw_react_props => {
|
|
|
784
802
|
class: raw_react_props.className,
|
|
785
803
|
...raw_react_props
|
|
786
804
|
};
|
|
787
|
-
return $
|
|
805
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
788
806
|
solid_component: props_store => $2IzJs$depictaiui.ImagePlaceholder(props_store),
|
|
789
807
|
props: react_props,
|
|
790
808
|
wrapper_type: "span",
|
|
@@ -796,7 +814,7 @@ const $7c8b440edc188ad5$export$89c6019e4baa40b1 = raw_react_props => {
|
|
|
796
814
|
class: raw_react_props.className,
|
|
797
815
|
...raw_react_props
|
|
798
816
|
};
|
|
799
|
-
return $
|
|
817
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
800
818
|
solid_component: props_store => $2IzJs$depictaiui.TextPlaceholder(props_store),
|
|
801
819
|
props: react_props,
|
|
802
820
|
wrapper_type: "span",
|
|
@@ -818,7 +836,7 @@ function $67657ea54664baa8$export$4daadad26e48a2c7(props) {
|
|
|
818
836
|
}
|
|
819
837
|
function $8ffd7da37fdd46be$export$82cfdc85a4d15688(props) {
|
|
820
838
|
$67657ea54664baa8$export$4daadad26e48a2c7(props);
|
|
821
|
-
return $
|
|
839
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
822
840
|
solid_component: $8ffd7da37fdd46be$export$5abb40edfde2a843,
|
|
823
841
|
props: props
|
|
824
842
|
});
|
|
@@ -898,7 +916,7 @@ function $c6b960f2a07285c8$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
898
916
|
}
|
|
899
917
|
function $48732d1a919ddb4c$export$b0a773486c1c2312(props) {
|
|
900
918
|
$67657ea54664baa8$export$4daadad26e48a2c7(props);
|
|
901
|
-
return $
|
|
919
|
+
return $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
902
920
|
solid_component: (0, $c6b960f2a07285c8$export$e46079a2793e9ec7),
|
|
903
921
|
props: props,
|
|
904
922
|
hydrate_function_when_ssr: (0, $2IzJs$solidjsweb.hydrate),
|
|
@@ -945,25 +963,27 @@ function $ae73b15c325f1b21$export$912994940e660d32(params = {}) {
|
|
|
945
963
|
open: open
|
|
946
964
|
};
|
|
947
965
|
}
|
|
948
|
-
const $
|
|
966
|
+
const $c8b22e24c4b8035c$export$9bb30bbe003b82e0 = (props = {}) => {
|
|
949
967
|
// We should just export a plain SearchField component here, not a weird hook thing, but I don't want to make a breaking change. Just fixing the re-rendering issue for now.
|
|
950
968
|
// Create signal that persists across renders
|
|
951
969
|
const [[get_aligner_signal_value, set_aligner_signal_value]] = $2IzJs$react.useState($2IzJs$solidjs.createSignal());
|
|
952
970
|
// Update signal value when alignerRef changes
|
|
953
971
|
set_aligner_signal_value(props?.alignerRef);
|
|
954
972
|
// Make sure react never re-renders the actual SearchField component
|
|
955
|
-
const componentFunction = $2IzJs$react.useCallback(() => $
|
|
956
|
-
solid_component: $
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
973
|
+
const componentFunction = $2IzJs$react.useCallback(() => $69121eedef466fe9$export$f6e64e17bd69eeef({
|
|
974
|
+
solid_component: () => $2IzJs$solidjsweb.createComponent((0, $1e18e5335ff79474$export$eb5844afe948564b), {
|
|
975
|
+
get children() {
|
|
976
|
+
return $2IzJs$solidjs.createMemo(() => {
|
|
977
|
+
const depict_search = $2506fd72fd4393aa$export$f4d89133c6985668("search", props.stateKey, "useSearchField");
|
|
978
|
+
return $2IzJs$depictaiui.SearchField({
|
|
979
|
+
depict_search: depict_search,
|
|
980
|
+
get aligner_ref() {
|
|
981
|
+
// React mutates the object at some random time so only get the current value once it actually is requested
|
|
982
|
+
return get_aligner_signal_value()?.current;
|
|
983
|
+
}
|
|
984
|
+
});
|
|
965
985
|
});
|
|
966
|
-
}
|
|
986
|
+
}
|
|
967
987
|
}),
|
|
968
988
|
props: {}
|
|
969
989
|
}), []);
|
|
@@ -1087,9 +1107,9 @@ const $e387bd534de10acd$export$804fac5697cfbe35 = router => (relativeUrl, {
|
|
|
1087
1107
|
Page[Page["SEARCH"] = 1] = "SEARCH";
|
|
1088
1108
|
Page[Page["CATEGORY"] = 2] = "CATEGORY";
|
|
1089
1109
|
})(Page || (Page = {}));
|
|
1090
|
-
const current_page = $
|
|
1110
|
+
const current_page = $69121eedef466fe9$export$775e6b3892b5ad52() ? Page.SEARCH : $69121eedef466fe9$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
|
|
1091
1111
|
const target_u_o = new URL(relativeUrl, location.origin);
|
|
1092
|
-
const target_page = $
|
|
1112
|
+
const target_page = $69121eedef466fe9$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $69121eedef466fe9$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
|
|
1093
1113
|
router[replace ? "replace" : "push"](relativeUrl, undefined, {
|
|
1094
1114
|
shallow: current_page === target_page && target_page !== Page.OTHER,
|
|
1095
1115
|
scroll:
|
package/latest/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, FC, ReactNode, ReactPortal, ReactElement } fr
|
|
|
3
3
|
import { BaseCategoryProviderConfig, BaseProviderConfig, BaseSearchProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ListingQuery, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations, FilterWithData } from "@depict-ai/ui/latest";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales/latest";
|
|
5
5
|
import { Display, ModernDisplay } from "@depict-ai/utilishared/latest";
|
|
6
|
-
export const version = "4.1.
|
|
6
|
+
export const version = "4.1.1";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|