@depict-ai/react-ui 0.0.52 → 0.0.54
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 +91 -40
- package/dist/main.js +113 -74
- package/dist/module.js +115 -77
- package/dist/styles/components/PLP/Buttons.scss +46 -0
- package/dist/styles/components/PLP/PLPResults.scss +6 -0
- package/dist/styles/components/PLP/ProductListingPage.scss +27 -2
- package/dist/styles/components/PLP/ScrollStatus.scss +8 -1
- package/dist/styles/components/PLP/SelectedFilters.scss +7 -0
- package/dist/styles/components/PLP/SlidableItems.scss +8 -0
- package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +9 -0
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +57 -0
- package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +4 -0
- package/dist/styles/components/PLP/Toast.scss +5 -0
- package/dist/styles/components/PLP/index.scss +14 -6
- package/dist/styles/components/category/BreadCrumbs.scss +13 -4
- package/dist/styles/components/category/CategoryTitle.scss +13 -2
- package/dist/styles/components/category/QuickLinks.scss +12 -4
- package/dist/styles/components/category/index.scss +5 -5
- package/dist/styles/components/search/QueryInput.scss +9 -0
- package/dist/styles/components/search/SearchModal.scss +8 -0
- package/dist/styles/components/search/SearchRecommendations.scss +3 -0
- package/dist/styles/components/search/ShowingResultsFor.scss +3 -0
- package/dist/styles/components/search/index.scss +5 -5
- package/dist/styles/default.css +1 -1
- package/dist/styles/index.scss +3 -48
- package/dist/styles/variables.scss +15 -3
- package/dist-server/index.d.ts +2 -1
- package/dist-server/main.js +7 -1
- package/dist-server/module.js +7 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SDKColsAtSize, SDKGridSpacing } from "@depict-ai/ui/dist";
|
|
2
|
+
import { Display } from "../../../lib/displays/Display";
|
|
3
|
+
import React, { ReactNode, PropsWithChildren } from "react";
|
|
2
4
|
import { Locale } from "@depict-ai/ui/locales";
|
|
3
|
-
import { Display } from "@depict-ai/utilishared";
|
|
4
|
-
|
|
5
|
+
import { DisplayWithVariants, Display as _Display1 } from "@depict-ai/utilishared";
|
|
6
|
+
interface PLPPageConfig<T extends Display> {
|
|
7
|
+
/**
|
|
8
|
+
* The product card to use for rendering products.
|
|
9
|
+
*/
|
|
10
|
+
productCard: DepictProductCard<T>;
|
|
11
|
+
/**
|
|
12
|
+
* How many columns to show at each media size.
|
|
13
|
+
* @default
|
|
14
|
+
* [[2, 901], [3, 1024], [4]]
|
|
15
|
+
* @example
|
|
16
|
+
* [[2, 901], [3, 1024], [4]]
|
|
17
|
+
* means 2 columns at sizes up to 901px, 3 columns at sizes up to 1024px and after that 4 columns at any size.
|
|
18
|
+
*/
|
|
19
|
+
columnsAtSize?: SDKColsAtSize;
|
|
20
|
+
/**
|
|
21
|
+
* The spacing between products.
|
|
22
|
+
* @default "2%"
|
|
23
|
+
* @example
|
|
24
|
+
* "2%", "10px", "1rem"
|
|
25
|
+
*/
|
|
26
|
+
gridSpacing?: SDKGridSpacing;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The Depict product card props.
|
|
30
|
+
*/
|
|
31
|
+
export interface DepictProductCardProps<T extends Display> {
|
|
32
|
+
/** The display data to render. */
|
|
33
|
+
display: T | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Depict product card to use for rendering products.
|
|
37
|
+
*/
|
|
38
|
+
export type DepictProductCard<T extends Display> = (props: DepictProductCardProps<T>) => ReactNode;
|
|
5
39
|
export function DepictSearchField(): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
6
40
|
type NavigateFunction = (href: string) => void;
|
|
7
41
|
type DepictSearchConfig = {
|
|
@@ -73,7 +107,7 @@ type DepictBaseConfig = {
|
|
|
73
107
|
* The locale to use for the Depict components.
|
|
74
108
|
* @default en
|
|
75
109
|
*/
|
|
76
|
-
locale
|
|
110
|
+
locale?: Locale;
|
|
77
111
|
};
|
|
78
112
|
/**
|
|
79
113
|
* The config for the DepictProvider.
|
|
@@ -124,40 +158,9 @@ export function DepictSearchHeader(): import("react").DetailedReactHTMLElement<{
|
|
|
124
158
|
* @returns {void}
|
|
125
159
|
*/
|
|
126
160
|
export function openModal(): void;
|
|
127
|
-
|
|
128
|
-
* The Depict product card props.
|
|
129
|
-
*/
|
|
130
|
-
export interface DepictProductCardProps<T extends Display> {
|
|
131
|
-
/** The display data to render. */
|
|
132
|
-
display: T | null;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Depict product card to use for rendering products.
|
|
136
|
-
*/
|
|
137
|
-
export type DepictProductCard<T extends Display> = (props: DepictProductCardProps<T>) => ReactNode;
|
|
138
|
-
interface SearchPageConfig<T extends Display> {
|
|
139
|
-
/**
|
|
140
|
-
* The product card to use for rendering products.
|
|
141
|
-
*/
|
|
142
|
-
productCard: DepictProductCard<T>;
|
|
143
|
-
/**
|
|
144
|
-
* How many columns to show at each media size.
|
|
145
|
-
* @default
|
|
146
|
-
* [[2, 901], [3, 1024], [4]]
|
|
147
|
-
* @example
|
|
148
|
-
* [[2, 901], [3, 1024], [4]]
|
|
149
|
-
* means 2 columns at sizes up to 901px, 3 columns at sizes up to 1024px and after that 4 columns at any size.
|
|
150
|
-
*/
|
|
151
|
-
columnsAtSize?: SDKColsAtSize;
|
|
152
|
-
/**
|
|
153
|
-
* The spacing between products.
|
|
154
|
-
* @default "2%"
|
|
155
|
-
* @example
|
|
156
|
-
* "2%", "10px", "1rem"
|
|
157
|
-
*/
|
|
158
|
-
gridSpacing?: SDKGridSpacing;
|
|
161
|
+
interface SearchPageConfig<T extends DisplayWithVariants> extends PLPPageConfig<T> {
|
|
159
162
|
/**
|
|
160
|
-
* Whether
|
|
163
|
+
* Whether to show the search input field in the search page.
|
|
161
164
|
* @default true
|
|
162
165
|
*/
|
|
163
166
|
includeInputField?: boolean;
|
|
@@ -168,7 +171,7 @@ interface SearchPageConfig<T extends Display> {
|
|
|
168
171
|
*
|
|
169
172
|
* @example
|
|
170
173
|
* ```tsx
|
|
171
|
-
* import { DepictProductCard, ImagePlaceholder, Display } from '@depict-ai/react-ui'
|
|
174
|
+
* import { DepictProductCard, ImagePlaceholder, Display, DepictSearchPage } from '@depict-ai/react-ui'
|
|
172
175
|
*
|
|
173
176
|
* function Search() {
|
|
174
177
|
* return <DepictSearchPage productCard={MyCustomSearchProductCard} />
|
|
@@ -202,7 +205,55 @@ interface SearchPageConfig<T extends Display> {
|
|
|
202
205
|
*
|
|
203
206
|
* ```
|
|
204
207
|
*/
|
|
205
|
-
export function DepictSearchPage<T extends
|
|
208
|
+
export function DepictSearchPage<T extends DisplayWithVariants>(props: SearchPageConfig<T>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
209
|
+
interface CategoryPageConfig<T extends _Display1> extends PLPPageConfig<T> {
|
|
210
|
+
/**
|
|
211
|
+
* The category id to show.
|
|
212
|
+
*/
|
|
213
|
+
categoryId: string;
|
|
214
|
+
showBreadcrumbs?: boolean;
|
|
215
|
+
showQuicklinks?: boolean;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* DepictCategoryPage is a component that renders a category page.
|
|
219
|
+
* @param props the props for the category page.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```tsx
|
|
223
|
+
* import { DepictProductCard, ImagePlaceholder, Display, DepictCategoryPage } from '@depict-ai/react-ui'
|
|
224
|
+
*
|
|
225
|
+
* function Category() {
|
|
226
|
+
* return <DepictCategoryPage categoryId="jeans" productCard={MyCustomCategoryProductCard} />
|
|
227
|
+
* }
|
|
228
|
+
*
|
|
229
|
+
* interface MyCustomDisplay extends Display {}
|
|
230
|
+
*
|
|
231
|
+
* export const MyCustomSearchProductCard: DepictProductCard<MyCustomDisplay> = ({
|
|
232
|
+
* display,
|
|
233
|
+
* }) => {
|
|
234
|
+
* if (!display) {
|
|
235
|
+
* return <ImagePlaceholder aspectRatio={3 / 4} />
|
|
236
|
+
* }
|
|
237
|
+
*
|
|
238
|
+
* return (
|
|
239
|
+
* <>
|
|
240
|
+
* <MyCustomProductCard
|
|
241
|
+
* product={{
|
|
242
|
+
* id: display.product_id,
|
|
243
|
+
* name: display.title,
|
|
244
|
+
* description: display.title,
|
|
245
|
+
* images: [{ url: display.image_url }],
|
|
246
|
+
* price: {
|
|
247
|
+
* value: display.sale_price,
|
|
248
|
+
* },
|
|
249
|
+
* }}
|
|
250
|
+
* />
|
|
251
|
+
* </>
|
|
252
|
+
* )
|
|
253
|
+
* }
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
export function DepictCategoryPage<T extends _Display1>(props: CategoryPageConfig<T>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
206
257
|
/**
|
|
207
258
|
* Props for the ImagePlaceholder component.
|
|
208
259
|
*/
|
|
@@ -233,7 +284,7 @@ interface TextPlaceholderProps {
|
|
|
233
284
|
}
|
|
234
285
|
/** A placeholder text that can be used in place of a text that is loading. */
|
|
235
286
|
export const TextPlaceholder: React.FC<TextPlaceholderProps>;
|
|
236
|
-
export const version = "0.0.
|
|
287
|
+
export const version = "0.0.54";
|
|
237
288
|
/**
|
|
238
289
|
* Helper function to navigate to a new page depending on the navigation library used.
|
|
239
290
|
*/
|
package/dist/main.js
CHANGED
|
@@ -3,9 +3,9 @@ var $4GYXz$depictaiui = require("@depict-ai/ui");
|
|
|
3
3
|
var $4GYXz$solidjs = require("solid-js");
|
|
4
4
|
var $4GYXz$solidjsweb = require("solid-js/web");
|
|
5
5
|
var $4GYXz$react = require("react");
|
|
6
|
-
var $4GYXz$depictaiuilocales = require("@depict-ai/ui/locales");
|
|
7
|
-
var $4GYXz$reactdom = require("react-dom");
|
|
8
6
|
var $4GYXz$reactjsxruntime = require("react/jsx-runtime");
|
|
7
|
+
var $4GYXz$reactdom = require("react-dom");
|
|
8
|
+
var $4GYXz$depictaiuilocales = require("@depict-ai/ui/locales");
|
|
9
9
|
|
|
10
10
|
function $parcel$export(e, n, v, s) {
|
|
11
11
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
@@ -16,6 +16,7 @@ $parcel$export(module.exports, "DepictProvider", () => $18b830ef84ac138a$export$
|
|
|
16
16
|
$parcel$export(module.exports, "openModal", () => $20bf907adee775ba$export$a7f6cffb6b8ba11c);
|
|
17
17
|
$parcel$export(module.exports, "DepictSearchHeader", () => $20bf907adee775ba$export$cbcd1ecdb41b1d0a);
|
|
18
18
|
$parcel$export(module.exports, "DepictSearchPage", () => $a6bedbe4b4d6d027$export$210723f5a54a7028);
|
|
19
|
+
$parcel$export(module.exports, "DepictCategoryPage", () => $a7b03ed69305c219$export$d87c61cecb2edf0d);
|
|
19
20
|
$parcel$export(module.exports, "ImagePlaceholder", () => $308b2c6db21be2eb$export$3f37af283f8fb843);
|
|
20
21
|
$parcel$export(module.exports, "TextPlaceholder", () => $afce04c26b0c4208$export$89c6019e4baa40b1);
|
|
21
22
|
$parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
|
|
@@ -27,6 +28,7 @@ $parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a6
|
|
|
27
28
|
|
|
28
29
|
const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
29
30
|
search: null,
|
|
31
|
+
category: null,
|
|
30
32
|
header_alignment: null,
|
|
31
33
|
search_page_path_: (0, $4GYXz$solidjs.createSignal)(),
|
|
32
34
|
required_state_set_: (0, $4GYXz$solidjs.createSignal)(false)
|
|
@@ -36,6 +38,8 @@ const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
|
|
41
|
+
|
|
42
|
+
|
|
39
43
|
let $b4d0d98857ed9934$var$run_on_href_change;
|
|
40
44
|
function $b4d0d98857ed9934$export$74f3924c5027fe1d(cb) {
|
|
41
45
|
$b4d0d98857ed9934$var$run_on_href_change = cb;
|
|
@@ -44,7 +48,7 @@ function $b4d0d98857ed9934$export$74f3924c5027fe1d(cb) {
|
|
|
44
48
|
for await (const href of (0, $4GYXz$depictaiutilishared.href_change_ipns))$b4d0d98857ed9934$var$run_on_href_change?.(href);
|
|
45
49
|
})();
|
|
46
50
|
const $b4d0d98857ed9934$export$6cb4d3a5c1ac9b43 = (url)=>url.pathname == (0, $4GYXz$solidjs.untrack)((0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_[0]); // might have changed therefore get it from globalState
|
|
47
|
-
function $b4d0d98857ed9934$export$f6e64e17bd69eeef(solid_component, props, wrapper_type = "div", wrapper_style = {}) {
|
|
51
|
+
function $b4d0d98857ed9934$export$f6e64e17bd69eeef(solid_component, props, wrapper_type = "div", wrapper_style = {}, render_cb) {
|
|
48
52
|
const [portals, set_portals] = (0, $4GYXz$react.useState)([]);
|
|
49
53
|
const wrapper_element_ref = (0, $4GYXz$react.useRef)();
|
|
50
54
|
(0, $4GYXz$react.useEffect)(()=>{
|
|
@@ -52,6 +56,7 @@ function $b4d0d98857ed9934$export$f6e64e17bd69eeef(solid_component, props, wrapp
|
|
|
52
56
|
const dispose = (0, $4GYXz$solidjsweb.render)(()=>solid_component(props, set_portals), wrapper_element);
|
|
53
57
|
return dispose;
|
|
54
58
|
}, []);
|
|
59
|
+
render_cb?.(props);
|
|
55
60
|
return (0, $4GYXz$react.createElement)(wrapper_type, {
|
|
56
61
|
ref: wrapper_element_ref,
|
|
57
62
|
style: wrapper_style
|
|
@@ -69,6 +74,38 @@ function $b4d0d98857ed9934$export$e5139bbbb9a05035(component) {
|
|
|
69
74
|
});
|
|
70
75
|
};
|
|
71
76
|
}
|
|
77
|
+
async function $b4d0d98857ed9934$export$79c79419c1ef0081({ display: display , info: info , component_portals: component_portals , set_portals: set_portals , react_template: react_template }) {
|
|
78
|
+
const solid_container = document.createElement("div");
|
|
79
|
+
const react_has_rendered = new Promise((r)=>{
|
|
80
|
+
const m_o = new MutationObserver(()=>{
|
|
81
|
+
m_o.disconnect();
|
|
82
|
+
r();
|
|
83
|
+
});
|
|
84
|
+
m_o.observe(solid_container, {
|
|
85
|
+
childList: true
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
89
|
+
const reactProductCard = (0, $4GYXz$reactjsxruntime.jsx)(react_template, {
|
|
90
|
+
display: is_placeholder ? null : display
|
|
91
|
+
});
|
|
92
|
+
const portal = $4GYXz$reactdom.createPortal(reactProductCard, solid_container);
|
|
93
|
+
component_portals.add(portal);
|
|
94
|
+
set_portals([
|
|
95
|
+
...component_portals
|
|
96
|
+
]);
|
|
97
|
+
(0, $4GYXz$solidjs.onCleanup)(()=>{
|
|
98
|
+
// this will stop working after any await so be careful to not await before this, or you'll have to carry the owner over with getOwner and runWithOwner
|
|
99
|
+
component_portals.delete(portal);
|
|
100
|
+
set_portals([
|
|
101
|
+
...component_portals
|
|
102
|
+
]);
|
|
103
|
+
});
|
|
104
|
+
await react_has_rendered; // wait for react to have finish portaling the elements so that the placeholders get removed once we have an actual result and so that the PLP code knows it has a placeholder when this is a placeholder rendering
|
|
105
|
+
return [
|
|
106
|
+
solid_container
|
|
107
|
+
];
|
|
108
|
+
}
|
|
72
109
|
|
|
73
110
|
|
|
74
111
|
|
|
@@ -148,7 +185,7 @@ const $bc389476eeb2b615$export$599d4515591ef232 = (href)=>{
|
|
|
148
185
|
|
|
149
186
|
|
|
150
187
|
function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
|
|
151
|
-
const { children: children ,
|
|
188
|
+
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale } = props;
|
|
152
189
|
const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.en);
|
|
153
190
|
const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
|
|
154
191
|
if (!market || !merchant) {
|
|
@@ -156,9 +193,13 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
|
|
|
156
193
|
return (0, $4GYXz$react.createElement)((0, $4GYXz$react.Fragment), null, children);
|
|
157
194
|
}
|
|
158
195
|
try {
|
|
159
|
-
const { search: search } = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e);
|
|
196
|
+
const { search: search , category: category } = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e);
|
|
160
197
|
const [get_search_page_path, set_search_page_path] = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_;
|
|
161
198
|
set_search_page_path(searchPagePath);
|
|
199
|
+
const on_navigation = typeof window?.next?.router !== "undefined" || navigateFunction ? (new_href)=>{
|
|
200
|
+
if (navigateFunction) navigateFunction(new_href);
|
|
201
|
+
else (0, $bc389476eeb2b615$export$599d4515591ef232)(new_href);
|
|
202
|
+
} : undefined;
|
|
162
203
|
if (!search) {
|
|
163
204
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search = new (0, $4GYXz$depictaiui.DepictSearch)({
|
|
164
205
|
search_query_url_param_name: urlParamName,
|
|
@@ -167,13 +208,8 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
|
|
|
167
208
|
enable_category_suggestions: enableCategorySuggestions ?? false,
|
|
168
209
|
// default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
|
|
169
210
|
localization: usedLocale,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (navigateFunction) navigateFunction(new_href);
|
|
173
|
-
else (0, $bc389476eeb2b615$export$599d4515591ef232)(new_href);
|
|
174
|
-
}
|
|
175
|
-
} : {},
|
|
176
|
-
url_transformer: (url)=>url.pathname = (0, $4GYXz$solidjs.untrack)(get_search_page_path)
|
|
211
|
+
url_transformer: (url)=>url.pathname = (0, $4GYXz$solidjs.untrack)(get_search_page_path),
|
|
212
|
+
on_navigation: on_navigation
|
|
177
213
|
});
|
|
178
214
|
(0, $6319748b4f0426f0$export$6453cbc34515a94d)((0, $b4d0d98857ed9934$export$6cb4d3a5c1ac9b43));
|
|
179
215
|
} else {
|
|
@@ -181,6 +217,17 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
|
|
|
181
217
|
search.merchant = merchant;
|
|
182
218
|
search.localization = usedLocale;
|
|
183
219
|
}
|
|
220
|
+
if (!category) (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).category = new (0, $18b830ef84ac138a$import$5090e60c224b3b76$f34314aa9505732e)({
|
|
221
|
+
market: market,
|
|
222
|
+
merchant: merchant,
|
|
223
|
+
localization: usedLocale,
|
|
224
|
+
on_navigation: on_navigation
|
|
225
|
+
});
|
|
226
|
+
else {
|
|
227
|
+
category.market = market;
|
|
228
|
+
category.merchant = merchant;
|
|
229
|
+
category.localization = usedLocale;
|
|
230
|
+
}
|
|
184
231
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).required_state_set_[1](true);
|
|
185
232
|
} catch (e) {
|
|
186
233
|
// Make sure to not break the users app if we throw
|
|
@@ -197,7 +244,6 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
|
|
|
197
244
|
// and cover the entire height of the header. Then we know where to put the modal input top and bottom, and the left and right we just center.
|
|
198
245
|
|
|
199
246
|
|
|
200
|
-
|
|
201
247
|
function $20bf907adee775ba$export$cbcd1ecdb41b1d0a() {
|
|
202
248
|
return (0, $4GYXz$react.createElement)("div", {
|
|
203
249
|
className: "depict aligner",
|
|
@@ -210,32 +256,7 @@ function $20bf907adee775ba$export$a7f6cffb6b8ba11c() {
|
|
|
210
256
|
console.error("No active search in the app!");
|
|
211
257
|
return;
|
|
212
258
|
}
|
|
213
|
-
|
|
214
|
-
console.error("No active search header aligner on the page!");
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
const style_props_ = (0, $4GYXz$solidjs.createSignal)({
|
|
218
|
-
position: "fixed",
|
|
219
|
-
top: 0
|
|
220
|
-
});
|
|
221
|
-
if ((0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).header_alignment?.clientHeight) {
|
|
222
|
-
let styles = `.depict.plp.in-header .depict-search-modal .query-input { height: ${(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).header_alignment?.clientHeight}px; }`;
|
|
223
|
-
styles += `.depict.plp.in-header .depict-search-modal-backdrop { top: ${(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).header_alignment?.clientHeight}px; }`;
|
|
224
|
-
if (!$20bf907adee775ba$var$sheet) {
|
|
225
|
-
const style = document.createElement("style");
|
|
226
|
-
style.append(styles);
|
|
227
|
-
document.head.appendChild(style);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
const class_list_ = (0, $4GYXz$solidjs.createMemo)(()=>({
|
|
231
|
-
"in-header": true
|
|
232
|
-
}));
|
|
233
|
-
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search.modal_open = [
|
|
234
|
-
{
|
|
235
|
-
style_props_: style_props_,
|
|
236
|
-
class_list_: class_list_
|
|
237
|
-
}
|
|
238
|
-
];
|
|
259
|
+
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search.modal_open = true;
|
|
239
260
|
}
|
|
240
261
|
|
|
241
262
|
|
|
@@ -243,8 +264,6 @@ function $20bf907adee775ba$export$a7f6cffb6b8ba11c() {
|
|
|
243
264
|
|
|
244
265
|
|
|
245
266
|
|
|
246
|
-
|
|
247
|
-
|
|
248
267
|
function $a6bedbe4b4d6d027$export$210723f5a54a7028(props) {
|
|
249
268
|
return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)($a6bedbe4b4d6d027$var$SolidSearchPage), props);
|
|
250
269
|
}
|
|
@@ -284,38 +303,58 @@ function $a6bedbe4b4d6d027$var$SolidSearchPage(props, set_portals) {
|
|
|
284
303
|
// Todo: Do we need this?
|
|
285
304
|
get_product_id: ()=>"",
|
|
286
305
|
depict_search: depict_search,
|
|
287
|
-
product_card_template:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
306
|
+
product_card_template: (display, info)=>(0, $b4d0d98857ed9934$export$79c79419c1ef0081)({
|
|
307
|
+
display: display,
|
|
308
|
+
info: info,
|
|
309
|
+
react_template: props.productCard,
|
|
310
|
+
component_portals: component_portals,
|
|
311
|
+
set_portals: set_portals
|
|
312
|
+
})
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
let $a7b03ed69305c219$var$render_cb;
|
|
321
|
+
function $a7b03ed69305c219$export$d87c61cecb2edf0d(props) {
|
|
322
|
+
return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)($a7b03ed69305c219$var$SolidCategoryPage), props, "div", {}, (props)=>$a7b03ed69305c219$var$render_cb?.(props));
|
|
323
|
+
}
|
|
324
|
+
function $a7b03ed69305c219$var$SolidCategoryPage(props, set_portals) {
|
|
325
|
+
const depict_category = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).category;
|
|
326
|
+
if (!depict_category) throw Error("No depict_category instance when rendering SearchPage. Did you forget to wrap your app in DepictProvider?");
|
|
327
|
+
$a7b03ed69305c219$var$render_cb = (props)=>depict_category.category_id = props.categoryId;
|
|
328
|
+
$a7b03ed69305c219$var$render_cb(props);
|
|
329
|
+
const component_portals = new Set();
|
|
330
|
+
return (0, $4GYXz$depictaiui.CategoryPage)({
|
|
331
|
+
depict_category: depict_category,
|
|
332
|
+
cols_at_size: props.columnsAtSize ?? [
|
|
333
|
+
[
|
|
334
|
+
4
|
|
335
|
+
],
|
|
336
|
+
[
|
|
337
|
+
3,
|
|
338
|
+
1024
|
|
339
|
+
],
|
|
340
|
+
[
|
|
341
|
+
2,
|
|
342
|
+
901
|
|
343
|
+
]
|
|
344
|
+
],
|
|
345
|
+
grid_spacing: props.gridSpacing ?? "2%",
|
|
346
|
+
// Todo: Do we need this?
|
|
347
|
+
get_product_id: ()=>"",
|
|
348
|
+
category_title: (0, $4GYXz$depictaiui.embedded_num_products),
|
|
349
|
+
show_breadcrumbs: props.showBreadcrumbs || false,
|
|
350
|
+
show_quicklinks: props.showQuicklinks || false,
|
|
351
|
+
product_card_template: (display, info)=>(0, $b4d0d98857ed9934$export$79c79419c1ef0081)({
|
|
352
|
+
display: display,
|
|
353
|
+
info: info,
|
|
354
|
+
react_template: props.productCard,
|
|
355
|
+
component_portals: component_portals,
|
|
356
|
+
set_portals: set_portals
|
|
357
|
+
})
|
|
319
358
|
});
|
|
320
359
|
}
|
|
321
360
|
|
|
@@ -343,7 +382,7 @@ const $afce04c26b0c4208$export$89c6019e4baa40b1 = ({ width: width , height: heig
|
|
|
343
382
|
};
|
|
344
383
|
|
|
345
384
|
|
|
346
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.
|
|
385
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.54";
|
|
347
386
|
|
|
348
387
|
|
|
349
388
|
|