@depict-ai/ui 1.3.2 → 1.3.3
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/dist/client/main.cjs +293 -182
- package/dist/client/module.js +296 -185
- package/dist/index.d.ts +3 -3
- package/dist/server/main.cjs +265 -169
- package/dist/server/module.js +267 -171
- package/package.json +4 -4
package/dist/server/main.cjs
CHANGED
|
@@ -43,7 +43,7 @@ $parcel$export(module.exports, "defaultGridSpacing", () => $a3280f0aad997933$exp
|
|
|
43
43
|
$parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$export$c3834fa86c616831);
|
|
44
44
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
45
45
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
46
|
-
/*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.3.
|
|
46
|
+
/*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.3.3";
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
@@ -669,8 +669,6 @@ function $401aee5f33dca9e2$export$83fd5de5504a7a67({ formatted_number_of_results
|
|
|
669
669
|
|
|
670
670
|
|
|
671
671
|
|
|
672
|
-
|
|
673
|
-
|
|
674
672
|
const $0d0b172488865048$var$_tmpl$ = [
|
|
675
673
|
"<a",
|
|
676
674
|
' class="hint" href="javascript:void(0)">',
|
|
@@ -1084,21 +1082,107 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({ plp_results_: plp_results_
|
|
|
1084
1082
|
}
|
|
1085
1083
|
|
|
1086
1084
|
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
const $f48d0fbb00835aaa$var$_tmpl$ = [
|
|
1095
|
+
"<div",
|
|
1096
|
+
' class="',
|
|
1097
|
+
'">',
|
|
1098
|
+
"</div>"
|
|
1099
|
+
], $f48d0fbb00835aaa$var$_tmpl$2 = [
|
|
1100
|
+
"<style",
|
|
1101
|
+
' type="text/css">',
|
|
1102
|
+
"</style>"
|
|
1103
|
+
];
|
|
1104
|
+
function $f48d0fbb00835aaa$export$d21e32dfedac04be(props) {
|
|
1105
|
+
return (0, $diwD4$solidjsweb.createComponent)((0, $edafe91daf3091d7$export$b69d0d92862de18b), {
|
|
1106
|
+
get message_ () {
|
|
1107
|
+
return "Failed calculating " + props.layout + " layout";
|
|
1108
|
+
},
|
|
1109
|
+
severity_: "error",
|
|
1110
|
+
get children () {
|
|
1111
|
+
return $f48d0fbb00835aaa$var$ActualSolidLayout(props);
|
|
1112
|
+
}
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
function $f48d0fbb00835aaa$var$ActualSolidLayout(props) {
|
|
1116
|
+
// Copy of Layout from utilishared but using solid-js signals instead of async iterable IPNS
|
|
1117
|
+
const show_all_rows = (0, $diwD4$solidjs.createMemo)(()=>props.rows === "all");
|
|
1118
|
+
const rows_or_empty_object = (0, $diwD4$solidjs.createMemo)(()=>show_all_rows() ? {} : props.rows);
|
|
1119
|
+
const button_elements = (0, $5f7d55c710fd1bc2$export$2f0cbfbb4354bb52)((0, $diwD4$solidjs.createMemo)(()=>rows_or_empty_object().button));
|
|
1120
|
+
const have_a_button = (0, $diwD4$solidjs.createMemo)(()=>{
|
|
1121
|
+
const button = button_elements();
|
|
1122
|
+
return !(!button || Array.isArray(button) && !button.length);
|
|
1123
|
+
});
|
|
1124
|
+
const [get_styling, set_styling] = (0, $diwD4$solidjs.createSignal)();
|
|
1125
|
+
const container_class = (0, $diwD4$depictaiutilishared.make_random_classname)();
|
|
1126
|
+
const selector_beginning = `.depict .${container_class}>`; // class so ppl can have id if needed
|
|
1127
|
+
const container_element = (0, $diwD4$solidjsweb.ssrElement)("div", props.element_attributes, ()=>(0, $diwD4$solidjsweb.escape)(props.children), true);
|
|
1128
|
+
const [get_children_count, set_children_count] = (0, $diwD4$solidjs.createSignal)(0);
|
|
1129
|
+
const update_children_count = ()=>set_children_count(container_element.children.length);
|
|
1130
|
+
const col_styling = (0, $diwD4$solidjs.createMemo)(()=>(0, $diwD4$depictaiutilishared.n_col_styling_with_dist)(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1131
|
+
const rows_visible_signal = (0, $diwD4$solidjs.createMemo)(()=>rows_or_empty_object().currently_visible || (0, $diwD4$solidjs.createSignal)(0));
|
|
1132
|
+
const get_rows_visible = (0, $diwD4$solidjs.createMemo)(()=>rows_visible_signal()[0]());
|
|
1133
|
+
const set_rows_visible = (0, $diwD4$solidjs.createMemo)(()=>rows_visible_signal()[1]);
|
|
1134
|
+
const button_class = (0, $diwD4$depictaiutilishared.make_random_classname)();
|
|
1135
|
+
const button_container = (0, $diwD4$solidjs.createMemo)(()=>have_a_button() && (0, $diwD4$solidjsweb.ssr)($f48d0fbb00835aaa$var$_tmpl$, (0, $diwD4$solidjsweb.ssrHydrationKey)(), "load-more-container " + (0, $diwD4$solidjsweb.escape)(button_class, true), (0, $diwD4$solidjsweb.escape)(rows_or_empty_object().button)));
|
|
1136
|
+
container_element.classList.add(container_class);
|
|
1137
|
+
(0, $diwD4$solidjs.createRenderEffect)(()=>{
|
|
1138
|
+
// Be careful to only read show_all_rows in here (ofc doesn't apply to nested effects)
|
|
1139
|
+
if (show_all_rows()) {
|
|
1140
|
+
// no view more functionality requested
|
|
1141
|
+
set_styling(()=>col_styling);
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
(0, $diwD4$solidjs.untrack)(()=>set_rows_visible()(rows_or_empty_object().start_rows ?? 1));
|
|
1145
|
+
update_children_count();
|
|
1146
|
+
const mutation_observer = new MutationObserver((0, $diwD4$depictaiutilishared.catchify)(update_children_count));
|
|
1147
|
+
mutation_observer.observe(container_element, {
|
|
1148
|
+
childList: true
|
|
1149
|
+
});
|
|
1150
|
+
(0, $diwD4$solidjs.onCleanup)(()=>mutation_observer.disconnect());
|
|
1151
|
+
set_styling(// this is needed because solid will think that the memo-accessor is a setter function otherwise
|
|
1152
|
+
()=>(0, $diwD4$solidjs.createMemo)(()=>{
|
|
1153
|
+
const { rows_per_click: rows_per_click , max_rows: max_rows = -1 } = rows_or_empty_object();
|
|
1154
|
+
return col_styling() + props.cols_at_size.map((options)=>{
|
|
1155
|
+
const [, min, max] = options;
|
|
1156
|
+
let should_hide_button;
|
|
1157
|
+
let visible_recs;
|
|
1158
|
+
if (props.disable_partial_rows) {
|
|
1159
|
+
visible_recs = (0, $diwD4$depictaiutilishared.layout_get_visible_recs_without_partial_rows)(get_rows_visible(), get_children_count(), options);
|
|
1160
|
+
const visible_recs_next_show_more = (0, $diwD4$depictaiutilishared.layout_get_visible_recs_without_partial_rows)(get_rows_visible() + (rows_per_click || 0), // Should this really be zero when we default rows_per_click to 1?
|
|
1161
|
+
get_children_count(), options);
|
|
1162
|
+
should_hide_button = visible_recs === visible_recs_next_show_more;
|
|
1163
|
+
} else {
|
|
1164
|
+
visible_recs = (0, $diwD4$depictaiutilishared.layout_get_total_rec_amount_for_row)(get_rows_visible(), options);
|
|
1165
|
+
should_hide_button = visible_recs >= get_children_count();
|
|
1166
|
+
}
|
|
1167
|
+
const should_hide_button_final = button_class && (should_hide_button || max_rows !== -1 && get_rows_visible() >= max_rows);
|
|
1168
|
+
return `${(0, $diwD4$depictaiutilishared.layout_media_query_header)(min, max)}{${selector_beginning}:nth-child(n+${visible_recs + 1}){display:none}${props.layout == "slider" ? `${selector_beginning}:nth-child(n+${visible_recs}){margin-right:0}` : ""}${should_hide_button_final ? `.depict .${button_class}{display:none!important}` : ``}}`;
|
|
1169
|
+
}).join("");
|
|
1170
|
+
}));
|
|
1171
|
+
});
|
|
1172
|
+
return [
|
|
1173
|
+
container_element,
|
|
1174
|
+
button_container(),
|
|
1175
|
+
(0, $diwD4$solidjsweb.ssr)($f48d0fbb00835aaa$var$_tmpl$2, (0, $diwD4$solidjsweb.ssrHydrationKey)(), get_styling)
|
|
1176
|
+
];
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
|
|
1087
1180
|
const $fe76fb463cc60b89$var$_tmpl$ = [
|
|
1088
1181
|
"<div",
|
|
1089
1182
|
' class="',
|
|
1090
1183
|
'"><!--#-->',
|
|
1091
1184
|
"<!--/--><!--#-->",
|
|
1092
1185
|
"<!--/--></div>"
|
|
1093
|
-
], $fe76fb463cc60b89$var$_tmpl$2 = [
|
|
1094
|
-
"<div",
|
|
1095
|
-
' class="cards"',
|
|
1096
|
-
">",
|
|
1097
|
-
"</div>"
|
|
1098
|
-
], $fe76fb463cc60b89$var$_tmpl$3 = [
|
|
1099
|
-
"<style",
|
|
1100
|
-
">",
|
|
1101
|
-
"</style>"
|
|
1102
1186
|
];
|
|
1103
1187
|
function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_ , depict_api_: depict_api_ , all_products_loaded_: all_products_loaded_ , min_products_to_fetch_: min_products_to_fetch_ , query_base_: query_base_ , first_result_in_viewport_: first_result_in_viewport_ , last_result_in_viewport_: last_result_in_viewport_ , scroll_restoration_data_: [get_scroll_restoration_data] , no_results_options_: no_results_options_ , desktop_filter_elements_: desktop_filter_elements_ , sort_or_filter_open_: sort_or_filter_open_ , product_card_template_: product_card_template_ , layout_options_: layout_options_ , id_currently_querying_for_: id_currently_querying_for_ }) {
|
|
1104
1188
|
// The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
|
|
@@ -1140,9 +1224,6 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1140
1224
|
let suspense_contents;
|
|
1141
1225
|
let is_just_after_plp_results_update = false;
|
|
1142
1226
|
let fallback_is_alive = false;
|
|
1143
|
-
const random_id = (0, $diwD4$depictaiutilishared.make_random_classname)();
|
|
1144
|
-
const selector_beginning_ = `.depict.plp #${random_id}>`;
|
|
1145
|
-
const [get_styling, set_styling_] = (0, $diwD4$solidjs.createSignal)("");
|
|
1146
1227
|
const [get_should_have_placeholders_rendered, set_should_have_placeholders_rendered] = (0, $diwD4$solidjs.createSignal)(true);
|
|
1147
1228
|
const rendered_placeholders = (0, $diwD4$solidjs.createMemo)(()=>get_should_have_placeholders_rendered() ? (0, $0caf87eaa19079da$export$f33414a4df0afd3f)({
|
|
1148
1229
|
product_card_template_: product_card_template_,
|
|
@@ -1152,64 +1233,22 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1152
1233
|
})
|
|
1153
1234
|
}) : undefined);
|
|
1154
1235
|
const [get_suspense_is_blocked, set_suspense_is_blocked] = (0, $diwD4$solidjs.createSignal)(false);
|
|
1236
|
+
const modified_cols_at_size = $fe76fb463cc60b89$var$make_modified_cols_at_size({
|
|
1237
|
+
layout_options_: layout_options_,
|
|
1238
|
+
sort_or_filter_open_: sort_or_filter_open_
|
|
1239
|
+
});
|
|
1155
1240
|
(0, $diwD4$solidjs.createComputed)(()=>{
|
|
1156
1241
|
if (!is_loading_()) return;
|
|
1157
1242
|
set_should_have_placeholders_rendered(true);
|
|
1158
1243
|
set_suspense_is_blocked(false);
|
|
1159
1244
|
is_just_after_plp_results_update = true;
|
|
1160
1245
|
});
|
|
1161
|
-
$fe76fb463cc60b89$var$results_grid_styling_generator({
|
|
1162
|
-
layout_options_: layout_options_,
|
|
1163
|
-
set_styling_: set_styling_,
|
|
1164
|
-
sort_or_filter_open_: sort_or_filter_open_,
|
|
1165
|
-
selector_beginning_: selector_beginning_
|
|
1166
|
-
});
|
|
1167
|
-
const has_at_least_one_display = (0, $diwD4$solidjs.createMemo)(()=>!!plp_results_()?.displays?.length); // Only de-construct below stuff if we get 0 displays. Important that this returns boolean so that below Suspense only gets re-created if it actually changes
|
|
1168
1246
|
const block_suspense_if_needed = ()=>{
|
|
1169
1247
|
if (!is_just_after_plp_results_update) return;
|
|
1170
1248
|
is_just_after_plp_results_update = false;
|
|
1171
1249
|
fallback_is_alive = false;
|
|
1172
1250
|
set_suspense_is_blocked(true);
|
|
1173
1251
|
};
|
|
1174
|
-
const non_placeholder_product_cards = (0, $diwD4$solidjs.createMemo)(()=>has_at_least_one_display() && // This suspense ensures that if someone has async templates, we still show placeholders until the product cards actually have finished rendering (automagically since they're createResource's)
|
|
1175
|
-
// We're creating it outside the <Show> so that we can benefit from <For>'s optimisation between changing results
|
|
1176
|
-
// (For the whole idea of the displays being cached to work we can't tear down and re-run ProductCards for every new result.
|
|
1177
|
-
// We have to keep ProductCards alive, but hidden, and feed them new data as soon as we had it)
|
|
1178
|
-
(0, $diwD4$solidjsweb.createComponent)((0, $diwD4$solidjs.Suspense), {
|
|
1179
|
-
get fallback () {
|
|
1180
|
-
return (()=>{
|
|
1181
|
-
fallback_is_alive = true;
|
|
1182
|
-
(0, $diwD4$solidjs.onCleanup)(block_suspense_if_needed); // Block suspense after initial run every time after we fetch
|
|
1183
|
-
return (0, $diwD4$solidjs.createMemo)(()=>{
|
|
1184
|
-
// We need to be able to block the suspense since when async product cards are *rendering* we want to show the placeholders on initial load but not when loading more
|
|
1185
|
-
// In future we could have individual suspense's for each product card, but that's too much for now
|
|
1186
|
-
if (get_suspense_is_blocked()) return suspense_contents;
|
|
1187
|
-
set_should_have_placeholders_rendered(true); // just in case
|
|
1188
|
-
(0, $diwD4$solidjs.onCleanup)(()=>set_should_have_placeholders_rendered(false));
|
|
1189
|
-
return rendered_placeholders; // I lifted the placeholders into the memo since we don't want to re-render them when switching from <Show> to <Suspense>
|
|
1190
|
-
});
|
|
1191
|
-
})();
|
|
1192
|
-
},
|
|
1193
|
-
get children () {
|
|
1194
|
-
return (()=>{
|
|
1195
|
-
suspense_contents = (0, $ac167f6af6a48fc3$export$a1fd619a4743ca08)({
|
|
1196
|
-
product_card_template_: product_card_template_,
|
|
1197
|
-
plp_results_: plp_results_,
|
|
1198
|
-
last_result_in_viewport_: last_result_in_viewport_,
|
|
1199
|
-
first_result_in_viewport_: first_result_in_viewport_,
|
|
1200
|
-
market_: market_,
|
|
1201
|
-
merchant_: merchant_,
|
|
1202
|
-
all_products_loaded_: all_products_loaded_,
|
|
1203
|
-
min_products_to_fetch_: min_products_to_fetch_,
|
|
1204
|
-
query_base_: query_base_,
|
|
1205
|
-
depict_api_: depict_api_,
|
|
1206
|
-
is_loading_: is_loading_
|
|
1207
|
-
});
|
|
1208
|
-
(0, $diwD4$solidjs.onCleanup)(()=>suspense_contents = undefined);
|
|
1209
|
-
return suspense_contents;
|
|
1210
|
-
})();
|
|
1211
|
-
}
|
|
1212
|
-
}));
|
|
1213
1252
|
(0, $diwD4$solidjs.createEffect)((0, $diwD4$solidjs.on)(plp_results_, ()=>{
|
|
1214
1253
|
if (!fallback_is_alive) {
|
|
1215
1254
|
// if all product card rendering functions after the initial rendering are synchronous the suspense boundary will never go into the fallback, so we don't know when they have finished rendering, and we can't block the suspense. Therefore, we're just doing it with this effect
|
|
@@ -1221,18 +1260,69 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1221
1260
|
}));
|
|
1222
1261
|
return [
|
|
1223
1262
|
(0, $fc23d7668ae0011d$export$a2cc176055f8f08)(),
|
|
1224
|
-
(0, $diwD4$solidjsweb.
|
|
1225
|
-
get
|
|
1226
|
-
return
|
|
1263
|
+
(0, $diwD4$solidjsweb.createComponent)((0, $f48d0fbb00835aaa$export$d21e32dfedac04be), {
|
|
1264
|
+
get cols_at_size () {
|
|
1265
|
+
return modified_cols_at_size();
|
|
1227
1266
|
},
|
|
1228
|
-
get
|
|
1229
|
-
return
|
|
1267
|
+
get override_vertical_spacing () {
|
|
1268
|
+
return layout_options_().override_vertical_spacing;
|
|
1269
|
+
},
|
|
1270
|
+
get grid_spacing () {
|
|
1271
|
+
return layout_options_().grid_spacing;
|
|
1272
|
+
},
|
|
1273
|
+
rows: "all",
|
|
1274
|
+
layout: "grid",
|
|
1275
|
+
element_attributes: {
|
|
1276
|
+
class: "cards"
|
|
1230
1277
|
},
|
|
1231
1278
|
get children () {
|
|
1232
|
-
return
|
|
1279
|
+
return (0, $diwD4$solidjsweb.createComponent)((0, $diwD4$solidjs.Show), {
|
|
1280
|
+
get when () {
|
|
1281
|
+
return !is_loading_();
|
|
1282
|
+
},
|
|
1283
|
+
get fallback () {
|
|
1284
|
+
return rendered_placeholders();
|
|
1285
|
+
},
|
|
1286
|
+
get children () {
|
|
1287
|
+
return (0, $diwD4$solidjsweb.createComponent)((0, $diwD4$solidjs.Suspense), {
|
|
1288
|
+
get fallback () {
|
|
1289
|
+
return (()=>{
|
|
1290
|
+
fallback_is_alive = true;
|
|
1291
|
+
(0, $diwD4$solidjs.onCleanup)(block_suspense_if_needed); // Block suspense after initial run every time after we fetch
|
|
1292
|
+
return (0, $diwD4$solidjs.createMemo)(()=>{
|
|
1293
|
+
// We need to be able to block the suspense since when async product cards are *rendering* we want to show the placeholders on initial load but not when loading more
|
|
1294
|
+
// In future we could have individual suspense's for each product card, but that's too much for now
|
|
1295
|
+
if (get_suspense_is_blocked()) return suspense_contents;
|
|
1296
|
+
set_should_have_placeholders_rendered(true); // just in case
|
|
1297
|
+
(0, $diwD4$solidjs.onCleanup)(()=>set_should_have_placeholders_rendered(false));
|
|
1298
|
+
return rendered_placeholders; // I lifted the placeholders into the memo since we don't want to re-render them when switching from <Show> to <Suspense>
|
|
1299
|
+
});
|
|
1300
|
+
})();
|
|
1301
|
+
},
|
|
1302
|
+
get children () {
|
|
1303
|
+
return (()=>{
|
|
1304
|
+
suspense_contents = (0, $ac167f6af6a48fc3$export$a1fd619a4743ca08)({
|
|
1305
|
+
product_card_template_: product_card_template_,
|
|
1306
|
+
plp_results_: plp_results_,
|
|
1307
|
+
last_result_in_viewport_: last_result_in_viewport_,
|
|
1308
|
+
first_result_in_viewport_: first_result_in_viewport_,
|
|
1309
|
+
market_: market_,
|
|
1310
|
+
merchant_: merchant_,
|
|
1311
|
+
all_products_loaded_: all_products_loaded_,
|
|
1312
|
+
min_products_to_fetch_: min_products_to_fetch_,
|
|
1313
|
+
query_base_: query_base_,
|
|
1314
|
+
depict_api_: depict_api_,
|
|
1315
|
+
is_loading_: is_loading_
|
|
1316
|
+
});
|
|
1317
|
+
(0, $diwD4$solidjs.onCleanup)(()=>suspense_contents = undefined);
|
|
1318
|
+
return suspense_contents;
|
|
1319
|
+
})();
|
|
1320
|
+
}
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1233
1324
|
}
|
|
1234
|
-
})
|
|
1235
|
-
(0, $diwD4$solidjsweb.ssr)($fe76fb463cc60b89$var$_tmpl$3, (0, $diwD4$solidjsweb.ssrHydrationKey)(), get_styling())
|
|
1325
|
+
})
|
|
1236
1326
|
];
|
|
1237
1327
|
}
|
|
1238
1328
|
});
|
|
@@ -1240,13 +1330,14 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1240
1330
|
})), (0, $diwD4$solidjsweb.escape)(desktop_filter_elements_()));
|
|
1241
1331
|
}
|
|
1242
1332
|
/**
|
|
1243
|
-
*
|
|
1333
|
+
* Changes cols_at_size depending on if filters are open or not so one card less is shown when the filters are open
|
|
1244
1334
|
* This function is special to the actual PLPResults.
|
|
1245
|
-
*/ function $fe76fb463cc60b89$var$
|
|
1246
|
-
(0, $diwD4$solidjs.
|
|
1335
|
+
*/ function $fe76fb463cc60b89$var$make_modified_cols_at_size({ layout_options_: layout_options_ , sort_or_filter_open_: sort_or_filter_open_ }) {
|
|
1336
|
+
return (0, $diwD4$solidjs.createMemo)(()=>{
|
|
1337
|
+
const layout_options = layout_options_();
|
|
1247
1338
|
// Add grid styling that changes when filters get opened/closed
|
|
1248
|
-
const when_filters_closed_cols =
|
|
1249
|
-
|
|
1339
|
+
const when_filters_closed_cols = layout_options.cols_at_size;
|
|
1340
|
+
return sort_or_filter_open_() ? when_filters_closed_cols.map((row)=>{
|
|
1250
1341
|
const [num_cols_default, , , , override_cols] = row;
|
|
1251
1342
|
const cloned_row = [
|
|
1252
1343
|
...row
|
|
@@ -1262,8 +1353,6 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1262
1353
|
};
|
|
1263
1354
|
return cloned_row;
|
|
1264
1355
|
}) : when_filters_closed_cols;
|
|
1265
|
-
const css = (0, $diwD4$depictaiutilishared.n_col_styling_with_dist)(selector_beginning_, layout_options_.grid_spacing, cols_at_size, "grid", layout_options_.override_vertical_spacing);
|
|
1266
|
-
set_styling_(css);
|
|
1267
1356
|
});
|
|
1268
1357
|
}
|
|
1269
1358
|
|
|
@@ -5392,15 +5481,19 @@ class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
|
5392
5481
|
});
|
|
5393
5482
|
}
|
|
5394
5483
|
}
|
|
5395
|
-
function $48567ac5b39bac56$export$e2bf8ce7779e827e(
|
|
5484
|
+
function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
5485
|
+
const { depict_category: depict_category , product_card_template: product_card_template , category_title: category_title } = props;
|
|
5396
5486
|
const shared_properties = $48567ac5b39bac56$var$get_shared_properties(depict_category);
|
|
5397
|
-
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
5398
|
-
grid_spacing: grid_spacing
|
|
5399
|
-
} : {
|
|
5400
|
-
override_vertical_spacing: grid_spacing.vertical,
|
|
5401
|
-
grid_spacing: grid_spacing.horizontal
|
|
5402
|
-
};
|
|
5403
5487
|
return (0, $95837413165cc2df$export$23fca46f3143581f)(()=>{
|
|
5488
|
+
const grid_spacing_override = (0, $diwD4$solidjs.createMemo)(()=>{
|
|
5489
|
+
const { grid_spacing: grid_spacing } = props; // can be reactive
|
|
5490
|
+
return typeof grid_spacing === "string" ? {
|
|
5491
|
+
grid_spacing: grid_spacing
|
|
5492
|
+
} : {
|
|
5493
|
+
override_vertical_spacing: grid_spacing.vertical,
|
|
5494
|
+
grid_spacing: grid_spacing.horizontal
|
|
5495
|
+
};
|
|
5496
|
+
});
|
|
5404
5497
|
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ } = shared_properties;
|
|
5405
5498
|
(0, $diwD4$solidjs.onCleanup)(reset_history_state_);
|
|
5406
5499
|
return (0, $840d88a04b2d22a7$export$f7d2f673fc2f091d)({
|
|
@@ -5412,9 +5505,9 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5412
5505
|
query_id_: ()=>depict_category.category_id,
|
|
5413
5506
|
listing_type_: ()=>depict_category.listing_type,
|
|
5414
5507
|
i18n_: i18n_,
|
|
5415
|
-
show_quicklinks_: show_quicklinks,
|
|
5508
|
+
show_quicklinks_: (0, $diwD4$solidjs.createMemo)(()=>props.show_quicklinks ?? true),
|
|
5416
5509
|
category_title_: category_title,
|
|
5417
|
-
show_breadcrumbs_: show_breadcrumbs,
|
|
5510
|
+
show_breadcrumbs_: (0, $diwD4$solidjs.createMemo)(()=>props.show_breadcrumbs ?? true),
|
|
5418
5511
|
current_sorting_: current_sorting_,
|
|
5419
5512
|
router_: router_,
|
|
5420
5513
|
get_breadcrumb_accessor_: (accessor)=>(0, $diwD4$solidjs.createComputed)(()=>breadcrumb_signal_[1](accessor())),
|
|
@@ -5426,10 +5519,10 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5426
5519
|
selected_filters_: selected_filters_,
|
|
5427
5520
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
5428
5521
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5429
|
-
layout_options_: {
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5522
|
+
layout_options_: (0, $diwD4$solidjs.createMemo)(()=>({
|
|
5523
|
+
cols_at_size: (0, $4e04be41243c3d80$export$6daf8749b65a1b77)(props.cols_at_size),
|
|
5524
|
+
...grid_spacing_override()
|
|
5525
|
+
})),
|
|
5433
5526
|
product_card_template_: product_card_template
|
|
5434
5527
|
});
|
|
5435
5528
|
}, "Entire CategoryPage failed");
|
|
@@ -5826,17 +5919,14 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({ search_field_value_: search
|
|
|
5826
5919
|
|
|
5827
5920
|
|
|
5828
5921
|
|
|
5922
|
+
|
|
5829
5923
|
const $fb29c6201c369e39$var$_tmpl$ = [
|
|
5830
|
-
"<div",
|
|
5831
|
-
' class="cards">',
|
|
5832
|
-
"</div>"
|
|
5833
|
-
], $fb29c6201c369e39$var$_tmpl$2 = [
|
|
5834
5924
|
"<div",
|
|
5835
5925
|
' class="search-recs"><h3 class="search-recs-title">',
|
|
5836
5926
|
"</h3><!--#-->",
|
|
5837
5927
|
"<!--/--><!--#-->",
|
|
5838
5928
|
"<!--/--></div>"
|
|
5839
|
-
], $fb29c6201c369e39$var$_tmpl$
|
|
5929
|
+
], $fb29c6201c369e39$var$_tmpl$2 = [
|
|
5840
5930
|
"<button",
|
|
5841
5931
|
' class="show-more major" type="button">',
|
|
5842
5932
|
"</button>"
|
|
@@ -5847,59 +5937,58 @@ function $fb29c6201c369e39$export$7de92c4c2205ebf3({ depict_api_: depict_api_ ,
|
|
|
5847
5937
|
const rows_object = view_more_button_ ? $fb29c6201c369e39$var$make_state_saved_rows(showing_recommendation_rows_, i18n_) : "all";
|
|
5848
5938
|
const [recommendations_resource] = (0, $diwD4$solidjs.createResource)(search_query_base_, (query)=>depict_api_.get_recommended(query).then((r)=>r.displays));
|
|
5849
5939
|
const is_showing_something = (0, $diwD4$solidjs.createMemo)(()=>recommendations_resource.loading || recommendations_resource()?.length);
|
|
5850
|
-
const num_placeholders_ = (0, $diwD4$solidjs.createMemo)(()=>(0, $aec24316ed262dc0$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...layout_options_.cols_at_size.map(([per_column])=>per_column)));
|
|
5851
|
-
const cards = (0, $diwD4$solidjsweb.ssr)($fb29c6201c369e39$var$_tmpl$, (0, $diwD4$solidjsweb.ssrHydrationKey)(), (0, $diwD4$solidjsweb.escape)((0, $diwD4$solidjsweb.createComponent)((0, $diwD4$solidjs.Suspense), {
|
|
5852
|
-
get fallback () {
|
|
5853
|
-
return (0, $0caf87eaa19079da$export$f33414a4df0afd3f)({
|
|
5854
|
-
num_placeholders_: num_placeholders_,
|
|
5855
|
-
product_card_template_: product_card_template_
|
|
5856
|
-
});
|
|
5857
|
-
},
|
|
5858
|
-
get children () {
|
|
5859
|
-
return (()=>{
|
|
5860
|
-
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
5861
|
-
const displays_by_key_ = (0, $a73063cc642f3e5f$export$7f8bd308237ab5a5)((0, $diwD4$solidjs.createMemo)(()=>recommendations_resource() || []));
|
|
5862
|
-
return (0, $a73063cc642f3e5f$export$43f0fb951fcb0c54)({
|
|
5863
|
-
displays_by_key_: displays_by_key_,
|
|
5864
|
-
merchant_: (0, $diwD4$solidjs.createMemo)(()=>search_query_base_().tenant),
|
|
5865
|
-
market_: (0, $diwD4$solidjs.createMemo)(()=>search_query_base_().market),
|
|
5866
|
-
product_card_template_: product_card_template_
|
|
5867
|
-
});
|
|
5868
|
-
})();
|
|
5869
|
-
}
|
|
5870
|
-
})));
|
|
5871
|
-
const search_recs_elements = (0, $diwD4$solidjsweb.ssr)($fb29c6201c369e39$var$_tmpl$2, (0, $diwD4$solidjsweb.ssrHydrationKey)(), (0, $diwD4$solidjsweb.escape)(i18n_.search_recs_title_()), (0, $diwD4$solidjsweb.escape)((0, $fc23d7668ae0011d$export$a2cc176055f8f08)()), (0, $diwD4$solidjsweb.escape)(cards));
|
|
5872
|
-
// the cards element must have a parent for Layout to work, therefore we're inserting it into a div above
|
|
5873
|
-
(0, $diwD4$depictaiutilishared.Layout)({
|
|
5874
|
-
container_element: cards,
|
|
5875
|
-
layout: "grid",
|
|
5876
|
-
rows: rows_object,
|
|
5877
|
-
...layout_options_
|
|
5878
|
-
}).catch((e)=>(0, $diwD4$depictaiutilishared.report)([
|
|
5879
|
-
e,
|
|
5880
|
-
"Layout failed"
|
|
5881
|
-
], "error"));
|
|
5940
|
+
const num_placeholders_ = (0, $diwD4$solidjs.createMemo)(()=>(0, $aec24316ed262dc0$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...layout_options_().cols_at_size.map(([per_column])=>per_column)));
|
|
5882
5941
|
return (0, $diwD4$solidjsweb.createComponent)((0, $diwD4$solidjs.Show), {
|
|
5883
5942
|
get when () {
|
|
5884
5943
|
return is_showing_something();
|
|
5885
5944
|
},
|
|
5886
|
-
children
|
|
5945
|
+
get children () {
|
|
5946
|
+
return (0, $diwD4$solidjsweb.ssr)($fb29c6201c369e39$var$_tmpl$, (0, $diwD4$solidjsweb.ssrHydrationKey)(), (0, $diwD4$solidjsweb.escape)(i18n_.search_recs_title_()), (0, $diwD4$solidjsweb.escape)((0, $fc23d7668ae0011d$export$a2cc176055f8f08)()), (0, $diwD4$solidjsweb.escape)((0, $diwD4$solidjsweb.createComponent)((0, $f48d0fbb00835aaa$export$d21e32dfedac04be), (0, $diwD4$solidjsweb.mergeProps)({
|
|
5947
|
+
rows: rows_object,
|
|
5948
|
+
layout: "grid",
|
|
5949
|
+
element_attributes: {
|
|
5950
|
+
class: "cards"
|
|
5951
|
+
}
|
|
5952
|
+
}, layout_options_, {
|
|
5953
|
+
get children () {
|
|
5954
|
+
return (0, $diwD4$solidjsweb.createComponent)((0, $diwD4$solidjs.Suspense), {
|
|
5955
|
+
get fallback () {
|
|
5956
|
+
return (0, $0caf87eaa19079da$export$f33414a4df0afd3f)({
|
|
5957
|
+
num_placeholders_: num_placeholders_,
|
|
5958
|
+
product_card_template_: product_card_template_
|
|
5959
|
+
});
|
|
5960
|
+
},
|
|
5961
|
+
get children () {
|
|
5962
|
+
return (()=>{
|
|
5963
|
+
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
5964
|
+
const displays_by_key_ = (0, $a73063cc642f3e5f$export$7f8bd308237ab5a5)((0, $diwD4$solidjs.createMemo)(()=>recommendations_resource() || []));
|
|
5965
|
+
return (0, $a73063cc642f3e5f$export$43f0fb951fcb0c54)({
|
|
5966
|
+
displays_by_key_: displays_by_key_,
|
|
5967
|
+
merchant_: (0, $diwD4$solidjs.createMemo)(()=>search_query_base_().tenant),
|
|
5968
|
+
market_: (0, $diwD4$solidjs.createMemo)(()=>search_query_base_().market),
|
|
5969
|
+
product_card_template_: product_card_template_
|
|
5970
|
+
});
|
|
5971
|
+
})();
|
|
5972
|
+
}
|
|
5973
|
+
});
|
|
5974
|
+
}
|
|
5975
|
+
}))));
|
|
5976
|
+
}
|
|
5887
5977
|
});
|
|
5888
5978
|
}
|
|
5889
5979
|
function $fb29c6201c369e39$var$make_state_saved_rows([get_showing_recommendation_rows, set_showing_recommendation_rows], i18n_) {
|
|
5890
|
-
const
|
|
5980
|
+
const currently_visible = (0, $diwD4$solidjs.createSignal)(0); // this number shouldn't matter for anything except typing
|
|
5981
|
+
const [get_currently_visible, set_currently_visible] = currently_visible;
|
|
5891
5982
|
const rows = {
|
|
5892
|
-
|
|
5983
|
+
currently_visible: currently_visible,
|
|
5893
5984
|
start_rows: (0, $diwD4$solidjs.untrack)(get_showing_recommendation_rows) ?? $fb29c6201c369e39$export$1c8c715550dc689d,
|
|
5894
5985
|
rows_per_click: 3,
|
|
5895
|
-
button: (0, $diwD4$solidjsweb.ssr)($fb29c6201c369e39$var$_tmpl$
|
|
5986
|
+
button: (0, $diwD4$solidjsweb.ssr)($fb29c6201c369e39$var$_tmpl$2, (0, $diwD4$solidjsweb.ssrHydrationKey)(), (0, $diwD4$solidjsweb.escape)(i18n_.view_more_()))
|
|
5896
5987
|
};
|
|
5897
|
-
(0, $diwD4$
|
|
5898
|
-
|
|
5899
|
-
})
|
|
5900
|
-
(0, $diwD4$solidjs.createComputed)((0, $diwD4$solidjs.on)(get_showing_recommendation_rows, (new_rows = $fb29c6201c369e39$export$1c8c715550dc689d)=>{
|
|
5901
|
-
if (ipns.latest_call_value !== new_rows && ipns.state !== new_rows) ipns(new_rows);
|
|
5902
|
-
}, {
|
|
5988
|
+
(0, $diwD4$solidjs.createComputed)((0, $diwD4$solidjs.on)(get_currently_visible, (new_visible)=>set_showing_recommendation_rows(new_visible), {
|
|
5989
|
+
defer: true
|
|
5990
|
+
}));
|
|
5991
|
+
(0, $diwD4$solidjs.createComputed)((0, $diwD4$solidjs.on)(get_showing_recommendation_rows, (new_rows = $fb29c6201c369e39$export$1c8c715550dc689d)=>set_currently_visible(new_rows), {
|
|
5903
5992
|
defer: true
|
|
5904
5993
|
}));
|
|
5905
5994
|
return rows;
|
|
@@ -7199,7 +7288,7 @@ const $f1d7cb69f839a526$var$_tmpl$ = [
|
|
|
7199
7288
|
"<!--/--><!--#-->",
|
|
7200
7289
|
"<!--/--></div>"
|
|
7201
7290
|
];
|
|
7202
|
-
function $f1d7cb69f839a526$export$a54ec244c8863715({ depict_api_: depict_api_ , search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ , make_category_suggestion_card_: make_category_suggestion_card_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , clear_filters_on_next_submit_: clear_filters_on_next_submit_ , local_filter_cache_: local_filter_cache_ , include_input_field_: include_input_field_ , tenant_: tenant_ , market_: market_ , showing_recommendation_rows_: showing_recommendation_rows_ , search_recs_view_more_: search_recs_view_more_ , disable_search_recommendations_: disable_search_recommendations_ , layout_options_: layout_options_ , recommendations_layout_options_: recommendations_layout_options_
|
|
7291
|
+
function $f1d7cb69f839a526$export$a54ec244c8863715({ depict_api_: depict_api_ , search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ , make_category_suggestion_card_: make_category_suggestion_card_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , clear_filters_on_next_submit_: clear_filters_on_next_submit_ , local_filter_cache_: local_filter_cache_ , include_input_field_: include_input_field_ , tenant_: tenant_ , market_: market_ , showing_recommendation_rows_: showing_recommendation_rows_ , search_recs_view_more_: search_recs_view_more_ , disable_search_recommendations_: disable_search_recommendations_ , layout_options_: layout_options_ , recommendations_layout_options_: recommendations_layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ , modal_body_style_ref_: modal_body_style_ref_ }) {
|
|
7203
7292
|
const [get_sorting] = current_sorting_;
|
|
7204
7293
|
const all_products_loaded_ = (0, $diwD4$solidjs.createSignal)(false);
|
|
7205
7294
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
@@ -7435,7 +7524,9 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({ depict_api_: depict_api_ ,
|
|
|
7435
7524
|
depict_api_: depict_api_,
|
|
7436
7525
|
i18n_: i18n_,
|
|
7437
7526
|
search_query_base_: search_query_base_,
|
|
7438
|
-
layout_options_
|
|
7527
|
+
get layout_options_ () {
|
|
7528
|
+
return (0, $diwD4$solidjs.createMemo)(()=>recommendations_layout_options_?.() ?? layout_options_());
|
|
7529
|
+
},
|
|
7439
7530
|
showing_recommendation_rows_: showing_recommendation_rows_,
|
|
7440
7531
|
view_more_button_: search_recs_view_more_,
|
|
7441
7532
|
product_card_template_: product_card_template_
|
|
@@ -7724,16 +7815,19 @@ function $2c61e4cd8229c49a$var$get_shared_properties(depict_search) {
|
|
|
7724
7815
|
return shared_properties;
|
|
7725
7816
|
}
|
|
7726
7817
|
function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
7727
|
-
const { depict_search: depict_search ,
|
|
7818
|
+
const { depict_search: depict_search , product_card_template: product_card_template } = props;
|
|
7728
7819
|
const shared_properties = $2c61e4cd8229c49a$var$get_shared_properties(depict_search);
|
|
7729
|
-
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
7730
|
-
grid_spacing: grid_spacing
|
|
7731
|
-
} : {
|
|
7732
|
-
override_vertical_spacing: grid_spacing.vertical,
|
|
7733
|
-
grid_spacing: grid_spacing.horizontal
|
|
7734
|
-
};
|
|
7735
7820
|
return (0, $95837413165cc2df$export$23fca46f3143581f)(()=>{
|
|
7736
7821
|
const { state_: state_ } = shared_properties;
|
|
7822
|
+
const grid_spacing_override = (0, $diwD4$solidjs.createMemo)(()=>{
|
|
7823
|
+
const { grid_spacing: grid_spacing } = props; // can be reactive
|
|
7824
|
+
return typeof grid_spacing === "string" ? {
|
|
7825
|
+
grid_spacing: grid_spacing
|
|
7826
|
+
} : {
|
|
7827
|
+
override_vertical_spacing: grid_spacing.vertical,
|
|
7828
|
+
grid_spacing: grid_spacing.horizontal
|
|
7829
|
+
};
|
|
7830
|
+
});
|
|
7737
7831
|
(0, $diwD4$solidjs.onCleanup)(shared_properties.reset_history_state_);
|
|
7738
7832
|
return (0, $f1d7cb69f839a526$export$a54ec244c8863715)({
|
|
7739
7833
|
input_modal_open_: ()=>!!depict_search.modal_open,
|
|
@@ -7779,19 +7873,23 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
7779
7873
|
showing_recommendation_rows_: state_.search_showing_recommendation_rows,
|
|
7780
7874
|
scroll_restoration_data_: state_.search_scroll_restoration_data,
|
|
7781
7875
|
include_input_field_: ()=>props.include_input_field,
|
|
7782
|
-
layout_options_: {
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
recommendations_layout_options_:
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7876
|
+
layout_options_: (0, $diwD4$solidjs.createMemo)(()=>({
|
|
7877
|
+
cols_at_size: (0, $4e04be41243c3d80$export$6daf8749b65a1b77)(props.cols_at_size),
|
|
7878
|
+
...grid_spacing_override()
|
|
7879
|
+
})),
|
|
7880
|
+
recommendations_layout_options_: (0, $diwD4$solidjs.createMemo)(()=>{
|
|
7881
|
+
const { extra_depict_options: extra_depict_options } = props;
|
|
7882
|
+
return extra_depict_options?.recommendations_cols_at_size ? {
|
|
7883
|
+
cols_at_size: (0, $4e04be41243c3d80$export$6daf8749b65a1b77)(extra_depict_options.recommendations_cols_at_size),
|
|
7884
|
+
...grid_spacing_override()
|
|
7885
|
+
} : undefined;
|
|
7886
|
+
}),
|
|
7790
7887
|
product_card_template_: product_card_template
|
|
7791
7888
|
});
|
|
7792
7889
|
}, "Entire SearchPage failed");
|
|
7793
7890
|
}
|
|
7794
|
-
function $2c61e4cd8229c49a$export$316f6f283ae64765(
|
|
7891
|
+
function $2c61e4cd8229c49a$export$316f6f283ae64765(props) {
|
|
7892
|
+
const { depict_search: depict_search , modal_dispose_handler: modal_dispose_handler , click_handler: click_handler } = props;
|
|
7795
7893
|
const shared_properties = $2c61e4cd8229c49a$var$get_shared_properties(depict_search);
|
|
7796
7894
|
return (0, $95837413165cc2df$export$23fca46f3143581f)(()=>{
|
|
7797
7895
|
let input_element;
|
|
@@ -7820,7 +7918,7 @@ function $2c61e4cd8229c49a$export$316f6f283ae64765({ depict_search: depict_searc
|
|
|
7820
7918
|
input_element.selectionStart,
|
|
7821
7919
|
input_element.selectionEnd
|
|
7822
7920
|
];
|
|
7823
|
-
const { cleanup: cleanup } = $2c61e4cd8229c49a$var$align_field_modal(style_props_, search_field, aligner_ref);
|
|
7921
|
+
const { cleanup: cleanup } = $2c61e4cd8229c49a$var$align_field_modal(style_props_, search_field, ()=>props.aligner_ref);
|
|
7824
7922
|
const complete_modal_dispose_handler = ()=>{
|
|
7825
7923
|
modal_dispose_handler?.();
|
|
7826
7924
|
cleanup();
|
|
@@ -7844,23 +7942,21 @@ function $2c61e4cd8229c49a$export$316f6f283ae64765({ depict_search: depict_searc
|
|
|
7844
7942
|
];
|
|
7845
7943
|
}, "SearchField failed");
|
|
7846
7944
|
}
|
|
7847
|
-
function $2c61e4cd8229c49a$var$align_field_modal(style_props_, input,
|
|
7945
|
+
function $2c61e4cd8229c49a$var$align_field_modal(style_props_, input, aligner_ref_accessor) {
|
|
7848
7946
|
return (0, $diwD4$solidjs.createRoot)((dispose)=>{
|
|
7849
|
-
|
|
7947
|
+
(0, $diwD4$solidjs.createComputed)(()=>{
|
|
7948
|
+
const aligner_ref = aligner_ref_accessor?.();
|
|
7949
|
+
if (!aligner_ref) {
|
|
7950
|
+
(0, $fd463ff0edb29915$export$b3ad617e9036868)(style_props_, input);
|
|
7951
|
+
return;
|
|
7952
|
+
}
|
|
7850
7953
|
const { cleanup: cleanup } = (0, $d8e94ea381ab57fa$export$828dcdd425fd3231)(aligner_ref);
|
|
7954
|
+
(0, $diwD4$solidjs.onCleanup)(cleanup);
|
|
7851
7955
|
(0, $fd463ff0edb29915$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
}
|
|
7857
|
-
};
|
|
7858
|
-
} else {
|
|
7859
|
-
(0, $fd463ff0edb29915$export$b3ad617e9036868)(style_props_, input);
|
|
7860
|
-
return {
|
|
7861
|
-
cleanup: dispose
|
|
7862
|
-
};
|
|
7863
|
-
}
|
|
7956
|
+
});
|
|
7957
|
+
return {
|
|
7958
|
+
cleanup: dispose
|
|
7959
|
+
};
|
|
7864
7960
|
});
|
|
7865
7961
|
}
|
|
7866
7962
|
|