@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/ES10/index.cjs
CHANGED
|
@@ -23,14 +23,14 @@ $parcel$export(module.exports, "QuickLinks", () => $df17258939eea14f$export$466c
|
|
|
23
23
|
$parcel$export(module.exports, "BreadCrumbs", () => $5f792cc5817de4b4$export$5646050d516e06bc);
|
|
24
24
|
$parcel$export(module.exports, "ComponentAligner", () => $6d02bf18967c1604$export$80e99ee6b29cadd2);
|
|
25
25
|
$parcel$export(module.exports, "DepictProvider", () => $6f994ff16ce375bb$export$9fac37a9c21c2f3b);
|
|
26
|
-
$parcel$export(module.exports, "CategoryPage", () => $
|
|
27
|
-
$parcel$export(module.exports, "SearchPage", () => $
|
|
26
|
+
$parcel$export(module.exports, "CategoryPage", () => $b0f04d11b78e06c3$export$f7d2f673fc2f091d);
|
|
27
|
+
$parcel$export(module.exports, "SearchPage", () => $a81b3f46133355c5$export$a54ec244c8863715);
|
|
28
28
|
$parcel$export(module.exports, "ImagePlaceholder", () => $95af6193353bea10$export$3f37af283f8fb843);
|
|
29
29
|
$parcel$export(module.exports, "TextPlaceholder", () => $07e1b96355935829$export$89c6019e4baa40b1);
|
|
30
30
|
$parcel$export(module.exports, "RecommendationGrid", () => $8f89f8a832210d6b$export$b0a773486c1c2312);
|
|
31
31
|
$parcel$export(module.exports, "RecommendationSlider", () => $745b83c12baac3c0$export$82cfdc85a4d15688);
|
|
32
32
|
$parcel$export(module.exports, "useSearchModal", () => $0991f250194bf9f3$export$912994940e660d32);
|
|
33
|
-
$parcel$export(module.exports, "useSearchField", () => $
|
|
33
|
+
$parcel$export(module.exports, "useSearchField", () => $22f9dd60da27081f$export$9bb30bbe003b82e0);
|
|
34
34
|
$parcel$export(module.exports, "useFetchRecommendations", () => $2ea1d71b29581906$export$6501da23a2770fc);
|
|
35
35
|
$parcel$export(module.exports, "usePerformanceClient", () => $18f442be2cc59de2$export$38b98fae14bd1f64);
|
|
36
36
|
$parcel$export(module.exports, "useCategoryFilterHelpers", () => $b8893da801486712$export$72616730c1fad2f4);
|
|
@@ -42,7 +42,7 @@ $parcel$export(module.exports, "version", () => $efbdd2dab4314170$export$83d89fb
|
|
|
42
42
|
$parcel$export(module.exports, "Navigation", () => $0d3a2413fdeb34b9$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 $efbdd2dab4314170$export$83d89fbfd8236492 = "4.1.
|
|
45
|
+
const $efbdd2dab4314170$export$83d89fbfd8236492 = "4.1.1";
|
|
46
46
|
const $ef516b1f92253963$export$8e769ad4338a911e = {
|
|
47
47
|
usedLocale: $2kiy7$solidjs.createSignal((0, $2kiy7$depictaiuilocales.defaultLocale)),
|
|
48
48
|
search_instances: new Map(),
|
|
@@ -60,27 +60,27 @@ const $ef516b1f92253963$export$8e769ad4338a911e = {
|
|
|
60
60
|
enable_content_search: $2kiy7$solidjs.createSignal(),
|
|
61
61
|
disable_override_listing_id: $2kiy7$solidjs.createSignal()
|
|
62
62
|
};
|
|
63
|
-
let $
|
|
64
|
-
let $
|
|
65
|
-
function $
|
|
66
|
-
$
|
|
63
|
+
let $f8d878722c3bc07d$var$run_on_href_change;
|
|
64
|
+
let $f8d878722c3bc07d$var$old_href = location.href;
|
|
65
|
+
function $f8d878722c3bc07d$export$74f3924c5027fe1d(cb) {
|
|
66
|
+
$f8d878722c3bc07d$var$run_on_href_change = cb;
|
|
67
67
|
}
|
|
68
68
|
(0, $2kiy7$depictaiutilishared.instant_exec_on_suspect_history_change).add($2kiy7$depictaiutilishared.catchify(() => {
|
|
69
69
|
const {
|
|
70
70
|
href: href
|
|
71
71
|
} = location;
|
|
72
|
-
if ($
|
|
73
|
-
$
|
|
72
|
+
if ($f8d878722c3bc07d$var$run_on_href_change && $f8d878722c3bc07d$var$old_href !== href) $f8d878722c3bc07d$var$run_on_href_change(href);
|
|
73
|
+
$f8d878722c3bc07d$var$old_href = href;
|
|
74
74
|
}));
|
|
75
|
-
const $
|
|
75
|
+
const $f8d878722c3bc07d$export$775e6b3892b5ad52 = function () {
|
|
76
76
|
let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location;
|
|
77
77
|
return url.pathname == $2kiy7$solidjs.untrack((0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_path_[0]);
|
|
78
78
|
}; // might have changed therefore get it from globalState
|
|
79
|
-
const $
|
|
79
|
+
const $f8d878722c3bc07d$export$30c8a12df09be0e4 = function () {
|
|
80
80
|
let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location;
|
|
81
81
|
return (0, $ef516b1f92253963$export$8e769ad4338a911e).known_category_paths.has(url.pathname);
|
|
82
82
|
};
|
|
83
|
-
function $
|
|
83
|
+
function $f8d878722c3bc07d$export$f6e64e17bd69eeef(_ref) {
|
|
84
84
|
let {
|
|
85
85
|
solid_component: solid_component,
|
|
86
86
|
props: props,
|
|
@@ -115,7 +115,7 @@ function $e7ba61a7074c02d3$export$f6e64e17bd69eeef(_ref) {
|
|
|
115
115
|
const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
|
|
116
116
|
return dispose;
|
|
117
117
|
}, []);
|
|
118
|
-
return
|
|
118
|
+
return /*#__PURE__*/$2kiy7$react.createElement((0, $2kiy7$react.Fragment), null, /*#__PURE__*/$2kiy7$react.createElement(wrapper_type, {
|
|
119
119
|
ref: wrapper_element_ref,
|
|
120
120
|
style: wrapper_style,
|
|
121
121
|
...(hydrate_function_when_ssr ? {
|
|
@@ -127,40 +127,6 @@ function $e7ba61a7074c02d3$export$f6e64e17bd69eeef(_ref) {
|
|
|
127
127
|
} : {})
|
|
128
128
|
}), ...portals);
|
|
129
129
|
}
|
|
130
|
-
function $e7ba61a7074c02d3$export$e5139bbbb9a05035(component, is_set) {
|
|
131
|
-
const unset = Symbol();
|
|
132
|
-
const [args, setArgs] = $2kiy7$solidjs.createSignal(unset);
|
|
133
|
-
const default_is_set = $2kiy7$solidjs.createMemo(() => {
|
|
134
|
-
var _globalState$usedLoca;
|
|
135
|
-
return !!((0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[0]() && (0, $ef516b1f92253963$export$8e769ad4338a911e).market[0]() && (_globalState$usedLoca = (0, $ef516b1f92253963$export$8e769ad4338a911e).usedLocale[0]()) !== null && _globalState$usedLoca !== void 0 && _globalState$usedLoca.backend_locale_);
|
|
136
|
-
});
|
|
137
|
-
const should_show = $2kiy7$solidjs.createMemo(prev => {
|
|
138
|
-
if (!prev && (0, $ef516b1f92253963$export$8e769ad4338a911e).provider_is_updating[0]())
|
|
139
|
-
// Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
|
|
140
|
-
// If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
|
|
141
|
-
// 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
|
|
142
|
-
return false;
|
|
143
|
-
return (is_set || default_is_set)();
|
|
144
|
-
});
|
|
145
|
-
// @ts-ignore
|
|
146
|
-
const renderedShow = $2kiy7$solidjs.createComponent((0, $2kiy7$solidjs.Show), {
|
|
147
|
-
get when() {
|
|
148
|
-
// Need to wait with rendering component until we've actually received the args
|
|
149
|
-
return should_show() && args() !== unset;
|
|
150
|
-
},
|
|
151
|
-
get children() {
|
|
152
|
-
return component(...$2kiy7$solidjs.untrack(args));
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
// 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.
|
|
156
|
-
// 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
|
|
157
|
-
// 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
|
|
158
|
-
return function () {
|
|
159
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
160
|
-
setArgs(args);
|
|
161
|
-
return renderedShow;
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
130
|
let $abe6528d061993d2$var$set = false;
|
|
165
131
|
let $abe6528d061993d2$var$padding_animation;
|
|
166
132
|
function $abe6528d061993d2$export$6453cbc34515a94d() {
|
|
@@ -168,7 +134,7 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
|
|
|
168
134
|
/// WARNING WARNING WARNING
|
|
169
135
|
// 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
|
|
170
136
|
// Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
|
|
171
|
-
const are_on_search_or_category_page = () => $
|
|
137
|
+
const are_on_search_or_category_page = () => $f8d878722c3bc07d$export$775e6b3892b5ad52() || $f8d878722c3bc07d$export$30c8a12df09be0e4();
|
|
172
138
|
if ($abe6528d061993d2$var$set) return; // Just being safe
|
|
173
139
|
$abe6528d061993d2$var$set = true;
|
|
174
140
|
// 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)
|
|
@@ -194,8 +160,8 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
|
|
|
194
160
|
const [get_category_page_in_dom] = (0, $ef516b1f92253963$export$8e769ad4338a911e).category_page_in_dom;
|
|
195
161
|
const search_page_in_dom = $2kiy7$solidjs.untrack(get_search_page_in_dom);
|
|
196
162
|
const category_page_in_dom = $2kiy7$solidjs.untrack(get_category_page_in_dom);
|
|
197
|
-
const new_is_search = $
|
|
198
|
-
const new_is_category = $
|
|
163
|
+
const new_is_search = $f8d878722c3bc07d$export$775e6b3892b5ad52();
|
|
164
|
+
const new_is_category = $f8d878722c3bc07d$export$30c8a12df09be0e4();
|
|
199
165
|
let accessor_to_wait_for;
|
|
200
166
|
if (search_page_in_dom && new_is_search || category_page_in_dom && new_is_category) {
|
|
201
167
|
// Already on the page we're going to
|
|
@@ -261,9 +227,9 @@ const $4a695f491f8300eb$export$599d4515591ef232 = (relativeUrl, isReplace, scrol
|
|
|
261
227
|
Page[Page["SEARCH"] = 1] = "SEARCH";
|
|
262
228
|
Page[Page["CATEGORY"] = 2] = "CATEGORY";
|
|
263
229
|
})(Page || (Page = {}));
|
|
264
|
-
const current_page = $
|
|
230
|
+
const current_page = $f8d878722c3bc07d$export$775e6b3892b5ad52() ? Page.SEARCH : $f8d878722c3bc07d$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
|
|
265
231
|
const target_u_o = new URL(relativeUrl, location.origin);
|
|
266
|
-
const target_page = $
|
|
232
|
+
const target_page = $f8d878722c3bc07d$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $f8d878722c3bc07d$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
|
|
267
233
|
window.next.router[isReplace ? "replace" : "push"](relativeUrl, undefined, {
|
|
268
234
|
shallow: current_page === target_page && target_page !== Page.OTHER,
|
|
269
235
|
scroll:
|
|
@@ -614,14 +580,45 @@ function $5e001d14635c1518$export$84601d922bd37be1(blocks, component_portals, se
|
|
|
614
580
|
};
|
|
615
581
|
});
|
|
616
582
|
}
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
583
|
+
function $c14f9d5966bcfc3c$export$eb5844afe948564b(props) {
|
|
584
|
+
const default_is_set = $2kiy7$solidjs.createMemo(() => {
|
|
585
|
+
var _globalState$usedLoca;
|
|
586
|
+
return !!((0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[0]() && (0, $ef516b1f92253963$export$8e769ad4338a911e).market[0]() && (_globalState$usedLoca = (0, $ef516b1f92253963$export$8e769ad4338a911e).usedLocale[0]()) !== null && _globalState$usedLoca !== void 0 && _globalState$usedLoca.backend_locale_);
|
|
587
|
+
});
|
|
588
|
+
const should_show = $2kiy7$solidjs.createMemo(prev => {
|
|
589
|
+
if (!prev && (0, $ef516b1f92253963$export$8e769ad4338a911e).provider_is_updating[0]())
|
|
590
|
+
// Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
|
|
591
|
+
// If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
|
|
592
|
+
// 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
|
|
593
|
+
return false;
|
|
594
|
+
return (props.isSet || default_is_set)();
|
|
595
|
+
});
|
|
596
|
+
return $2kiy7$solidjsweb.createComponent((0, $2kiy7$solidjs.Show), {
|
|
597
|
+
get when() {
|
|
598
|
+
return should_show();
|
|
599
|
+
},
|
|
600
|
+
get children() {
|
|
601
|
+
return props.children;
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
const $a81b3f46133355c5$var$rendered_components_with_state_key = new Set();
|
|
606
|
+
function $a81b3f46133355c5$export$a54ec244c8863715(props) {
|
|
607
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
608
|
+
solid_component: function () {
|
|
609
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
610
|
+
// 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
|
|
611
|
+
const ourArguments = args;
|
|
612
|
+
return $2kiy7$solidjsweb.createComponent((0, $c14f9d5966bcfc3c$export$eb5844afe948564b), {
|
|
613
|
+
get children() {
|
|
614
|
+
return $a81b3f46133355c5$var$SolidSearchPage(...ourArguments);
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
},
|
|
621
618
|
props: props
|
|
622
619
|
});
|
|
623
620
|
}
|
|
624
|
-
function $
|
|
621
|
+
function $a81b3f46133355c5$var$SolidSearchPage(props, set_portals) {
|
|
625
622
|
const depict_search = $2kiy7$solidjs.createMemo(() => {
|
|
626
623
|
const instance = $fe70497a7dcbe63d$export$f4d89133c6985668("search", props.stateKey, "SearchPage");
|
|
627
624
|
$2kiy7$solidjs.onCleanup(() => {
|
|
@@ -645,7 +642,7 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
|
|
|
645
642
|
// 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
|
|
646
643
|
// 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
|
|
647
644
|
// EDIT: now that we're resetting this in the onCleanup of the memo above this might no longer be the case
|
|
648
|
-
write_signal(!$
|
|
645
|
+
write_signal(!$f8d878722c3bc07d$export$775e6b3892b5ad52(location));
|
|
649
646
|
};
|
|
650
647
|
const [, set_search_page_in_dom] = (0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_in_dom;
|
|
651
648
|
const component_portals = new Set();
|
|
@@ -653,18 +650,18 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
|
|
|
653
650
|
set_search_page_in_dom(true);
|
|
654
651
|
$2kiy7$solidjs.onCleanup(() => set_search_page_in_dom(false));
|
|
655
652
|
// 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
|
|
656
|
-
$
|
|
653
|
+
$f8d878722c3bc07d$export$74f3924c5027fe1d(update_updating_blocked_signal); // if we navigate, re-check
|
|
657
654
|
$2kiy7$solidjs.createComputed(() => {
|
|
658
655
|
(0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
|
|
659
656
|
update_updating_blocked_signal();
|
|
660
657
|
});
|
|
661
|
-
$
|
|
658
|
+
$a81b3f46133355c5$var$search_page_path_checker();
|
|
662
659
|
return $2kiy7$solidjs.createMemo(() => {
|
|
663
660
|
const stateKey = $2kiy7$solidjs.untrack(() => props.stateKey);
|
|
664
|
-
if ($
|
|
661
|
+
if ($a81b3f46133355c5$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple SearchPage components with the same stateKey: ".concat(stateKey, ". Each SearchPage component must have a unique stateKey."));
|
|
665
662
|
const transformed_content_blocks = $5e001d14635c1518$export$84601d922bd37be1(() => props.contentBlocksByRow, component_portals, set_portals);
|
|
666
|
-
$
|
|
667
|
-
$2kiy7$solidjs.onCleanup(() => $
|
|
663
|
+
$a81b3f46133355c5$var$rendered_components_with_state_key.add(stateKey);
|
|
664
|
+
$2kiy7$solidjs.onCleanup(() => $a81b3f46133355c5$var$rendered_components_with_state_key.delete(stateKey));
|
|
668
665
|
return $2kiy7$depictaiui.SearchPage({
|
|
669
666
|
// Default config goes here
|
|
670
667
|
get include_input_field() {
|
|
@@ -696,7 +693,7 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
|
|
|
696
693
|
/**
|
|
697
694
|
* 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.
|
|
698
695
|
*/
|
|
699
|
-
function $
|
|
696
|
+
function $a81b3f46133355c5$var$search_page_path_checker() {
|
|
700
697
|
let has_warned = false;
|
|
701
698
|
$2kiy7$solidjs.createEffect(() => {
|
|
702
699
|
if (has_warned) return;
|
|
@@ -712,19 +709,26 @@ function $735104b46c50160f$var$search_page_path_checker() {
|
|
|
712
709
|
}
|
|
713
710
|
});
|
|
714
711
|
}
|
|
715
|
-
const $
|
|
716
|
-
function $
|
|
717
|
-
return $
|
|
712
|
+
const $b0f04d11b78e06c3$var$rendered_components_with_state_key = new Set();
|
|
713
|
+
function $b0f04d11b78e06c3$export$f7d2f673fc2f091d(props) {
|
|
714
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
718
715
|
// @ts-ignore
|
|
719
716
|
solid_component: function () {
|
|
720
|
-
|
|
717
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
718
|
+
// 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
|
|
719
|
+
const ourArguments = args;
|
|
720
|
+
return $2kiy7$solidjsweb.createComponent((0, $c14f9d5966bcfc3c$export$eb5844afe948564b), {
|
|
721
|
+
get children() {
|
|
722
|
+
return $b0f04d11b78e06c3$var$SolidCategoryPage(...ourArguments);
|
|
723
|
+
}
|
|
724
|
+
});
|
|
721
725
|
},
|
|
722
726
|
props: props,
|
|
723
727
|
wrapper_type: "div",
|
|
724
728
|
wrapper_style: {}
|
|
725
729
|
});
|
|
726
730
|
}
|
|
727
|
-
function $
|
|
731
|
+
function $b0f04d11b78e06c3$var$SolidCategoryPage(props, set_portals) {
|
|
728
732
|
const depict_category = $2kiy7$solidjs.createMemo(() => $fe70497a7dcbe63d$export$f4d89133c6985668("category", props.stateKey, "CategoryPage") // stateKey can change
|
|
729
733
|
);
|
|
730
734
|
|
|
@@ -744,11 +748,11 @@ function $15691268d8df90a9$var$SolidCategoryPage(props, set_portals) {
|
|
|
744
748
|
(0, $ef516b1f92253963$export$8e769ad4338a911e).known_category_paths.add(location.pathname);
|
|
745
749
|
}
|
|
746
750
|
});
|
|
747
|
-
const
|
|
751
|
+
const Category = () => $2kiy7$solidjs.createMemo(() => {
|
|
748
752
|
const stateKey = $2kiy7$solidjs.untrack(() => props.stateKey);
|
|
749
|
-
if ($
|
|
750
|
-
$
|
|
751
|
-
$2kiy7$solidjs.onCleanup(() => $
|
|
753
|
+
if ($b0f04d11b78e06c3$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple CategoryPage components with the same stateKey: ".concat(stateKey, ". Each CategoryPage component must have a unique stateKey."));
|
|
754
|
+
$b0f04d11b78e06c3$var$rendered_components_with_state_key.add(stateKey);
|
|
755
|
+
$2kiy7$solidjs.onCleanup(() => $b0f04d11b78e06c3$var$rendered_components_with_state_key.delete(stateKey));
|
|
752
756
|
const transformed_content_blocks = $5e001d14635c1518$export$84601d922bd37be1(() => props.contentBlocksByRow, component_portals, set_portals);
|
|
753
757
|
return $2kiy7$depictaiui.CategoryPage({
|
|
754
758
|
depict_category: depict_category(),
|
|
@@ -785,15 +789,24 @@ function $15691268d8df90a9$var$SolidCategoryPage(props, set_portals) {
|
|
|
785
789
|
})
|
|
786
790
|
});
|
|
787
791
|
});
|
|
788
|
-
return $
|
|
792
|
+
return $2kiy7$solidjsweb.createComponent((0, $c14f9d5966bcfc3c$export$eb5844afe948564b), {
|
|
793
|
+
isSet: category_state_set,
|
|
794
|
+
get children() {
|
|
795
|
+
return $2kiy7$solidjsweb.createComponent(Category, {});
|
|
796
|
+
}
|
|
797
|
+
});
|
|
789
798
|
}
|
|
790
799
|
function $5f792cc5817de4b4$export$5646050d516e06bc(react_props) {
|
|
791
|
-
return $
|
|
792
|
-
solid_component: $
|
|
800
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
801
|
+
solid_component: solidProps => $2kiy7$solidjsweb.createComponent((0, $c14f9d5966bcfc3c$export$eb5844afe948564b), {
|
|
802
|
+
get children() {
|
|
803
|
+
return $2kiy7$solidjsweb.createComponent($5f792cc5817de4b4$var$VanillaBreadcrumbs, solidProps);
|
|
804
|
+
}
|
|
805
|
+
}),
|
|
793
806
|
props: react_props
|
|
794
807
|
});
|
|
795
808
|
}
|
|
796
|
-
function $5f792cc5817de4b4$var$
|
|
809
|
+
function $5f792cc5817de4b4$var$VanillaBreadcrumbs(props) {
|
|
797
810
|
// memo so stateKey can be dynamically changed
|
|
798
811
|
return $2kiy7$solidjs.createMemo(() => {
|
|
799
812
|
const depict_category = $fe70497a7dcbe63d$export$f4d89133c6985668("category", props.stateKey, "BreadCrumbs");
|
|
@@ -804,12 +817,16 @@ function $5f792cc5817de4b4$var$vanilla_breadcrumbs(props) {
|
|
|
804
817
|
}
|
|
805
818
|
function $df17258939eea14f$export$466cdc317043f6cb() {
|
|
806
819
|
let react_props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
807
|
-
return $
|
|
808
|
-
solid_component: $
|
|
820
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
821
|
+
solid_component: solidProps => $2kiy7$solidjsweb.createComponent((0, $c14f9d5966bcfc3c$export$eb5844afe948564b), {
|
|
822
|
+
get children() {
|
|
823
|
+
return $2kiy7$solidjsweb.createComponent($df17258939eea14f$var$VanillaQuickLinks, solidProps);
|
|
824
|
+
}
|
|
825
|
+
}),
|
|
809
826
|
props: react_props
|
|
810
827
|
});
|
|
811
828
|
}
|
|
812
|
-
function $df17258939eea14f$var$
|
|
829
|
+
function $df17258939eea14f$var$VanillaQuickLinks(props) {
|
|
813
830
|
// memo so stateKey can be dynamically changed
|
|
814
831
|
return $2kiy7$solidjs.createMemo(() => {
|
|
815
832
|
const depict_category = $fe70497a7dcbe63d$export$f4d89133c6985668("category", props.stateKey, "QuickLinks");
|
|
@@ -823,7 +840,7 @@ const $95af6193353bea10$export$3f37af283f8fb843 = raw_react_props => {
|
|
|
823
840
|
class: raw_react_props.className,
|
|
824
841
|
...raw_react_props
|
|
825
842
|
};
|
|
826
|
-
return $
|
|
843
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
827
844
|
solid_component: props_store => $2kiy7$depictaiui.ImagePlaceholder(props_store),
|
|
828
845
|
props: react_props,
|
|
829
846
|
wrapper_type: "span",
|
|
@@ -835,7 +852,7 @@ const $07e1b96355935829$export$89c6019e4baa40b1 = raw_react_props => {
|
|
|
835
852
|
class: raw_react_props.className,
|
|
836
853
|
...raw_react_props
|
|
837
854
|
};
|
|
838
|
-
return $
|
|
855
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
839
856
|
solid_component: props_store => $2kiy7$depictaiui.TextPlaceholder(props_store),
|
|
840
857
|
props: react_props,
|
|
841
858
|
wrapper_type: "span",
|
|
@@ -858,7 +875,7 @@ function $6e5ce22b65512b0a$export$4daadad26e48a2c7(props) {
|
|
|
858
875
|
}
|
|
859
876
|
function $745b83c12baac3c0$export$82cfdc85a4d15688(props) {
|
|
860
877
|
$6e5ce22b65512b0a$export$4daadad26e48a2c7(props);
|
|
861
|
-
return $
|
|
878
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
862
879
|
solid_component: $745b83c12baac3c0$export$5abb40edfde2a843,
|
|
863
880
|
props: props
|
|
864
881
|
});
|
|
@@ -941,7 +958,7 @@ function $3b36cc844440a979$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
941
958
|
}
|
|
942
959
|
function $8f89f8a832210d6b$export$b0a773486c1c2312(props) {
|
|
943
960
|
$6e5ce22b65512b0a$export$4daadad26e48a2c7(props);
|
|
944
|
-
return $
|
|
961
|
+
return $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
945
962
|
solid_component: (0, $3b36cc844440a979$export$e46079a2793e9ec7),
|
|
946
963
|
props: props,
|
|
947
964
|
hydrate_function_when_ssr: (0, $2kiy7$solidjsweb.hydrate),
|
|
@@ -993,7 +1010,7 @@ function $0991f250194bf9f3$export$912994940e660d32() {
|
|
|
993
1010
|
open: open
|
|
994
1011
|
};
|
|
995
1012
|
}
|
|
996
|
-
const $
|
|
1013
|
+
const $22f9dd60da27081f$export$9bb30bbe003b82e0 = function () {
|
|
997
1014
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
998
1015
|
// 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.
|
|
999
1016
|
// Create signal that persists across renders
|
|
@@ -1001,19 +1018,21 @@ const $fea6ed5be1bf2b27$export$9bb30bbe003b82e0 = function () {
|
|
|
1001
1018
|
// Update signal value when alignerRef changes
|
|
1002
1019
|
set_aligner_signal_value(props === null || props === void 0 ? void 0 : props.alignerRef);
|
|
1003
1020
|
// Make sure react never re-renders the actual SearchField component
|
|
1004
|
-
const componentFunction = $2kiy7$react.useCallback(() => $
|
|
1005
|
-
solid_component: $
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1021
|
+
const componentFunction = $2kiy7$react.useCallback(() => $f8d878722c3bc07d$export$f6e64e17bd69eeef({
|
|
1022
|
+
solid_component: () => $2kiy7$solidjsweb.createComponent((0, $c14f9d5966bcfc3c$export$eb5844afe948564b), {
|
|
1023
|
+
get children() {
|
|
1024
|
+
return $2kiy7$solidjs.createMemo(() => {
|
|
1025
|
+
const depict_search = $fe70497a7dcbe63d$export$f4d89133c6985668("search", props.stateKey, "useSearchField");
|
|
1026
|
+
return $2kiy7$depictaiui.SearchField({
|
|
1027
|
+
depict_search: depict_search,
|
|
1028
|
+
get aligner_ref() {
|
|
1029
|
+
var _get_aligner_signal_v;
|
|
1030
|
+
// React mutates the object at some random time so only get the current value once it actually is requested
|
|
1031
|
+
return (_get_aligner_signal_v = get_aligner_signal_value()) === null || _get_aligner_signal_v === void 0 ? void 0 : _get_aligner_signal_v.current;
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1015
1034
|
});
|
|
1016
|
-
}
|
|
1035
|
+
}
|
|
1017
1036
|
}),
|
|
1018
1037
|
props: {}
|
|
1019
1038
|
}), []);
|
|
@@ -1150,9 +1169,9 @@ const $6bf91538dbdf0252$export$804fac5697cfbe35 = router => (relativeUrl, _ref)
|
|
|
1150
1169
|
Page[Page["SEARCH"] = 1] = "SEARCH";
|
|
1151
1170
|
Page[Page["CATEGORY"] = 2] = "CATEGORY";
|
|
1152
1171
|
})(Page || (Page = {}));
|
|
1153
|
-
const current_page = $
|
|
1172
|
+
const current_page = $f8d878722c3bc07d$export$775e6b3892b5ad52() ? Page.SEARCH : $f8d878722c3bc07d$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
|
|
1154
1173
|
const target_u_o = new URL(relativeUrl, location.origin);
|
|
1155
|
-
const target_page = $
|
|
1174
|
+
const target_page = $f8d878722c3bc07d$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $f8d878722c3bc07d$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
|
|
1156
1175
|
router[replace ? "replace" : "push"](relativeUrl, undefined, {
|
|
1157
1176
|
shallow: current_page === target_page && target_page !== Page.OTHER,
|
|
1158
1177
|
scroll:
|
package/ES10/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/ES10";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales/ES10";
|
|
5
5
|
import { Display, ModernDisplay } from "@depict-ai/utilishared/ES10";
|
|
6
|
-
export const version = "4.1.
|
|
6
|
+
export const version = "4.1.1";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|