@depict-ai/ui 4.4.0 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ES10/index.cjs +29 -17
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +29 -17
- package/latest/index.cjs +28 -17
- package/latest/index.d.ts +1 -1
- package/latest/index.js +28 -17
- package/package.json +2 -2
- package/server/ES10/index.cjs +26 -13
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +26 -13
- package/server/latest/index.cjs +25 -13
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +25 -13
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.2";
|
|
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++) {
|
|
@@ -3600,6 +3600,16 @@ let $c95c6dd9e93acd82$export$44dad306455dddf;
|
|
|
3600
3600
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
3601
3601
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3602
3602
|
})($c95c6dd9e93acd82$export$44dad306455dddf || ($c95c6dd9e93acd82$export$44dad306455dddf = {}));
|
|
3603
|
+
var $34934309832515dc$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg width=21 height=20 viewBox="0 0 21 20"fill=none><path fill-rule=evenodd d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z"fill=#0f0f0f>`);
|
|
3604
|
+
function $34934309832515dc$export$f7658c347b037c3f() {
|
|
3605
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3606
|
+
return (() => {
|
|
3607
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($34934309832515dc$var$_tmpl$);
|
|
3608
|
+
$52FdA$solidjsweb.spread(_el$, props, true, true);
|
|
3609
|
+
$52FdA$solidjsweb.runHydrationEvents();
|
|
3610
|
+
return _el$;
|
|
3611
|
+
})();
|
|
3612
|
+
}
|
|
3603
3613
|
var $29e5dbeb69da7a36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class=back type=button>`),
|
|
3604
3614
|
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=clear>`),
|
|
3605
3615
|
$29e5dbeb69da7a36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=spacer>`),
|
|
@@ -3618,7 +3628,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3618
3628
|
i18n_: i18n_,
|
|
3619
3629
|
after_focusing_: after_focusing_,
|
|
3620
3630
|
BackIcon_: BackIcon_,
|
|
3621
|
-
|
|
3631
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
3622
3632
|
} = _ref;
|
|
3623
3633
|
let input_element;
|
|
3624
3634
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3662,6 +3672,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3662
3672
|
});
|
|
3663
3673
|
const ClearButton = () => (() => {
|
|
3664
3674
|
var _el$2 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$2);
|
|
3675
|
+
var _ref$ = buttonInFieldRef_;
|
|
3676
|
+
typeof _ref$ === "function" ? $52FdA$solidjsweb.use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3665
3677
|
$52FdA$solidjsweb.spread(_el$2, $52FdA$solidjsweb.mergeProps({
|
|
3666
3678
|
get classList() {
|
|
3667
3679
|
return {
|
|
@@ -3689,7 +3701,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3689
3701
|
return !searchFieldEmpty();
|
|
3690
3702
|
},
|
|
3691
3703
|
get fallback() {
|
|
3692
|
-
return $52FdA$solidjsweb.createComponent((0, $
|
|
3704
|
+
return $52FdA$solidjsweb.createComponent((0, $34934309832515dc$export$f7658c347b037c3f), {});
|
|
3693
3705
|
},
|
|
3694
3706
|
get children() {
|
|
3695
3707
|
return $52FdA$solidjsweb.createComponent(BackIcon_, {});
|
|
@@ -3805,11 +3817,11 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3805
3817
|
if (!dont_submit) submit_query_();
|
|
3806
3818
|
}
|
|
3807
3819
|
}), true);
|
|
3808
|
-
var _ref$ = $52FdA$depictaiutilishared.catchify(el => {
|
|
3820
|
+
var _ref$2 = $52FdA$depictaiutilishared.catchify(el => {
|
|
3809
3821
|
input_element = el;
|
|
3810
3822
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
3811
3823
|
});
|
|
3812
|
-
typeof _ref$ === "function" && $52FdA$solidjsweb.use(_ref
|
|
3824
|
+
typeof _ref$2 === "function" && $52FdA$solidjsweb.use(_ref$2, _el$6);
|
|
3813
3825
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
3814
3826
|
$52FdA$solidjsweb.insert(_el$5, !isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
3815
3827
|
$52FdA$solidjsweb.insert(_el$3, isNewModal && $52FdA$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -3818,8 +3830,6 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3818
3830
|
get children() {
|
|
3819
3831
|
var _el$11 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$4);
|
|
3820
3832
|
$52FdA$solidjsweb.addEventListener(_el$11, "click", $52FdA$depictaiutilishared.catchify(() => submit_query_()), true);
|
|
3821
|
-
var _ref$2 = submit_button_ref_;
|
|
3822
|
-
typeof _ref$2 === "function" ? $52FdA$solidjsweb.use(_ref$2, _el$11) : submit_button_ref_ = _el$11;
|
|
3823
3833
|
$52FdA$solidjsweb.insert(_el$11, $52FdA$solidjsweb.createComponent((0, $5b88b077e48a4451$export$82eafebb825fc23f), {}));
|
|
3824
3834
|
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3825
3835
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
@@ -13612,7 +13622,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13612
13622
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
13613
13623
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
13614
13624
|
setPollAlignment_: setPollAlignment_,
|
|
13615
|
-
|
|
13625
|
+
buttonInField_: buttonInField_,
|
|
13616
13626
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13617
13627
|
} = _ref;
|
|
13618
13628
|
return $52FdA$solidjs.createRoot(dispose => {
|
|
@@ -13659,7 +13669,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13659
13669
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
13660
13670
|
setPollAlignment_(true);
|
|
13661
13671
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
13662
|
-
|
|
13672
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
13663
13673
|
opacity: 1
|
|
13664
13674
|
}, {
|
|
13665
13675
|
opacity: 0
|
|
@@ -13726,6 +13736,8 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13726
13736
|
width: width,
|
|
13727
13737
|
left: left
|
|
13728
13738
|
} = fakeField.getBoundingClientRect();
|
|
13739
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
13740
|
+
const pxOffCenter = Math.abs($52FdA$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
13729
13741
|
$ce2f7ec02a8f2173$export$23d40cc5971c3acd({
|
|
13730
13742
|
setBackdropStyle_: setBackdropStyle_,
|
|
13731
13743
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -13741,12 +13753,12 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13741
13753
|
duration: closeDuration_,
|
|
13742
13754
|
fill: "forwards",
|
|
13743
13755
|
easing: "ease-out"
|
|
13744
|
-
}).finished,
|
|
13756
|
+
}).finished, buttonInField_.animate([{
|
|
13745
13757
|
opacity: 0
|
|
13746
13758
|
}, {
|
|
13747
13759
|
opacity: 1
|
|
13748
13760
|
}], {
|
|
13749
|
-
duration: closeDuration_ / 3,
|
|
13761
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
13750
13762
|
delay: closeDuration_ * (2 / 3),
|
|
13751
13763
|
fill: "forwards"
|
|
13752
13764
|
}).finished]);
|
|
@@ -13966,7 +13978,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
13966
13978
|
if (!input_field_accessor_value) break add_input_field;
|
|
13967
13979
|
let input_element;
|
|
13968
13980
|
let div_with_field_class;
|
|
13969
|
-
let
|
|
13981
|
+
let buttonInField;
|
|
13970
13982
|
const search_field = SafeSearchField({
|
|
13971
13983
|
i18n_: i18n_,
|
|
13972
13984
|
search_field_value_: search_field_value_,
|
|
@@ -13976,7 +13988,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
13976
13988
|
field_element_ref_: el => div_with_field_class = el,
|
|
13977
13989
|
disabled_: true,
|
|
13978
13990
|
BackIcon_: BackIcon_,
|
|
13979
|
-
|
|
13991
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
13980
13992
|
});
|
|
13981
13993
|
if (!search_field) break add_input_field;
|
|
13982
13994
|
setModalBodyStyle({});
|
|
@@ -14011,7 +14023,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
14011
14023
|
bodyAlignmentSignal_: modal_body_style,
|
|
14012
14024
|
backdropStyleSignal_: modal_backdrop_style,
|
|
14013
14025
|
setPollAlignment_: setPollAlignment_,
|
|
14014
|
-
|
|
14026
|
+
buttonInField_: buttonInField,
|
|
14015
14027
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
14016
14028
|
});
|
|
14017
14029
|
}
|
|
@@ -15066,7 +15078,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
15066
15078
|
const shared_properties = $ddd39c5f36f49703$export$12fa711345994013(depict_search);
|
|
15067
15079
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
15068
15080
|
let input_element;
|
|
15069
|
-
let
|
|
15081
|
+
let buttonInField;
|
|
15070
15082
|
const search_field = $52FdA$solidjsweb.createComponent((0, $29e5dbeb69da7a36$export$b94867ecbd698f21), {
|
|
15071
15083
|
get BackIcon_() {
|
|
15072
15084
|
return shared_properties.BackIcon_;
|
|
@@ -15085,7 +15097,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
15085
15097
|
},
|
|
15086
15098
|
disabled_: true,
|
|
15087
15099
|
input_field_ref_: el => input_element = el,
|
|
15088
|
-
|
|
15100
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
15089
15101
|
field_element_ref_: field => {
|
|
15090
15102
|
const bodyAlignmentSignal_ = $52FdA$solidjs.createSignal({
|
|
15091
15103
|
position: "fixed"
|
|
@@ -15132,7 +15144,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
15132
15144
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
15133
15145
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
15134
15146
|
setPollAlignment_: setPollAlignment_,
|
|
15135
|
-
|
|
15147
|
+
buttonInField_: buttonInField,
|
|
15136
15148
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
15137
15149
|
});
|
|
15138
15150
|
}
|
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.2";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
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.2";
|
|
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++) {
|
|
@@ -3510,6 +3510,16 @@ let $c3820807ac1e6fd7$export$44dad306455dddf;
|
|
|
3510
3510
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
3511
3511
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3512
3512
|
})($c3820807ac1e6fd7$export$44dad306455dddf || ($c3820807ac1e6fd7$export$44dad306455dddf = {}));
|
|
3513
|
+
var $83c36ed4520d0335$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg xmlns=http://www.w3.org/2000/svg width=21 height=20 viewBox="0 0 21 20"fill=none><path fill-rule=evenodd d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z"fill=#0f0f0f>`);
|
|
3514
|
+
function $83c36ed4520d0335$export$f7658c347b037c3f() {
|
|
3515
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3516
|
+
return (() => {
|
|
3517
|
+
var _el$ = $8tj43$getNextElement($83c36ed4520d0335$var$_tmpl$);
|
|
3518
|
+
$8tj43$spread(_el$, props, true, true);
|
|
3519
|
+
$8tj43$runHydrationEvents();
|
|
3520
|
+
return _el$;
|
|
3521
|
+
})();
|
|
3522
|
+
}
|
|
3513
3523
|
var $584c06c09cf4609d$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<button class=back type=button>`),
|
|
3514
3524
|
$584c06c09cf4609d$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<button type=button class=clear>`),
|
|
3515
3525
|
$584c06c09cf4609d$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=spacer>`),
|
|
@@ -3528,7 +3538,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3528
3538
|
i18n_: i18n_,
|
|
3529
3539
|
after_focusing_: after_focusing_,
|
|
3530
3540
|
BackIcon_: BackIcon_,
|
|
3531
|
-
|
|
3541
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
3532
3542
|
} = _ref;
|
|
3533
3543
|
let input_element;
|
|
3534
3544
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3572,6 +3582,8 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3572
3582
|
});
|
|
3573
3583
|
const ClearButton = () => (() => {
|
|
3574
3584
|
var _el$2 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$2);
|
|
3585
|
+
var _ref$ = buttonInFieldRef_;
|
|
3586
|
+
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3575
3587
|
$8tj43$spread(_el$2, $8tj43$mergeProps({
|
|
3576
3588
|
get classList() {
|
|
3577
3589
|
return {
|
|
@@ -3599,7 +3611,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3599
3611
|
return !searchFieldEmpty();
|
|
3600
3612
|
},
|
|
3601
3613
|
get fallback() {
|
|
3602
|
-
return $8tj43$createComponent((0, $
|
|
3614
|
+
return $8tj43$createComponent((0, $83c36ed4520d0335$export$f7658c347b037c3f), {});
|
|
3603
3615
|
},
|
|
3604
3616
|
get children() {
|
|
3605
3617
|
return $8tj43$createComponent(BackIcon_, {});
|
|
@@ -3715,11 +3727,11 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3715
3727
|
if (!dont_submit) submit_query_();
|
|
3716
3728
|
}
|
|
3717
3729
|
}), true);
|
|
3718
|
-
var _ref$ = $8tj43$catchify(el => {
|
|
3730
|
+
var _ref$2 = $8tj43$catchify(el => {
|
|
3719
3731
|
input_element = el;
|
|
3720
3732
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
3721
3733
|
});
|
|
3722
|
-
typeof _ref$ === "function" && $8tj43$use(_ref
|
|
3734
|
+
typeof _ref$2 === "function" && $8tj43$use(_ref$2, _el$6);
|
|
3723
3735
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
3724
3736
|
$8tj43$insert(_el$5, !isNewModal && $8tj43$createComponent(ClearButton, {}), _el$10, _co$2);
|
|
3725
3737
|
$8tj43$insert(_el$3, isNewModal && $8tj43$createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -3728,8 +3740,6 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3728
3740
|
get children() {
|
|
3729
3741
|
var _el$11 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$4);
|
|
3730
3742
|
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify(() => submit_query_()), true);
|
|
3731
|
-
var _ref$2 = submit_button_ref_;
|
|
3732
|
-
typeof _ref$2 === "function" ? $8tj43$use(_ref$2, _el$11) : submit_button_ref_ = _el$11;
|
|
3733
3743
|
$8tj43$insert(_el$11, $8tj43$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {}));
|
|
3734
3744
|
$8tj43$effect(() => $8tj43$setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3735
3745
|
$8tj43$runHydrationEvents();
|
|
@@ -13522,7 +13532,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13522
13532
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
13523
13533
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
13524
13534
|
setPollAlignment_: setPollAlignment_,
|
|
13525
|
-
|
|
13535
|
+
buttonInField_: buttonInField_,
|
|
13526
13536
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13527
13537
|
} = _ref;
|
|
13528
13538
|
return $8tj43$createRoot(dispose => {
|
|
@@ -13569,7 +13579,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13569
13579
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
13570
13580
|
setPollAlignment_(true);
|
|
13571
13581
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
13572
|
-
|
|
13582
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
13573
13583
|
opacity: 1
|
|
13574
13584
|
}, {
|
|
13575
13585
|
opacity: 0
|
|
@@ -13636,6 +13646,8 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13636
13646
|
width: width,
|
|
13637
13647
|
left: left
|
|
13638
13648
|
} = fakeField.getBoundingClientRect();
|
|
13649
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
13650
|
+
const pxOffCenter = Math.abs($8tj43$untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
13639
13651
|
$d7833ca17fc05c5e$export$23d40cc5971c3acd({
|
|
13640
13652
|
setBackdropStyle_: setBackdropStyle_,
|
|
13641
13653
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -13651,12 +13663,12 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13651
13663
|
duration: closeDuration_,
|
|
13652
13664
|
fill: "forwards",
|
|
13653
13665
|
easing: "ease-out"
|
|
13654
|
-
}).finished,
|
|
13666
|
+
}).finished, buttonInField_.animate([{
|
|
13655
13667
|
opacity: 0
|
|
13656
13668
|
}, {
|
|
13657
13669
|
opacity: 1
|
|
13658
13670
|
}], {
|
|
13659
|
-
duration: closeDuration_ / 3,
|
|
13671
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
13660
13672
|
delay: closeDuration_ * (2 / 3),
|
|
13661
13673
|
fill: "forwards"
|
|
13662
13674
|
}).finished]);
|
|
@@ -13876,7 +13888,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13876
13888
|
if (!input_field_accessor_value) break add_input_field;
|
|
13877
13889
|
let input_element;
|
|
13878
13890
|
let div_with_field_class;
|
|
13879
|
-
let
|
|
13891
|
+
let buttonInField;
|
|
13880
13892
|
const search_field = SafeSearchField({
|
|
13881
13893
|
i18n_: i18n_,
|
|
13882
13894
|
search_field_value_: search_field_value_,
|
|
@@ -13886,7 +13898,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13886
13898
|
field_element_ref_: el => div_with_field_class = el,
|
|
13887
13899
|
disabled_: true,
|
|
13888
13900
|
BackIcon_: BackIcon_,
|
|
13889
|
-
|
|
13901
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
13890
13902
|
});
|
|
13891
13903
|
if (!search_field) break add_input_field;
|
|
13892
13904
|
setModalBodyStyle({});
|
|
@@ -13921,7 +13933,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13921
13933
|
bodyAlignmentSignal_: modal_body_style,
|
|
13922
13934
|
backdropStyleSignal_: modal_backdrop_style,
|
|
13923
13935
|
setPollAlignment_: setPollAlignment_,
|
|
13924
|
-
|
|
13936
|
+
buttonInField_: buttonInField,
|
|
13925
13937
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13926
13938
|
});
|
|
13927
13939
|
}
|
|
@@ -14976,7 +14988,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
14976
14988
|
const shared_properties = $eb064bc3350276c1$export$12fa711345994013(depict_search);
|
|
14977
14989
|
return $83e8cf2c0b87a58a$export$23fca46f3143581f(() => {
|
|
14978
14990
|
let input_element;
|
|
14979
|
-
let
|
|
14991
|
+
let buttonInField;
|
|
14980
14992
|
const search_field = $8tj43$createComponent((0, $584c06c09cf4609d$export$b94867ecbd698f21), {
|
|
14981
14993
|
get BackIcon_() {
|
|
14982
14994
|
return shared_properties.BackIcon_;
|
|
@@ -14995,7 +15007,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
14995
15007
|
},
|
|
14996
15008
|
disabled_: true,
|
|
14997
15009
|
input_field_ref_: el => input_element = el,
|
|
14998
|
-
|
|
15010
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
14999
15011
|
field_element_ref_: field => {
|
|
15000
15012
|
const bodyAlignmentSignal_ = $8tj43$createSignal({
|
|
15001
15013
|
position: "fixed"
|
|
@@ -15042,7 +15054,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
15042
15054
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
15043
15055
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
15044
15056
|
setPollAlignment_: setPollAlignment_,
|
|
15045
|
-
|
|
15057
|
+
buttonInField_: buttonInField,
|
|
15046
15058
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
15047
15059
|
});
|
|
15048
15060
|
}
|
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.2";
|
|
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++) {
|
|
@@ -3410,6 +3410,15 @@ let $0b6e2070a98de347$export$44dad306455dddf;
|
|
|
3410
3410
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
3411
3411
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3412
3412
|
})($0b6e2070a98de347$export$44dad306455dddf || ($0b6e2070a98de347$export$44dad306455dddf = {}));
|
|
3413
|
+
var $0175183387c8923a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg width=21 height=20 viewBox="0 0 21 20"fill=none><path fill-rule=evenodd d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z"fill=#0f0f0f>`);
|
|
3414
|
+
function $0175183387c8923a$export$f7658c347b037c3f(props = {}) {
|
|
3415
|
+
return (() => {
|
|
3416
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($0175183387c8923a$var$_tmpl$);
|
|
3417
|
+
$gVhhF$solidjsweb.spread(_el$, props, true, true);
|
|
3418
|
+
$gVhhF$solidjsweb.runHydrationEvents();
|
|
3419
|
+
return _el$;
|
|
3420
|
+
})();
|
|
3421
|
+
}
|
|
3413
3422
|
var $66b8b9a9613c141d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button class=back type=button>`),
|
|
3414
3423
|
$66b8b9a9613c141d$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button type=button class=clear>`),
|
|
3415
3424
|
$66b8b9a9613c141d$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=spacer>`),
|
|
@@ -3427,7 +3436,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3427
3436
|
i18n_: i18n_,
|
|
3428
3437
|
after_focusing_: after_focusing_,
|
|
3429
3438
|
BackIcon_: BackIcon_,
|
|
3430
|
-
|
|
3439
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
3431
3440
|
}) {
|
|
3432
3441
|
let input_element;
|
|
3433
3442
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3468,6 +3477,8 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3468
3477
|
});
|
|
3469
3478
|
const ClearButton = () => (() => {
|
|
3470
3479
|
var _el$2 = $gVhhF$solidjsweb.getNextElement($66b8b9a9613c141d$var$_tmpl$2);
|
|
3480
|
+
var _ref$ = buttonInFieldRef_;
|
|
3481
|
+
typeof _ref$ === "function" ? $gVhhF$solidjsweb.use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3471
3482
|
$gVhhF$solidjsweb.spread(_el$2, $gVhhF$solidjsweb.mergeProps({
|
|
3472
3483
|
get classList() {
|
|
3473
3484
|
return {
|
|
@@ -3495,7 +3506,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3495
3506
|
return !searchFieldEmpty();
|
|
3496
3507
|
},
|
|
3497
3508
|
get fallback() {
|
|
3498
|
-
return $gVhhF$solidjsweb.createComponent((0, $
|
|
3509
|
+
return $gVhhF$solidjsweb.createComponent((0, $0175183387c8923a$export$f7658c347b037c3f), {});
|
|
3499
3510
|
},
|
|
3500
3511
|
get children() {
|
|
3501
3512
|
return $gVhhF$solidjsweb.createComponent(BackIcon_, {});
|
|
@@ -3608,11 +3619,11 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3608
3619
|
if (!dont_submit) submit_query_();
|
|
3609
3620
|
}
|
|
3610
3621
|
}), true);
|
|
3611
|
-
var _ref$ = $gVhhF$depictaiutilishared.catchify(el => {
|
|
3622
|
+
var _ref$2 = $gVhhF$depictaiutilishared.catchify(el => {
|
|
3612
3623
|
input_element = el;
|
|
3613
3624
|
input_field_ref_?.(el);
|
|
3614
3625
|
});
|
|
3615
|
-
typeof _ref$ === "function" && $gVhhF$solidjsweb.use(_ref
|
|
3626
|
+
typeof _ref$2 === "function" && $gVhhF$solidjsweb.use(_ref$2, _el$6);
|
|
3616
3627
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
3617
3628
|
$gVhhF$solidjsweb.insert(_el$5, !isNewModal && $gVhhF$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
3618
3629
|
$gVhhF$solidjsweb.insert(_el$3, isNewModal && $gVhhF$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -3621,8 +3632,6 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
3621
3632
|
get children() {
|
|
3622
3633
|
var _el$11 = $gVhhF$solidjsweb.getNextElement($66b8b9a9613c141d$var$_tmpl$4);
|
|
3623
3634
|
$gVhhF$solidjsweb.addEventListener(_el$11, "click", $gVhhF$depictaiutilishared.catchify(() => submit_query_()), true);
|
|
3624
|
-
var _ref$2 = submit_button_ref_;
|
|
3625
|
-
typeof _ref$2 === "function" ? $gVhhF$solidjsweb.use(_ref$2, _el$11) : submit_button_ref_ = _el$11;
|
|
3626
3635
|
$gVhhF$solidjsweb.insert(_el$11, $gVhhF$solidjsweb.createComponent((0, $87d7574e1d89d69b$export$82eafebb825fc23f), {}));
|
|
3627
3636
|
$gVhhF$solidjsweb.effect(() => $gVhhF$solidjsweb.setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3628
3637
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
@@ -12818,7 +12827,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
12818
12827
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
12819
12828
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
12820
12829
|
setPollAlignment_: setPollAlignment_,
|
|
12821
|
-
|
|
12830
|
+
buttonInField_: buttonInField_,
|
|
12822
12831
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
12823
12832
|
}) {
|
|
12824
12833
|
return $gVhhF$solidjs.createRoot(dispose => {
|
|
@@ -12865,7 +12874,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
12865
12874
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
12866
12875
|
setPollAlignment_(true);
|
|
12867
12876
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
12868
|
-
|
|
12877
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
12869
12878
|
opacity: 1
|
|
12870
12879
|
}, {
|
|
12871
12880
|
opacity: 0
|
|
@@ -12932,6 +12941,8 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
12932
12941
|
width: width,
|
|
12933
12942
|
left: left
|
|
12934
12943
|
} = fakeField.getBoundingClientRect();
|
|
12944
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
12945
|
+
const pxOffCenter = Math.abs($gVhhF$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
12935
12946
|
$6892e0748f94faa6$export$23d40cc5971c3acd({
|
|
12936
12947
|
setBackdropStyle_: setBackdropStyle_,
|
|
12937
12948
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -12947,12 +12958,12 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
12947
12958
|
duration: closeDuration_,
|
|
12948
12959
|
fill: "forwards",
|
|
12949
12960
|
easing: "ease-out"
|
|
12950
|
-
}).finished,
|
|
12961
|
+
}).finished, buttonInField_.animate([{
|
|
12951
12962
|
opacity: 0
|
|
12952
12963
|
}, {
|
|
12953
12964
|
opacity: 1
|
|
12954
12965
|
}], {
|
|
12955
|
-
duration: closeDuration_ / 3,
|
|
12966
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
12956
12967
|
delay: closeDuration_ * (2 / 3),
|
|
12957
12968
|
fill: "forwards"
|
|
12958
12969
|
}).finished]);
|
|
@@ -13154,7 +13165,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13154
13165
|
if (!input_field_accessor_value) break add_input_field;
|
|
13155
13166
|
let input_element;
|
|
13156
13167
|
let div_with_field_class;
|
|
13157
|
-
let
|
|
13168
|
+
let buttonInField;
|
|
13158
13169
|
const search_field = SafeSearchField({
|
|
13159
13170
|
i18n_: i18n_,
|
|
13160
13171
|
search_field_value_: search_field_value_,
|
|
@@ -13164,7 +13175,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13164
13175
|
field_element_ref_: el => div_with_field_class = el,
|
|
13165
13176
|
disabled_: true,
|
|
13166
13177
|
BackIcon_: BackIcon_,
|
|
13167
|
-
|
|
13178
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
13168
13179
|
});
|
|
13169
13180
|
if (!search_field) break add_input_field;
|
|
13170
13181
|
setModalBodyStyle({});
|
|
@@ -13198,7 +13209,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13198
13209
|
bodyAlignmentSignal_: modal_body_style,
|
|
13199
13210
|
backdropStyleSignal_: modal_backdrop_style,
|
|
13200
13211
|
setPollAlignment_: setPollAlignment_,
|
|
13201
|
-
|
|
13212
|
+
buttonInField_: buttonInField,
|
|
13202
13213
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13203
13214
|
});
|
|
13204
13215
|
}
|
|
@@ -14068,7 +14079,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
14068
14079
|
const shared_properties = $2c61e4cd8229c49a$export$12fa711345994013(depict_search);
|
|
14069
14080
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
14070
14081
|
let input_element;
|
|
14071
|
-
let
|
|
14082
|
+
let buttonInField;
|
|
14072
14083
|
const search_field = $gVhhF$solidjsweb.createComponent((0, $66b8b9a9613c141d$export$b94867ecbd698f21), {
|
|
14073
14084
|
get BackIcon_() {
|
|
14074
14085
|
return shared_properties.BackIcon_;
|
|
@@ -14087,7 +14098,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
14087
14098
|
},
|
|
14088
14099
|
disabled_: true,
|
|
14089
14100
|
input_field_ref_: el => input_element = el,
|
|
14090
|
-
|
|
14101
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
14091
14102
|
field_element_ref_: field => {
|
|
14092
14103
|
const bodyAlignmentSignal_ = $gVhhF$solidjs.createSignal({
|
|
14093
14104
|
position: "fixed"
|
|
@@ -14134,7 +14145,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
14134
14145
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
14135
14146
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
14136
14147
|
setPollAlignment_: setPollAlignment_,
|
|
14137
|
-
|
|
14148
|
+
buttonInField_: buttonInField,
|
|
14138
14149
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
14139
14150
|
});
|
|
14140
14151
|
}
|
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.2";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
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.2";
|
|
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++) {
|
|
@@ -3323,6 +3323,15 @@ let $f86ba724282f6690$export$44dad306455dddf;
|
|
|
3323
3323
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
3324
3324
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3325
3325
|
})($f86ba724282f6690$export$44dad306455dddf || ($f86ba724282f6690$export$44dad306455dddf = {}));
|
|
3326
|
+
var $081752ca508a876f$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg xmlns=http://www.w3.org/2000/svg width=21 height=20 viewBox="0 0 21 20"fill=none><path fill-rule=evenodd d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z"fill=#0f0f0f>`);
|
|
3327
|
+
function $081752ca508a876f$export$f7658c347b037c3f(props = {}) {
|
|
3328
|
+
return (() => {
|
|
3329
|
+
var _el$ = $9HbP8$getNextElement($081752ca508a876f$var$_tmpl$);
|
|
3330
|
+
$9HbP8$spread(_el$, props, true, true);
|
|
3331
|
+
$9HbP8$runHydrationEvents();
|
|
3332
|
+
return _el$;
|
|
3333
|
+
})();
|
|
3334
|
+
}
|
|
3326
3335
|
var $5285d2814d0fac0c$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<button class=back type=button>`),
|
|
3327
3336
|
$5285d2814d0fac0c$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<button type=button class=clear>`),
|
|
3328
3337
|
$5285d2814d0fac0c$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=spacer>`),
|
|
@@ -3340,7 +3349,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3340
3349
|
i18n_: i18n_,
|
|
3341
3350
|
after_focusing_: after_focusing_,
|
|
3342
3351
|
BackIcon_: BackIcon_,
|
|
3343
|
-
|
|
3352
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
3344
3353
|
}) {
|
|
3345
3354
|
let input_element;
|
|
3346
3355
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3381,6 +3390,8 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3381
3390
|
});
|
|
3382
3391
|
const ClearButton = () => (() => {
|
|
3383
3392
|
var _el$2 = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$2);
|
|
3393
|
+
var _ref$ = buttonInFieldRef_;
|
|
3394
|
+
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3384
3395
|
$9HbP8$spread(_el$2, $9HbP8$mergeProps({
|
|
3385
3396
|
get classList() {
|
|
3386
3397
|
return {
|
|
@@ -3408,7 +3419,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3408
3419
|
return !searchFieldEmpty();
|
|
3409
3420
|
},
|
|
3410
3421
|
get fallback() {
|
|
3411
|
-
return $9HbP8$createComponent((0, $
|
|
3422
|
+
return $9HbP8$createComponent((0, $081752ca508a876f$export$f7658c347b037c3f), {});
|
|
3412
3423
|
},
|
|
3413
3424
|
get children() {
|
|
3414
3425
|
return $9HbP8$createComponent(BackIcon_, {});
|
|
@@ -3521,11 +3532,11 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3521
3532
|
if (!dont_submit) submit_query_();
|
|
3522
3533
|
}
|
|
3523
3534
|
}), true);
|
|
3524
|
-
var _ref$ = $9HbP8$catchify(el => {
|
|
3535
|
+
var _ref$2 = $9HbP8$catchify(el => {
|
|
3525
3536
|
input_element = el;
|
|
3526
3537
|
input_field_ref_?.(el);
|
|
3527
3538
|
});
|
|
3528
|
-
typeof _ref$ === "function" && $9HbP8$use(_ref
|
|
3539
|
+
typeof _ref$2 === "function" && $9HbP8$use(_ref$2, _el$6);
|
|
3529
3540
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
3530
3541
|
$9HbP8$insert(_el$5, !isNewModal && $9HbP8$createComponent(ClearButton, {}), _el$10, _co$2);
|
|
3531
3542
|
$9HbP8$insert(_el$3, isNewModal && $9HbP8$createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -3534,8 +3545,6 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
3534
3545
|
get children() {
|
|
3535
3546
|
var _el$11 = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$4);
|
|
3536
3547
|
$9HbP8$addEventListener(_el$11, "click", $9HbP8$catchify(() => submit_query_()), true);
|
|
3537
|
-
var _ref$2 = submit_button_ref_;
|
|
3538
|
-
typeof _ref$2 === "function" ? $9HbP8$use(_ref$2, _el$11) : submit_button_ref_ = _el$11;
|
|
3539
3548
|
$9HbP8$insert(_el$11, $9HbP8$createComponent((0, $16f0ed5ea30d8d9c$export$82eafebb825fc23f), {}));
|
|
3540
3549
|
$9HbP8$effect(() => $9HbP8$setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3541
3550
|
$9HbP8$runHydrationEvents();
|
|
@@ -12731,7 +12740,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
12731
12740
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
12732
12741
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
12733
12742
|
setPollAlignment_: setPollAlignment_,
|
|
12734
|
-
|
|
12743
|
+
buttonInField_: buttonInField_,
|
|
12735
12744
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
12736
12745
|
}) {
|
|
12737
12746
|
return $9HbP8$createRoot(dispose => {
|
|
@@ -12778,7 +12787,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
12778
12787
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
12779
12788
|
setPollAlignment_(true);
|
|
12780
12789
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
12781
|
-
|
|
12790
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
12782
12791
|
opacity: 1
|
|
12783
12792
|
}, {
|
|
12784
12793
|
opacity: 0
|
|
@@ -12845,6 +12854,8 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
12845
12854
|
width: width,
|
|
12846
12855
|
left: left
|
|
12847
12856
|
} = fakeField.getBoundingClientRect();
|
|
12857
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
12858
|
+
const pxOffCenter = Math.abs($9HbP8$untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
12848
12859
|
$0a901077d5c8a2b2$export$23d40cc5971c3acd({
|
|
12849
12860
|
setBackdropStyle_: setBackdropStyle_,
|
|
12850
12861
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -12860,12 +12871,12 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
12860
12871
|
duration: closeDuration_,
|
|
12861
12872
|
fill: "forwards",
|
|
12862
12873
|
easing: "ease-out"
|
|
12863
|
-
}).finished,
|
|
12874
|
+
}).finished, buttonInField_.animate([{
|
|
12864
12875
|
opacity: 0
|
|
12865
12876
|
}, {
|
|
12866
12877
|
opacity: 1
|
|
12867
12878
|
}], {
|
|
12868
|
-
duration: closeDuration_ / 3,
|
|
12879
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
12869
12880
|
delay: closeDuration_ * (2 / 3),
|
|
12870
12881
|
fill: "forwards"
|
|
12871
12882
|
}).finished]);
|
|
@@ -13067,7 +13078,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13067
13078
|
if (!input_field_accessor_value) break add_input_field;
|
|
13068
13079
|
let input_element;
|
|
13069
13080
|
let div_with_field_class;
|
|
13070
|
-
let
|
|
13081
|
+
let buttonInField;
|
|
13071
13082
|
const search_field = SafeSearchField({
|
|
13072
13083
|
i18n_: i18n_,
|
|
13073
13084
|
search_field_value_: search_field_value_,
|
|
@@ -13077,7 +13088,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13077
13088
|
field_element_ref_: el => div_with_field_class = el,
|
|
13078
13089
|
disabled_: true,
|
|
13079
13090
|
BackIcon_: BackIcon_,
|
|
13080
|
-
|
|
13091
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
13081
13092
|
});
|
|
13082
13093
|
if (!search_field) break add_input_field;
|
|
13083
13094
|
setModalBodyStyle({});
|
|
@@ -13111,7 +13122,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13111
13122
|
bodyAlignmentSignal_: modal_body_style,
|
|
13112
13123
|
backdropStyleSignal_: modal_backdrop_style,
|
|
13113
13124
|
setPollAlignment_: setPollAlignment_,
|
|
13114
|
-
|
|
13125
|
+
buttonInField_: buttonInField,
|
|
13115
13126
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13116
13127
|
});
|
|
13117
13128
|
}
|
|
@@ -13981,7 +13992,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
13981
13992
|
const shared_properties = $806c97b931758897$export$12fa711345994013(depict_search);
|
|
13982
13993
|
return $16b52438165aafe2$export$23fca46f3143581f(() => {
|
|
13983
13994
|
let input_element;
|
|
13984
|
-
let
|
|
13995
|
+
let buttonInField;
|
|
13985
13996
|
const search_field = $9HbP8$createComponent((0, $5285d2814d0fac0c$export$b94867ecbd698f21), {
|
|
13986
13997
|
get BackIcon_() {
|
|
13987
13998
|
return shared_properties.BackIcon_;
|
|
@@ -14000,7 +14011,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
14000
14011
|
},
|
|
14001
14012
|
disabled_: true,
|
|
14002
14013
|
input_field_ref_: el => input_element = el,
|
|
14003
|
-
|
|
14014
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
14004
14015
|
field_element_ref_: field => {
|
|
14005
14016
|
const bodyAlignmentSignal_ = $9HbP8$createSignal({
|
|
14006
14017
|
position: "fixed"
|
|
@@ -14047,7 +14058,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
14047
14058
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
14048
14059
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
14049
14060
|
setPollAlignment_: setPollAlignment_,
|
|
14050
|
-
|
|
14061
|
+
buttonInField_: buttonInField,
|
|
14051
14062
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
14052
14063
|
});
|
|
14053
14064
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
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,7 +236,7 @@
|
|
|
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.
|
|
239
|
+
"@depict-ai/plp-styling": "^4.1.2",
|
|
240
240
|
"@depict-ai/types": "^5.1.2",
|
|
241
241
|
"@depict-ai/utilishared": "^2.1.2",
|
|
242
242
|
"solid-js": "^1.8.12"
|
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.2";
|
|
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++) {
|
|
@@ -3055,6 +3055,17 @@ let $c95c6dd9e93acd82$export$44dad306455dddf;
|
|
|
3055
3055
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
3056
3056
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3057
3057
|
})($c95c6dd9e93acd82$export$44dad306455dddf || ($c95c6dd9e93acd82$export$44dad306455dddf = {}));
|
|
3058
|
+
var $34934309832515dc$var$_tmpl$ = '<path fill-rule="evenodd" d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z" fill="#0f0f0f"></path>';
|
|
3059
|
+
function $34934309832515dc$export$f7658c347b037c3f() {
|
|
3060
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3061
|
+
return $3hooq$solidjsweb.ssrElement("svg", $3hooq$solidjsweb.mergeProps({
|
|
3062
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3063
|
+
width: "21",
|
|
3064
|
+
height: "20",
|
|
3065
|
+
viewBox: "0 0 21 20",
|
|
3066
|
+
fill: "none"
|
|
3067
|
+
}, props), () => $3hooq$solidjsweb.ssr($34934309832515dc$var$_tmpl$), true);
|
|
3068
|
+
}
|
|
3058
3069
|
var $29e5dbeb69da7a36$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
3059
3070
|
$29e5dbeb69da7a36$var$_tmpl$2 = ["<button", ' class="submit major" type="button"', ">", "</button>"],
|
|
3060
3071
|
$29e5dbeb69da7a36$var$_tmpl$3 = ["<div", ' class="', '" role="search"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="field"><!--$-->', '<!--/--><input class="', '" tabindex="0"', "><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
@@ -3071,7 +3082,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3071
3082
|
i18n_: i18n_,
|
|
3072
3083
|
after_focusing_: after_focusing_,
|
|
3073
3084
|
BackIcon_: BackIcon_,
|
|
3074
|
-
|
|
3085
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
3075
3086
|
} = _ref;
|
|
3076
3087
|
let input_element;
|
|
3077
3088
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3125,7 +3136,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3125
3136
|
return !searchFieldEmpty();
|
|
3126
3137
|
},
|
|
3127
3138
|
get fallback() {
|
|
3128
|
-
return $3hooq$solidjsweb.createComponent((0, $
|
|
3139
|
+
return $3hooq$solidjsweb.createComponent((0, $34934309832515dc$export$f7658c347b037c3f), {});
|
|
3129
3140
|
},
|
|
3130
3141
|
get children() {
|
|
3131
3142
|
return $3hooq$solidjsweb.createComponent(BackIcon_, {});
|
|
@@ -11162,7 +11173,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
11162
11173
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
11163
11174
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
11164
11175
|
setPollAlignment_: setPollAlignment_,
|
|
11165
|
-
|
|
11176
|
+
buttonInField_: buttonInField_,
|
|
11166
11177
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11167
11178
|
} = _ref;
|
|
11168
11179
|
return $3hooq$solidjs.createRoot(dispose => {
|
|
@@ -11205,7 +11216,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
11205
11216
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
11206
11217
|
setPollAlignment_(true);
|
|
11207
11218
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
11208
|
-
|
|
11219
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
11209
11220
|
opacity: 1
|
|
11210
11221
|
}, {
|
|
11211
11222
|
opacity: 0
|
|
@@ -11272,6 +11283,8 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
11272
11283
|
width: width,
|
|
11273
11284
|
left: left
|
|
11274
11285
|
} = fakeField.getBoundingClientRect();
|
|
11286
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
11287
|
+
const pxOffCenter = Math.abs($3hooq$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
11275
11288
|
$ce2f7ec02a8f2173$export$23d40cc5971c3acd({
|
|
11276
11289
|
setBackdropStyle_: setBackdropStyle_,
|
|
11277
11290
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -11287,12 +11300,12 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
11287
11300
|
duration: closeDuration_,
|
|
11288
11301
|
fill: "forwards",
|
|
11289
11302
|
easing: "ease-out"
|
|
11290
|
-
}).finished,
|
|
11303
|
+
}).finished, buttonInField_.animate([{
|
|
11291
11304
|
opacity: 0
|
|
11292
11305
|
}, {
|
|
11293
11306
|
opacity: 1
|
|
11294
11307
|
}], {
|
|
11295
|
-
duration: closeDuration_ / 3,
|
|
11308
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
11296
11309
|
delay: closeDuration_ * (2 / 3),
|
|
11297
11310
|
fill: "forwards"
|
|
11298
11311
|
}).finished]);
|
|
@@ -11503,7 +11516,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11503
11516
|
if (!input_field_accessor_value) break add_input_field;
|
|
11504
11517
|
let input_element;
|
|
11505
11518
|
let div_with_field_class;
|
|
11506
|
-
let
|
|
11519
|
+
let buttonInField;
|
|
11507
11520
|
const search_field = SafeSearchField({
|
|
11508
11521
|
i18n_: i18n_,
|
|
11509
11522
|
search_field_value_: search_field_value_,
|
|
@@ -11513,7 +11526,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11513
11526
|
field_element_ref_: el => div_with_field_class = el,
|
|
11514
11527
|
disabled_: true,
|
|
11515
11528
|
BackIcon_: BackIcon_,
|
|
11516
|
-
|
|
11529
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
11517
11530
|
});
|
|
11518
11531
|
if (!search_field) break add_input_field;
|
|
11519
11532
|
setModalBodyStyle({});
|
|
@@ -11548,7 +11561,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11548
11561
|
bodyAlignmentSignal_: modal_body_style,
|
|
11549
11562
|
backdropStyleSignal_: modal_backdrop_style,
|
|
11550
11563
|
setPollAlignment_: setPollAlignment_,
|
|
11551
|
-
|
|
11564
|
+
buttonInField_: buttonInField,
|
|
11552
11565
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11553
11566
|
});
|
|
11554
11567
|
}
|
|
@@ -12571,7 +12584,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
12571
12584
|
const shared_properties = $ddd39c5f36f49703$export$12fa711345994013(depict_search);
|
|
12572
12585
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
12573
12586
|
let input_element;
|
|
12574
|
-
let
|
|
12587
|
+
let buttonInField;
|
|
12575
12588
|
const search_field = $3hooq$solidjsweb.createComponent((0, $29e5dbeb69da7a36$export$b94867ecbd698f21), {
|
|
12576
12589
|
get BackIcon_() {
|
|
12577
12590
|
return shared_properties.BackIcon_;
|
|
@@ -12590,7 +12603,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
12590
12603
|
},
|
|
12591
12604
|
disabled_: true,
|
|
12592
12605
|
input_field_ref_: el => input_element = el,
|
|
12593
|
-
|
|
12606
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
12594
12607
|
field_element_ref_: field => {
|
|
12595
12608
|
const bodyAlignmentSignal_ = $3hooq$solidjs.createSignal({
|
|
12596
12609
|
position: "fixed"
|
|
@@ -12637,7 +12650,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
12637
12650
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
12638
12651
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
12639
12652
|
setPollAlignment_: setPollAlignment_,
|
|
12640
|
-
|
|
12653
|
+
buttonInField_: buttonInField,
|
|
12641
12654
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
12642
12655
|
});
|
|
12643
12656
|
}
|
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.2";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
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.2";
|
|
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++) {
|
|
@@ -2965,6 +2965,17 @@ let $c3820807ac1e6fd7$export$44dad306455dddf;
|
|
|
2965
2965
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
2966
2966
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
2967
2967
|
})($c3820807ac1e6fd7$export$44dad306455dddf || ($c3820807ac1e6fd7$export$44dad306455dddf = {}));
|
|
2968
|
+
var $83c36ed4520d0335$var$_tmpl$ = '<path fill-rule="evenodd" d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z" fill="#0f0f0f"></path>';
|
|
2969
|
+
function $83c36ed4520d0335$export$f7658c347b037c3f() {
|
|
2970
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2971
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps({
|
|
2972
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2973
|
+
width: "21",
|
|
2974
|
+
height: "20",
|
|
2975
|
+
viewBox: "0 0 21 20",
|
|
2976
|
+
fill: "none"
|
|
2977
|
+
}, props), () => $b8hua$ssr($83c36ed4520d0335$var$_tmpl$), true);
|
|
2978
|
+
}
|
|
2968
2979
|
var $584c06c09cf4609d$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
2969
2980
|
$584c06c09cf4609d$var$_tmpl$2 = ["<button", ' class="submit major" type="button"', ">", "</button>"],
|
|
2970
2981
|
$584c06c09cf4609d$var$_tmpl$3 = ["<div", ' class="', '" role="search"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="field"><!--$-->', '<!--/--><input class="', '" tabindex="0"', "><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
@@ -2981,7 +2992,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
2981
2992
|
i18n_: i18n_,
|
|
2982
2993
|
after_focusing_: after_focusing_,
|
|
2983
2994
|
BackIcon_: BackIcon_,
|
|
2984
|
-
|
|
2995
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
2985
2996
|
} = _ref;
|
|
2986
2997
|
let input_element;
|
|
2987
2998
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3035,7 +3046,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3035
3046
|
return !searchFieldEmpty();
|
|
3036
3047
|
},
|
|
3037
3048
|
get fallback() {
|
|
3038
|
-
return $b8hua$createComponent((0, $
|
|
3049
|
+
return $b8hua$createComponent((0, $83c36ed4520d0335$export$f7658c347b037c3f), {});
|
|
3039
3050
|
},
|
|
3040
3051
|
get children() {
|
|
3041
3052
|
return $b8hua$createComponent(BackIcon_, {});
|
|
@@ -11072,7 +11083,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11072
11083
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
11073
11084
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
11074
11085
|
setPollAlignment_: setPollAlignment_,
|
|
11075
|
-
|
|
11086
|
+
buttonInField_: buttonInField_,
|
|
11076
11087
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11077
11088
|
} = _ref;
|
|
11078
11089
|
return $b8hua$createRoot(dispose => {
|
|
@@ -11115,7 +11126,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11115
11126
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
11116
11127
|
setPollAlignment_(true);
|
|
11117
11128
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
11118
|
-
|
|
11129
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
11119
11130
|
opacity: 1
|
|
11120
11131
|
}, {
|
|
11121
11132
|
opacity: 0
|
|
@@ -11182,6 +11193,8 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11182
11193
|
width: width,
|
|
11183
11194
|
left: left
|
|
11184
11195
|
} = fakeField.getBoundingClientRect();
|
|
11196
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
11197
|
+
const pxOffCenter = Math.abs($b8hua$untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
11185
11198
|
$d7833ca17fc05c5e$export$23d40cc5971c3acd({
|
|
11186
11199
|
setBackdropStyle_: setBackdropStyle_,
|
|
11187
11200
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -11197,12 +11210,12 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11197
11210
|
duration: closeDuration_,
|
|
11198
11211
|
fill: "forwards",
|
|
11199
11212
|
easing: "ease-out"
|
|
11200
|
-
}).finished,
|
|
11213
|
+
}).finished, buttonInField_.animate([{
|
|
11201
11214
|
opacity: 0
|
|
11202
11215
|
}, {
|
|
11203
11216
|
opacity: 1
|
|
11204
11217
|
}], {
|
|
11205
|
-
duration: closeDuration_ / 3,
|
|
11218
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
11206
11219
|
delay: closeDuration_ * (2 / 3),
|
|
11207
11220
|
fill: "forwards"
|
|
11208
11221
|
}).finished]);
|
|
@@ -11413,7 +11426,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11413
11426
|
if (!input_field_accessor_value) break add_input_field;
|
|
11414
11427
|
let input_element;
|
|
11415
11428
|
let div_with_field_class;
|
|
11416
|
-
let
|
|
11429
|
+
let buttonInField;
|
|
11417
11430
|
const search_field = SafeSearchField({
|
|
11418
11431
|
i18n_: i18n_,
|
|
11419
11432
|
search_field_value_: search_field_value_,
|
|
@@ -11423,7 +11436,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11423
11436
|
field_element_ref_: el => div_with_field_class = el,
|
|
11424
11437
|
disabled_: true,
|
|
11425
11438
|
BackIcon_: BackIcon_,
|
|
11426
|
-
|
|
11439
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
11427
11440
|
});
|
|
11428
11441
|
if (!search_field) break add_input_field;
|
|
11429
11442
|
setModalBodyStyle({});
|
|
@@ -11458,7 +11471,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11458
11471
|
bodyAlignmentSignal_: modal_body_style,
|
|
11459
11472
|
backdropStyleSignal_: modal_backdrop_style,
|
|
11460
11473
|
setPollAlignment_: setPollAlignment_,
|
|
11461
|
-
|
|
11474
|
+
buttonInField_: buttonInField,
|
|
11462
11475
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11463
11476
|
});
|
|
11464
11477
|
}
|
|
@@ -12481,7 +12494,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12481
12494
|
const shared_properties = $eb064bc3350276c1$export$12fa711345994013(depict_search);
|
|
12482
12495
|
return $83e8cf2c0b87a58a$export$23fca46f3143581f(() => {
|
|
12483
12496
|
let input_element;
|
|
12484
|
-
let
|
|
12497
|
+
let buttonInField;
|
|
12485
12498
|
const search_field = $b8hua$createComponent((0, $584c06c09cf4609d$export$b94867ecbd698f21), {
|
|
12486
12499
|
get BackIcon_() {
|
|
12487
12500
|
return shared_properties.BackIcon_;
|
|
@@ -12500,7 +12513,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12500
12513
|
},
|
|
12501
12514
|
disabled_: true,
|
|
12502
12515
|
input_field_ref_: el => input_element = el,
|
|
12503
|
-
|
|
12516
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
12504
12517
|
field_element_ref_: field => {
|
|
12505
12518
|
const bodyAlignmentSignal_ = $b8hua$createSignal({
|
|
12506
12519
|
position: "fixed"
|
|
@@ -12547,7 +12560,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12547
12560
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
12548
12561
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
12549
12562
|
setPollAlignment_: setPollAlignment_,
|
|
12550
|
-
|
|
12563
|
+
buttonInField_: buttonInField,
|
|
12551
12564
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
12552
12565
|
});
|
|
12553
12566
|
}
|
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.2";
|
|
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++) {
|
|
@@ -2885,6 +2885,16 @@ let $0b6e2070a98de347$export$44dad306455dddf;
|
|
|
2885
2885
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
2886
2886
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
2887
2887
|
})($0b6e2070a98de347$export$44dad306455dddf || ($0b6e2070a98de347$export$44dad306455dddf = {}));
|
|
2888
|
+
var $0175183387c8923a$var$_tmpl$ = '<path fill-rule="evenodd" d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z" fill="#0f0f0f"></path>';
|
|
2889
|
+
function $0175183387c8923a$export$f7658c347b037c3f(props = {}) {
|
|
2890
|
+
return $5vyXB$solidjsweb.ssrElement("svg", $5vyXB$solidjsweb.mergeProps({
|
|
2891
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2892
|
+
width: "21",
|
|
2893
|
+
height: "20",
|
|
2894
|
+
viewBox: "0 0 21 20",
|
|
2895
|
+
fill: "none"
|
|
2896
|
+
}, props), () => $5vyXB$solidjsweb.ssr($0175183387c8923a$var$_tmpl$), true);
|
|
2897
|
+
}
|
|
2888
2898
|
var $66b8b9a9613c141d$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
2889
2899
|
$66b8b9a9613c141d$var$_tmpl$2 = ["<button", ' class="submit major" type="button"', ">", "</button>"],
|
|
2890
2900
|
$66b8b9a9613c141d$var$_tmpl$3 = ["<div", ' class="', '" role="search"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="field"><!--$-->', '<!--/--><input class="', '" tabindex="0"', "><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
@@ -2900,7 +2910,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
2900
2910
|
i18n_: i18n_,
|
|
2901
2911
|
after_focusing_: after_focusing_,
|
|
2902
2912
|
BackIcon_: BackIcon_,
|
|
2903
|
-
|
|
2913
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
2904
2914
|
}) {
|
|
2905
2915
|
let input_element;
|
|
2906
2916
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -2951,7 +2961,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
2951
2961
|
return !searchFieldEmpty();
|
|
2952
2962
|
},
|
|
2953
2963
|
get fallback() {
|
|
2954
|
-
return $5vyXB$solidjsweb.createComponent((0, $
|
|
2964
|
+
return $5vyXB$solidjsweb.createComponent((0, $0175183387c8923a$export$f7658c347b037c3f), {});
|
|
2955
2965
|
},
|
|
2956
2966
|
get children() {
|
|
2957
2967
|
return $5vyXB$solidjsweb.createComponent(BackIcon_, {});
|
|
@@ -10439,7 +10449,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10439
10449
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
10440
10450
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
10441
10451
|
setPollAlignment_: setPollAlignment_,
|
|
10442
|
-
|
|
10452
|
+
buttonInField_: buttonInField_,
|
|
10443
10453
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
10444
10454
|
}) {
|
|
10445
10455
|
return $5vyXB$solidjs.createRoot(dispose => {
|
|
@@ -10482,7 +10492,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10482
10492
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
10483
10493
|
setPollAlignment_(true);
|
|
10484
10494
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
10485
|
-
|
|
10495
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
10486
10496
|
opacity: 1
|
|
10487
10497
|
}, {
|
|
10488
10498
|
opacity: 0
|
|
@@ -10549,6 +10559,8 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10549
10559
|
width: width,
|
|
10550
10560
|
left: left
|
|
10551
10561
|
} = fakeField.getBoundingClientRect();
|
|
10562
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
10563
|
+
const pxOffCenter = Math.abs($5vyXB$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
10552
10564
|
$6892e0748f94faa6$export$23d40cc5971c3acd({
|
|
10553
10565
|
setBackdropStyle_: setBackdropStyle_,
|
|
10554
10566
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -10564,12 +10576,12 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10564
10576
|
duration: closeDuration_,
|
|
10565
10577
|
fill: "forwards",
|
|
10566
10578
|
easing: "ease-out"
|
|
10567
|
-
}).finished,
|
|
10579
|
+
}).finished, buttonInField_.animate([{
|
|
10568
10580
|
opacity: 0
|
|
10569
10581
|
}, {
|
|
10570
10582
|
opacity: 1
|
|
10571
10583
|
}], {
|
|
10572
|
-
duration: closeDuration_ / 3,
|
|
10584
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
10573
10585
|
delay: closeDuration_ * (2 / 3),
|
|
10574
10586
|
fill: "forwards"
|
|
10575
10587
|
}).finished]);
|
|
@@ -10762,7 +10774,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10762
10774
|
if (!input_field_accessor_value) break add_input_field;
|
|
10763
10775
|
let input_element;
|
|
10764
10776
|
let div_with_field_class;
|
|
10765
|
-
let
|
|
10777
|
+
let buttonInField;
|
|
10766
10778
|
const search_field = SafeSearchField({
|
|
10767
10779
|
i18n_: i18n_,
|
|
10768
10780
|
search_field_value_: search_field_value_,
|
|
@@ -10772,7 +10784,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10772
10784
|
field_element_ref_: el => div_with_field_class = el,
|
|
10773
10785
|
disabled_: true,
|
|
10774
10786
|
BackIcon_: BackIcon_,
|
|
10775
|
-
|
|
10787
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
10776
10788
|
});
|
|
10777
10789
|
if (!search_field) break add_input_field;
|
|
10778
10790
|
setModalBodyStyle({});
|
|
@@ -10806,7 +10818,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10806
10818
|
bodyAlignmentSignal_: modal_body_style,
|
|
10807
10819
|
backdropStyleSignal_: modal_backdrop_style,
|
|
10808
10820
|
setPollAlignment_: setPollAlignment_,
|
|
10809
|
-
|
|
10821
|
+
buttonInField_: buttonInField,
|
|
10810
10822
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
10811
10823
|
});
|
|
10812
10824
|
}
|
|
@@ -11644,7 +11656,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11644
11656
|
const shared_properties = $2c61e4cd8229c49a$export$12fa711345994013(depict_search);
|
|
11645
11657
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
11646
11658
|
let input_element;
|
|
11647
|
-
let
|
|
11659
|
+
let buttonInField;
|
|
11648
11660
|
const search_field = $5vyXB$solidjsweb.createComponent((0, $66b8b9a9613c141d$export$b94867ecbd698f21), {
|
|
11649
11661
|
get BackIcon_() {
|
|
11650
11662
|
return shared_properties.BackIcon_;
|
|
@@ -11663,7 +11675,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11663
11675
|
},
|
|
11664
11676
|
disabled_: true,
|
|
11665
11677
|
input_field_ref_: el => input_element = el,
|
|
11666
|
-
|
|
11678
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
11667
11679
|
field_element_ref_: field => {
|
|
11668
11680
|
const bodyAlignmentSignal_ = $5vyXB$solidjs.createSignal({
|
|
11669
11681
|
position: "fixed"
|
|
@@ -11710,7 +11722,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11710
11722
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
11711
11723
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
11712
11724
|
setPollAlignment_: setPollAlignment_,
|
|
11713
|
-
|
|
11725
|
+
buttonInField_: buttonInField,
|
|
11714
11726
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11715
11727
|
});
|
|
11716
11728
|
}
|
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.2";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
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.2";
|
|
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++) {
|
|
@@ -2798,6 +2798,16 @@ let $f86ba724282f6690$export$44dad306455dddf;
|
|
|
2798
2798
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
2799
2799
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
2800
2800
|
})($f86ba724282f6690$export$44dad306455dddf || ($f86ba724282f6690$export$44dad306455dddf = {}));
|
|
2801
|
+
var $081752ca508a876f$var$_tmpl$ = '<path fill-rule="evenodd" d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z" fill="#0f0f0f"></path>';
|
|
2802
|
+
function $081752ca508a876f$export$f7658c347b037c3f(props = {}) {
|
|
2803
|
+
return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
|
|
2804
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2805
|
+
width: "21",
|
|
2806
|
+
height: "20",
|
|
2807
|
+
viewBox: "0 0 21 20",
|
|
2808
|
+
fill: "none"
|
|
2809
|
+
}, props), () => $i7OB2$ssr($081752ca508a876f$var$_tmpl$), true);
|
|
2810
|
+
}
|
|
2801
2811
|
var $5285d2814d0fac0c$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
2802
2812
|
$5285d2814d0fac0c$var$_tmpl$2 = ["<button", ' class="submit major" type="button"', ">", "</button>"],
|
|
2803
2813
|
$5285d2814d0fac0c$var$_tmpl$3 = ["<div", ' class="', '" role="search"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="field"><!--$-->', '<!--/--><input class="', '" tabindex="0"', "><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
@@ -2813,7 +2823,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
2813
2823
|
i18n_: i18n_,
|
|
2814
2824
|
after_focusing_: after_focusing_,
|
|
2815
2825
|
BackIcon_: BackIcon_,
|
|
2816
|
-
|
|
2826
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
2817
2827
|
}) {
|
|
2818
2828
|
let input_element;
|
|
2819
2829
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -2864,7 +2874,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
2864
2874
|
return !searchFieldEmpty();
|
|
2865
2875
|
},
|
|
2866
2876
|
get fallback() {
|
|
2867
|
-
return $i7OB2$createComponent((0, $
|
|
2877
|
+
return $i7OB2$createComponent((0, $081752ca508a876f$export$f7658c347b037c3f), {});
|
|
2868
2878
|
},
|
|
2869
2879
|
get children() {
|
|
2870
2880
|
return $i7OB2$createComponent(BackIcon_, {});
|
|
@@ -10352,7 +10362,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
10352
10362
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
10353
10363
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
10354
10364
|
setPollAlignment_: setPollAlignment_,
|
|
10355
|
-
|
|
10365
|
+
buttonInField_: buttonInField_,
|
|
10356
10366
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
10357
10367
|
}) {
|
|
10358
10368
|
return $i7OB2$createRoot(dispose => {
|
|
@@ -10395,7 +10405,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
10395
10405
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
10396
10406
|
setPollAlignment_(true);
|
|
10397
10407
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
10398
|
-
|
|
10408
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
10399
10409
|
opacity: 1
|
|
10400
10410
|
}, {
|
|
10401
10411
|
opacity: 0
|
|
@@ -10462,6 +10472,8 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
10462
10472
|
width: width,
|
|
10463
10473
|
left: left
|
|
10464
10474
|
} = fakeField.getBoundingClientRect();
|
|
10475
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
10476
|
+
const pxOffCenter = Math.abs($i7OB2$untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
10465
10477
|
$0a901077d5c8a2b2$export$23d40cc5971c3acd({
|
|
10466
10478
|
setBackdropStyle_: setBackdropStyle_,
|
|
10467
10479
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -10477,12 +10489,12 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
10477
10489
|
duration: closeDuration_,
|
|
10478
10490
|
fill: "forwards",
|
|
10479
10491
|
easing: "ease-out"
|
|
10480
|
-
}).finished,
|
|
10492
|
+
}).finished, buttonInField_.animate([{
|
|
10481
10493
|
opacity: 0
|
|
10482
10494
|
}, {
|
|
10483
10495
|
opacity: 1
|
|
10484
10496
|
}], {
|
|
10485
|
-
duration: closeDuration_ / 3,
|
|
10497
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
10486
10498
|
delay: closeDuration_ * (2 / 3),
|
|
10487
10499
|
fill: "forwards"
|
|
10488
10500
|
}).finished]);
|
|
@@ -10675,7 +10687,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
10675
10687
|
if (!input_field_accessor_value) break add_input_field;
|
|
10676
10688
|
let input_element;
|
|
10677
10689
|
let div_with_field_class;
|
|
10678
|
-
let
|
|
10690
|
+
let buttonInField;
|
|
10679
10691
|
const search_field = SafeSearchField({
|
|
10680
10692
|
i18n_: i18n_,
|
|
10681
10693
|
search_field_value_: search_field_value_,
|
|
@@ -10685,7 +10697,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
10685
10697
|
field_element_ref_: el => div_with_field_class = el,
|
|
10686
10698
|
disabled_: true,
|
|
10687
10699
|
BackIcon_: BackIcon_,
|
|
10688
|
-
|
|
10700
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
10689
10701
|
});
|
|
10690
10702
|
if (!search_field) break add_input_field;
|
|
10691
10703
|
setModalBodyStyle({});
|
|
@@ -10719,7 +10731,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
10719
10731
|
bodyAlignmentSignal_: modal_body_style,
|
|
10720
10732
|
backdropStyleSignal_: modal_backdrop_style,
|
|
10721
10733
|
setPollAlignment_: setPollAlignment_,
|
|
10722
|
-
|
|
10734
|
+
buttonInField_: buttonInField,
|
|
10723
10735
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
10724
10736
|
});
|
|
10725
10737
|
}
|
|
@@ -11557,7 +11569,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
11557
11569
|
const shared_properties = $806c97b931758897$export$12fa711345994013(depict_search);
|
|
11558
11570
|
return $16b52438165aafe2$export$23fca46f3143581f(() => {
|
|
11559
11571
|
let input_element;
|
|
11560
|
-
let
|
|
11572
|
+
let buttonInField;
|
|
11561
11573
|
const search_field = $i7OB2$createComponent((0, $5285d2814d0fac0c$export$b94867ecbd698f21), {
|
|
11562
11574
|
get BackIcon_() {
|
|
11563
11575
|
return shared_properties.BackIcon_;
|
|
@@ -11576,7 +11588,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
11576
11588
|
},
|
|
11577
11589
|
disabled_: true,
|
|
11578
11590
|
input_field_ref_: el => input_element = el,
|
|
11579
|
-
|
|
11591
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
11580
11592
|
field_element_ref_: field => {
|
|
11581
11593
|
const bodyAlignmentSignal_ = $i7OB2$createSignal({
|
|
11582
11594
|
position: "fixed"
|
|
@@ -11623,7 +11635,7 @@ function $58b3487626e85ece$export$316f6f283ae64765(props) {
|
|
|
11623
11635
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
11624
11636
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
11625
11637
|
setPollAlignment_: setPollAlignment_,
|
|
11626
|
-
|
|
11638
|
+
buttonInField_: buttonInField,
|
|
11627
11639
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11628
11640
|
});
|
|
11629
11641
|
}
|