@depict-ai/ui 4.4.3 → 4.4.5
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 +30 -14
- package/ES10/index.d.ts +5 -3
- package/ES10/index.js +30 -14
- package/latest/index.cjs +29 -14
- package/latest/index.d.ts +5 -3
- package/latest/index.js +29 -14
- package/package.json +4 -4
- package/server/ES10/index.cjs +13 -8
- package/server/ES10/index.d.ts +5 -3
- package/server/ES10/index.js +13 -8
- package/server/latest/index.cjs +12 -8
- package/server/latest/index.d.ts +5 -3
- package/server/latest/index.js +12 -8
package/ES10/index.cjs
CHANGED
|
@@ -100,7 +100,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
100
100
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
101
101
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
102
102
|
/*! Depict.ai search and product listing SDK */
|
|
103
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.4.
|
|
103
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.4.5";
|
|
104
104
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
105
105
|
const cols_at_size = [];
|
|
106
106
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -115,8 +115,9 @@ const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
|
115
115
|
return cols_at_size;
|
|
116
116
|
};
|
|
117
117
|
const $5401a6698b0c0658$export$6daf8749b65a1b77 = cols_at_size => {
|
|
118
|
+
var _cols_at_size$every;
|
|
118
119
|
// Check that every element is an array
|
|
119
|
-
const are_arrays = cols_at_size.every(element => Array.isArray(element));
|
|
120
|
+
const are_arrays = cols_at_size === null || cols_at_size === void 0 ? void 0 : (_cols_at_size$every = cols_at_size.every) === null || _cols_at_size$every === void 0 ? void 0 : _cols_at_size$every.call(cols_at_size, element => Array.isArray(element));
|
|
120
121
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
121
122
|
// Check width duplicates
|
|
122
123
|
const widths = cols_at_size.map(_ref => {
|
|
@@ -3614,7 +3615,7 @@ var $29e5dbeb69da7a36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<but
|
|
|
3614
3615
|
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=clear>`),
|
|
3615
3616
|
$29e5dbeb69da7a36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=spacer>`),
|
|
3616
3617
|
$29e5dbeb69da7a36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
3617
|
-
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
3618
|
+
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3618
3619
|
function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
3619
3620
|
let {
|
|
3620
3621
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -3628,7 +3629,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3628
3629
|
i18n_: i18n_,
|
|
3629
3630
|
after_focusing_: after_focusing_,
|
|
3630
3631
|
BackIcon_: BackIcon_,
|
|
3631
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
3632
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
3633
|
+
class_: class_
|
|
3632
3634
|
} = _ref;
|
|
3633
3635
|
let input_element;
|
|
3634
3636
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3726,7 +3728,6 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3726
3728
|
[_el$17, _co$5] = $52FdA$solidjsweb.getNextMarker(_el$16.nextSibling),
|
|
3727
3729
|
_el$18 = _el$17.nextSibling,
|
|
3728
3730
|
[_el$19, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$18.nextSibling);
|
|
3729
|
-
_el$3.classList.toggle("in-modal", !!!!on_back_);
|
|
3730
3731
|
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3731
3732
|
get when() {
|
|
3732
3733
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -3837,14 +3838,17 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3837
3838
|
}
|
|
3838
3839
|
}), _el$19, _co$6);
|
|
3839
3840
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
3840
|
-
var _v$ =
|
|
3841
|
-
_v$2 = i18n_.
|
|
3842
|
-
|
|
3843
|
-
_v$
|
|
3841
|
+
var _v$ = "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : ""),
|
|
3842
|
+
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
3843
|
+
_v$3 = i18n_.placeholder_text_();
|
|
3844
|
+
_v$ !== _p$.e && $52FdA$solidjsweb.className(_el$3, _p$.e = _v$);
|
|
3845
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
3846
|
+
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
3844
3847
|
return _p$;
|
|
3845
3848
|
}, {
|
|
3846
3849
|
e: undefined,
|
|
3847
|
-
t: undefined
|
|
3850
|
+
t: undefined,
|
|
3851
|
+
a: undefined
|
|
3848
3852
|
});
|
|
3849
3853
|
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setProperty(_el$6, "value", searchFieldValue()));
|
|
3850
3854
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
@@ -13768,7 +13772,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13768
13772
|
});
|
|
13769
13773
|
}
|
|
13770
13774
|
var $739c927cbecd26b0$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
13771
|
-
$739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
13775
|
+
$739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
13772
13776
|
function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
13773
13777
|
let {
|
|
13774
13778
|
depict_api_: depict_api_,
|
|
@@ -13803,7 +13807,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
13803
13807
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
13804
13808
|
modalVersionUsed_: modalVersionUsed_,
|
|
13805
13809
|
BackIcon_: BackIcon_,
|
|
13806
|
-
filterModalParent_: filterModalParent_
|
|
13810
|
+
filterModalParent_: filterModalParent_,
|
|
13811
|
+
class_: class_
|
|
13807
13812
|
} = _ref;
|
|
13808
13813
|
const [get_sorting] = current_sorting_;
|
|
13809
13814
|
const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
|
|
@@ -14222,7 +14227,16 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
14222
14227
|
});
|
|
14223
14228
|
}
|
|
14224
14229
|
}), _el$25, _co$11);
|
|
14225
|
-
$52FdA$solidjsweb.effect(
|
|
14230
|
+
$52FdA$solidjsweb.effect(_p$ => {
|
|
14231
|
+
var _v$ = (0, $c95c6dd9e93acd82$export$44dad306455dddf).SEARCH_PAGE,
|
|
14232
|
+
_v$2 = "depict plp search".concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : "");
|
|
14233
|
+
_v$ !== _p$.e && $52FdA$solidjsweb.setAttribute(_el$6, "id", _p$.e = _v$);
|
|
14234
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.className(_el$6, _p$.t = _v$2);
|
|
14235
|
+
return _p$;
|
|
14236
|
+
}, {
|
|
14237
|
+
e: undefined,
|
|
14238
|
+
t: undefined
|
|
14239
|
+
});
|
|
14226
14240
|
return _el$6;
|
|
14227
14241
|
})()];
|
|
14228
14242
|
}
|
|
@@ -14688,7 +14702,8 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
14688
14702
|
...grid_spacing_override()
|
|
14689
14703
|
})),
|
|
14690
14704
|
filterModalParent_: $52FdA$solidjs.untrack(() => props.filterModalParent_),
|
|
14691
|
-
product_card_template_: product_card_template
|
|
14705
|
+
product_card_template_: product_card_template,
|
|
14706
|
+
class_: () => props.class
|
|
14692
14707
|
});
|
|
14693
14708
|
}, "Entire SearchPage failed");
|
|
14694
14709
|
}
|
|
@@ -15080,6 +15095,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
15080
15095
|
let input_element;
|
|
15081
15096
|
let buttonInField;
|
|
15082
15097
|
const search_field = $52FdA$solidjsweb.createComponent((0, $29e5dbeb69da7a36$export$b94867ecbd698f21), {
|
|
15098
|
+
class_: () => props.class,
|
|
15083
15099
|
get BackIcon_() {
|
|
15084
15100
|
return shared_properties.BackIcon_;
|
|
15085
15101
|
},
|
package/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.4.
|
|
13
|
+
export const version = "4.4.5";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -1360,6 +1360,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1360
1360
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1361
1361
|
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
1362
1362
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1363
|
+
class?: string;
|
|
1363
1364
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1364
1365
|
/**
|
|
1365
1366
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1399,7 +1400,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1399
1400
|
* Open the modal with support for alignment.
|
|
1400
1401
|
* @returns {void}
|
|
1401
1402
|
*/
|
|
1402
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1403
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1403
1404
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1404
1405
|
export interface PageReplacer {
|
|
1405
1406
|
readonly render_: () => Node_Array;
|
|
@@ -1445,6 +1446,7 @@ interface SearchFieldParams {
|
|
|
1445
1446
|
modal_dispose_handler?: VoidFunction;
|
|
1446
1447
|
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
1447
1448
|
aligner_ref?: HTMLElement | null;
|
|
1449
|
+
class?: string;
|
|
1448
1450
|
}
|
|
1449
1451
|
/**
|
|
1450
1452
|
* Returns a SearchField that will open a modal aligned to it when clicked.
|
|
@@ -1477,5 +1479,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1477
1479
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1478
1480
|
layout?: PossibleLayout;
|
|
1479
1481
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1480
|
-
}): import("@depict-ai/utilishared
|
|
1482
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1481
1483
|
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.4.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.4.5";
|
|
14
14
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
15
15
|
const cols_at_size = [];
|
|
16
16
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -25,8 +25,9 @@ const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
|
25
25
|
return cols_at_size;
|
|
26
26
|
};
|
|
27
27
|
const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
|
|
28
|
+
var _cols_at_size$every;
|
|
28
29
|
// Check that every element is an array
|
|
29
|
-
const are_arrays = cols_at_size.every(element => Array.isArray(element));
|
|
30
|
+
const are_arrays = cols_at_size === null || cols_at_size === void 0 ? void 0 : (_cols_at_size$every = cols_at_size.every) === null || _cols_at_size$every === void 0 ? void 0 : _cols_at_size$every.call(cols_at_size, element => Array.isArray(element));
|
|
30
31
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
31
32
|
// Check width duplicates
|
|
32
33
|
const widths = cols_at_size.map(_ref => {
|
|
@@ -3524,7 +3525,7 @@ var $584c06c09cf4609d$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<button class=b
|
|
|
3524
3525
|
$584c06c09cf4609d$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<button type=button class=clear>`),
|
|
3525
3526
|
$584c06c09cf4609d$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=spacer>`),
|
|
3526
3527
|
$584c06c09cf4609d$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<button class="submit major"type=button>`),
|
|
3527
|
-
$584c06c09cf4609d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<div
|
|
3528
|
+
$584c06c09cf4609d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3528
3529
|
function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
3529
3530
|
let {
|
|
3530
3531
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -3538,7 +3539,8 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3538
3539
|
i18n_: i18n_,
|
|
3539
3540
|
after_focusing_: after_focusing_,
|
|
3540
3541
|
BackIcon_: BackIcon_,
|
|
3541
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
3542
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
3543
|
+
class_: class_
|
|
3542
3544
|
} = _ref;
|
|
3543
3545
|
let input_element;
|
|
3544
3546
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3636,7 +3638,6 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3636
3638
|
[_el$17, _co$5] = $8tj43$getNextMarker(_el$16.nextSibling),
|
|
3637
3639
|
_el$18 = _el$17.nextSibling,
|
|
3638
3640
|
[_el$19, _co$6] = $8tj43$getNextMarker(_el$18.nextSibling);
|
|
3639
|
-
_el$3.classList.toggle("in-modal", !!!!on_back_);
|
|
3640
3641
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $8tj43$Show), {
|
|
3641
3642
|
get when() {
|
|
3642
3643
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -3747,14 +3748,17 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3747
3748
|
}
|
|
3748
3749
|
}), _el$19, _co$6);
|
|
3749
3750
|
$8tj43$effect(_p$ => {
|
|
3750
|
-
var _v$ =
|
|
3751
|
-
_v$2 = i18n_.
|
|
3752
|
-
|
|
3753
|
-
_v$
|
|
3751
|
+
var _v$ = "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : ""),
|
|
3752
|
+
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
3753
|
+
_v$3 = i18n_.placeholder_text_();
|
|
3754
|
+
_v$ !== _p$.e && $8tj43$className(_el$3, _p$.e = _v$);
|
|
3755
|
+
_v$2 !== _p$.t && $8tj43$setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
3756
|
+
_v$3 !== _p$.a && $8tj43$setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
3754
3757
|
return _p$;
|
|
3755
3758
|
}, {
|
|
3756
3759
|
e: undefined,
|
|
3757
|
-
t: undefined
|
|
3760
|
+
t: undefined,
|
|
3761
|
+
a: undefined
|
|
3758
3762
|
});
|
|
3759
3763
|
$8tj43$effect(() => $8tj43$setProperty(_el$6, "value", searchFieldValue()));
|
|
3760
3764
|
$8tj43$runHydrationEvents();
|
|
@@ -13678,7 +13682,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13678
13682
|
});
|
|
13679
13683
|
}
|
|
13680
13684
|
var $da279c5a540c6846$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
13681
|
-
$da279c5a540c6846$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<div
|
|
13685
|
+
$da279c5a540c6846$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
13682
13686
|
function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
13683
13687
|
let {
|
|
13684
13688
|
depict_api_: depict_api_,
|
|
@@ -13713,7 +13717,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13713
13717
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
13714
13718
|
modalVersionUsed_: modalVersionUsed_,
|
|
13715
13719
|
BackIcon_: BackIcon_,
|
|
13716
|
-
filterModalParent_: filterModalParent_
|
|
13720
|
+
filterModalParent_: filterModalParent_,
|
|
13721
|
+
class_: class_
|
|
13717
13722
|
} = _ref;
|
|
13718
13723
|
const [get_sorting] = current_sorting_;
|
|
13719
13724
|
const all_products_loaded_ = $8tj43$createSignal(false);
|
|
@@ -14132,7 +14137,16 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14132
14137
|
});
|
|
14133
14138
|
}
|
|
14134
14139
|
}), _el$25, _co$11);
|
|
14135
|
-
$8tj43$effect(
|
|
14140
|
+
$8tj43$effect(_p$ => {
|
|
14141
|
+
var _v$ = (0, $c3820807ac1e6fd7$export$44dad306455dddf).SEARCH_PAGE,
|
|
14142
|
+
_v$2 = "depict plp search".concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : "");
|
|
14143
|
+
_v$ !== _p$.e && $8tj43$setAttribute(_el$6, "id", _p$.e = _v$);
|
|
14144
|
+
_v$2 !== _p$.t && $8tj43$className(_el$6, _p$.t = _v$2);
|
|
14145
|
+
return _p$;
|
|
14146
|
+
}, {
|
|
14147
|
+
e: undefined,
|
|
14148
|
+
t: undefined
|
|
14149
|
+
});
|
|
14136
14150
|
return _el$6;
|
|
14137
14151
|
})()];
|
|
14138
14152
|
}
|
|
@@ -14598,7 +14612,8 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
14598
14612
|
...grid_spacing_override()
|
|
14599
14613
|
})),
|
|
14600
14614
|
filterModalParent_: $8tj43$untrack(() => props.filterModalParent_),
|
|
14601
|
-
product_card_template_: product_card_template
|
|
14615
|
+
product_card_template_: product_card_template,
|
|
14616
|
+
class_: () => props.class
|
|
14602
14617
|
});
|
|
14603
14618
|
}, "Entire SearchPage failed");
|
|
14604
14619
|
}
|
|
@@ -14990,6 +15005,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
14990
15005
|
let input_element;
|
|
14991
15006
|
let buttonInField;
|
|
14992
15007
|
const search_field = $8tj43$createComponent((0, $584c06c09cf4609d$export$b94867ecbd698f21), {
|
|
15008
|
+
class_: () => props.class,
|
|
14993
15009
|
get BackIcon_() {
|
|
14994
15010
|
return shared_properties.BackIcon_;
|
|
14995
15011
|
},
|
package/latest/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
94
94
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
95
95
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.4.
|
|
97
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.4.5";
|
|
98
98
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
99
99
|
const cols_at_size = [];
|
|
100
100
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -109,7 +109,7 @@ const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
|
109
109
|
};
|
|
110
110
|
const $4e04be41243c3d80$export$6daf8749b65a1b77 = cols_at_size => {
|
|
111
111
|
// Check that every element is an array
|
|
112
|
-
const are_arrays = cols_at_size
|
|
112
|
+
const are_arrays = cols_at_size?.every?.(element => Array.isArray(element));
|
|
113
113
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
114
114
|
// Check width duplicates
|
|
115
115
|
const widths = cols_at_size.map(([_, width]) => width);
|
|
@@ -3423,7 +3423,7 @@ var $66b8b9a9613c141d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<but
|
|
|
3423
3423
|
$66b8b9a9613c141d$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button type=button class=clear>`),
|
|
3424
3424
|
$66b8b9a9613c141d$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=spacer>`),
|
|
3425
3425
|
$66b8b9a9613c141d$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
3426
|
-
$66b8b9a9613c141d$var$_tmpl$5 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div
|
|
3426
|
+
$66b8b9a9613c141d$var$_tmpl$5 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3427
3427
|
function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
3428
3428
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
3429
3429
|
input_field_ref_: input_field_ref_,
|
|
@@ -3436,7 +3436,8 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3436
3436
|
i18n_: i18n_,
|
|
3437
3437
|
after_focusing_: after_focusing_,
|
|
3438
3438
|
BackIcon_: BackIcon_,
|
|
3439
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
3439
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
3440
|
+
class_: class_
|
|
3440
3441
|
}) {
|
|
3441
3442
|
let input_element;
|
|
3442
3443
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3531,7 +3532,6 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3531
3532
|
[_el$17, _co$5] = $gVhhF$solidjsweb.getNextMarker(_el$16.nextSibling),
|
|
3532
3533
|
_el$18 = _el$17.nextSibling,
|
|
3533
3534
|
[_el$19, _co$6] = $gVhhF$solidjsweb.getNextMarker(_el$18.nextSibling);
|
|
3534
|
-
_el$3.classList.toggle("in-modal", !!!!on_back_);
|
|
3535
3535
|
$gVhhF$solidjsweb.insert(_el$3, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
3536
3536
|
get when() {
|
|
3537
3537
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -3639,14 +3639,17 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3639
3639
|
}
|
|
3640
3640
|
}), _el$19, _co$6);
|
|
3641
3641
|
$gVhhF$solidjsweb.effect(_p$ => {
|
|
3642
|
-
var _v$ =
|
|
3643
|
-
_v$2 = i18n_.
|
|
3644
|
-
|
|
3645
|
-
_v$
|
|
3642
|
+
var _v$ = `search-field${on_back_ ? " in-modal" : ""}${class_?.() ? ` ${class_()}` : ""}`,
|
|
3643
|
+
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
3644
|
+
_v$3 = i18n_.placeholder_text_();
|
|
3645
|
+
_v$ !== _p$.e && $gVhhF$solidjsweb.className(_el$3, _p$.e = _v$);
|
|
3646
|
+
_v$2 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
3647
|
+
_v$3 !== _p$.a && $gVhhF$solidjsweb.setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
3646
3648
|
return _p$;
|
|
3647
3649
|
}, {
|
|
3648
3650
|
e: undefined,
|
|
3649
|
-
t: undefined
|
|
3651
|
+
t: undefined,
|
|
3652
|
+
a: undefined
|
|
3650
3653
|
});
|
|
3651
3654
|
$gVhhF$solidjsweb.effect(() => $gVhhF$solidjsweb.setProperty(_el$6, "value", searchFieldValue()));
|
|
3652
3655
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
@@ -12973,7 +12976,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
12973
12976
|
});
|
|
12974
12977
|
}
|
|
12975
12978
|
var $f1d7cb69f839a526$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
12976
|
-
$f1d7cb69f839a526$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div
|
|
12979
|
+
$f1d7cb69f839a526$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
12977
12980
|
function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
12978
12981
|
depict_api_: depict_api_,
|
|
12979
12982
|
search_field_value_: search_field_value_,
|
|
@@ -13007,7 +13010,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13007
13010
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
13008
13011
|
modalVersionUsed_: modalVersionUsed_,
|
|
13009
13012
|
BackIcon_: BackIcon_,
|
|
13010
|
-
filterModalParent_: filterModalParent_
|
|
13013
|
+
filterModalParent_: filterModalParent_,
|
|
13014
|
+
class_: class_
|
|
13011
13015
|
}) {
|
|
13012
13016
|
const [get_sorting] = current_sorting_;
|
|
13013
13017
|
const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
|
|
@@ -13403,7 +13407,16 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13403
13407
|
});
|
|
13404
13408
|
}
|
|
13405
13409
|
}), _el$25, _co$11);
|
|
13406
|
-
$gVhhF$solidjsweb.effect(
|
|
13410
|
+
$gVhhF$solidjsweb.effect(_p$ => {
|
|
13411
|
+
var _v$ = (0, $0b6e2070a98de347$export$44dad306455dddf).SEARCH_PAGE,
|
|
13412
|
+
_v$2 = `depict plp search${class_?.() ? ` ${class_()}` : ""}`;
|
|
13413
|
+
_v$ !== _p$.e && $gVhhF$solidjsweb.setAttribute(_el$6, "id", _p$.e = _v$);
|
|
13414
|
+
_v$2 !== _p$.t && $gVhhF$solidjsweb.className(_el$6, _p$.t = _v$2);
|
|
13415
|
+
return _p$;
|
|
13416
|
+
}, {
|
|
13417
|
+
e: undefined,
|
|
13418
|
+
t: undefined
|
|
13419
|
+
});
|
|
13407
13420
|
return _el$6;
|
|
13408
13421
|
})()];
|
|
13409
13422
|
}
|
|
@@ -13782,7 +13795,8 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
13782
13795
|
...grid_spacing_override()
|
|
13783
13796
|
})),
|
|
13784
13797
|
filterModalParent_: $gVhhF$solidjs.untrack(() => props.filterModalParent_),
|
|
13785
|
-
product_card_template_: product_card_template
|
|
13798
|
+
product_card_template_: product_card_template,
|
|
13799
|
+
class_: () => props.class
|
|
13786
13800
|
});
|
|
13787
13801
|
}, "Entire SearchPage failed");
|
|
13788
13802
|
}
|
|
@@ -14081,6 +14095,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
14081
14095
|
let input_element;
|
|
14082
14096
|
let buttonInField;
|
|
14083
14097
|
const search_field = $gVhhF$solidjsweb.createComponent((0, $66b8b9a9613c141d$export$b94867ecbd698f21), {
|
|
14098
|
+
class_: () => props.class,
|
|
14084
14099
|
get BackIcon_() {
|
|
14085
14100
|
return shared_properties.BackIcon_;
|
|
14086
14101
|
},
|
package/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.4.
|
|
13
|
+
export const version = "4.4.5";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -1360,6 +1360,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1360
1360
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1361
1361
|
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
1362
1362
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1363
|
+
class?: string;
|
|
1363
1364
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1364
1365
|
/**
|
|
1365
1366
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1399,7 +1400,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1399
1400
|
* Open the modal with support for alignment.
|
|
1400
1401
|
* @returns {void}
|
|
1401
1402
|
*/
|
|
1402
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1403
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1403
1404
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1404
1405
|
export interface PageReplacer {
|
|
1405
1406
|
readonly render_: () => Node_Array;
|
|
@@ -1445,6 +1446,7 @@ interface SearchFieldParams {
|
|
|
1445
1446
|
modal_dispose_handler?: VoidFunction;
|
|
1446
1447
|
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
1447
1448
|
aligner_ref?: HTMLElement | null;
|
|
1449
|
+
class?: string;
|
|
1448
1450
|
}
|
|
1449
1451
|
/**
|
|
1450
1452
|
* Returns a SearchField that will open a modal aligned to it when clicked.
|
|
@@ -1477,5 +1479,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1477
1479
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1478
1480
|
layout?: PossibleLayout;
|
|
1479
1481
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1480
|
-
}): import("@depict-ai/utilishared
|
|
1482
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1481
1483
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.4.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.4.5";
|
|
11
11
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
12
12
|
const cols_at_size = [];
|
|
13
13
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -22,7 +22,7 @@ const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
|
22
22
|
};
|
|
23
23
|
const $b5cccc8ee7d24677$export$6daf8749b65a1b77 = cols_at_size => {
|
|
24
24
|
// Check that every element is an array
|
|
25
|
-
const are_arrays = cols_at_size
|
|
25
|
+
const are_arrays = cols_at_size?.every?.(element => Array.isArray(element));
|
|
26
26
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
27
27
|
// Check width duplicates
|
|
28
28
|
const widths = cols_at_size.map(([_, width]) => width);
|
|
@@ -3336,7 +3336,7 @@ var $5285d2814d0fac0c$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<button class=b
|
|
|
3336
3336
|
$5285d2814d0fac0c$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<button type=button class=clear>`),
|
|
3337
3337
|
$5285d2814d0fac0c$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=spacer>`),
|
|
3338
3338
|
$5285d2814d0fac0c$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<button class="submit major"type=button>`),
|
|
3339
|
-
$5285d2814d0fac0c$var$_tmpl$5 = /*#__PURE__*/$9HbP8$template(`<div
|
|
3339
|
+
$5285d2814d0fac0c$var$_tmpl$5 = /*#__PURE__*/$9HbP8$template(`<div role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3340
3340
|
function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
3341
3341
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
3342
3342
|
input_field_ref_: input_field_ref_,
|
|
@@ -3349,7 +3349,8 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3349
3349
|
i18n_: i18n_,
|
|
3350
3350
|
after_focusing_: after_focusing_,
|
|
3351
3351
|
BackIcon_: BackIcon_,
|
|
3352
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
3352
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
3353
|
+
class_: class_
|
|
3353
3354
|
}) {
|
|
3354
3355
|
let input_element;
|
|
3355
3356
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3444,7 +3445,6 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3444
3445
|
[_el$17, _co$5] = $9HbP8$getNextMarker(_el$16.nextSibling),
|
|
3445
3446
|
_el$18 = _el$17.nextSibling,
|
|
3446
3447
|
[_el$19, _co$6] = $9HbP8$getNextMarker(_el$18.nextSibling);
|
|
3447
|
-
_el$3.classList.toggle("in-modal", !!!!on_back_);
|
|
3448
3448
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
3449
3449
|
get when() {
|
|
3450
3450
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -3552,14 +3552,17 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3552
3552
|
}
|
|
3553
3553
|
}), _el$19, _co$6);
|
|
3554
3554
|
$9HbP8$effect(_p$ => {
|
|
3555
|
-
var _v$ =
|
|
3556
|
-
_v$2 = i18n_.
|
|
3557
|
-
|
|
3558
|
-
_v$
|
|
3555
|
+
var _v$ = `search-field${on_back_ ? " in-modal" : ""}${class_?.() ? ` ${class_()}` : ""}`,
|
|
3556
|
+
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
3557
|
+
_v$3 = i18n_.placeholder_text_();
|
|
3558
|
+
_v$ !== _p$.e && $9HbP8$className(_el$3, _p$.e = _v$);
|
|
3559
|
+
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
3560
|
+
_v$3 !== _p$.a && $9HbP8$setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
3559
3561
|
return _p$;
|
|
3560
3562
|
}, {
|
|
3561
3563
|
e: undefined,
|
|
3562
|
-
t: undefined
|
|
3564
|
+
t: undefined,
|
|
3565
|
+
a: undefined
|
|
3563
3566
|
});
|
|
3564
3567
|
$9HbP8$effect(() => $9HbP8$setProperty(_el$6, "value", searchFieldValue()));
|
|
3565
3568
|
$9HbP8$runHydrationEvents();
|
|
@@ -12886,7 +12889,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
12886
12889
|
});
|
|
12887
12890
|
}
|
|
12888
12891
|
var $7097477c78a89208$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
12889
|
-
$7097477c78a89208$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div
|
|
12892
|
+
$7097477c78a89208$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
12890
12893
|
function $7097477c78a89208$export$a54ec244c8863715({
|
|
12891
12894
|
depict_api_: depict_api_,
|
|
12892
12895
|
search_field_value_: search_field_value_,
|
|
@@ -12920,7 +12923,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
12920
12923
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
12921
12924
|
modalVersionUsed_: modalVersionUsed_,
|
|
12922
12925
|
BackIcon_: BackIcon_,
|
|
12923
|
-
filterModalParent_: filterModalParent_
|
|
12926
|
+
filterModalParent_: filterModalParent_,
|
|
12927
|
+
class_: class_
|
|
12924
12928
|
}) {
|
|
12925
12929
|
const [get_sorting] = current_sorting_;
|
|
12926
12930
|
const all_products_loaded_ = $9HbP8$createSignal(false);
|
|
@@ -13316,7 +13320,16 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13316
13320
|
});
|
|
13317
13321
|
}
|
|
13318
13322
|
}), _el$25, _co$11);
|
|
13319
|
-
$9HbP8$effect(
|
|
13323
|
+
$9HbP8$effect(_p$ => {
|
|
13324
|
+
var _v$ = (0, $f86ba724282f6690$export$44dad306455dddf).SEARCH_PAGE,
|
|
13325
|
+
_v$2 = `depict plp search${class_?.() ? ` ${class_()}` : ""}`;
|
|
13326
|
+
_v$ !== _p$.e && $9HbP8$setAttribute(_el$6, "id", _p$.e = _v$);
|
|
13327
|
+
_v$2 !== _p$.t && $9HbP8$className(_el$6, _p$.t = _v$2);
|
|
13328
|
+
return _p$;
|
|
13329
|
+
}, {
|
|
13330
|
+
e: undefined,
|
|
13331
|
+
t: undefined
|
|
13332
|
+
});
|
|
13320
13333
|
return _el$6;
|
|
13321
13334
|
})()];
|
|
13322
13335
|
}
|
|
@@ -13695,7 +13708,8 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
13695
13708
|
...grid_spacing_override()
|
|
13696
13709
|
})),
|
|
13697
13710
|
filterModalParent_: $9HbP8$untrack(() => props.filterModalParent_),
|
|
13698
|
-
product_card_template_: product_card_template
|
|
13711
|
+
product_card_template_: product_card_template,
|
|
13712
|
+
class_: () => props.class
|
|
13699
13713
|
});
|
|
13700
13714
|
}, "Entire SearchPage failed");
|
|
13701
13715
|
}
|
|
@@ -13994,6 +14008,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
13994
14008
|
let input_element;
|
|
13995
14009
|
let buttonInField;
|
|
13996
14010
|
const search_field = $9HbP8$createComponent((0, $5285d2814d0fac0c$export$b94867ecbd698f21), {
|
|
14011
|
+
class_: () => props.class,
|
|
13997
14012
|
get BackIcon_() {
|
|
13998
14013
|
return shared_properties.BackIcon_;
|
|
13999
14014
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.5",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^4.1.
|
|
240
|
-
"@depict-ai/types": "^5.1.
|
|
241
|
-
"@depict-ai/utilishared": "^2.1.
|
|
239
|
+
"@depict-ai/plp-styling": "^4.1.5",
|
|
240
|
+
"@depict-ai/types": "^5.1.4",
|
|
241
|
+
"@depict-ai/utilishared": "^2.1.4",
|
|
242
242
|
"solid-js": "^1.8.12"
|
|
243
243
|
},
|
|
244
244
|
"type": "module",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -100,7 +100,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
100
100
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
101
101
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
102
102
|
/*! Depict.ai search and product listing SDK */
|
|
103
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.4.
|
|
103
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.4.5";
|
|
104
104
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
105
105
|
const cols_at_size = [];
|
|
106
106
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -115,8 +115,9 @@ const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
|
115
115
|
return cols_at_size;
|
|
116
116
|
};
|
|
117
117
|
const $5401a6698b0c0658$export$6daf8749b65a1b77 = cols_at_size => {
|
|
118
|
+
var _cols_at_size$every;
|
|
118
119
|
// Check that every element is an array
|
|
119
|
-
const are_arrays = cols_at_size.every(element => Array.isArray(element));
|
|
120
|
+
const are_arrays = cols_at_size === null || cols_at_size === void 0 ? void 0 : (_cols_at_size$every = cols_at_size.every) === null || _cols_at_size$every === void 0 ? void 0 : _cols_at_size$every.call(cols_at_size, element => Array.isArray(element));
|
|
120
121
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
121
122
|
// Check width duplicates
|
|
122
123
|
const widths = cols_at_size.map(_ref => {
|
|
@@ -3082,7 +3083,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3082
3083
|
i18n_: i18n_,
|
|
3083
3084
|
after_focusing_: after_focusing_,
|
|
3084
3085
|
BackIcon_: BackIcon_,
|
|
3085
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
3086
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
3087
|
+
class_: class_
|
|
3086
3088
|
} = _ref;
|
|
3087
3089
|
let input_element;
|
|
3088
3090
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3142,7 +3144,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3142
3144
|
return $3hooq$solidjsweb.createComponent(BackIcon_, {});
|
|
3143
3145
|
}
|
|
3144
3146
|
})) : $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), true);
|
|
3145
|
-
return $3hooq$solidjsweb.ssr($29e5dbeb69da7a36$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), "search-field
|
|
3147
|
+
return $3hooq$solidjsweb.ssr($29e5dbeb69da7a36$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat($3hooq$solidjsweb.escape(class_(), true)) : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
3146
3148
|
get when() {
|
|
3147
3149
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
3148
3150
|
},
|
|
@@ -11315,7 +11317,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
11315
11317
|
});
|
|
11316
11318
|
}
|
|
11317
11319
|
var $739c927cbecd26b0$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
11318
|
-
$739c927cbecd26b0$var$_tmpl$2 = ["<div", ' class="
|
|
11320
|
+
$739c927cbecd26b0$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
11319
11321
|
function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
11320
11322
|
let {
|
|
11321
11323
|
depict_api_: depict_api_,
|
|
@@ -11350,7 +11352,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11350
11352
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
11351
11353
|
modalVersionUsed_: modalVersionUsed_,
|
|
11352
11354
|
BackIcon_: BackIcon_,
|
|
11353
|
-
filterModalParent_: filterModalParent_
|
|
11355
|
+
filterModalParent_: filterModalParent_,
|
|
11356
|
+
class_: class_
|
|
11354
11357
|
} = _ref;
|
|
11355
11358
|
const [get_sorting] = current_sorting_;
|
|
11356
11359
|
const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
|
|
@@ -11594,7 +11597,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11594
11597
|
alignmentSignals_: alignmentSignals_
|
|
11595
11598
|
});
|
|
11596
11599
|
});
|
|
11597
|
-
return [(0, $3hooq$solidjsweb.isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $3hooq$solidjsweb.ssr($739c927cbecd26b0$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey() + $3hooq$solidjsweb.ssrAttribute("id", $3hooq$solidjsweb.escape((0, $c95c6dd9e93acd82$export$44dad306455dddf).SEARCH_PAGE, true), false), $3hooq$solidjsweb.escape(get_search_field_elements()), make_category_suggestion_card_ ? $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
11600
|
+
return [(0, $3hooq$solidjsweb.isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $3hooq$solidjsweb.ssr($739c927cbecd26b0$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey() + $3hooq$solidjsweb.ssrAttribute("id", $3hooq$solidjsweb.escape((0, $c95c6dd9e93acd82$export$44dad306455dddf).SEARCH_PAGE, true), false), "depict plp search".concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat($3hooq$solidjsweb.escape(class_(), true)) : ""), $3hooq$solidjsweb.escape(get_search_field_elements()), make_category_suggestion_card_ ? $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
11598
11601
|
severity_: "error",
|
|
11599
11602
|
message_: "Category suggestions failed",
|
|
11600
11603
|
get children() {
|
|
@@ -12194,7 +12197,8 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
12194
12197
|
...grid_spacing_override()
|
|
12195
12198
|
})),
|
|
12196
12199
|
filterModalParent_: $3hooq$solidjs.untrack(() => props.filterModalParent_),
|
|
12197
|
-
product_card_template_: product_card_template
|
|
12200
|
+
product_card_template_: product_card_template,
|
|
12201
|
+
class_: () => props.class
|
|
12198
12202
|
});
|
|
12199
12203
|
}, "Entire SearchPage failed");
|
|
12200
12204
|
}
|
|
@@ -12586,6 +12590,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
12586
12590
|
let input_element;
|
|
12587
12591
|
let buttonInField;
|
|
12588
12592
|
const search_field = $3hooq$solidjsweb.createComponent((0, $29e5dbeb69da7a36$export$b94867ecbd698f21), {
|
|
12593
|
+
class_: () => props.class,
|
|
12589
12594
|
get BackIcon_() {
|
|
12590
12595
|
return shared_properties.BackIcon_;
|
|
12591
12596
|
},
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.4.
|
|
13
|
+
export const version = "4.4.5";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -1360,6 +1360,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1360
1360
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1361
1361
|
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
1362
1362
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1363
|
+
class?: string;
|
|
1363
1364
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1364
1365
|
/**
|
|
1365
1366
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1399,7 +1400,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1399
1400
|
* Open the modal with support for alignment.
|
|
1400
1401
|
* @returns {void}
|
|
1401
1402
|
*/
|
|
1402
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1403
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1403
1404
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1404
1405
|
export interface PageReplacer {
|
|
1405
1406
|
readonly render_: () => Node_Array;
|
|
@@ -1445,6 +1446,7 @@ interface SearchFieldParams {
|
|
|
1445
1446
|
modal_dispose_handler?: VoidFunction;
|
|
1446
1447
|
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
1447
1448
|
aligner_ref?: HTMLElement | null;
|
|
1449
|
+
class?: string;
|
|
1448
1450
|
}
|
|
1449
1451
|
/**
|
|
1450
1452
|
* Returns a SearchField that will open a modal aligned to it when clicked.
|
|
@@ -1477,5 +1479,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1477
1479
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1478
1480
|
layout?: PossibleLayout;
|
|
1479
1481
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1480
|
-
}): import("@depict-ai/utilishared
|
|
1482
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1481
1483
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$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.4.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.4.5";
|
|
14
14
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
15
15
|
const cols_at_size = [];
|
|
16
16
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -25,8 +25,9 @@ const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
|
25
25
|
return cols_at_size;
|
|
26
26
|
};
|
|
27
27
|
const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
|
|
28
|
+
var _cols_at_size$every;
|
|
28
29
|
// Check that every element is an array
|
|
29
|
-
const are_arrays = cols_at_size.every(element => Array.isArray(element));
|
|
30
|
+
const are_arrays = cols_at_size === null || cols_at_size === void 0 ? void 0 : (_cols_at_size$every = cols_at_size.every) === null || _cols_at_size$every === void 0 ? void 0 : _cols_at_size$every.call(cols_at_size, element => Array.isArray(element));
|
|
30
31
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
31
32
|
// Check width duplicates
|
|
32
33
|
const widths = cols_at_size.map(_ref => {
|
|
@@ -2992,7 +2993,8 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
2992
2993
|
i18n_: i18n_,
|
|
2993
2994
|
after_focusing_: after_focusing_,
|
|
2994
2995
|
BackIcon_: BackIcon_,
|
|
2995
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
2996
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
2997
|
+
class_: class_
|
|
2996
2998
|
} = _ref;
|
|
2997
2999
|
let input_element;
|
|
2998
3000
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3052,7 +3054,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3052
3054
|
return $b8hua$createComponent(BackIcon_, {});
|
|
3053
3055
|
}
|
|
3054
3056
|
})) : $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), true);
|
|
3055
|
-
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$3, $b8hua$ssrHydrationKey(), "search-field
|
|
3057
|
+
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$3, $b8hua$ssrHydrationKey(), "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat($b8hua$escape(class_(), true)) : ""), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
3056
3058
|
get when() {
|
|
3057
3059
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
3058
3060
|
},
|
|
@@ -11225,7 +11227,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11225
11227
|
});
|
|
11226
11228
|
}
|
|
11227
11229
|
var $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
11228
|
-
$da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="
|
|
11230
|
+
$da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
11229
11231
|
function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
11230
11232
|
let {
|
|
11231
11233
|
depict_api_: depict_api_,
|
|
@@ -11260,7 +11262,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11260
11262
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
11261
11263
|
modalVersionUsed_: modalVersionUsed_,
|
|
11262
11264
|
BackIcon_: BackIcon_,
|
|
11263
|
-
filterModalParent_: filterModalParent_
|
|
11265
|
+
filterModalParent_: filterModalParent_,
|
|
11266
|
+
class_: class_
|
|
11264
11267
|
} = _ref;
|
|
11265
11268
|
const [get_sorting] = current_sorting_;
|
|
11266
11269
|
const all_products_loaded_ = $b8hua$createSignal(false);
|
|
@@ -11504,7 +11507,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11504
11507
|
alignmentSignals_: alignmentSignals_
|
|
11505
11508
|
});
|
|
11506
11509
|
});
|
|
11507
|
-
return [(0, $b8hua$isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $b8hua$ssr($da279c5a540c6846$var$_tmpl$2, $b8hua$ssrHydrationKey() + $b8hua$ssrAttribute("id", $b8hua$escape((0, $c3820807ac1e6fd7$export$44dad306455dddf).SEARCH_PAGE, true), false), $b8hua$escape(get_search_field_elements()), make_category_suggestion_card_ ? $b8hua$escape($b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
11510
|
+
return [(0, $b8hua$isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $b8hua$ssr($da279c5a540c6846$var$_tmpl$2, $b8hua$ssrHydrationKey() + $b8hua$ssrAttribute("id", $b8hua$escape((0, $c3820807ac1e6fd7$export$44dad306455dddf).SEARCH_PAGE, true), false), "depict plp search".concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat($b8hua$escape(class_(), true)) : ""), $b8hua$escape(get_search_field_elements()), make_category_suggestion_card_ ? $b8hua$escape($b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
11508
11511
|
severity_: "error",
|
|
11509
11512
|
message_: "Category suggestions failed",
|
|
11510
11513
|
get children() {
|
|
@@ -12104,7 +12107,8 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
12104
12107
|
...grid_spacing_override()
|
|
12105
12108
|
})),
|
|
12106
12109
|
filterModalParent_: $b8hua$untrack(() => props.filterModalParent_),
|
|
12107
|
-
product_card_template_: product_card_template
|
|
12110
|
+
product_card_template_: product_card_template,
|
|
12111
|
+
class_: () => props.class
|
|
12108
12112
|
});
|
|
12109
12113
|
}, "Entire SearchPage failed");
|
|
12110
12114
|
}
|
|
@@ -12496,6 +12500,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12496
12500
|
let input_element;
|
|
12497
12501
|
let buttonInField;
|
|
12498
12502
|
const search_field = $b8hua$createComponent((0, $584c06c09cf4609d$export$b94867ecbd698f21), {
|
|
12503
|
+
class_: () => props.class,
|
|
12499
12504
|
get BackIcon_() {
|
|
12500
12505
|
return shared_properties.BackIcon_;
|
|
12501
12506
|
},
|
package/server/latest/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
94
94
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
95
95
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.4.
|
|
97
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.4.5";
|
|
98
98
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
99
99
|
const cols_at_size = [];
|
|
100
100
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -109,7 +109,7 @@ const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
|
109
109
|
};
|
|
110
110
|
const $4e04be41243c3d80$export$6daf8749b65a1b77 = cols_at_size => {
|
|
111
111
|
// Check that every element is an array
|
|
112
|
-
const are_arrays = cols_at_size
|
|
112
|
+
const are_arrays = cols_at_size?.every?.(element => Array.isArray(element));
|
|
113
113
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
114
114
|
// Check width duplicates
|
|
115
115
|
const widths = cols_at_size.map(([_, width]) => width);
|
|
@@ -2910,7 +2910,8 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
2910
2910
|
i18n_: i18n_,
|
|
2911
2911
|
after_focusing_: after_focusing_,
|
|
2912
2912
|
BackIcon_: BackIcon_,
|
|
2913
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
2913
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
2914
|
+
class_: class_
|
|
2914
2915
|
}) {
|
|
2915
2916
|
let input_element;
|
|
2916
2917
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -2967,7 +2968,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
2967
2968
|
return $5vyXB$solidjsweb.createComponent(BackIcon_, {});
|
|
2968
2969
|
}
|
|
2969
2970
|
})) : $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $c77c68e559a1506c$export$3b621d86b1566b2), {})), true);
|
|
2970
|
-
return $5vyXB$solidjsweb.ssr($66b8b9a9613c141d$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), `search-field
|
|
2971
|
+
return $5vyXB$solidjsweb.ssr($66b8b9a9613c141d$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), `search-field${on_back_ ? " in-modal" : ""}${class_?.() ? ` ${$5vyXB$solidjsweb.escape(class_(), true)}` : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2971
2972
|
get when() {
|
|
2972
2973
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
2973
2974
|
},
|
|
@@ -10591,7 +10592,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10591
10592
|
});
|
|
10592
10593
|
}
|
|
10593
10594
|
var $f1d7cb69f839a526$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
10594
|
-
$f1d7cb69f839a526$var$_tmpl$2 = ["<div", ' class="
|
|
10595
|
+
$f1d7cb69f839a526$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
10595
10596
|
function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
10596
10597
|
depict_api_: depict_api_,
|
|
10597
10598
|
search_field_value_: search_field_value_,
|
|
@@ -10625,7 +10626,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10625
10626
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
10626
10627
|
modalVersionUsed_: modalVersionUsed_,
|
|
10627
10628
|
BackIcon_: BackIcon_,
|
|
10628
|
-
filterModalParent_: filterModalParent_
|
|
10629
|
+
filterModalParent_: filterModalParent_,
|
|
10630
|
+
class_: class_
|
|
10629
10631
|
}) {
|
|
10630
10632
|
const [get_sorting] = current_sorting_;
|
|
10631
10633
|
const all_products_loaded_ = $5vyXB$solidjs.createSignal(false);
|
|
@@ -10850,7 +10852,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10850
10852
|
alignmentSignals_: alignmentSignals_
|
|
10851
10853
|
});
|
|
10852
10854
|
});
|
|
10853
|
-
return [(0, $5vyXB$solidjsweb.isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $5vyXB$solidjsweb.ssr($f1d7cb69f839a526$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey() + $5vyXB$solidjsweb.ssrAttribute("id", $5vyXB$solidjsweb.escape((0, $0b6e2070a98de347$export$44dad306455dddf).SEARCH_PAGE, true), false), $5vyXB$solidjsweb.escape(get_search_field_elements()), make_category_suggestion_card_ ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $edafe91daf3091d7$export$b69d0d92862de18b), {
|
|
10855
|
+
return [(0, $5vyXB$solidjsweb.isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $5vyXB$solidjsweb.ssr($f1d7cb69f839a526$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey() + $5vyXB$solidjsweb.ssrAttribute("id", $5vyXB$solidjsweb.escape((0, $0b6e2070a98de347$export$44dad306455dddf).SEARCH_PAGE, true), false), `depict plp search${class_?.() ? ` ${$5vyXB$solidjsweb.escape(class_(), true)}` : ""}`, $5vyXB$solidjsweb.escape(get_search_field_elements()), make_category_suggestion_card_ ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $edafe91daf3091d7$export$b69d0d92862de18b), {
|
|
10854
10856
|
severity_: "error",
|
|
10855
10857
|
message_: "Category suggestions failed",
|
|
10856
10858
|
get children() {
|
|
@@ -11359,7 +11361,8 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
11359
11361
|
...grid_spacing_override()
|
|
11360
11362
|
})),
|
|
11361
11363
|
filterModalParent_: $5vyXB$solidjs.untrack(() => props.filterModalParent_),
|
|
11362
|
-
product_card_template_: product_card_template
|
|
11364
|
+
product_card_template_: product_card_template,
|
|
11365
|
+
class_: () => props.class
|
|
11363
11366
|
});
|
|
11364
11367
|
}, "Entire SearchPage failed");
|
|
11365
11368
|
}
|
|
@@ -11658,6 +11661,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11658
11661
|
let input_element;
|
|
11659
11662
|
let buttonInField;
|
|
11660
11663
|
const search_field = $5vyXB$solidjsweb.createComponent((0, $66b8b9a9613c141d$export$b94867ecbd698f21), {
|
|
11664
|
+
class_: () => props.class,
|
|
11661
11665
|
get BackIcon_() {
|
|
11662
11666
|
return shared_properties.BackIcon_;
|
|
11663
11667
|
},
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.4.
|
|
13
|
+
export const version = "4.4.5";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -1360,6 +1360,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1360
1360
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1361
1361
|
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
1362
1362
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1363
|
+
class?: string;
|
|
1363
1364
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1364
1365
|
/**
|
|
1365
1366
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1399,7 +1400,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1399
1400
|
* Open the modal with support for alignment.
|
|
1400
1401
|
* @returns {void}
|
|
1401
1402
|
*/
|
|
1402
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1403
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1403
1404
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1404
1405
|
export interface PageReplacer {
|
|
1405
1406
|
readonly render_: () => Node_Array;
|
|
@@ -1445,6 +1446,7 @@ interface SearchFieldParams {
|
|
|
1445
1446
|
modal_dispose_handler?: VoidFunction;
|
|
1446
1447
|
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
1447
1448
|
aligner_ref?: HTMLElement | null;
|
|
1449
|
+
class?: string;
|
|
1448
1450
|
}
|
|
1449
1451
|
/**
|
|
1450
1452
|
* Returns a SearchField that will open a modal aligned to it when clicked.
|
|
@@ -1477,5 +1479,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1477
1479
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1478
1480
|
layout?: PossibleLayout;
|
|
1479
1481
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1480
|
-
}): import("@depict-ai/utilishared
|
|
1482
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1481
1483
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.4.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.4.5";
|
|
11
11
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
12
12
|
const cols_at_size = [];
|
|
13
13
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -22,7 +22,7 @@ const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
|
22
22
|
};
|
|
23
23
|
const $b5cccc8ee7d24677$export$6daf8749b65a1b77 = cols_at_size => {
|
|
24
24
|
// Check that every element is an array
|
|
25
|
-
const are_arrays = cols_at_size
|
|
25
|
+
const are_arrays = cols_at_size?.every?.(element => Array.isArray(element));
|
|
26
26
|
if (!are_arrays) throw new Error("Every element in cols_at_size must be an array");
|
|
27
27
|
// Check width duplicates
|
|
28
28
|
const widths = cols_at_size.map(([_, width]) => width);
|
|
@@ -2823,7 +2823,8 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
2823
2823
|
i18n_: i18n_,
|
|
2824
2824
|
after_focusing_: after_focusing_,
|
|
2825
2825
|
BackIcon_: BackIcon_,
|
|
2826
|
-
buttonInFieldRef_: buttonInFieldRef_
|
|
2826
|
+
buttonInFieldRef_: buttonInFieldRef_,
|
|
2827
|
+
class_: class_
|
|
2827
2828
|
}) {
|
|
2828
2829
|
let input_element;
|
|
2829
2830
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -2880,7 +2881,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
2880
2881
|
return $i7OB2$createComponent(BackIcon_, {});
|
|
2881
2882
|
}
|
|
2882
2883
|
})) : $i7OB2$escape($i7OB2$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {})), true);
|
|
2883
|
-
return $i7OB2$ssr($5285d2814d0fac0c$var$_tmpl$3, $i7OB2$ssrHydrationKey(), `search-field
|
|
2884
|
+
return $i7OB2$ssr($5285d2814d0fac0c$var$_tmpl$3, $i7OB2$ssrHydrationKey(), `search-field${on_back_ ? " in-modal" : ""}${class_?.() ? ` ${$i7OB2$escape(class_(), true)}` : ""}`, $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
2884
2885
|
get when() {
|
|
2885
2886
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
2886
2887
|
},
|
|
@@ -10504,7 +10505,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
10504
10505
|
});
|
|
10505
10506
|
}
|
|
10506
10507
|
var $7097477c78a89208$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
10507
|
-
$7097477c78a89208$var$_tmpl$2 = ["<div", ' class="
|
|
10508
|
+
$7097477c78a89208$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
10508
10509
|
function $7097477c78a89208$export$a54ec244c8863715({
|
|
10509
10510
|
depict_api_: depict_api_,
|
|
10510
10511
|
search_field_value_: search_field_value_,
|
|
@@ -10538,7 +10539,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
10538
10539
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
10539
10540
|
modalVersionUsed_: modalVersionUsed_,
|
|
10540
10541
|
BackIcon_: BackIcon_,
|
|
10541
|
-
filterModalParent_: filterModalParent_
|
|
10542
|
+
filterModalParent_: filterModalParent_,
|
|
10543
|
+
class_: class_
|
|
10542
10544
|
}) {
|
|
10543
10545
|
const [get_sorting] = current_sorting_;
|
|
10544
10546
|
const all_products_loaded_ = $i7OB2$createSignal(false);
|
|
@@ -10763,7 +10765,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
10763
10765
|
alignmentSignals_: alignmentSignals_
|
|
10764
10766
|
});
|
|
10765
10767
|
});
|
|
10766
|
-
return [(0, $i7OB2$isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $i7OB2$ssr($7097477c78a89208$var$_tmpl$2, $i7OB2$ssrHydrationKey() + $i7OB2$ssrAttribute("id", $i7OB2$escape((0, $f86ba724282f6690$export$44dad306455dddf).SEARCH_PAGE, true), false), $i7OB2$escape(get_search_field_elements()), make_category_suggestion_card_ ? $i7OB2$escape($i7OB2$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
10768
|
+
return [(0, $i7OB2$isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"), $i7OB2$ssr($7097477c78a89208$var$_tmpl$2, $i7OB2$ssrHydrationKey() + $i7OB2$ssrAttribute("id", $i7OB2$escape((0, $f86ba724282f6690$export$44dad306455dddf).SEARCH_PAGE, true), false), `depict plp search${class_?.() ? ` ${$i7OB2$escape(class_(), true)}` : ""}`, $i7OB2$escape(get_search_field_elements()), make_category_suggestion_card_ ? $i7OB2$escape($i7OB2$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
10767
10769
|
severity_: "error",
|
|
10768
10770
|
message_: "Category suggestions failed",
|
|
10769
10771
|
get children() {
|
|
@@ -11272,7 +11274,8 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
11272
11274
|
...grid_spacing_override()
|
|
11273
11275
|
})),
|
|
11274
11276
|
filterModalParent_: $i7OB2$untrack(() => props.filterModalParent_),
|
|
11275
|
-
product_card_template_: product_card_template
|
|
11277
|
+
product_card_template_: product_card_template,
|
|
11278
|
+
class_: () => props.class
|
|
11276
11279
|
});
|
|
11277
11280
|
}, "Entire SearchPage failed");
|
|
11278
11281
|
}
|
|
@@ -11571,6 +11574,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
11571
11574
|
let input_element;
|
|
11572
11575
|
let buttonInField;
|
|
11573
11576
|
const search_field = $i7OB2$createComponent((0, $5285d2814d0fac0c$export$b94867ecbd698f21), {
|
|
11577
|
+
class_: () => props.class,
|
|
11574
11578
|
get BackIcon_() {
|
|
11575
11579
|
return shared_properties.BackIcon_;
|
|
11576
11580
|
},
|