@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/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.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.4.1";
|
|
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,11 +2965,12 @@ 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 $584c06c09cf4609d$var$_tmpl$ = ["<
|
|
2969
|
-
$584c06c09cf4609d$var$_tmpl$2 = ["<
|
|
2968
|
+
var $584c06c09cf4609d$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
2969
|
+
$584c06c09cf4609d$var$_tmpl$2 = ["<button", ' class="submit major" type="button"', ">", "</button>"],
|
|
2970
|
+
$584c06c09cf4609d$var$_tmpl$3 = ["<div", ' class="', '" role="search"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="field"><!--$-->', '<!--/--><input class="', '" tabindex="0"', "><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
2970
2971
|
function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
2971
2972
|
let {
|
|
2972
|
-
search_field_value_:
|
|
2973
|
+
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
2973
2974
|
input_field_ref_: input_field_ref_,
|
|
2974
2975
|
field_element_ref_: field_element_ref_,
|
|
2975
2976
|
submit_query_: submit_query_,
|
|
@@ -2980,7 +2981,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
2980
2981
|
i18n_: i18n_,
|
|
2981
2982
|
after_focusing_: after_focusing_,
|
|
2982
2983
|
BackIcon_: BackIcon_,
|
|
2983
|
-
|
|
2984
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
2984
2985
|
} = _ref;
|
|
2985
2986
|
let input_element;
|
|
2986
2987
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -2994,19 +2995,65 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
2994
2995
|
})); // focus field on render
|
|
2995
2996
|
const owner_of_field_element = $b8hua$getOwner();
|
|
2996
2997
|
const isNewModal = BackIcon_[(0, $b026fa9c9c904a98$export$1ea76ea778b880dd)] === 2;
|
|
2997
|
-
|
|
2998
|
+
const [backButtonWidthAccessor, setBackButtonWidthAccessor] = $b8hua$createSignal();
|
|
2999
|
+
const getBackButtonWidth = () => {
|
|
3000
|
+
var _backButtonWidthAcces;
|
|
3001
|
+
return (_backButtonWidthAcces = backButtonWidthAccessor()) === null || _backButtonWidthAcces === void 0 ? void 0 : _backButtonWidthAcces();
|
|
3002
|
+
};
|
|
3003
|
+
const searchFieldEmpty = $b8hua$createMemo(() => !searchFieldValue());
|
|
3004
|
+
const BackButton = () => $b8hua$createComponent((0, $b8hua$Show), {
|
|
2998
3005
|
when: on_back_,
|
|
2999
3006
|
get children() {
|
|
3000
|
-
return $b8hua$
|
|
3007
|
+
return $b8hua$ssrElement("button", $b8hua$mergeProps({
|
|
3008
|
+
"class": "back",
|
|
3009
|
+
type: "button",
|
|
3010
|
+
get ["aria-label"]() {
|
|
3011
|
+
return i18n_.back_();
|
|
3012
|
+
}
|
|
3013
|
+
}, isNewModal && {
|
|
3014
|
+
ref: el => {
|
|
3015
|
+
setBackButtonWidthAccessor(() => $fc830a7ee59416ef$export$ebdc3711f7e02ccd(el));
|
|
3016
|
+
$b8hua$onCleanup(() => setBackButtonWidthAccessor());
|
|
3017
|
+
}
|
|
3018
|
+
}), () => isNewModal ? $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})) : $b8hua$escape($b8hua$createComponent(BackIcon_, {})), true);
|
|
3001
3019
|
}
|
|
3002
|
-
})
|
|
3003
|
-
|
|
3004
|
-
type: "button"
|
|
3005
|
-
|
|
3006
|
-
|
|
3020
|
+
});
|
|
3021
|
+
const ClearButton = () => $b8hua$ssrElement("button", $b8hua$mergeProps({
|
|
3022
|
+
type: "button",
|
|
3023
|
+
get ["class"]() {
|
|
3024
|
+
return "clear ".concat(searchFieldEmpty() ? "empty" : "");
|
|
3025
|
+
},
|
|
3026
|
+
get style() {
|
|
3027
|
+
return isNewModal || !searchFieldEmpty() ? "" : "display: none";
|
|
3028
|
+
}
|
|
3029
|
+
}, () => searchFieldEmpty() ? {
|
|
3030
|
+
"aria-hidden": "true"
|
|
3007
3031
|
} : {
|
|
3008
|
-
|
|
3009
|
-
}), () => $b8hua$escape($b8hua$createComponent((0, $
|
|
3032
|
+
title: i18n_.clear_filters_query_sorting_after_submit_()
|
|
3033
|
+
}), () => isNewModal ? $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
3034
|
+
get when() {
|
|
3035
|
+
return !searchFieldEmpty();
|
|
3036
|
+
},
|
|
3037
|
+
get fallback() {
|
|
3038
|
+
return $b8hua$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {});
|
|
3039
|
+
},
|
|
3040
|
+
get children() {
|
|
3041
|
+
return $b8hua$createComponent(BackIcon_, {});
|
|
3042
|
+
}
|
|
3043
|
+
})) : $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), true);
|
|
3044
|
+
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$3, $b8hua$ssrHydrationKey(), "search-field ".concat(!!on_back_ ? "in-modal" : ""), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
3045
|
+
get when() {
|
|
3046
|
+
return getBackButtonWidth() !== undefined && on_back_;
|
|
3047
|
+
},
|
|
3048
|
+
get children() {
|
|
3049
|
+
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$, $b8hua$ssrHydrationKey(), "width:" + ($b8hua$escape(getBackButtonWidth(), true) + "px"));
|
|
3050
|
+
}
|
|
3051
|
+
})), !isNewModal && $b8hua$escape($b8hua$createComponent(BackButton, {})), isNewModal && $b8hua$escape($b8hua$createComponent(ClearButton, {})), "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_field_field_aria_label_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(searchFieldValue(), true), false) + $b8hua$ssrAttribute("placeholder", $b8hua$escape(i18n_.placeholder_text_(), true), false), !isNewModal && $b8hua$escape($b8hua$createComponent(ClearButton, {})), isNewModal && $b8hua$escape($b8hua$createComponent(BackButton, {})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
3052
|
+
when: !isNewModal,
|
|
3053
|
+
get children() {
|
|
3054
|
+
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_submit_button_aria_label_(), true), false), $b8hua$escape($b8hua$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {})));
|
|
3055
|
+
}
|
|
3056
|
+
})));
|
|
3010
3057
|
}
|
|
3011
3058
|
function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
3012
3059
|
const cleanup_fns = [];
|
|
@@ -3173,7 +3220,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
3173
3220
|
};
|
|
3174
3221
|
});
|
|
3175
3222
|
const search_field = $584c06c09cf4609d$export$b94867ecbd698f21({
|
|
3176
|
-
BackIcon_: (
|
|
3223
|
+
BackIcon_: (0, $fac58b5610eec6a9$export$8d8893ffd8aca39a),
|
|
3177
3224
|
input_field_ref_: element => set_input_field(element),
|
|
3178
3225
|
override_on_enter_: e => {
|
|
3179
3226
|
var _on_enter_in_search_f;
|
|
@@ -3192,7 +3239,6 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
3192
3239
|
input_el.setSelectionRange(start, end);
|
|
3193
3240
|
}
|
|
3194
3241
|
});
|
|
3195
|
-
search_field.classList.add("in-modal");
|
|
3196
3242
|
const modal_element = $b8hua$ssr($40411f2ec772c376$var$_tmpl$3, $b8hua$ssrHydrationKey(), "depict-search-modal", "".concat("body", " ").concat($b8hua$escape($b8hua$escape(random_classname, true), true)), $b8hua$escape(search_field), $b8hua$escape($b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
3197
3243
|
severity_: "error",
|
|
3198
3244
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -4230,7 +4276,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
4230
4276
|
};
|
|
4231
4277
|
const discoverMoreSection = $b8hua$ssr($06fcd2a345efd24d$var$_tmpl$2, $b8hua$ssrHydrationKey(), get_search_field_value_() ? $b8hua$escape(i18n_.modal_view_all_results_()($b8hua$ssr($06fcd2a345efd24d$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$escape(formattedTotalNumberResults())))) : $b8hua$escape(i18n_.modal_discover_more_()));
|
|
4232
4278
|
const search_field = $584c06c09cf4609d$export$b94867ecbd698f21({
|
|
4233
|
-
BackIcon_: (
|
|
4279
|
+
BackIcon_: (0, $c2fe922d21c40514$export$11e9f390c90a537f),
|
|
4234
4280
|
input_field_ref_: element => set_input_field(element),
|
|
4235
4281
|
override_on_enter_: e => {
|
|
4236
4282
|
var _on_enter_in_search_f;
|
|
@@ -4249,7 +4295,6 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
4249
4295
|
input_el.setSelectionRange(start, end);
|
|
4250
4296
|
}
|
|
4251
4297
|
});
|
|
4252
|
-
search_field.classList.add("in-modal");
|
|
4253
4298
|
if (setSearchFieldOuterWidth_) {
|
|
4254
4299
|
const resizeObserver = new ResizeObserver($b8hua$catchify(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
|
4255
4300
|
resizeObserver.observe(search_field);
|
|
@@ -11027,7 +11072,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11027
11072
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
11028
11073
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
11029
11074
|
setPollAlignment_: setPollAlignment_,
|
|
11030
|
-
|
|
11075
|
+
buttonInField_: buttonInField_,
|
|
11031
11076
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11032
11077
|
} = _ref;
|
|
11033
11078
|
return $b8hua$createRoot(dispose => {
|
|
@@ -11070,7 +11115,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11070
11115
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
11071
11116
|
setPollAlignment_(true);
|
|
11072
11117
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
11073
|
-
|
|
11118
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
11074
11119
|
opacity: 1
|
|
11075
11120
|
}, {
|
|
11076
11121
|
opacity: 0
|
|
@@ -11137,6 +11182,8 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11137
11182
|
width: width,
|
|
11138
11183
|
left: left
|
|
11139
11184
|
} = fakeField.getBoundingClientRect();
|
|
11185
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
11186
|
+
const pxOffCenter = Math.abs($b8hua$untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
11140
11187
|
$d7833ca17fc05c5e$export$23d40cc5971c3acd({
|
|
11141
11188
|
setBackdropStyle_: setBackdropStyle_,
|
|
11142
11189
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -11152,12 +11199,12 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11152
11199
|
duration: closeDuration_,
|
|
11153
11200
|
fill: "forwards",
|
|
11154
11201
|
easing: "ease-out"
|
|
11155
|
-
}).finished,
|
|
11202
|
+
}).finished, buttonInField_.animate([{
|
|
11156
11203
|
opacity: 0
|
|
11157
11204
|
}, {
|
|
11158
11205
|
opacity: 1
|
|
11159
11206
|
}], {
|
|
11160
|
-
duration: closeDuration_ / 3,
|
|
11207
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
11161
11208
|
delay: closeDuration_ * (2 / 3),
|
|
11162
11209
|
fill: "forwards"
|
|
11163
11210
|
}).finished]);
|
|
@@ -11368,7 +11415,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11368
11415
|
if (!input_field_accessor_value) break add_input_field;
|
|
11369
11416
|
let input_element;
|
|
11370
11417
|
let div_with_field_class;
|
|
11371
|
-
let
|
|
11418
|
+
let buttonInField;
|
|
11372
11419
|
const search_field = SafeSearchField({
|
|
11373
11420
|
i18n_: i18n_,
|
|
11374
11421
|
search_field_value_: search_field_value_,
|
|
@@ -11378,7 +11425,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11378
11425
|
field_element_ref_: el => div_with_field_class = el,
|
|
11379
11426
|
disabled_: true,
|
|
11380
11427
|
BackIcon_: BackIcon_,
|
|
11381
|
-
|
|
11428
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
11382
11429
|
});
|
|
11383
11430
|
if (!search_field) break add_input_field;
|
|
11384
11431
|
setModalBodyStyle({});
|
|
@@ -11413,7 +11460,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11413
11460
|
bodyAlignmentSignal_: modal_body_style,
|
|
11414
11461
|
backdropStyleSignal_: modal_backdrop_style,
|
|
11415
11462
|
setPollAlignment_: setPollAlignment_,
|
|
11416
|
-
|
|
11463
|
+
buttonInField_: buttonInField,
|
|
11417
11464
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11418
11465
|
});
|
|
11419
11466
|
}
|
|
@@ -12436,7 +12483,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12436
12483
|
const shared_properties = $eb064bc3350276c1$export$12fa711345994013(depict_search);
|
|
12437
12484
|
return $83e8cf2c0b87a58a$export$23fca46f3143581f(() => {
|
|
12438
12485
|
let input_element;
|
|
12439
|
-
let
|
|
12486
|
+
let buttonInField;
|
|
12440
12487
|
const search_field = $b8hua$createComponent((0, $584c06c09cf4609d$export$b94867ecbd698f21), {
|
|
12441
12488
|
get BackIcon_() {
|
|
12442
12489
|
return shared_properties.BackIcon_;
|
|
@@ -12455,7 +12502,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12455
12502
|
},
|
|
12456
12503
|
disabled_: true,
|
|
12457
12504
|
input_field_ref_: el => input_element = el,
|
|
12458
|
-
|
|
12505
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
12459
12506
|
field_element_ref_: field => {
|
|
12460
12507
|
const bodyAlignmentSignal_ = $b8hua$createSignal({
|
|
12461
12508
|
position: "fixed"
|
|
@@ -12502,7 +12549,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
12502
12549
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
12503
12550
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
12504
12551
|
setPollAlignment_: setPollAlignment_,
|
|
12505
|
-
|
|
12552
|
+
buttonInField_: buttonInField,
|
|
12506
12553
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
12507
12554
|
});
|
|
12508
12555
|
}
|
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.
|
|
97
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.4.1";
|
|
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,10 +2885,11 @@ 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 $66b8b9a9613c141d$var$_tmpl$ = ["<
|
|
2889
|
-
$66b8b9a9613c141d$var$_tmpl$2 = ["<
|
|
2888
|
+
var $66b8b9a9613c141d$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
2889
|
+
$66b8b9a9613c141d$var$_tmpl$2 = ["<button", ' class="submit major" type="button"', ">", "</button>"],
|
|
2890
|
+
$66b8b9a9613c141d$var$_tmpl$3 = ["<div", ' class="', '" role="search"><!--$-->', "<!--/--><!--$-->", '<!--/--><div class="field"><!--$-->', '<!--/--><input class="', '" tabindex="0"', "><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
2890
2891
|
function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
2891
|
-
search_field_value_:
|
|
2892
|
+
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
2892
2893
|
input_field_ref_: input_field_ref_,
|
|
2893
2894
|
field_element_ref_: field_element_ref_,
|
|
2894
2895
|
submit_query_: submit_query_,
|
|
@@ -2899,7 +2900,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
2899
2900
|
i18n_: i18n_,
|
|
2900
2901
|
after_focusing_: after_focusing_,
|
|
2901
2902
|
BackIcon_: BackIcon_,
|
|
2902
|
-
|
|
2903
|
+
buttonInFieldRef_: buttonInFieldRef_
|
|
2903
2904
|
}) {
|
|
2904
2905
|
let input_element;
|
|
2905
2906
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -2913,19 +2914,62 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
2913
2914
|
})); // focus field on render
|
|
2914
2915
|
const owner_of_field_element = $5vyXB$solidjs.getOwner();
|
|
2915
2916
|
const isNewModal = BackIcon_[(0, $ad1fa088e5509cca$export$1ea76ea778b880dd)] === 2;
|
|
2916
|
-
|
|
2917
|
+
const [backButtonWidthAccessor, setBackButtonWidthAccessor] = $5vyXB$solidjs.createSignal();
|
|
2918
|
+
const getBackButtonWidth = () => backButtonWidthAccessor()?.();
|
|
2919
|
+
const searchFieldEmpty = $5vyXB$solidjs.createMemo(() => !searchFieldValue());
|
|
2920
|
+
const BackButton = () => $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2917
2921
|
when: on_back_,
|
|
2918
2922
|
get children() {
|
|
2919
|
-
return $5vyXB$solidjsweb.
|
|
2923
|
+
return $5vyXB$solidjsweb.ssrElement("button", $5vyXB$solidjsweb.mergeProps({
|
|
2924
|
+
"class": "back",
|
|
2925
|
+
type: "button",
|
|
2926
|
+
get ["aria-label"]() {
|
|
2927
|
+
return i18n_.back_();
|
|
2928
|
+
}
|
|
2929
|
+
}, isNewModal && {
|
|
2930
|
+
ref: el => {
|
|
2931
|
+
setBackButtonWidthAccessor(() => $f13855d1b951b24a$export$ebdc3711f7e02ccd(el));
|
|
2932
|
+
$5vyXB$solidjs.onCleanup(() => setBackButtonWidthAccessor());
|
|
2933
|
+
}
|
|
2934
|
+
}), () => isNewModal ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $c77c68e559a1506c$export$3b621d86b1566b2), {})) : $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(BackIcon_, {})), true);
|
|
2920
2935
|
}
|
|
2921
|
-
})
|
|
2922
|
-
|
|
2923
|
-
type: "button"
|
|
2924
|
-
|
|
2925
|
-
|
|
2936
|
+
});
|
|
2937
|
+
const ClearButton = () => $5vyXB$solidjsweb.ssrElement("button", $5vyXB$solidjsweb.mergeProps({
|
|
2938
|
+
type: "button",
|
|
2939
|
+
get ["class"]() {
|
|
2940
|
+
return `clear ${searchFieldEmpty() ? "empty" : ""}`;
|
|
2941
|
+
},
|
|
2942
|
+
get style() {
|
|
2943
|
+
return isNewModal || !searchFieldEmpty() ? "" : "display: none";
|
|
2944
|
+
}
|
|
2945
|
+
}, () => searchFieldEmpty() ? {
|
|
2946
|
+
"aria-hidden": "true"
|
|
2926
2947
|
} : {
|
|
2927
|
-
|
|
2928
|
-
}), () => $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $
|
|
2948
|
+
title: i18n_.clear_filters_query_sorting_after_submit_()
|
|
2949
|
+
}), () => isNewModal ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2950
|
+
get when() {
|
|
2951
|
+
return !searchFieldEmpty();
|
|
2952
|
+
},
|
|
2953
|
+
get fallback() {
|
|
2954
|
+
return $5vyXB$solidjsweb.createComponent((0, $87d7574e1d89d69b$export$82eafebb825fc23f), {});
|
|
2955
|
+
},
|
|
2956
|
+
get children() {
|
|
2957
|
+
return $5vyXB$solidjsweb.createComponent(BackIcon_, {});
|
|
2958
|
+
}
|
|
2959
|
+
})) : $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $c77c68e559a1506c$export$3b621d86b1566b2), {})), true);
|
|
2960
|
+
return $5vyXB$solidjsweb.ssr($66b8b9a9613c141d$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), `search-field ${!!on_back_ ? "in-modal" : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2961
|
+
get when() {
|
|
2962
|
+
return getBackButtonWidth() !== undefined && on_back_;
|
|
2963
|
+
},
|
|
2964
|
+
get children() {
|
|
2965
|
+
return $5vyXB$solidjsweb.ssr($66b8b9a9613c141d$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "width:" + ($5vyXB$solidjsweb.escape(getBackButtonWidth(), true) + "px"));
|
|
2966
|
+
}
|
|
2967
|
+
})), !isNewModal && $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(BackButton, {})), isNewModal && $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(ClearButton, {})), `query ${!!on_back_ ? "has-adjacent-back-button" : ""}`, $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.search_field_field_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("value", $5vyXB$solidjsweb.escape(searchFieldValue(), true), false) + $5vyXB$solidjsweb.ssrAttribute("placeholder", $5vyXB$solidjsweb.escape(i18n_.placeholder_text_(), true), false), !isNewModal && $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(ClearButton, {})), isNewModal && $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(BackButton, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2968
|
+
when: !isNewModal,
|
|
2969
|
+
get children() {
|
|
2970
|
+
return $5vyXB$solidjsweb.ssr($66b8b9a9613c141d$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.search_submit_button_aria_label_(), true), false), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $87d7574e1d89d69b$export$82eafebb825fc23f), {})));
|
|
2971
|
+
}
|
|
2972
|
+
})));
|
|
2929
2973
|
}
|
|
2930
2974
|
function $ca1176b694a6ee2e$export$fe334901e8bebd57() {
|
|
2931
2975
|
const cleanup_fns = [];
|
|
@@ -3089,7 +3133,7 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
3089
3133
|
};
|
|
3090
3134
|
});
|
|
3091
3135
|
const search_field = $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
3092
|
-
BackIcon_: (
|
|
3136
|
+
BackIcon_: (0, $610b584d4f54699e$export$8d8893ffd8aca39a),
|
|
3093
3137
|
input_field_ref_: element => set_input_field(element),
|
|
3094
3138
|
override_on_enter_: e => on_enter_in_search_field_function?.(e),
|
|
3095
3139
|
on_back_: close_modal_,
|
|
@@ -3105,7 +3149,6 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
3105
3149
|
input_el.setSelectionRange(start, end);
|
|
3106
3150
|
}
|
|
3107
3151
|
});
|
|
3108
|
-
search_field.classList.add("in-modal");
|
|
3109
3152
|
const modal_element = $5vyXB$solidjsweb.ssr($44f0b2e312a9b710$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), `depict-search-modal`, `${`body` || ""} ${$5vyXB$solidjsweb.escape($5vyXB$solidjsweb.escape(random_classname, true), true)}`, $5vyXB$solidjsweb.escape(search_field), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $edafe91daf3091d7$export$b69d0d92862de18b), {
|
|
3110
3153
|
severity_: "error",
|
|
3111
3154
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -4100,7 +4143,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
4100
4143
|
};
|
|
4101
4144
|
const discoverMoreSection = $5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), get_search_field_value_() ? $5vyXB$solidjsweb.escape(i18n_.modal_view_all_results_()($5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(formattedTotalNumberResults())))) : $5vyXB$solidjsweb.escape(i18n_.modal_discover_more_()));
|
|
4102
4145
|
const search_field = $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
4103
|
-
BackIcon_: (
|
|
4146
|
+
BackIcon_: (0, $b8660a70353e03cf$export$11e9f390c90a537f),
|
|
4104
4147
|
input_field_ref_: element => set_input_field(element),
|
|
4105
4148
|
override_on_enter_: e => on_enter_in_search_field_function?.(e),
|
|
4106
4149
|
on_back_: close_modal_,
|
|
@@ -4116,7 +4159,6 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
4116
4159
|
input_el.setSelectionRange(start, end);
|
|
4117
4160
|
}
|
|
4118
4161
|
});
|
|
4119
|
-
search_field.classList.add("in-modal");
|
|
4120
4162
|
if (setSearchFieldOuterWidth_) {
|
|
4121
4163
|
const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
|
4122
4164
|
resizeObserver.observe(search_field);
|
|
@@ -10397,7 +10439,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10397
10439
|
bodyAlignmentSignal_: [, setBodyAlignment_],
|
|
10398
10440
|
backdropStyleSignal_: [, setBackdropStyle_],
|
|
10399
10441
|
setPollAlignment_: setPollAlignment_,
|
|
10400
|
-
|
|
10442
|
+
buttonInField_: buttonInField_,
|
|
10401
10443
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
10402
10444
|
}) {
|
|
10403
10445
|
return $5vyXB$solidjs.createRoot(dispose => {
|
|
@@ -10440,7 +10482,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10440
10482
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
10441
10483
|
setPollAlignment_(true);
|
|
10442
10484
|
// Fade out submit button so there aren't two overlapping buttons for a split second
|
|
10443
|
-
|
|
10485
|
+
if (pxOffCenter > 10) buttonInField_.animate([{
|
|
10444
10486
|
opacity: 1
|
|
10445
10487
|
}, {
|
|
10446
10488
|
opacity: 0
|
|
@@ -10507,6 +10549,8 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10507
10549
|
width: width,
|
|
10508
10550
|
left: left
|
|
10509
10551
|
} = fakeField.getBoundingClientRect();
|
|
10552
|
+
// Just copy-pasted below line without thinking, it might be wrong
|
|
10553
|
+
const pxOffCenter = Math.abs($5vyXB$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
10510
10554
|
$6892e0748f94faa6$export$23d40cc5971c3acd({
|
|
10511
10555
|
setBackdropStyle_: setBackdropStyle_,
|
|
10512
10556
|
setBodyAlignment_: setBodyAlignment_,
|
|
@@ -10522,12 +10566,12 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
10522
10566
|
duration: closeDuration_,
|
|
10523
10567
|
fill: "forwards",
|
|
10524
10568
|
easing: "ease-out"
|
|
10525
|
-
}).finished,
|
|
10569
|
+
}).finished, buttonInField_.animate([{
|
|
10526
10570
|
opacity: 0
|
|
10527
10571
|
}, {
|
|
10528
10572
|
opacity: 1
|
|
10529
10573
|
}], {
|
|
10530
|
-
duration: closeDuration_ / 3,
|
|
10574
|
+
duration: pxOffCenter > 10 ? closeDuration_ / 3 : 1,
|
|
10531
10575
|
delay: closeDuration_ * (2 / 3),
|
|
10532
10576
|
fill: "forwards"
|
|
10533
10577
|
}).finished]);
|
|
@@ -10720,7 +10764,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10720
10764
|
if (!input_field_accessor_value) break add_input_field;
|
|
10721
10765
|
let input_element;
|
|
10722
10766
|
let div_with_field_class;
|
|
10723
|
-
let
|
|
10767
|
+
let buttonInField;
|
|
10724
10768
|
const search_field = SafeSearchField({
|
|
10725
10769
|
i18n_: i18n_,
|
|
10726
10770
|
search_field_value_: search_field_value_,
|
|
@@ -10730,7 +10774,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10730
10774
|
field_element_ref_: el => div_with_field_class = el,
|
|
10731
10775
|
disabled_: true,
|
|
10732
10776
|
BackIcon_: BackIcon_,
|
|
10733
|
-
|
|
10777
|
+
buttonInFieldRef_: el => buttonInField = el
|
|
10734
10778
|
});
|
|
10735
10779
|
if (!search_field) break add_input_field;
|
|
10736
10780
|
setModalBodyStyle({});
|
|
@@ -10764,7 +10808,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
10764
10808
|
bodyAlignmentSignal_: modal_body_style,
|
|
10765
10809
|
backdropStyleSignal_: modal_backdrop_style,
|
|
10766
10810
|
setPollAlignment_: setPollAlignment_,
|
|
10767
|
-
|
|
10811
|
+
buttonInField_: buttonInField,
|
|
10768
10812
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
10769
10813
|
});
|
|
10770
10814
|
}
|
|
@@ -11602,7 +11646,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11602
11646
|
const shared_properties = $2c61e4cd8229c49a$export$12fa711345994013(depict_search);
|
|
11603
11647
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
11604
11648
|
let input_element;
|
|
11605
|
-
let
|
|
11649
|
+
let buttonInField;
|
|
11606
11650
|
const search_field = $5vyXB$solidjsweb.createComponent((0, $66b8b9a9613c141d$export$b94867ecbd698f21), {
|
|
11607
11651
|
get BackIcon_() {
|
|
11608
11652
|
return shared_properties.BackIcon_;
|
|
@@ -11621,7 +11665,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11621
11665
|
},
|
|
11622
11666
|
disabled_: true,
|
|
11623
11667
|
input_field_ref_: el => input_element = el,
|
|
11624
|
-
|
|
11668
|
+
buttonInFieldRef_: el => buttonInField = el,
|
|
11625
11669
|
field_element_ref_: field => {
|
|
11626
11670
|
const bodyAlignmentSignal_ = $5vyXB$solidjs.createSignal({
|
|
11627
11671
|
position: "fixed"
|
|
@@ -11668,7 +11712,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
|
|
|
11668
11712
|
bodyAlignmentSignal_: bodyAlignmentSignal_,
|
|
11669
11713
|
backdropStyleSignal_: backdropAlignmentSignal_,
|
|
11670
11714
|
setPollAlignment_: setPollAlignment_,
|
|
11671
|
-
|
|
11715
|
+
buttonInField_: buttonInField,
|
|
11672
11716
|
modalSearchFieldOuterWidth_: modalSearchFieldOuterWidth_
|
|
11673
11717
|
});
|
|
11674
11718
|
}
|
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.
|
|
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 = {
|