@depict-ai/react-ui 1.2.1 → 1.2.2
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 +19 -2
- package/dist/module.js +20 -3
- 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 +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ 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
6
|
import { ModernDisplayWithPageUrl } from "@depict-ai/ui/src";
|
|
7
|
-
export const version = "1.2.
|
|
7
|
+
export const version = "1.2.2";
|
|
8
8
|
interface PLPConfig<T extends Display> extends BaseProductListingConfig {
|
|
9
9
|
/**
|
|
10
10
|
* 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.2.
|
|
34
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "1.2.2";
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -412,6 +412,7 @@ const $883a881f7926405d$export$80e99ee6b29cadd2 = /*#__PURE__*/ (0, $4GYXz$react
|
|
|
412
412
|
|
|
413
413
|
|
|
414
414
|
|
|
415
|
+
|
|
415
416
|
function $7ad7a3d0011b7b1b$export$a54ec244c8863715(props) {
|
|
416
417
|
return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)({
|
|
417
418
|
solid_component: (0, $b4d0d98857ed9934$export$e5139bbbb9a05035)($7ad7a3d0011b7b1b$var$SolidSearchPage),
|
|
@@ -428,6 +429,7 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
428
429
|
set_search_query_updating_blocked_signal(!(0, $b4d0d98857ed9934$export$775e6b3892b5ad52)(location));
|
|
429
430
|
};
|
|
430
431
|
const [, set_search_page_in_dom] = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_in_dom;
|
|
432
|
+
const component_portals = new Set();
|
|
431
433
|
// We should only get here once react already has a DOM node which means we should be in the DOM
|
|
432
434
|
set_search_page_in_dom(true);
|
|
433
435
|
(0, $4GYXz$solidjs.onCleanup)(()=>set_search_page_in_dom(false));
|
|
@@ -437,7 +439,7 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
437
439
|
(0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
|
|
438
440
|
update_updating_blocked_signal();
|
|
439
441
|
});
|
|
440
|
-
|
|
442
|
+
$7ad7a3d0011b7b1b$var$search_page_path_checker();
|
|
441
443
|
return (0, $4GYXz$depictaiui.SearchPage)({
|
|
442
444
|
// Default config goes here
|
|
443
445
|
get include_input_field () {
|
|
@@ -454,6 +456,21 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
454
456
|
})
|
|
455
457
|
});
|
|
456
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* 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.
|
|
461
|
+
*/ function $7ad7a3d0011b7b1b$var$search_page_path_checker() {
|
|
462
|
+
let has_warned = false;
|
|
463
|
+
(0, $4GYXz$solidjs.createEffect)(()=>{
|
|
464
|
+
if (has_warned) return;
|
|
465
|
+
const should_be_path = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_[0]();
|
|
466
|
+
const { pathname: pathname } = location;
|
|
467
|
+
if (// allow some variability just to be sure
|
|
468
|
+
should_be_path !== pathname && should_be_path + "/" !== pathname && should_be_path !== pathname + "/") {
|
|
469
|
+
(0, $4GYXz$depictaiutilishared.derror)("searchPagePath is set to", should_be_path, "but the SearchPage is rendered at", pathname, ". Please double-check your searchPagePath is where the SearchPage component ends up being rendered, after all redirects, unless you're sure this is intentional.");
|
|
470
|
+
has_warned = true;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
457
474
|
|
|
458
475
|
|
|
459
476
|
|
package/dist/module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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} from "@depict-ai/utilishared";
|
|
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, derror as $TZSbU$derror} from "@depict-ai/utilishared";
|
|
2
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, ImagePlaceholder as $TZSbU$ImagePlaceholder, TextPlaceholder as $TZSbU$TextPlaceholder, open_modal_with_alignment as $TZSbU$open_modal_with_alignment, SearchField as $TZSbU$SearchField, fetchDepictRecommendations as $TZSbU$fetchDepictRecommendations} from "@depict-ai/ui";
|
|
3
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} from "solid-js";
|
|
4
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";
|
|
@@ -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.2.
|
|
14
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.2.2";
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -392,6 +392,7 @@ const $421f32789b6f111f$export$80e99ee6b29cadd2 = /*#__PURE__*/ (0, $TZSbU$forwa
|
|
|
392
392
|
|
|
393
393
|
|
|
394
394
|
|
|
395
|
+
|
|
395
396
|
function $4a678f0c87b12e78$export$a54ec244c8863715(props) {
|
|
396
397
|
return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
|
|
397
398
|
solid_component: (0, $c83ba9ab79386687$export$e5139bbbb9a05035)($4a678f0c87b12e78$var$SolidSearchPage),
|
|
@@ -408,6 +409,7 @@ function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
|
|
|
408
409
|
set_search_query_updating_blocked_signal(!(0, $c83ba9ab79386687$export$775e6b3892b5ad52)(location));
|
|
409
410
|
};
|
|
410
411
|
const [, set_search_page_in_dom] = (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_in_dom;
|
|
412
|
+
const component_portals = new Set();
|
|
411
413
|
// We should only get here once react already has a DOM node which means we should be in the DOM
|
|
412
414
|
set_search_page_in_dom(true);
|
|
413
415
|
(0, $TZSbU$onCleanup)(()=>set_search_page_in_dom(false));
|
|
@@ -417,7 +419,7 @@ function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
|
|
|
417
419
|
(0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
|
|
418
420
|
update_updating_blocked_signal();
|
|
419
421
|
});
|
|
420
|
-
|
|
422
|
+
$4a678f0c87b12e78$var$search_page_path_checker();
|
|
421
423
|
return (0, $TZSbU$SearchPage)({
|
|
422
424
|
// Default config goes here
|
|
423
425
|
get include_input_field () {
|
|
@@ -434,6 +436,21 @@ function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
|
|
|
434
436
|
})
|
|
435
437
|
});
|
|
436
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* 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.
|
|
441
|
+
*/ function $4a678f0c87b12e78$var$search_page_path_checker() {
|
|
442
|
+
let has_warned = false;
|
|
443
|
+
(0, $TZSbU$createEffect)(()=>{
|
|
444
|
+
if (has_warned) return;
|
|
445
|
+
const should_be_path = (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_[0]();
|
|
446
|
+
const { pathname: pathname } = location;
|
|
447
|
+
if (// allow some variability just to be sure
|
|
448
|
+
should_be_path !== pathname && should_be_path + "/" !== pathname && should_be_path !== pathname + "/") {
|
|
449
|
+
(0, $TZSbU$derror)("searchPagePath is set to", should_be_path, "but the SearchPage is rendered at", pathname, ". Please double-check your searchPagePath is where the SearchPage component ends up being rendered, after all redirects, unless you're sure this is intentional.");
|
|
450
|
+
has_warned = true;
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
}
|
|
437
454
|
|
|
438
455
|
|
|
439
456
|
|
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.2.
|
|
36
|
+
export const version = "1.2.2";
|
|
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
|
@@ -40,7 +40,7 @@ function $35dfe83eec81954c$export$4b564d7f5a1b1d43({ solid_component: solid_comp
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "1.2.
|
|
43
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "1.2.2";
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
|
package/dist-server/module.js
CHANGED
|
@@ -22,7 +22,7 @@ function $4568c09979447ab1$export$4b564d7f5a1b1d43({ solid_component: solid_comp
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.2.
|
|
25
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.2.2";
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/react-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -97,10 +97,10 @@
|
|
|
97
97
|
"README.md"
|
|
98
98
|
],
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@depict-ai/dpc": "^1.0.
|
|
101
|
-
"@depict-ai/plp-styling": "^1.0.
|
|
102
|
-
"@depict-ai/ui": "^1.2.
|
|
103
|
-
"@depict-ai/utilishared": "^1.0.
|
|
100
|
+
"@depict-ai/dpc": "^1.0.23",
|
|
101
|
+
"@depict-ai/plp-styling": "^1.0.24",
|
|
102
|
+
"@depict-ai/ui": "^1.2.2",
|
|
103
|
+
"@depict-ai/utilishared": "^1.0.23",
|
|
104
104
|
"solid-js": "^1.7.3"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"@babel/preset-typescript": "latest",
|
|
115
115
|
"@babel/runtime": "latest",
|
|
116
116
|
"@babel/runtime-corejs3": "latest",
|
|
117
|
-
"@depict-ai/plp-styling": "^1.0.
|
|
117
|
+
"@depict-ai/plp-styling": "^1.0.24",
|
|
118
118
|
"@jest/globals": "^29.3.1",
|
|
119
119
|
"@parcel/babel-preset-env": "latest",
|
|
120
120
|
"@parcel/resolver-default": "^2.8.0",
|