@depict-ai/ui 4.6.1 → 4.7.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 +39 -13
- package/ES10/index.d.ts +3 -3
- package/ES10/index.js +39 -13
- package/latest/index.cjs +39 -13
- package/latest/index.d.ts +3 -3
- package/latest/index.js +39 -13
- package/package.json +4 -4
- package/server/ES10/index.cjs +37 -13
- package/server/ES10/index.d.ts +3 -3
- package/server/ES10/index.js +37 -13
- package/server/latest/index.cjs +37 -13
- package/server/latest/index.d.ts +3 -3
- package/server/latest/index.js +37 -13
package/ES10/index.cjs
CHANGED
|
@@ -104,7 +104,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
104
104
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
105
105
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
106
106
|
/*! Depict.ai search and product listing SDK */
|
|
107
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.
|
|
107
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.1";
|
|
108
108
|
function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
|
|
109
109
|
const {
|
|
110
110
|
collapse: collapse,
|
|
@@ -3656,7 +3656,7 @@ var $29e5dbeb69da7a36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<but
|
|
|
3656
3656
|
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=clear>`),
|
|
3657
3657
|
$29e5dbeb69da7a36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=spacer>`),
|
|
3658
3658
|
$29e5dbeb69da7a36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
3659
|
-
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3659
|
+
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query type=search tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
3660
3660
|
function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
3661
3661
|
let {
|
|
3662
3662
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -6472,7 +6472,9 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
|
|
|
6472
6472
|
local_filter_cache_: [get_local_filter_cache, set_local_filter_cache],
|
|
6473
6473
|
selected_filters_: [get_selected_filters, set_selected_filters],
|
|
6474
6474
|
expanded_hierarchical_filters_: [get_expanded_hierarchical_filters, set_expanded_hierarchical_filters],
|
|
6475
|
-
delay_toast_: delay_toast_
|
|
6475
|
+
delay_toast_: delay_toast_,
|
|
6476
|
+
expanded_filters_: expanded_filters_,
|
|
6477
|
+
filters_open_: filters_open_
|
|
6476
6478
|
} = props;
|
|
6477
6479
|
const previous_selected_filters = $52FdA$solidjs.untrack(get_selected_filters);
|
|
6478
6480
|
if (!previous_selected_filters.length) {
|
|
@@ -6481,9 +6483,13 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
|
|
|
6481
6483
|
if (delay_toast_) return () => {};
|
|
6482
6484
|
return;
|
|
6483
6485
|
}
|
|
6486
|
+
const previousExpandedFilters = $52FdA$solidjs.untrack(() => expanded_filters_ === null || expanded_filters_ === void 0 ? void 0 : expanded_filters_[0]());
|
|
6487
|
+
const previousFiltersOpen = $52FdA$solidjs.untrack(() => filters_open_ === null || filters_open_ === void 0 ? void 0 : filters_open_[0]());
|
|
6484
6488
|
const previous_expanded_hierarchical_filters = $52FdA$solidjs.untrack(get_expanded_hierarchical_filters);
|
|
6485
6489
|
const previous_local_filter_cache = $52FdA$solidjs.untrack(get_local_filter_cache);
|
|
6486
6490
|
const statement_accessor = user_triggered_ ? i18n_.filters_cleared_ : i18n_.we_cleared_your_filters_;
|
|
6491
|
+
expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1]([]);
|
|
6492
|
+
filters_open_ === null || filters_open_ === void 0 || filters_open_[1](false);
|
|
6487
6493
|
set_selected_filters([]);
|
|
6488
6494
|
scrollTo({
|
|
6489
6495
|
top: 0
|
|
@@ -6509,7 +6515,7 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
|
|
|
6509
6515
|
close_toast_: close_toast_
|
|
6510
6516
|
} = $5909f8d84b7b4c30$export$5196e4c01fa56fcb({
|
|
6511
6517
|
class: "cleared_filters",
|
|
6512
|
-
close_after_:
|
|
6518
|
+
close_after_: 10000,
|
|
6513
6519
|
on_close_: on_toast_hidden,
|
|
6514
6520
|
children: [(() => {
|
|
6515
6521
|
var _el$ = $52FdA$solidjsweb.getNextElement($1a8463d757baadb6$var$_tmpl$);
|
|
@@ -6522,7 +6528,9 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
|
|
|
6522
6528
|
$52FdA$solidjsweb.addEventListener(_el$3, "click", $52FdA$depictaiutilishared.catchify(() => {
|
|
6523
6529
|
set_selected_filters(previous_selected_filters);
|
|
6524
6530
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
6531
|
+
if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
|
|
6525
6532
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
6533
|
+
if (typeof previousFiltersOpen === "boolean") filters_open_ === null || filters_open_ === void 0 || filters_open_[1](previousFiltersOpen);
|
|
6526
6534
|
// also restore previous filter cache, I think this should trigger a correct re-merging with newly in-came filters from backend in case there are any. This is because selected filters otherwise might not exist anymore and therefore can't be viewed in the UI
|
|
6527
6535
|
set_local_filter_cache(previous_local_filter_cache);
|
|
6528
6536
|
scrollTo({
|
|
@@ -10749,7 +10757,9 @@ function $1c0d0256826edea6$export$e026af0c7b64ea5f(_ref) {
|
|
|
10749
10757
|
current_sorting_: current_sorting_,
|
|
10750
10758
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10751
10759
|
i18n_: i18n_,
|
|
10752
|
-
local_filter_cache_: local_filter_cache_
|
|
10760
|
+
local_filter_cache_: local_filter_cache_,
|
|
10761
|
+
expanded_filters_: expanded_filters_,
|
|
10762
|
+
filters_open_: filters_open_
|
|
10753
10763
|
} = _ref;
|
|
10754
10764
|
const [get_selected_filters] = selected_filters_;
|
|
10755
10765
|
// Possible values:
|
|
@@ -10777,7 +10787,9 @@ function $1c0d0256826edea6$export$e026af0c7b64ea5f(_ref) {
|
|
|
10777
10787
|
also_clear_sorting_: true,
|
|
10778
10788
|
current_sorting_: current_sorting_,
|
|
10779
10789
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10780
|
-
local_filter_cache_: local_filter_cache_
|
|
10790
|
+
local_filter_cache_: local_filter_cache_,
|
|
10791
|
+
expanded_filters_: expanded_filters_,
|
|
10792
|
+
filters_open_: filters_open_
|
|
10781
10793
|
});
|
|
10782
10794
|
}
|
|
10783
10795
|
}), {
|
|
@@ -14451,7 +14463,9 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
14451
14463
|
current_sorting_: current_sorting_,
|
|
14452
14464
|
expanded_hierarchical_filters_: state_.expanded_hierarchical_filters,
|
|
14453
14465
|
i18n_: i18n_,
|
|
14454
|
-
local_filter_cache_: state_.local_filter_cache
|
|
14466
|
+
local_filter_cache_: state_.local_filter_cache,
|
|
14467
|
+
expanded_filters_: state_.expanded_filters,
|
|
14468
|
+
filters_open_: state_.filters_open
|
|
14455
14469
|
});
|
|
14456
14470
|
$ddd39c5f36f49703$export$dde08b2dca8cc1ce.set(this, {
|
|
14457
14471
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
@@ -15527,7 +15541,9 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
|
|
|
15527
15541
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15528
15542
|
plp_results_: plp_results_,
|
|
15529
15543
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15530
|
-
id_type_: id_type_
|
|
15544
|
+
id_type_: id_type_,
|
|
15545
|
+
expanded_filters_: expanded_filters_,
|
|
15546
|
+
filters_open_: filters_open_
|
|
15531
15547
|
} = _ref;
|
|
15532
15548
|
// If we just got opened in a new tab, clear filters instantly and remove the flag
|
|
15533
15549
|
$8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
|
|
@@ -15536,7 +15552,9 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
|
|
|
15536
15552
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15537
15553
|
selected_filters_: selected_filters_,
|
|
15538
15554
|
i18n_: i18n_,
|
|
15539
|
-
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
15555
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15556
|
+
expanded_filters_: expanded_filters_,
|
|
15557
|
+
filters_open_: filters_open_
|
|
15540
15558
|
});
|
|
15541
15559
|
// The code below is for when we're already open and the user navigates to a new category
|
|
15542
15560
|
let previous_crumb_data = $52FdA$solidjs.untrack(crumb_data_);
|
|
@@ -15572,7 +15590,9 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
|
|
|
15572
15590
|
also_clear_sorting_: false,
|
|
15573
15591
|
selected_filters_: selected_filters_,
|
|
15574
15592
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15575
|
-
local_filter_cache_: local_filter_cache_
|
|
15593
|
+
local_filter_cache_: local_filter_cache_,
|
|
15594
|
+
expanded_filters_: expanded_filters_,
|
|
15595
|
+
filters_open_: filters_open_
|
|
15576
15596
|
});
|
|
15577
15597
|
// Also ensure we don't have `sideways_url_params_flag` set anymore
|
|
15578
15598
|
sideways_filter_clearing_flag_[1](false);
|
|
@@ -15593,7 +15613,9 @@ function $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15593
15613
|
i18n_: i18n_,
|
|
15594
15614
|
selected_filters_: selected_filters_,
|
|
15595
15615
|
local_filter_cache_: local_filter_cache_,
|
|
15596
|
-
sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_]
|
|
15616
|
+
sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_],
|
|
15617
|
+
expanded_filters_: expanded_filters_,
|
|
15618
|
+
filters_open_: filters_open_
|
|
15597
15619
|
} = _ref3;
|
|
15598
15620
|
const tracking_function_for_plp_results = $52FdA$solidjs.createReaction(() => {
|
|
15599
15621
|
// On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
|
|
@@ -15608,7 +15630,9 @@ function $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15608
15630
|
also_clear_sorting_: false,
|
|
15609
15631
|
selected_filters_: selected_filters_,
|
|
15610
15632
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15611
|
-
local_filter_cache_: local_filter_cache_
|
|
15633
|
+
local_filter_cache_: local_filter_cache_,
|
|
15634
|
+
filters_open_: filters_open_,
|
|
15635
|
+
expanded_filters_: expanded_filters_
|
|
15612
15636
|
});
|
|
15613
15637
|
});
|
|
15614
15638
|
});
|
|
@@ -15935,7 +15959,9 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
15935
15959
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15936
15960
|
plp_results_: plp_products_,
|
|
15937
15961
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15938
|
-
id_type_: id_type_
|
|
15962
|
+
id_type_: id_type_,
|
|
15963
|
+
expanded_filters_: expanded_filters_,
|
|
15964
|
+
filters_open_: category_filters_open_
|
|
15939
15965
|
});
|
|
15940
15966
|
get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
|
|
15941
15967
|
get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
|
package/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.
|
|
14
|
+
export const version = "4.7.1";
|
|
15
15
|
/**
|
|
16
16
|
* Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
|
|
17
17
|
*/
|
|
@@ -1442,7 +1442,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1442
1442
|
* Open the modal with support for alignment.
|
|
1443
1443
|
* @returns {void}
|
|
1444
1444
|
*/
|
|
1445
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1445
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1446
1446
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1447
1447
|
export interface PageReplacer {
|
|
1448
1448
|
readonly render_: () => Node_Array;
|
|
@@ -1521,5 +1521,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1521
1521
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1522
1522
|
layout?: PossibleLayout;
|
|
1523
1523
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1524
|
-
}): import("@depict-ai/utilishared
|
|
1524
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1525
1525
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.1";
|
|
14
14
|
function $8e8b179489080711$export$5bad61ecde080b1f() {
|
|
15
15
|
const {
|
|
16
16
|
collapse: collapse,
|
|
@@ -3562,7 +3562,7 @@ var $584c06c09cf4609d$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<button class=b
|
|
|
3562
3562
|
$584c06c09cf4609d$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<button type=button class=clear>`),
|
|
3563
3563
|
$584c06c09cf4609d$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=spacer>`),
|
|
3564
3564
|
$584c06c09cf4609d$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<button class="submit major"type=button>`),
|
|
3565
|
-
$584c06c09cf4609d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3565
|
+
$584c06c09cf4609d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query type=search tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
3566
3566
|
function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
3567
3567
|
let {
|
|
3568
3568
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -6378,7 +6378,9 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6378
6378
|
local_filter_cache_: [get_local_filter_cache, set_local_filter_cache],
|
|
6379
6379
|
selected_filters_: [get_selected_filters, set_selected_filters],
|
|
6380
6380
|
expanded_hierarchical_filters_: [get_expanded_hierarchical_filters, set_expanded_hierarchical_filters],
|
|
6381
|
-
delay_toast_: delay_toast_
|
|
6381
|
+
delay_toast_: delay_toast_,
|
|
6382
|
+
expanded_filters_: expanded_filters_,
|
|
6383
|
+
filters_open_: filters_open_
|
|
6382
6384
|
} = props;
|
|
6383
6385
|
const previous_selected_filters = $8tj43$untrack(get_selected_filters);
|
|
6384
6386
|
if (!previous_selected_filters.length) {
|
|
@@ -6387,9 +6389,13 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6387
6389
|
if (delay_toast_) return () => {};
|
|
6388
6390
|
return;
|
|
6389
6391
|
}
|
|
6392
|
+
const previousExpandedFilters = $8tj43$untrack(() => expanded_filters_ === null || expanded_filters_ === void 0 ? void 0 : expanded_filters_[0]());
|
|
6393
|
+
const previousFiltersOpen = $8tj43$untrack(() => filters_open_ === null || filters_open_ === void 0 ? void 0 : filters_open_[0]());
|
|
6390
6394
|
const previous_expanded_hierarchical_filters = $8tj43$untrack(get_expanded_hierarchical_filters);
|
|
6391
6395
|
const previous_local_filter_cache = $8tj43$untrack(get_local_filter_cache);
|
|
6392
6396
|
const statement_accessor = user_triggered_ ? i18n_.filters_cleared_ : i18n_.we_cleared_your_filters_;
|
|
6397
|
+
expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1]([]);
|
|
6398
|
+
filters_open_ === null || filters_open_ === void 0 || filters_open_[1](false);
|
|
6393
6399
|
set_selected_filters([]);
|
|
6394
6400
|
scrollTo({
|
|
6395
6401
|
top: 0
|
|
@@ -6415,7 +6421,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6415
6421
|
close_toast_: close_toast_
|
|
6416
6422
|
} = $a61a2051e15c8d7a$export$5196e4c01fa56fcb({
|
|
6417
6423
|
class: "cleared_filters",
|
|
6418
|
-
close_after_:
|
|
6424
|
+
close_after_: 10000,
|
|
6419
6425
|
on_close_: on_toast_hidden,
|
|
6420
6426
|
children: [(() => {
|
|
6421
6427
|
var _el$ = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$);
|
|
@@ -6428,7 +6434,9 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6428
6434
|
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => {
|
|
6429
6435
|
set_selected_filters(previous_selected_filters);
|
|
6430
6436
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
6437
|
+
if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
|
|
6431
6438
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
6439
|
+
if (typeof previousFiltersOpen === "boolean") filters_open_ === null || filters_open_ === void 0 || filters_open_[1](previousFiltersOpen);
|
|
6432
6440
|
// also restore previous filter cache, I think this should trigger a correct re-merging with newly in-came filters from backend in case there are any. This is because selected filters otherwise might not exist anymore and therefore can't be viewed in the UI
|
|
6433
6441
|
set_local_filter_cache(previous_local_filter_cache);
|
|
6434
6442
|
scrollTo({
|
|
@@ -10655,7 +10663,9 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
10655
10663
|
current_sorting_: current_sorting_,
|
|
10656
10664
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10657
10665
|
i18n_: i18n_,
|
|
10658
|
-
local_filter_cache_: local_filter_cache_
|
|
10666
|
+
local_filter_cache_: local_filter_cache_,
|
|
10667
|
+
expanded_filters_: expanded_filters_,
|
|
10668
|
+
filters_open_: filters_open_
|
|
10659
10669
|
} = _ref;
|
|
10660
10670
|
const [get_selected_filters] = selected_filters_;
|
|
10661
10671
|
// Possible values:
|
|
@@ -10683,7 +10693,9 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
10683
10693
|
also_clear_sorting_: true,
|
|
10684
10694
|
current_sorting_: current_sorting_,
|
|
10685
10695
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10686
|
-
local_filter_cache_: local_filter_cache_
|
|
10696
|
+
local_filter_cache_: local_filter_cache_,
|
|
10697
|
+
expanded_filters_: expanded_filters_,
|
|
10698
|
+
filters_open_: filters_open_
|
|
10687
10699
|
});
|
|
10688
10700
|
}
|
|
10689
10701
|
}), {
|
|
@@ -14357,7 +14369,9 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
14357
14369
|
current_sorting_: current_sorting_,
|
|
14358
14370
|
expanded_hierarchical_filters_: state_.expanded_hierarchical_filters,
|
|
14359
14371
|
i18n_: i18n_,
|
|
14360
|
-
local_filter_cache_: state_.local_filter_cache
|
|
14372
|
+
local_filter_cache_: state_.local_filter_cache,
|
|
14373
|
+
expanded_filters_: state_.expanded_filters,
|
|
14374
|
+
filters_open_: state_.filters_open
|
|
14361
14375
|
});
|
|
14362
14376
|
$eb064bc3350276c1$export$dde08b2dca8cc1ce.set(this, {
|
|
14363
14377
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
@@ -15433,7 +15447,9 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
15433
15447
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15434
15448
|
plp_results_: plp_results_,
|
|
15435
15449
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15436
|
-
id_type_: id_type_
|
|
15450
|
+
id_type_: id_type_,
|
|
15451
|
+
expanded_filters_: expanded_filters_,
|
|
15452
|
+
filters_open_: filters_open_
|
|
15437
15453
|
} = _ref;
|
|
15438
15454
|
// If we just got opened in a new tab, clear filters instantly and remove the flag
|
|
15439
15455
|
$a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
|
|
@@ -15442,7 +15458,9 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
15442
15458
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15443
15459
|
selected_filters_: selected_filters_,
|
|
15444
15460
|
i18n_: i18n_,
|
|
15445
|
-
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
15461
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15462
|
+
expanded_filters_: expanded_filters_,
|
|
15463
|
+
filters_open_: filters_open_
|
|
15446
15464
|
});
|
|
15447
15465
|
// The code below is for when we're already open and the user navigates to a new category
|
|
15448
15466
|
let previous_crumb_data = $8tj43$untrack(crumb_data_);
|
|
@@ -15478,7 +15496,9 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
15478
15496
|
also_clear_sorting_: false,
|
|
15479
15497
|
selected_filters_: selected_filters_,
|
|
15480
15498
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15481
|
-
local_filter_cache_: local_filter_cache_
|
|
15499
|
+
local_filter_cache_: local_filter_cache_,
|
|
15500
|
+
expanded_filters_: expanded_filters_,
|
|
15501
|
+
filters_open_: filters_open_
|
|
15482
15502
|
});
|
|
15483
15503
|
// Also ensure we don't have `sideways_url_params_flag` set anymore
|
|
15484
15504
|
sideways_filter_clearing_flag_[1](false);
|
|
@@ -15499,7 +15519,9 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15499
15519
|
i18n_: i18n_,
|
|
15500
15520
|
selected_filters_: selected_filters_,
|
|
15501
15521
|
local_filter_cache_: local_filter_cache_,
|
|
15502
|
-
sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_]
|
|
15522
|
+
sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_],
|
|
15523
|
+
expanded_filters_: expanded_filters_,
|
|
15524
|
+
filters_open_: filters_open_
|
|
15503
15525
|
} = _ref3;
|
|
15504
15526
|
const tracking_function_for_plp_results = $8tj43$createReaction(() => {
|
|
15505
15527
|
// On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
|
|
@@ -15514,7 +15536,9 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15514
15536
|
also_clear_sorting_: false,
|
|
15515
15537
|
selected_filters_: selected_filters_,
|
|
15516
15538
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15517
|
-
local_filter_cache_: local_filter_cache_
|
|
15539
|
+
local_filter_cache_: local_filter_cache_,
|
|
15540
|
+
filters_open_: filters_open_,
|
|
15541
|
+
expanded_filters_: expanded_filters_
|
|
15518
15542
|
});
|
|
15519
15543
|
});
|
|
15520
15544
|
});
|
|
@@ -15841,7 +15865,9 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15841
15865
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15842
15866
|
plp_results_: plp_products_,
|
|
15843
15867
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15844
|
-
id_type_: id_type_
|
|
15868
|
+
id_type_: id_type_,
|
|
15869
|
+
expanded_filters_: expanded_filters_,
|
|
15870
|
+
filters_open_: category_filters_open_
|
|
15845
15871
|
});
|
|
15846
15872
|
get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
|
|
15847
15873
|
get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
|
package/latest/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
98
98
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
99
99
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
100
100
|
/*! Depict.ai search and product listing SDK */
|
|
101
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.
|
|
101
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.1";
|
|
102
102
|
function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
|
|
103
103
|
const {
|
|
104
104
|
collapse: collapse,
|
|
@@ -3463,7 +3463,7 @@ var $66b8b9a9613c141d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<but
|
|
|
3463
3463
|
$66b8b9a9613c141d$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button type=button class=clear>`),
|
|
3464
3464
|
$66b8b9a9613c141d$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=spacer>`),
|
|
3465
3465
|
$66b8b9a9613c141d$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
3466
|
-
$66b8b9a9613c141d$var$_tmpl$5 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3466
|
+
$66b8b9a9613c141d$var$_tmpl$5 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query type=search tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
3467
3467
|
function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
3468
3468
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
3469
3469
|
input_field_ref_: input_field_ref_,
|
|
@@ -6182,7 +6182,9 @@ function $47e2cc552c02110c$export$8895d39404bd2bb1(props) {
|
|
|
6182
6182
|
local_filter_cache_: [get_local_filter_cache, set_local_filter_cache],
|
|
6183
6183
|
selected_filters_: [get_selected_filters, set_selected_filters],
|
|
6184
6184
|
expanded_hierarchical_filters_: [get_expanded_hierarchical_filters, set_expanded_hierarchical_filters],
|
|
6185
|
-
delay_toast_: delay_toast_
|
|
6185
|
+
delay_toast_: delay_toast_,
|
|
6186
|
+
expanded_filters_: expanded_filters_,
|
|
6187
|
+
filters_open_: filters_open_
|
|
6186
6188
|
} = props;
|
|
6187
6189
|
const previous_selected_filters = $gVhhF$solidjs.untrack(get_selected_filters);
|
|
6188
6190
|
if (!previous_selected_filters.length) {
|
|
@@ -6191,9 +6193,13 @@ function $47e2cc552c02110c$export$8895d39404bd2bb1(props) {
|
|
|
6191
6193
|
if (delay_toast_) return () => {};
|
|
6192
6194
|
return;
|
|
6193
6195
|
}
|
|
6196
|
+
const previousExpandedFilters = $gVhhF$solidjs.untrack(() => expanded_filters_?.[0]());
|
|
6197
|
+
const previousFiltersOpen = $gVhhF$solidjs.untrack(() => filters_open_?.[0]());
|
|
6194
6198
|
const previous_expanded_hierarchical_filters = $gVhhF$solidjs.untrack(get_expanded_hierarchical_filters);
|
|
6195
6199
|
const previous_local_filter_cache = $gVhhF$solidjs.untrack(get_local_filter_cache);
|
|
6196
6200
|
const statement_accessor = user_triggered_ ? i18n_.filters_cleared_ : i18n_.we_cleared_your_filters_;
|
|
6201
|
+
expanded_filters_?.[1]([]);
|
|
6202
|
+
filters_open_?.[1](false);
|
|
6197
6203
|
set_selected_filters([]);
|
|
6198
6204
|
scrollTo({
|
|
6199
6205
|
top: 0
|
|
@@ -6219,7 +6225,7 @@ function $47e2cc552c02110c$export$8895d39404bd2bb1(props) {
|
|
|
6219
6225
|
close_toast_: close_toast_
|
|
6220
6226
|
} = $ee498ec5e7dc2bba$export$5196e4c01fa56fcb({
|
|
6221
6227
|
class: "cleared_filters",
|
|
6222
|
-
close_after_:
|
|
6228
|
+
close_after_: 10000,
|
|
6223
6229
|
on_close_: on_toast_hidden,
|
|
6224
6230
|
children: [(() => {
|
|
6225
6231
|
var _el$ = $gVhhF$solidjsweb.getNextElement($47e2cc552c02110c$var$_tmpl$);
|
|
@@ -6232,7 +6238,9 @@ function $47e2cc552c02110c$export$8895d39404bd2bb1(props) {
|
|
|
6232
6238
|
$gVhhF$solidjsweb.addEventListener(_el$3, "click", $gVhhF$depictaiutilishared.catchify(() => {
|
|
6233
6239
|
set_selected_filters(previous_selected_filters);
|
|
6234
6240
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
6241
|
+
if (previousExpandedFilters) expanded_filters_?.[1](previousExpandedFilters);
|
|
6235
6242
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
6243
|
+
if (typeof previousFiltersOpen === "boolean") filters_open_?.[1](previousFiltersOpen);
|
|
6236
6244
|
// also restore previous filter cache, I think this should trigger a correct re-merging with newly in-came filters from backend in case there are any. This is because selected filters otherwise might not exist anymore and therefore can't be viewed in the UI
|
|
6237
6245
|
set_local_filter_cache(previous_local_filter_cache);
|
|
6238
6246
|
scrollTo({
|
|
@@ -10105,7 +10113,9 @@ function $b34ce0b89e6db4e1$export$e026af0c7b64ea5f({
|
|
|
10105
10113
|
current_sorting_: current_sorting_,
|
|
10106
10114
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10107
10115
|
i18n_: i18n_,
|
|
10108
|
-
local_filter_cache_: local_filter_cache_
|
|
10116
|
+
local_filter_cache_: local_filter_cache_,
|
|
10117
|
+
expanded_filters_: expanded_filters_,
|
|
10118
|
+
filters_open_: filters_open_
|
|
10109
10119
|
}) {
|
|
10110
10120
|
const [get_selected_filters] = selected_filters_;
|
|
10111
10121
|
// Possible values:
|
|
@@ -10133,7 +10143,9 @@ function $b34ce0b89e6db4e1$export$e026af0c7b64ea5f({
|
|
|
10133
10143
|
also_clear_sorting_: true,
|
|
10134
10144
|
current_sorting_: current_sorting_,
|
|
10135
10145
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10136
|
-
local_filter_cache_: local_filter_cache_
|
|
10146
|
+
local_filter_cache_: local_filter_cache_,
|
|
10147
|
+
expanded_filters_: expanded_filters_,
|
|
10148
|
+
filters_open_: filters_open_
|
|
10137
10149
|
});
|
|
10138
10150
|
}
|
|
10139
10151
|
}), {
|
|
@@ -13565,7 +13577,9 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
13565
13577
|
current_sorting_: current_sorting_,
|
|
13566
13578
|
expanded_hierarchical_filters_: state_.expanded_hierarchical_filters,
|
|
13567
13579
|
i18n_: i18n_,
|
|
13568
|
-
local_filter_cache_: state_.local_filter_cache
|
|
13580
|
+
local_filter_cache_: state_.local_filter_cache,
|
|
13581
|
+
expanded_filters_: state_.expanded_filters,
|
|
13582
|
+
filters_open_: state_.filters_open
|
|
13569
13583
|
});
|
|
13570
13584
|
$2c61e4cd8229c49a$export$dde08b2dca8cc1ce.set(this, {
|
|
13571
13585
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
@@ -14503,7 +14517,9 @@ function $ef972f5c10b1c5b4$export$3945d6db2dfd3d12({
|
|
|
14503
14517
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14504
14518
|
plp_results_: plp_results_,
|
|
14505
14519
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
14506
|
-
id_type_: id_type_
|
|
14520
|
+
id_type_: id_type_,
|
|
14521
|
+
expanded_filters_: expanded_filters_,
|
|
14522
|
+
filters_open_: filters_open_
|
|
14507
14523
|
}) {
|
|
14508
14524
|
// If we just got opened in a new tab, clear filters instantly and remove the flag
|
|
14509
14525
|
$ef972f5c10b1c5b4$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
|
|
@@ -14512,7 +14528,9 @@ function $ef972f5c10b1c5b4$export$3945d6db2dfd3d12({
|
|
|
14512
14528
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14513
14529
|
selected_filters_: selected_filters_,
|
|
14514
14530
|
i18n_: i18n_,
|
|
14515
|
-
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
14531
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
14532
|
+
expanded_filters_: expanded_filters_,
|
|
14533
|
+
filters_open_: filters_open_
|
|
14516
14534
|
});
|
|
14517
14535
|
// The code below is for when we're already open and the user navigates to a new category
|
|
14518
14536
|
let previous_crumb_data = $gVhhF$solidjs.untrack(crumb_data_);
|
|
@@ -14545,7 +14563,9 @@ function $ef972f5c10b1c5b4$export$3945d6db2dfd3d12({
|
|
|
14545
14563
|
also_clear_sorting_: false,
|
|
14546
14564
|
selected_filters_: selected_filters_,
|
|
14547
14565
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14548
|
-
local_filter_cache_: local_filter_cache_
|
|
14566
|
+
local_filter_cache_: local_filter_cache_,
|
|
14567
|
+
expanded_filters_: expanded_filters_,
|
|
14568
|
+
filters_open_: filters_open_
|
|
14549
14569
|
});
|
|
14550
14570
|
// Also ensure we don't have `sideways_url_params_flag` set anymore
|
|
14551
14571
|
sideways_filter_clearing_flag_[1](false);
|
|
@@ -14565,7 +14585,9 @@ function $ef972f5c10b1c5b4$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
14565
14585
|
i18n_: i18n_,
|
|
14566
14586
|
selected_filters_: selected_filters_,
|
|
14567
14587
|
local_filter_cache_: local_filter_cache_,
|
|
14568
|
-
sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_]
|
|
14588
|
+
sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_],
|
|
14589
|
+
expanded_filters_: expanded_filters_,
|
|
14590
|
+
filters_open_: filters_open_
|
|
14569
14591
|
}) {
|
|
14570
14592
|
const tracking_function_for_plp_results = $gVhhF$solidjs.createReaction(() => {
|
|
14571
14593
|
// On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
|
|
@@ -14580,7 +14602,9 @@ function $ef972f5c10b1c5b4$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
14580
14602
|
also_clear_sorting_: false,
|
|
14581
14603
|
selected_filters_: selected_filters_,
|
|
14582
14604
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14583
|
-
local_filter_cache_: local_filter_cache_
|
|
14605
|
+
local_filter_cache_: local_filter_cache_,
|
|
14606
|
+
filters_open_: filters_open_,
|
|
14607
|
+
expanded_filters_: expanded_filters_
|
|
14584
14608
|
});
|
|
14585
14609
|
});
|
|
14586
14610
|
});
|
|
@@ -14876,7 +14900,9 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
14876
14900
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14877
14901
|
plp_results_: plp_products_,
|
|
14878
14902
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
14879
|
-
id_type_: id_type_
|
|
14903
|
+
id_type_: id_type_,
|
|
14904
|
+
expanded_filters_: expanded_filters_,
|
|
14905
|
+
filters_open_: category_filters_open_
|
|
14880
14906
|
});
|
|
14881
14907
|
get_breadcrumb_accessor_?.(crumb_data_);
|
|
14882
14908
|
get_quicklinks_accessor_?.(quicklinks_data_);
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.
|
|
14
|
+
export const version = "4.7.1";
|
|
15
15
|
/**
|
|
16
16
|
* Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
|
|
17
17
|
*/
|
|
@@ -1442,7 +1442,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1442
1442
|
* Open the modal with support for alignment.
|
|
1443
1443
|
* @returns {void}
|
|
1444
1444
|
*/
|
|
1445
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1445
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1446
1446
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1447
1447
|
export interface PageReplacer {
|
|
1448
1448
|
readonly render_: () => Node_Array;
|
|
@@ -1521,5 +1521,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1521
1521
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1522
1522
|
layout?: PossibleLayout;
|
|
1523
1523
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1524
|
-
}): import("@depict-ai/utilishared
|
|
1524
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1525
1525
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|