@depict-ai/ui 4.3.14 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ES10/index.cjs +142 -72
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +142 -72
- package/latest/index.cjs +139 -72
- package/latest/index.d.ts +1 -1
- package/latest/index.js +139 -72
- package/package.json +2 -2
- package/server/ES10/index.cjs +75 -28
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +75 -28
- package/server/latest/index.cjs +72 -28
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +72 -28
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.
|
|
103
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.4.1";
|
|
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++) {
|
|
@@ -3601,10 +3601,13 @@ let $c95c6dd9e93acd82$export$44dad306455dddf;
|
|
|
3601
3601
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3602
3602
|
})($c95c6dd9e93acd82$export$44dad306455dddf || ($c95c6dd9e93acd82$export$44dad306455dddf = {}));
|
|
3603
3603
|
var $29e5dbeb69da7a36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class=back type=button>`),
|
|
3604
|
-
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<
|
|
3604
|
+
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=clear>`),
|
|
3605
|
+
$29e5dbeb69da7a36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=spacer>`),
|
|
3606
|
+
$29e5dbeb69da7a36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
3607
|
+
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=search-field role=search><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0><!$><!/></div><!$><!/><!$><!/>`);
|
|
3605
3608
|
function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
3606
3609
|
let {
|
|
3607
|
-
search_field_value_:
|
|
3610
|
+
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
3608
3611
|
input_field_ref_: input_field_ref_,
|
|
3609
3612
|
field_element_ref_: field_element_ref_,
|
|
3610
3613
|
submit_query_: submit_query_,
|
|
@@ -3615,7 +3618,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3615
3618
|
i18n_: i18n_,
|
|
3616
3619
|
after_focusing_: after_focusing_,
|
|
3617
3620
|
BackIcon_: BackIcon_,
|
|
3618
|
-
|
|
3621
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
3619
3622
|
} = _ref;
|
|
3620
3623
|
let input_element;
|
|
3621
3624
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -3629,30 +3632,107 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3629
3632
|
})); // focus field on render
|
|
3630
3633
|
const owner_of_field_element = $52FdA$solidjs.getOwner();
|
|
3631
3634
|
const isNewModal = BackIcon_[(0, $072ab198d82c3eb7$export$1ea76ea778b880dd)] === 2;
|
|
3635
|
+
const [backButtonWidthAccessor, setBackButtonWidthAccessor] = $52FdA$solidjs.createSignal();
|
|
3636
|
+
const getBackButtonWidth = () => {
|
|
3637
|
+
var _backButtonWidthAcces;
|
|
3638
|
+
return (_backButtonWidthAcces = backButtonWidthAccessor()) === null || _backButtonWidthAcces === void 0 ? void 0 : _backButtonWidthAcces();
|
|
3639
|
+
};
|
|
3640
|
+
const searchFieldEmpty = $52FdA$solidjs.createMemo(() => !searchFieldValue());
|
|
3641
|
+
const BackButton = () => $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3642
|
+
when: on_back_,
|
|
3643
|
+
get children() {
|
|
3644
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$);
|
|
3645
|
+
$52FdA$solidjsweb.spread(_el$, $52FdA$solidjsweb.mergeProps({
|
|
3646
|
+
get onClick() {
|
|
3647
|
+
return $52FdA$depictaiutilishared.catchify(on_back_);
|
|
3648
|
+
},
|
|
3649
|
+
get ["aria-label"]() {
|
|
3650
|
+
return i18n_.back_();
|
|
3651
|
+
}
|
|
3652
|
+
}, isNewModal && {
|
|
3653
|
+
ref: el => {
|
|
3654
|
+
setBackButtonWidthAccessor(() => $c387d7f1d9fb66c0$export$ebdc3711f7e02ccd(el));
|
|
3655
|
+
$52FdA$solidjs.onCleanup(() => setBackButtonWidthAccessor());
|
|
3656
|
+
}
|
|
3657
|
+
}), false, true);
|
|
3658
|
+
$52FdA$solidjsweb.insert(_el$, isNewModal ? $52FdA$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {}) : $52FdA$solidjsweb.createComponent(BackIcon_, {}));
|
|
3659
|
+
$52FdA$solidjsweb.runHydrationEvents();
|
|
3660
|
+
return _el$;
|
|
3661
|
+
}
|
|
3662
|
+
});
|
|
3663
|
+
const ClearButton = () => (() => {
|
|
3664
|
+
var _el$2 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$2);
|
|
3665
|
+
var _ref$ = buttonInFieldRef_;
|
|
3666
|
+
typeof _ref$ === "function" ? $52FdA$solidjsweb.use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3667
|
+
$52FdA$solidjsweb.spread(_el$2, $52FdA$solidjsweb.mergeProps({
|
|
3668
|
+
get classList() {
|
|
3669
|
+
return {
|
|
3670
|
+
empty: searchFieldEmpty()
|
|
3671
|
+
};
|
|
3672
|
+
},
|
|
3673
|
+
get style() {
|
|
3674
|
+
return isNewModal || !searchFieldEmpty() ? "" : "display: none";
|
|
3675
|
+
},
|
|
3676
|
+
get onClick() {
|
|
3677
|
+
return $52FdA$depictaiutilishared.catchify(() => {
|
|
3678
|
+
if (isNewModal && searchFieldEmpty()) return;
|
|
3679
|
+
setSearchFieldValue("");
|
|
3680
|
+
clear_filters_(true);
|
|
3681
|
+
if (!disabled_) input_element.focus();
|
|
3682
|
+
});
|
|
3683
|
+
}
|
|
3684
|
+
}, () => searchFieldEmpty() ? {
|
|
3685
|
+
"aria-hidden": "true"
|
|
3686
|
+
} : {
|
|
3687
|
+
title: i18n_.clear_filters_query_sorting_after_submit_()
|
|
3688
|
+
}), false, true);
|
|
3689
|
+
$52FdA$solidjsweb.insert(_el$2, isNewModal ? $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3690
|
+
get when() {
|
|
3691
|
+
return !searchFieldEmpty();
|
|
3692
|
+
},
|
|
3693
|
+
get fallback() {
|
|
3694
|
+
return $52FdA$solidjsweb.createComponent((0, $5b88b077e48a4451$export$82eafebb825fc23f), {});
|
|
3695
|
+
},
|
|
3696
|
+
get children() {
|
|
3697
|
+
return $52FdA$solidjsweb.createComponent(BackIcon_, {});
|
|
3698
|
+
}
|
|
3699
|
+
}) : $52FdA$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {}));
|
|
3700
|
+
$52FdA$solidjsweb.runHydrationEvents();
|
|
3701
|
+
return _el$2;
|
|
3702
|
+
})();
|
|
3632
3703
|
return (() => {
|
|
3633
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$
|
|
3634
|
-
_el$
|
|
3704
|
+
var _el$3 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$5),
|
|
3705
|
+
_el$12 = _el$3.firstChild,
|
|
3706
|
+
[_el$13, _co$3] = $52FdA$solidjsweb.getNextMarker(_el$12.nextSibling),
|
|
3707
|
+
_el$14 = _el$13.nextSibling,
|
|
3708
|
+
[_el$15, _co$4] = $52FdA$solidjsweb.getNextMarker(_el$14.nextSibling),
|
|
3709
|
+
_el$5 = _el$15.nextSibling,
|
|
3710
|
+
_el$7 = _el$5.firstChild,
|
|
3635
3711
|
[_el$8, _co$] = $52FdA$solidjsweb.getNextMarker(_el$7.nextSibling),
|
|
3636
|
-
_el$
|
|
3637
|
-
_el$
|
|
3638
|
-
_el$
|
|
3639
|
-
_el$
|
|
3640
|
-
|
|
3641
|
-
|
|
3712
|
+
_el$6 = _el$8.nextSibling,
|
|
3713
|
+
_el$9 = _el$6.nextSibling,
|
|
3714
|
+
[_el$10, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$9.nextSibling),
|
|
3715
|
+
_el$16 = _el$5.nextSibling,
|
|
3716
|
+
[_el$17, _co$5] = $52FdA$solidjsweb.getNextMarker(_el$16.nextSibling),
|
|
3717
|
+
_el$18 = _el$17.nextSibling,
|
|
3718
|
+
[_el$19, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$18.nextSibling);
|
|
3719
|
+
_el$3.classList.toggle("in-modal", !!!!on_back_);
|
|
3720
|
+
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3721
|
+
get when() {
|
|
3722
|
+
return getBackButtonWidth() !== undefined && on_back_;
|
|
3723
|
+
},
|
|
3642
3724
|
get children() {
|
|
3643
|
-
var _el$
|
|
3644
|
-
$52FdA$solidjsweb.
|
|
3645
|
-
|
|
3646
|
-
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setAttribute(_el$2, "aria-label", i18n_.back_()));
|
|
3647
|
-
$52FdA$solidjsweb.runHydrationEvents();
|
|
3648
|
-
return _el$2;
|
|
3725
|
+
var _el$4 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$3);
|
|
3726
|
+
$52FdA$solidjsweb.effect(() => (getBackButtonWidth(), _el$4.style.setProperty("width", getBackButtonWidth() + "px")));
|
|
3727
|
+
return _el$4;
|
|
3649
3728
|
}
|
|
3650
|
-
}), _el$
|
|
3729
|
+
}), _el$13, _co$3);
|
|
3730
|
+
$52FdA$solidjsweb.insert(_el$3, !isNewModal && $52FdA$solidjsweb.createComponent(BackButton, {}), _el$15, _co$4);
|
|
3651
3731
|
$52FdA$solidjsweb.use(el => {
|
|
3652
3732
|
field_div = el;
|
|
3653
3733
|
field_element_ref_ === null || field_element_ref_ === void 0 || field_element_ref_(el);
|
|
3654
|
-
}, _el$
|
|
3655
|
-
$52FdA$solidjsweb.addEventListener(_el$
|
|
3734
|
+
}, _el$5);
|
|
3735
|
+
$52FdA$solidjsweb.addEventListener(_el$5, "click", $52FdA$depictaiutilishared.catchify(_ref2 => {
|
|
3656
3736
|
let {
|
|
3657
3737
|
target: target,
|
|
3658
3738
|
currentTarget: currentTarget,
|
|
@@ -3677,7 +3757,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3677
3757
|
}
|
|
3678
3758
|
}
|
|
3679
3759
|
}), true);
|
|
3680
|
-
_el$
|
|
3760
|
+
$52FdA$solidjsweb.insert(_el$5, isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$8, _co$);
|
|
3761
|
+
_el$6.$$pointerdown = _ref3 => {
|
|
3681
3762
|
let {
|
|
3682
3763
|
pointerType: pointerType
|
|
3683
3764
|
} = _ref3;
|
|
@@ -3697,7 +3778,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3697
3778
|
$52FdA$solidjs.runWithOwner(owner_of_field_element, () => $52FdA$solidjs.onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
3698
3779
|
}
|
|
3699
3780
|
};
|
|
3700
|
-
$52FdA$solidjsweb.addEventListener(_el$
|
|
3781
|
+
$52FdA$solidjsweb.addEventListener(_el$6, "select", $52FdA$depictaiutilishared.catchify(() => {
|
|
3701
3782
|
if (disabled_)
|
|
3702
3783
|
// just in case. The field not actually being disabled when being disabled_ is so that you can focus it and open the modal. We don't want any of the other input-field-interaction features to work
|
|
3703
3784
|
return;
|
|
@@ -3709,14 +3790,14 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3709
3790
|
once: true
|
|
3710
3791
|
});
|
|
3711
3792
|
}));
|
|
3712
|
-
$52FdA$solidjsweb.addEventListener(_el$
|
|
3793
|
+
$52FdA$solidjsweb.addEventListener(_el$6, "input", $52FdA$depictaiutilishared.catchify(() => {
|
|
3713
3794
|
const {
|
|
3714
3795
|
value: value
|
|
3715
3796
|
} = input_element;
|
|
3716
3797
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
3717
|
-
|
|
3798
|
+
setSearchFieldValue(value);
|
|
3718
3799
|
}), true);
|
|
3719
|
-
$52FdA$solidjsweb.addEventListener(_el$
|
|
3800
|
+
$52FdA$solidjsweb.addEventListener(_el$6, "keydown", $52FdA$depictaiutilishared.catchify(e => {
|
|
3720
3801
|
if (disabled_) {
|
|
3721
3802
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
3722
3803
|
// alow tab-selecting the input field and then open the modal when the user start writing but also to move past the field with tab
|
|
@@ -3726,49 +3807,38 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3726
3807
|
if (!dont_submit) submit_query_();
|
|
3727
3808
|
}
|
|
3728
3809
|
}), true);
|
|
3729
|
-
var _ref$ = $52FdA$depictaiutilishared.catchify(el => {
|
|
3810
|
+
var _ref$2 = $52FdA$depictaiutilishared.catchify(el => {
|
|
3730
3811
|
input_element = el;
|
|
3731
3812
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
3732
3813
|
});
|
|
3733
|
-
typeof _ref$ === "function" && $52FdA$solidjsweb.use(_ref
|
|
3734
|
-
_el$
|
|
3735
|
-
$52FdA$solidjsweb.
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
return $
|
|
3814
|
+
typeof _ref$2 === "function" && $52FdA$solidjsweb.use(_ref$2, _el$6);
|
|
3815
|
+
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
3816
|
+
$52FdA$solidjsweb.insert(_el$5, !isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
3817
|
+
$52FdA$solidjsweb.insert(_el$3, isNewModal && $52FdA$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
3818
|
+
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3819
|
+
when: !isNewModal,
|
|
3820
|
+
get children() {
|
|
3821
|
+
var _el$11 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$4);
|
|
3822
|
+
$52FdA$solidjsweb.addEventListener(_el$11, "click", $52FdA$depictaiutilishared.catchify(() => submit_query_()), true);
|
|
3823
|
+
$52FdA$solidjsweb.insert(_el$11, $52FdA$solidjsweb.createComponent((0, $5b88b077e48a4451$export$82eafebb825fc23f), {}));
|
|
3824
|
+
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3825
|
+
$52FdA$solidjsweb.runHydrationEvents();
|
|
3826
|
+
return _el$11;
|
|
3746
3827
|
}
|
|
3747
|
-
},
|
|
3748
|
-
tabindex: "-1"
|
|
3749
|
-
} : {
|
|
3750
|
-
"aria-label": i18n_.search_submit_button_aria_label_()
|
|
3751
|
-
}), false, true);
|
|
3752
|
-
$52FdA$solidjsweb.insert(_el$6, $52FdA$solidjsweb.createComponent((0, $5b88b077e48a4451$export$82eafebb825fc23f), {}));
|
|
3828
|
+
}), _el$19, _co$6);
|
|
3753
3829
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
3754
3830
|
var _v$ = i18n_.search_field_field_aria_label_(),
|
|
3755
|
-
_v$2 = i18n_.placeholder_text_()
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
_v$ !== _p$.e && $52FdA$solidjsweb.setAttribute(_el$4, "aria-label", _p$.e = _v$);
|
|
3759
|
-
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$4, "placeholder", _p$.t = _v$2);
|
|
3760
|
-
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$5, "title", _p$.a = _v$3);
|
|
3761
|
-
_p$.o = $52FdA$solidjsweb.style(_el$5, _v$4, _p$.o);
|
|
3831
|
+
_v$2 = i18n_.placeholder_text_();
|
|
3832
|
+
_v$ !== _p$.e && $52FdA$solidjsweb.setAttribute(_el$6, "aria-label", _p$.e = _v$);
|
|
3833
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$6, "placeholder", _p$.t = _v$2);
|
|
3762
3834
|
return _p$;
|
|
3763
3835
|
}, {
|
|
3764
3836
|
e: undefined,
|
|
3765
|
-
t: undefined
|
|
3766
|
-
a: undefined,
|
|
3767
|
-
o: undefined
|
|
3837
|
+
t: undefined
|
|
3768
3838
|
});
|
|
3769
|
-
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setProperty(_el$
|
|
3839
|
+
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setProperty(_el$6, "value", searchFieldValue()));
|
|
3770
3840
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
3771
|
-
return _el
|
|
3841
|
+
return _el$3;
|
|
3772
3842
|
})();
|
|
3773
3843
|
}
|
|
3774
3844
|
$52FdA$solidjsweb.delegateEvents(["click", "keydown", "input", "pointerdown"]);
|
|
@@ -3951,7 +4021,7 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
|
|
|
3951
4021
|
};
|
|
3952
4022
|
});
|
|
3953
4023
|
const search_field = $29e5dbeb69da7a36$export$b94867ecbd698f21({
|
|
3954
|
-
BackIcon_: (
|
|
4024
|
+
BackIcon_: (0, $820f2920cc576f7e$export$8d8893ffd8aca39a),
|
|
3955
4025
|
input_field_ref_: element => set_input_field(element),
|
|
3956
4026
|
override_on_enter_: e => {
|
|
3957
4027
|
var _on_enter_in_search_f;
|
|
@@ -3970,7 +4040,6 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
|
|
|
3970
4040
|
input_el.setSelectionRange(start, end);
|
|
3971
4041
|
}
|
|
3972
4042
|
});
|
|
3973
|
-
search_field.classList.add("in-modal");
|
|
3974
4043
|
const modal_element = (() => {
|
|
3975
4044
|
var _el$4 = $52FdA$solidjsweb.getNextElement($9035b24c2dbd3f36$var$_tmpl$3),
|
|
3976
4045
|
_el$5 = _el$4.firstChild,
|
|
@@ -5239,7 +5308,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
5239
5308
|
return _el$7;
|
|
5240
5309
|
})();
|
|
5241
5310
|
const search_field = $29e5dbeb69da7a36$export$b94867ecbd698f21({
|
|
5242
|
-
BackIcon_: (
|
|
5311
|
+
BackIcon_: (0, $50b50df3efaa8776$export$11e9f390c90a537f),
|
|
5243
5312
|
input_field_ref_: element => set_input_field(element),
|
|
5244
5313
|
override_on_enter_: e => {
|
|
5245
5314
|
var _on_enter_in_search_f;
|
|
@@ -5258,7 +5327,6 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
5258
5327
|
input_el.setSelectionRange(start, end);
|
|
5259
5328
|
}
|
|
5260
5329
|
});
|
|
5261
|
-
search_field.classList.add("in-modal");
|
|
5262
5330
|
if (setSearchFieldOuterWidth_) {
|
|
5263
5331
|
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
|
5264
5332
|
resizeObserver.observe(search_field);
|
|
@@ -13544,7 +13612,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13544
13612
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
13545
13613
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
13546
13614
|
setPollAlignment_: setPollAlignment_,
|
|
13547
|
-
|
|
13615
|
+
buttonInField_: buttonInField_,
|
|
13548
13616
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13549
13617
|
} = _ref;
|
|
13550
13618
|
return $52FdA$solidjs.createRoot(dispose => {
|
|
@@ -13591,7 +13659,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13591
13659
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
13592
13660
|
setPollAlignment_(true);
|
|
13593
13661
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
13594
|
-
|
|
13662
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
13595
13663
|
opacity: 1
|
|
13596
13664
|
}, {
|
|
13597
13665
|
opacity: 0
|
|
@@ -13658,6 +13726,8 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13658
13726
|
width: width,
|
|
13659
13727
|
left: left
|
|
13660
13728
|
} = fakeField.getBoundingClientRect();
|
|
13729
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
13730
|
+
const pxOffCenter = Math.abs($52FdA$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
13661
13731
|
$ce2f7ec02a8f2173$export$23d40cc5971c3acd({
|
|
13662
13732
|
setBackdropStyle_: setBackdropStyle_,
|
|
13663
13733
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -13673,12 +13743,12 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13673
13743
|
duration: closeDuration_,
|
|
13674
13744
|
fill: "forwards",
|
|
13675
13745
|
easing: "ease-out"
|
|
13676
|
-
}).finished,
|
|
13746
|
+
}).finished, buttonInField_.animate([{
|
|
13677
13747
|
opacity: 0
|
|
13678
13748
|
}, {
|
|
13679
13749
|
opacity: 1
|
|
13680
13750
|
}], {
|
|
13681
|
-
duration: closeDuration_ / 3,
|
|
13751
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
13682
13752
|
delay: closeDuration_ * (2 / 3),
|
|
13683
13753
|
fill: "forwards"
|
|
13684
13754
|
}).finished]);
|
|
@@ -13898,7 +13968,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
13898
13968
|
if (!input_field_accessor_value) break add_input_field;
|
|
13899
13969
|
let input_element;
|
|
13900
13970
|
let div_with_field_class;
|
|
13901
|
-
let
|
|
13971
|
+
let buttonInField;
|
|
13902
13972
|
const search_field = SafeSearchField({
|
|
13903
13973
|
i18n_: i18n_,
|
|
13904
13974
|
search_field_value_: search_field_value_,
|
|
@@ -13908,7 +13978,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
13908
13978
|
field_element_ref_: el => div_with_field_class = el,
|
|
13909
13979
|
disabled_: true,
|
|
13910
13980
|
BackIcon_: BackIcon_,
|
|
13911
|
-
|
|
13981
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
13912
13982
|
});
|
|
13913
13983
|
if (!search_field) break add_input_field;
|
|
13914
13984
|
setModalBodyStyle({});
|
|
@@ -13943,7 +14013,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
13943
14013
|
bodyAlignmentSignal_: modal_body_style,
|
|
13944
14014
|
backdropStyleSignal_: modal_backdrop_style,
|
|
13945
14015
|
setPollAlignment_: setPollAlignment_,
|
|
13946
|
-
|
|
14016
|
+
buttonInField_: buttonInField,
|
|
13947
14017
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
13948
14018
|
});
|
|
13949
14019
|
}
|
|
@@ -14998,7 +15068,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
14998
15068
|
const shared_properties = $ddd39c5f36f49703$export$12fa711345994013(depict_search);
|
|
14999
15069
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
15000
15070
|
let input_element;
|
|
15001
|
-
let
|
|
15071
|
+
let buttonInField;
|
|
15002
15072
|
const search_field = $52FdA$solidjsweb.createComponent((0, $29e5dbeb69da7a36$export$b94867ecbd698f21), {
|
|
15003
15073
|
get BackIcon_() {
|
|
15004
15074
|
return shared_properties.BackIcon_;
|
|
@@ -15017,7 +15087,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
15017
15087
|
},
|
|
15018
15088
|
disabled_: true,
|
|
15019
15089
|
input_field_ref_: el => input_element = el,
|
|
15020
|
-
|
|
15090
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
15021
15091
|
field_element_ref_: field => {
|
|
15022
15092
|
const bodyAlignmentSignal_ = $52FdA$solidjs.createSignal({
|
|
15023
15093
|
position: "fixed"
|
|
@@ -15064,7 +15134,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
|
|
|
15064
15134
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
15065
15135
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
15066
15136
|
setPollAlignment_: setPollAlignment_,
|
|
15067
|
-
|
|
15137
|
+
buttonInField_: buttonInField,
|
|
15068
15138
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
15069
15139
|
});
|
|
15070
15140
|
}
|
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.
|
|
13
|
+
export const version = "4.4.1";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|