@depict-ai/react-ui 1.0.1 → 1.0.4
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 +1 -1
- package/dist/main.js +50 -37
- package/dist/module.js +54 -41
- 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 +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Display } from "@depict-ai/utilishared";
|
|
|
3
3
|
import React, { ReactNode, PropsWithChildren, ReactElement } from "react";
|
|
4
4
|
import { DPC } from "@depict-ai/dpc";
|
|
5
5
|
import { Locale } from "@depict-ai/ui/locales";
|
|
6
|
-
export const version = "1.0.
|
|
6
|
+
export const version = "1.0.4";
|
|
7
7
|
interface PLPConfig<T extends Display> extends BaseProductListingConfig {
|
|
8
8
|
/**
|
|
9
9
|
* The product card to use for rendering products.
|
package/dist/main.js
CHANGED
|
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
|
|
|
31
31
|
$parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
|
|
32
32
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
33
33
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
34
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.
|
|
34
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.4";
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -66,6 +66,34 @@ const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
|
|
70
|
+
class $d7a14567b529586f$export$d0f82e3ef89b1f22 extends (0, $4GYXz$react.Component) {
|
|
71
|
+
constructor(props){
|
|
72
|
+
super(props);
|
|
73
|
+
this.state = {
|
|
74
|
+
hasError: false
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
static getDerivedStateFromError() {
|
|
78
|
+
// Update state so the next render will show the fallback UI.
|
|
79
|
+
return {
|
|
80
|
+
hasError: true
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
componentDidCatch(error) {
|
|
84
|
+
this.props.on_error(error);
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
if (this.state.hasError) // You can render any custom fallback UI
|
|
88
|
+
return (0, $4GYXz$react.createElement)("div", {
|
|
89
|
+
children: "Component failed"
|
|
90
|
+
});
|
|
91
|
+
return this.props.children;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
69
97
|
let $b4d0d98857ed9934$var$run_on_href_change;
|
|
70
98
|
let $b4d0d98857ed9934$var$old_href = location.href;
|
|
71
99
|
function $b4d0d98857ed9934$export$74f3924c5027fe1d(cb) {
|
|
@@ -73,8 +101,7 @@ function $b4d0d98857ed9934$export$74f3924c5027fe1d(cb) {
|
|
|
73
101
|
}
|
|
74
102
|
(0, $4GYXz$depictaiutilishared.instant_exec_on_suspect_history_change).add((0, $4GYXz$depictaiutilishared.catchify)(()=>{
|
|
75
103
|
const { href: href } = location;
|
|
76
|
-
if (
|
|
77
|
-
$b4d0d98857ed9934$var$run_on_href_change?.(href);
|
|
104
|
+
if ($b4d0d98857ed9934$var$run_on_href_change && $b4d0d98857ed9934$var$old_href !== href) $b4d0d98857ed9934$var$run_on_href_change(href);
|
|
78
105
|
$b4d0d98857ed9934$var$old_href = href;
|
|
79
106
|
}));
|
|
80
107
|
const $b4d0d98857ed9934$export$775e6b3892b5ad52 = (url = location)=>url.pathname == (0, $4GYXz$solidjs.untrack)((0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_[0]); // might have changed therefore get it from globalState
|
|
@@ -110,21 +137,31 @@ function $b4d0d98857ed9934$export$e5139bbbb9a05035(component, is_set = (0, $0b7c
|
|
|
110
137
|
}
|
|
111
138
|
async function $b4d0d98857ed9934$export$79c79419c1ef0081({ display: display , component_portals: component_portals , set_portals: set_portals , react_template: react_template }) {
|
|
112
139
|
let set_react_has_ran_hooks;
|
|
140
|
+
let was_cleaned_up = false;
|
|
113
141
|
const react_has_ran_hooks = new Promise((r)=>set_react_has_ran_hooks = r);
|
|
114
142
|
const solid_container = document.createElement("div");
|
|
143
|
+
const owner = (0, $4GYXz$solidjs.getOwner)();
|
|
115
144
|
const reactProductCard = (0, $4GYXz$reactjsxruntime.jsx)((props)=>{
|
|
116
|
-
// Sneak in a hook into their product card component
|
|
145
|
+
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
117
146
|
(0, $4GYXz$react.useEffect)(set_react_has_ran_hooks, []);
|
|
118
147
|
return react_template(props);
|
|
119
148
|
}, {
|
|
120
149
|
display: display
|
|
121
150
|
});
|
|
122
|
-
const
|
|
151
|
+
const reactProductCardInErrorBoundary = (0, $4GYXz$reactjsxruntime.jsx)((0, $d7a14567b529586f$export$d0f82e3ef89b1f22), {
|
|
152
|
+
children: reactProductCard,
|
|
153
|
+
on_error: (error)=>(0, $4GYXz$solidjs.runWithOwner)(owner, ()=>{
|
|
154
|
+
if (was_cleaned_up) return; // Would infinite loop if we'd throw after we've already been cleaned up. That is because the `ErrorBoundary` won't be "registered" with the cleaned-up owner anymore so react would hear about the throw and attempt to re-render the error boundary or something which would throw again, etc.
|
|
155
|
+
throw new (0, $4GYXz$depictaiui.ProductCardError)(error);
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
const portal = $4GYXz$reactdom.createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
123
159
|
component_portals.add(portal);
|
|
124
160
|
set_portals([
|
|
125
161
|
...component_portals
|
|
126
162
|
]);
|
|
127
163
|
(0, $4GYXz$solidjs.onCleanup)(()=>{
|
|
164
|
+
was_cleaned_up = true;
|
|
128
165
|
// 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
|
|
129
166
|
component_portals.delete(portal);
|
|
130
167
|
set_portals([
|
|
@@ -271,7 +308,7 @@ const $25c0a91312868994$export$47e064413edabf36 = (merchant, market, userId, ses
|
|
|
271
308
|
|
|
272
309
|
function $24b00503eef73528$export$9fac37a9c21c2f3b(props) {
|
|
273
310
|
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId , sessionId: sessionId } = props;
|
|
274
|
-
const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.
|
|
311
|
+
const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.defaultLocale);
|
|
275
312
|
const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
|
|
276
313
|
// Will run on other prop changes, but harmless
|
|
277
314
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).userId = userId;
|
|
@@ -390,20 +427,8 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
390
427
|
return (0, $4GYXz$depictaiui.SearchPage)({
|
|
391
428
|
// Default config goes here
|
|
392
429
|
include_input_field: (0, $4GYXz$solidjs.untrack)(()=>props.includeInputField) ?? true,
|
|
393
|
-
cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ??
|
|
394
|
-
|
|
395
|
-
4
|
|
396
|
-
],
|
|
397
|
-
[
|
|
398
|
-
3,
|
|
399
|
-
1024
|
|
400
|
-
],
|
|
401
|
-
[
|
|
402
|
-
2,
|
|
403
|
-
901
|
|
404
|
-
]
|
|
405
|
-
],
|
|
406
|
-
grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? "2%",
|
|
430
|
+
cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ?? (0, $4GYXz$depictaiui.defaultColsAtSize),
|
|
431
|
+
grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? (0, $4GYXz$depictaiui.defaultGridSpacing),
|
|
407
432
|
depict_search: depict_search,
|
|
408
433
|
product_card_template: (display)=>(0, $b4d0d98857ed9934$export$79c79419c1ef0081)({
|
|
409
434
|
display: display,
|
|
@@ -442,23 +467,11 @@ function $5aa5fcb9f8a2bebc$var$SolidCategoryPage(props, set_portals) {
|
|
|
442
467
|
});
|
|
443
468
|
const category = ()=>(0, $4GYXz$depictaiui.CategoryPage)({
|
|
444
469
|
depict_category: depict_category,
|
|
445
|
-
cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ??
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
3,
|
|
451
|
-
1024
|
|
452
|
-
],
|
|
453
|
-
[
|
|
454
|
-
2,
|
|
455
|
-
901
|
|
456
|
-
]
|
|
457
|
-
],
|
|
458
|
-
grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? "2%",
|
|
459
|
-
category_title: (0, $4GYXz$solidjs.untrack)(()=>props.categoryTitlePlugin) || (0, $4GYXz$depictaiui.CategoryTitle),
|
|
460
|
-
show_breadcrumbs: (0, $4GYXz$solidjs.untrack)(()=>props.showBreadcrumbs === undefined ? true : props.showBreadcrumbs),
|
|
461
|
-
show_quicklinks: (0, $4GYXz$solidjs.untrack)(()=>props.showQuicklinks === undefined ? true : props.showQuicklinks),
|
|
470
|
+
cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ?? (0, $4GYXz$depictaiui.defaultColsAtSize),
|
|
471
|
+
grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? (0, $4GYXz$depictaiui.defaultGridSpacing),
|
|
472
|
+
category_title: (0, $4GYXz$solidjs.untrack)(()=>props.categoryTitlePlugin) || (0, $4GYXz$depictaiui.defaultCategoryTitlePlugin),
|
|
473
|
+
show_breadcrumbs: (0, $4GYXz$solidjs.untrack)(()=>props.showBreadcrumbs),
|
|
474
|
+
show_quicklinks: (0, $4GYXz$solidjs.untrack)(()=>props.showQuicklinks),
|
|
462
475
|
product_card_template: (display)=>(0, $b4d0d98857ed9934$export$79c79419c1ef0081)({
|
|
463
476
|
display: display,
|
|
464
477
|
react_template: (0, $4GYXz$solidjs.untrack)(()=>props.productCard),
|
package/dist/module.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {add_to_version_info as $TZSbU$add_to_version_info, catchify as $TZSbU$catchify, 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
|
-
import {CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, 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, fetchDepictRecommendations as $TZSbU$fetchDepictRecommendations} from "@depict-ai/ui";
|
|
3
|
-
import {createRoot as $TZSbU$createRoot, untrack as $TZSbU$untrack, createEffect as $TZSbU$createEffect, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, onCleanup as $TZSbU$onCleanup, createSignal as $TZSbU$createSignal, createComputed as $TZSbU$createComputed, createMemo as $TZSbU$createMemo} from "solid-js";
|
|
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
|
-
import {
|
|
2
|
+
import {CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, DepictAPI as $TZSbU$DepictAPI, DepictSearch as $TZSbU$DepictSearch, DepictCategory as $TZSbU$DepictCategory, ProductCardError as $TZSbU$ProductCardError, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage, defaultColsAtSize as $TZSbU$defaultColsAtSize, defaultGridSpacing as $TZSbU$defaultGridSpacing, CategoryPage as $TZSbU$CategoryPage, defaultCategoryTitlePlugin as $TZSbU$defaultCategoryTitlePlugin, BreadCrumbs as $TZSbU$BreadCrumbs, QuickLinks as $TZSbU$QuickLinks, open_modal_with_alignment as $TZSbU$open_modal_with_alignment, SearchField as $TZSbU$SearchField, fetchDepictRecommendations as $TZSbU$fetchDepictRecommendations} from "@depict-ai/ui";
|
|
3
|
+
import {createRoot as $TZSbU$createRoot, untrack as $TZSbU$untrack, createEffect as $TZSbU$createEffect, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, getOwner as $TZSbU$getOwner, runWithOwner as $TZSbU$runWithOwner, onCleanup as $TZSbU$onCleanup, createSignal as $TZSbU$createSignal, createComputed as $TZSbU$createComputed, createMemo as $TZSbU$createMemo} from "solid-js";
|
|
4
|
+
import {createElement as $TZSbU$createElement, Fragment as $TZSbU$Fragment, useState as $TZSbU$useState, useRef as $TZSbU$useRef, useEffect as $TZSbU$useEffect, Component as $TZSbU$Component, forwardRef as $TZSbU$forwardRef} from "react";
|
|
5
|
+
import {defaultLocale as $TZSbU$defaultLocale} 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";
|
|
8
8
|
import {createPortal as $TZSbU$createPortal} from "react-dom";
|
|
@@ -11,7 +11,7 @@ import {DPC as $TZSbU$DPC} from "@depict-ai/dpc";
|
|
|
11
11
|
|
|
12
12
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
13
13
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
14
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.0.
|
|
14
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.0.4";
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -46,6 +46,34 @@ const $42858f023ef23dab$export$8e769ad4338a911e = {
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
|
|
50
|
+
class $d5c9e1f3545b4984$export$d0f82e3ef89b1f22 extends (0, $TZSbU$Component) {
|
|
51
|
+
constructor(props){
|
|
52
|
+
super(props);
|
|
53
|
+
this.state = {
|
|
54
|
+
hasError: false
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static getDerivedStateFromError() {
|
|
58
|
+
// Update state so the next render will show the fallback UI.
|
|
59
|
+
return {
|
|
60
|
+
hasError: true
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
componentDidCatch(error) {
|
|
64
|
+
this.props.on_error(error);
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
if (this.state.hasError) // You can render any custom fallback UI
|
|
68
|
+
return (0, $TZSbU$createElement)("div", {
|
|
69
|
+
children: "Component failed"
|
|
70
|
+
});
|
|
71
|
+
return this.props.children;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
49
77
|
let $c83ba9ab79386687$var$run_on_href_change;
|
|
50
78
|
let $c83ba9ab79386687$var$old_href = location.href;
|
|
51
79
|
function $c83ba9ab79386687$export$74f3924c5027fe1d(cb) {
|
|
@@ -53,8 +81,7 @@ function $c83ba9ab79386687$export$74f3924c5027fe1d(cb) {
|
|
|
53
81
|
}
|
|
54
82
|
(0, $TZSbU$instant_exec_on_suspect_history_change).add((0, $TZSbU$catchify)(()=>{
|
|
55
83
|
const { href: href } = location;
|
|
56
|
-
if (
|
|
57
|
-
$c83ba9ab79386687$var$run_on_href_change?.(href);
|
|
84
|
+
if ($c83ba9ab79386687$var$run_on_href_change && $c83ba9ab79386687$var$old_href !== href) $c83ba9ab79386687$var$run_on_href_change(href);
|
|
58
85
|
$c83ba9ab79386687$var$old_href = href;
|
|
59
86
|
}));
|
|
60
87
|
const $c83ba9ab79386687$export$775e6b3892b5ad52 = (url = location)=>url.pathname == (0, $TZSbU$untrack)((0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_[0]); // might have changed therefore get it from globalState
|
|
@@ -90,21 +117,31 @@ function $c83ba9ab79386687$export$e5139bbbb9a05035(component, is_set = (0, $4285
|
|
|
90
117
|
}
|
|
91
118
|
async function $c83ba9ab79386687$export$79c79419c1ef0081({ display: display , component_portals: component_portals , set_portals: set_portals , react_template: react_template }) {
|
|
92
119
|
let set_react_has_ran_hooks;
|
|
120
|
+
let was_cleaned_up = false;
|
|
93
121
|
const react_has_ran_hooks = new Promise((r)=>set_react_has_ran_hooks = r);
|
|
94
122
|
const solid_container = document.createElement("div");
|
|
123
|
+
const owner = (0, $TZSbU$getOwner)();
|
|
95
124
|
const reactProductCard = (0, $TZSbU$jsx)((props)=>{
|
|
96
|
-
// Sneak in a hook into their product card component
|
|
125
|
+
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
97
126
|
(0, $TZSbU$useEffect)(set_react_has_ran_hooks, []);
|
|
98
127
|
return react_template(props);
|
|
99
128
|
}, {
|
|
100
129
|
display: display
|
|
101
130
|
});
|
|
102
|
-
const
|
|
131
|
+
const reactProductCardInErrorBoundary = (0, $TZSbU$jsx)((0, $d5c9e1f3545b4984$export$d0f82e3ef89b1f22), {
|
|
132
|
+
children: reactProductCard,
|
|
133
|
+
on_error: (error)=>(0, $TZSbU$runWithOwner)(owner, ()=>{
|
|
134
|
+
if (was_cleaned_up) return; // Would infinite loop if we'd throw after we've already been cleaned up. That is because the `ErrorBoundary` won't be "registered" with the cleaned-up owner anymore so react would hear about the throw and attempt to re-render the error boundary or something which would throw again, etc.
|
|
135
|
+
throw new (0, $TZSbU$ProductCardError)(error);
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
const portal = $TZSbU$createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
103
139
|
component_portals.add(portal);
|
|
104
140
|
set_portals([
|
|
105
141
|
...component_portals
|
|
106
142
|
]);
|
|
107
143
|
(0, $TZSbU$onCleanup)(()=>{
|
|
144
|
+
was_cleaned_up = true;
|
|
108
145
|
// 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
|
|
109
146
|
component_portals.delete(portal);
|
|
110
147
|
set_portals([
|
|
@@ -251,7 +288,7 @@ const $a00d8f27abd5d0b0$export$47e064413edabf36 = (merchant, market, userId, ses
|
|
|
251
288
|
|
|
252
289
|
function $5376eb2a386cd90d$export$9fac37a9c21c2f3b(props) {
|
|
253
290
|
const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId , sessionId: sessionId } = props;
|
|
254
|
-
const usedLocale = locale ?? (0, $TZSbU$
|
|
291
|
+
const usedLocale = locale ?? (0, $TZSbU$defaultLocale);
|
|
255
292
|
const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
|
|
256
293
|
// Will run on other prop changes, but harmless
|
|
257
294
|
(0, $42858f023ef23dab$export$8e769ad4338a911e).userId = userId;
|
|
@@ -370,20 +407,8 @@ function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
|
|
|
370
407
|
return (0, $TZSbU$SearchPage)({
|
|
371
408
|
// Default config goes here
|
|
372
409
|
include_input_field: (0, $TZSbU$untrack)(()=>props.includeInputField) ?? true,
|
|
373
|
-
cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ??
|
|
374
|
-
|
|
375
|
-
4
|
|
376
|
-
],
|
|
377
|
-
[
|
|
378
|
-
3,
|
|
379
|
-
1024
|
|
380
|
-
],
|
|
381
|
-
[
|
|
382
|
-
2,
|
|
383
|
-
901
|
|
384
|
-
]
|
|
385
|
-
],
|
|
386
|
-
grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? "2%",
|
|
410
|
+
cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ?? (0, $TZSbU$defaultColsAtSize),
|
|
411
|
+
grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? (0, $TZSbU$defaultGridSpacing),
|
|
387
412
|
depict_search: depict_search,
|
|
388
413
|
product_card_template: (display)=>(0, $c83ba9ab79386687$export$79c79419c1ef0081)({
|
|
389
414
|
display: display,
|
|
@@ -422,23 +447,11 @@ function $48d7f568740a317d$var$SolidCategoryPage(props, set_portals) {
|
|
|
422
447
|
});
|
|
423
448
|
const category = ()=>(0, $TZSbU$CategoryPage)({
|
|
424
449
|
depict_category: depict_category,
|
|
425
|
-
cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ??
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
3,
|
|
431
|
-
1024
|
|
432
|
-
],
|
|
433
|
-
[
|
|
434
|
-
2,
|
|
435
|
-
901
|
|
436
|
-
]
|
|
437
|
-
],
|
|
438
|
-
grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? "2%",
|
|
439
|
-
category_title: (0, $TZSbU$untrack)(()=>props.categoryTitlePlugin) || (0, $43099132aad1ceb6$re_export$CategoryTitle),
|
|
440
|
-
show_breadcrumbs: (0, $TZSbU$untrack)(()=>props.showBreadcrumbs === undefined ? true : props.showBreadcrumbs),
|
|
441
|
-
show_quicklinks: (0, $TZSbU$untrack)(()=>props.showQuicklinks === undefined ? true : props.showQuicklinks),
|
|
450
|
+
cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ?? (0, $TZSbU$defaultColsAtSize),
|
|
451
|
+
grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? (0, $TZSbU$defaultGridSpacing),
|
|
452
|
+
category_title: (0, $TZSbU$untrack)(()=>props.categoryTitlePlugin) || (0, $TZSbU$defaultCategoryTitlePlugin),
|
|
453
|
+
show_breadcrumbs: (0, $TZSbU$untrack)(()=>props.showBreadcrumbs),
|
|
454
|
+
show_quicklinks: (0, $TZSbU$untrack)(()=>props.showQuicklinks),
|
|
442
455
|
product_card_template: (display)=>(0, $c83ba9ab79386687$export$79c79419c1ef0081)({
|
|
443
456
|
display: display,
|
|
444
457
|
react_template: (0, $TZSbU$untrack)(()=>props.productCard),
|
package/dist-server/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ interface UseFetchRecommendationsReturn<T extends Display> {
|
|
|
33
33
|
*/
|
|
34
34
|
fetchRecommendations: (opts: FetchRecsOptions) => Promise<T[]>;
|
|
35
35
|
}
|
|
36
|
-
export const version = "1.0.
|
|
36
|
+
export const version = "1.0.4";
|
|
37
37
|
export function DepictProvider(props: any): any;
|
|
38
38
|
export function SearchPage(): any;
|
|
39
39
|
export function CategoryPage(): any;
|
package/dist-server/main.js
CHANGED
|
@@ -21,7 +21,7 @@ $parcel$export(module.exports, "useFetchRecommendations", () => $41e7e5d85b5e0d4
|
|
|
21
21
|
$parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.
|
|
24
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.4";
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
|
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": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -96,15 +96,16 @@
|
|
|
96
96
|
"/locales"
|
|
97
97
|
],
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@depict-ai/dpc": "^1.0.
|
|
100
|
-
"@depict-ai/plp-styling": "^1.0.
|
|
101
|
-
"@depict-ai/ui": "^1.0.
|
|
102
|
-
"@depict-ai/utilishared": "^1.0.
|
|
99
|
+
"@depict-ai/dpc": "^1.0.5",
|
|
100
|
+
"@depict-ai/plp-styling": "^1.0.6",
|
|
101
|
+
"@depict-ai/ui": "^1.0.6",
|
|
102
|
+
"@depict-ai/utilishared": "^1.0.5",
|
|
103
103
|
"solid-js": "^1.7.3"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": ">= 16.14.0",
|
|
107
|
-
"react-dom": ">= 16.14.0"
|
|
107
|
+
"react-dom": ">= 16.14.0",
|
|
108
|
+
"sass": ">= 1.54.6"
|
|
108
109
|
},
|
|
109
110
|
"devDependencies": {
|
|
110
111
|
"@babel/core": "latest",
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
"@babel/preset-typescript": "latest",
|
|
113
114
|
"@babel/runtime": "latest",
|
|
114
115
|
"@babel/runtime-corejs3": "latest",
|
|
115
|
-
"@depict-ai/plp-styling": "^1.0.
|
|
116
|
+
"@depict-ai/plp-styling": "^1.0.6",
|
|
116
117
|
"@jest/globals": "^29.3.1",
|
|
117
118
|
"@parcel/babel-preset-env": "latest",
|
|
118
119
|
"@parcel/resolver-default": "^2.8.0",
|