@depict-ai/ui 2.1.13 → 2.1.15

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 CHANGED
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
76
76
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
77
77
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
78
78
  /*! Depict.ai search and product listing SDK */
79
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.13";
79
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.15";
80
80
  const $a68b73fd7ba0853f$var$fallback_operator = "in";
81
81
  const $a68b73fd7ba0853f$var$fallback_token = "";
82
82
  const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
@@ -2198,6 +2198,7 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
2198
2198
  i18n_: i18n_
2199
2199
  }) : []);
2200
2200
  });
2201
+ $52FdA$solidjs.onCleanup(() => set_view_more_button_below_group_());
2201
2202
  $52FdA$solidjs.createEffect($52FdA$depictaiutilishared.catchify(async () => {
2202
2203
  if (!togglable_rest()) {
2203
2204
  await collapse();
@@ -3033,7 +3034,7 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
3033
3034
  filter_: filter_,
3034
3035
  selected_filters_: selected_filters_,
3035
3036
  i18n_: i18n_,
3036
- view_more_button_below_group_: view_more_button_below_group_,
3037
+ view_more_button_below_group_: [, set_view_more_button_below_group],
3037
3038
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
3038
3039
  filter_query_: filter_query_
3039
3040
  } = _ref;
@@ -3124,7 +3125,7 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
3124
3125
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
3125
3126
  parent_.value_ = value.map(v => v + "");
3126
3127
  parent_.name_ = names[i];
3127
- parent_.count_ = counts[i];
3128
+ parent_.count_ = counts === null || counts === void 0 ? void 0 : counts[i];
3128
3129
  parent_.is_expanded_ = $9c1d49181fb3002a$var$make_expanded_signal({
3129
3130
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
3130
3131
  filter_value_: parent_.value_,
@@ -3158,11 +3159,12 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
3158
3159
  }
3159
3160
  });
3160
3161
  $52FdA$solidjs.createRenderEffect(() => {
3161
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $52FdA$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
3162
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $52FdA$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
3162
3163
  show_extras_: show_extras,
3163
3164
  i18n_: i18n_
3164
3165
  }) : []);
3165
3166
  });
3167
+ $52FdA$solidjs.onCleanup(() => set_view_more_button_below_group());
3166
3168
  $52FdA$solidjs.createEffect($52FdA$depictaiutilishared.catchify(async () => {
3167
3169
  if (!some_top_level_are_hidden()) {
3168
3170
  await collapse();
@@ -3753,7 +3755,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
3753
3755
  filter_: filter_,
3754
3756
  selected_filters_: [get_selected_filters, set_selected_filters],
3755
3757
  i18n_: i18n_,
3756
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
3758
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
3757
3759
  filter_query_: filter_query_
3758
3760
  } = _ref;
3759
3761
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -3874,6 +3876,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
3874
3876
  i18n_: i18n_
3875
3877
  }) : []);
3876
3878
  });
3879
+ $52FdA$solidjs.onCleanup(() => set_view_more_button_below_group_());
3877
3880
  $52FdA$solidjs.createEffect($52FdA$depictaiutilishared.catchify(async () => {
3878
3881
  if (!togglable_rest()) {
3879
3882
  await collapse();
@@ -4135,7 +4138,7 @@ function $5b88b077e48a4451$export$82eafebb825fc23f() {
4135
4138
  return _el$;
4136
4139
  })();
4137
4140
  }
4138
- const $8e7ac26c00243687$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear>`);
4141
+ const $8e7ac26c00243687$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear-filter-search>`);
4139
4142
  const $8e7ac26c00243687$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
4140
4143
  function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
4141
4144
  const [filter_query_, set_filter_query_] = $52FdA$solidjs.createSignal();
@@ -4147,7 +4150,7 @@ function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
4147
4150
  const type = (_filter$meta = filter.meta) === null || _filter$meta === void 0 ? void 0 : _filter$meta.type;
4148
4151
  if (type === "range") continue;
4149
4152
  const length = filter.meta.values.length;
4150
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
4153
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
4151
4154
  }
4152
4155
 
4153
4156
  return count >= $8e7ac26c00243687$var$min_items_to_enable_filter_searching;
@@ -4229,7 +4232,9 @@ function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
4229
4232
  ...filter,
4230
4233
  meta: {
4231
4234
  ...meta,
4232
- counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i]),
4235
+ ...(counts ? {
4236
+ counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i])
4237
+ } : {}),
4233
4238
  ...(names ? {
4234
4239
  names: (_meta$names = meta.names) === null || _meta$names === void 0 ? void 0 : _meta$names.filter((_, i) => filtered_indexes[i])
4235
4240
  } : {}),
@@ -11138,7 +11143,7 @@ function $f1fc9ea3e7632eba$export$f631859cab12b342(_ref) {
11138
11143
  })), _el$8, _co$);
11139
11144
  $52FdA$solidjsweb.insert(_el$5, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
11140
11145
  get when() {
11141
- return (content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description) || !content_result_;
11146
+ return content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description;
11142
11147
  },
11143
11148
  get children() {
11144
11149
  const _el$6 = $52FdA$solidjsweb.getNextElement($f1fc9ea3e7632eba$var$_tmpl$3);
package/ES10/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.13";
10
+ export const version = "2.1.15";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
package/ES10/index.js CHANGED
@@ -9,7 +9,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
9
9
  /*! Depict.ai search and product listing SDK */
10
10
  import { register_es_version } from "../multi_import_deduplicator.mjs";
11
11
  register_es_version("ui", "ES10");
12
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.13";
12
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.15";
13
13
  const $2855bffe06ef7a03$var$fallback_operator = "in";
14
14
  const $2855bffe06ef7a03$var$fallback_token = "";
15
15
  const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
@@ -2131,6 +2131,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
2131
2131
  i18n_: i18n_
2132
2132
  }) : []);
2133
2133
  });
2134
+ $8tj43$onCleanup(() => set_view_more_button_below_group_());
2134
2135
  $8tj43$createEffect($8tj43$catchify(async () => {
2135
2136
  if (!togglable_rest()) {
2136
2137
  await collapse();
@@ -2966,7 +2967,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
2966
2967
  filter_: filter_,
2967
2968
  selected_filters_: selected_filters_,
2968
2969
  i18n_: i18n_,
2969
- view_more_button_below_group_: view_more_button_below_group_,
2970
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2970
2971
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2971
2972
  filter_query_: filter_query_
2972
2973
  } = _ref;
@@ -3057,7 +3058,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
3057
3058
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
3058
3059
  parent_.value_ = value.map(v => v + "");
3059
3060
  parent_.name_ = names[i];
3060
- parent_.count_ = counts[i];
3061
+ parent_.count_ = counts === null || counts === void 0 ? void 0 : counts[i];
3061
3062
  parent_.is_expanded_ = $0ae614c5c7babb43$var$make_expanded_signal({
3062
3063
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
3063
3064
  filter_value_: parent_.value_,
@@ -3091,11 +3092,12 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
3091
3092
  }
3092
3093
  });
3093
3094
  $8tj43$createRenderEffect(() => {
3094
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $8tj43$createComponent((0, $3e850b2f2cca761f$export$ca21a16d65b3dd8), {
3095
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $8tj43$createComponent((0, $3e850b2f2cca761f$export$ca21a16d65b3dd8), {
3095
3096
  show_extras_: show_extras,
3096
3097
  i18n_: i18n_
3097
3098
  }) : []);
3098
3099
  });
3100
+ $8tj43$onCleanup(() => set_view_more_button_below_group());
3099
3101
  $8tj43$createEffect($8tj43$catchify(async () => {
3100
3102
  if (!some_top_level_are_hidden()) {
3101
3103
  await collapse();
@@ -3686,7 +3688,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
3686
3688
  filter_: filter_,
3687
3689
  selected_filters_: [get_selected_filters, set_selected_filters],
3688
3690
  i18n_: i18n_,
3689
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
3691
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
3690
3692
  filter_query_: filter_query_
3691
3693
  } = _ref;
3692
3694
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -3807,6 +3809,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
3807
3809
  i18n_: i18n_
3808
3810
  }) : []);
3809
3811
  });
3812
+ $8tj43$onCleanup(() => set_view_more_button_below_group_());
3810
3813
  $8tj43$createEffect($8tj43$catchify(async () => {
3811
3814
  if (!togglable_rest()) {
3812
3815
  await collapse();
@@ -4068,7 +4071,7 @@ function $ef0f18a578b32578$export$82eafebb825fc23f() {
4068
4071
  return _el$;
4069
4072
  })();
4070
4073
  }
4071
- const $e354b2f9ce33cb75$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear>`);
4074
+ const $e354b2f9ce33cb75$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear-filter-search>`);
4072
4075
  const $e354b2f9ce33cb75$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
4073
4076
  function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
4074
4077
  const [filter_query_, set_filter_query_] = $8tj43$createSignal();
@@ -4080,7 +4083,7 @@ function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
4080
4083
  const type = (_filter$meta = filter.meta) === null || _filter$meta === void 0 ? void 0 : _filter$meta.type;
4081
4084
  if (type === "range") continue;
4082
4085
  const length = filter.meta.values.length;
4083
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
4086
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
4084
4087
  }
4085
4088
 
4086
4089
  return count >= $e354b2f9ce33cb75$var$min_items_to_enable_filter_searching;
@@ -4162,7 +4165,9 @@ function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
4162
4165
  ...filter,
4163
4166
  meta: {
4164
4167
  ...meta,
4165
- counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i]),
4168
+ ...(counts ? {
4169
+ counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i])
4170
+ } : {}),
4166
4171
  ...(names ? {
4167
4172
  names: (_meta$names = meta.names) === null || _meta$names === void 0 ? void 0 : _meta$names.filter((_, i) => filtered_indexes[i])
4168
4173
  } : {}),
@@ -11071,7 +11076,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
11071
11076
  })), _el$8, _co$);
11072
11077
  $8tj43$insert(_el$5, $8tj43$createComponent((0, $8tj43$Show), {
11073
11078
  get when() {
11074
- return (content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description) || !content_result_;
11079
+ return content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description;
11075
11080
  },
11076
11081
  get children() {
11077
11082
  const _el$6 = $8tj43$getNextElement($22470de5f42cc35d$var$_tmpl$3);
package/latest/index.cjs CHANGED
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
70
70
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
71
71
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
72
72
  /*! Depict.ai search and product listing SDK */
73
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.13";
73
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.15";
74
74
  const $1ab22f2cd39b3061$var$fallback_operator = "in";
75
75
  const $1ab22f2cd39b3061$var$fallback_token = "";
76
76
  const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
@@ -2093,6 +2093,7 @@ function $d94869c80e337a3d$export$dd948f91abc3a1c4({
2093
2093
  i18n_: i18n_
2094
2094
  }) : []);
2095
2095
  });
2096
+ $gVhhF$solidjs.onCleanup(() => set_view_more_button_below_group_());
2096
2097
  $gVhhF$solidjs.createEffect($gVhhF$depictaiutilishared.catchify(async () => {
2097
2098
  if (!togglable_rest()) {
2098
2099
  await collapse();
@@ -2884,7 +2885,7 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
2884
2885
  filter_: filter_,
2885
2886
  selected_filters_: selected_filters_,
2886
2887
  i18n_: i18n_,
2887
- view_more_button_below_group_: view_more_button_below_group_,
2888
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2888
2889
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2889
2890
  filter_query_: filter_query_
2890
2891
  }) {
@@ -2971,7 +2972,7 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
2971
2972
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
2972
2973
  parent_.value_ = value.map(v => v + "");
2973
2974
  parent_.name_ = names[i];
2974
- parent_.count_ = counts[i];
2975
+ parent_.count_ = counts?.[i];
2975
2976
  parent_.is_expanded_ = $3bdc00a1353c1150$var$make_expanded_signal({
2976
2977
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2977
2978
  filter_value_: parent_.value_,
@@ -3005,11 +3006,12 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
3005
3006
  }
3006
3007
  });
3007
3008
  $gVhhF$solidjs.createRenderEffect(() => {
3008
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $gVhhF$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
3009
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $gVhhF$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
3009
3010
  show_extras_: show_extras,
3010
3011
  i18n_: i18n_
3011
3012
  }) : []);
3012
3013
  });
3014
+ $gVhhF$solidjs.onCleanup(() => set_view_more_button_below_group());
3013
3015
  $gVhhF$solidjs.createEffect($gVhhF$depictaiutilishared.catchify(async () => {
3014
3016
  if (!some_top_level_are_hidden()) {
3015
3017
  await collapse();
@@ -3546,7 +3548,7 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
3546
3548
  filter_: filter_,
3547
3549
  selected_filters_: [get_selected_filters, set_selected_filters],
3548
3550
  i18n_: i18n_,
3549
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
3551
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
3550
3552
  filter_query_: filter_query_
3551
3553
  }) {
3552
3554
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -3656,6 +3658,7 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
3656
3658
  i18n_: i18n_
3657
3659
  }) : []);
3658
3660
  });
3661
+ $gVhhF$solidjs.onCleanup(() => set_view_more_button_below_group_());
3659
3662
  $gVhhF$solidjs.createEffect($gVhhF$depictaiutilishared.catchify(async () => {
3660
3663
  if (!togglable_rest()) {
3661
3664
  await collapse();
@@ -3903,7 +3906,7 @@ function $87d7574e1d89d69b$export$82eafebb825fc23f(props = {}) {
3903
3906
  return _el$;
3904
3907
  })();
3905
3908
  }
3906
- const $47d8681015b71901$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear>`);
3909
+ const $47d8681015b71901$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear-filter-search>`);
3907
3910
  const $47d8681015b71901$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
3908
3911
  function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
3909
3912
  const [filter_query_, set_filter_query_] = $gVhhF$solidjs.createSignal();
@@ -3914,7 +3917,7 @@ function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3914
3917
  const type = filter.meta?.type;
3915
3918
  if (type === "range") continue;
3916
3919
  const length = filter.meta.values.length;
3917
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3920
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3918
3921
  }
3919
3922
 
3920
3923
  return count >= $47d8681015b71901$var$min_items_to_enable_filter_searching;
@@ -3995,7 +3998,9 @@ function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3995
3998
  ...filter,
3996
3999
  meta: {
3997
4000
  ...meta,
3998
- counts: counts?.filter((_, i) => filtered_indexes[i]),
4001
+ ...(counts ? {
4002
+ counts: counts?.filter((_, i) => filtered_indexes[i])
4003
+ } : {}),
3999
4004
  ...(names ? {
4000
4005
  names: meta.names?.filter((_, i) => filtered_indexes[i])
4001
4006
  } : {}),
@@ -10396,7 +10401,7 @@ function $76227de40be817e5$export$f631859cab12b342({
10396
10401
  })), _el$8, _co$);
10397
10402
  $gVhhF$solidjsweb.insert(_el$5, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
10398
10403
  get when() {
10399
- return content_result_?.().description || !content_result_;
10404
+ return content_result_?.().description;
10400
10405
  },
10401
10406
  get children() {
10402
10407
  const _el$6 = $gVhhF$solidjsweb.getNextElement($76227de40be817e5$var$_tmpl$3);
package/latest/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.13";
10
+ export const version = "2.1.15";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
package/latest/index.js CHANGED
@@ -6,7 +6,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
6
6
  /*! Depict.ai search and product listing SDK */
7
7
  import { register_es_version } from "../multi_import_deduplicator.mjs";
8
8
  register_es_version("ui", "latest");
9
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.13";
9
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.15";
10
10
  const $4147651646da990a$var$fallback_operator = "in";
11
11
  const $4147651646da990a$var$fallback_token = "";
12
12
  const $4147651646da990a$var$legacy_filter_prefix = "filter_";
@@ -2029,6 +2029,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
2029
2029
  i18n_: i18n_
2030
2030
  }) : []);
2031
2031
  });
2032
+ $9HbP8$onCleanup(() => set_view_more_button_below_group_());
2032
2033
  $9HbP8$createEffect($9HbP8$catchify(async () => {
2033
2034
  if (!togglable_rest()) {
2034
2035
  await collapse();
@@ -2820,7 +2821,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
2820
2821
  filter_: filter_,
2821
2822
  selected_filters_: selected_filters_,
2822
2823
  i18n_: i18n_,
2823
- view_more_button_below_group_: view_more_button_below_group_,
2824
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2824
2825
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2825
2826
  filter_query_: filter_query_
2826
2827
  }) {
@@ -2907,7 +2908,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
2907
2908
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
2908
2909
  parent_.value_ = value.map(v => v + "");
2909
2910
  parent_.name_ = names[i];
2910
- parent_.count_ = counts[i];
2911
+ parent_.count_ = counts?.[i];
2911
2912
  parent_.is_expanded_ = $1c8cac76cb67e9af$var$make_expanded_signal({
2912
2913
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2913
2914
  filter_value_: parent_.value_,
@@ -2941,11 +2942,12 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
2941
2942
  }
2942
2943
  });
2943
2944
  $9HbP8$createRenderEffect(() => {
2944
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $9HbP8$createComponent((0, $67b173f9db427028$export$ca21a16d65b3dd8), {
2945
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $9HbP8$createComponent((0, $67b173f9db427028$export$ca21a16d65b3dd8), {
2945
2946
  show_extras_: show_extras,
2946
2947
  i18n_: i18n_
2947
2948
  }) : []);
2948
2949
  });
2950
+ $9HbP8$onCleanup(() => set_view_more_button_below_group());
2949
2951
  $9HbP8$createEffect($9HbP8$catchify(async () => {
2950
2952
  if (!some_top_level_are_hidden()) {
2951
2953
  await collapse();
@@ -3482,7 +3484,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
3482
3484
  filter_: filter_,
3483
3485
  selected_filters_: [get_selected_filters, set_selected_filters],
3484
3486
  i18n_: i18n_,
3485
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
3487
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
3486
3488
  filter_query_: filter_query_
3487
3489
  }) {
3488
3490
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -3592,6 +3594,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
3592
3594
  i18n_: i18n_
3593
3595
  }) : []);
3594
3596
  });
3597
+ $9HbP8$onCleanup(() => set_view_more_button_below_group_());
3595
3598
  $9HbP8$createEffect($9HbP8$catchify(async () => {
3596
3599
  if (!togglable_rest()) {
3597
3600
  await collapse();
@@ -3839,7 +3842,7 @@ function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
3839
3842
  return _el$;
3840
3843
  })();
3841
3844
  }
3842
- const $e01b34f289b61435$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear>`);
3845
+ const $e01b34f289b61435$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=search-in-filters><input type=text class=query><!$><!/><button class=clear-filter-search>`);
3843
3846
  const $e01b34f289b61435$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
3844
3847
  function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
3845
3848
  const [filter_query_, set_filter_query_] = $9HbP8$createSignal();
@@ -3850,7 +3853,7 @@ function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3850
3853
  const type = filter.meta?.type;
3851
3854
  if (type === "range") continue;
3852
3855
  const length = filter.meta.values.length;
3853
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3856
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3854
3857
  }
3855
3858
 
3856
3859
  return count >= $e01b34f289b61435$var$min_items_to_enable_filter_searching;
@@ -3931,7 +3934,9 @@ function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3931
3934
  ...filter,
3932
3935
  meta: {
3933
3936
  ...meta,
3934
- counts: counts?.filter((_, i) => filtered_indexes[i]),
3937
+ ...(counts ? {
3938
+ counts: counts?.filter((_, i) => filtered_indexes[i])
3939
+ } : {}),
3935
3940
  ...(names ? {
3936
3941
  names: meta.names?.filter((_, i) => filtered_indexes[i])
3937
3942
  } : {}),
@@ -10332,7 +10337,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
10332
10337
  })), _el$8, _co$);
10333
10338
  $9HbP8$insert(_el$5, $9HbP8$createComponent((0, $9HbP8$Show), {
10334
10339
  get when() {
10335
- return content_result_?.().description || !content_result_;
10340
+ return content_result_?.().description;
10336
10341
  },
10337
10342
  get children() {
10338
10343
  const _el$6 = $9HbP8$getNextElement($b2bf2cdcff8142d8$var$_tmpl$3);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -236,7 +236,7 @@
236
236
  "@babel/plugin-transform-typescript": "^7.22.9",
237
237
  "@babel/runtime": "latest",
238
238
  "@babel/runtime-corejs3": "^7.22.6",
239
- "@depict-ai/plp-styling": "^1.2.7",
239
+ "@depict-ai/plp-styling": "^1.2.9",
240
240
  "@depict-ai/types": "^1.0.39",
241
241
  "@depict-ai/utilishared": "^1.0.48",
242
242
  "solid-js": "^1.8.1"
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
76
76
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
77
77
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
78
78
  /*! Depict.ai search and product listing SDK */
79
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.13";
79
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.15";
80
80
  const $a68b73fd7ba0853f$var$fallback_operator = "in";
81
81
  const $a68b73fd7ba0853f$var$fallback_token = "";
82
82
  const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
@@ -1748,6 +1748,7 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
1748
1748
  i18n_: i18n_
1749
1749
  }) : []);
1750
1750
  });
1751
+ $3hooq$solidjs.onCleanup(() => set_view_more_button_below_group_());
1751
1752
  $3hooq$solidjs.createEffect($3hooq$depictaiutilishared.catchify(async () => {
1752
1753
  if (!togglable_rest()) {
1753
1754
  await collapse();
@@ -2332,7 +2333,7 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
2332
2333
  filter_: filter_,
2333
2334
  selected_filters_: selected_filters_,
2334
2335
  i18n_: i18n_,
2335
- view_more_button_below_group_: view_more_button_below_group_,
2336
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2336
2337
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2337
2338
  filter_query_: filter_query_
2338
2339
  } = _ref;
@@ -2423,7 +2424,7 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
2423
2424
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
2424
2425
  parent_.value_ = value.map(v => v + "");
2425
2426
  parent_.name_ = names[i];
2426
- parent_.count_ = counts[i];
2427
+ parent_.count_ = counts === null || counts === void 0 ? void 0 : counts[i];
2427
2428
  parent_.is_expanded_ = $9c1d49181fb3002a$var$make_expanded_signal({
2428
2429
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2429
2430
  filter_value_: parent_.value_,
@@ -2457,11 +2458,12 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
2457
2458
  }
2458
2459
  });
2459
2460
  $3hooq$solidjs.createRenderEffect(() => {
2460
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $3hooq$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
2461
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $3hooq$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
2461
2462
  show_extras_: show_extras,
2462
2463
  i18n_: i18n_
2463
2464
  }) : []);
2464
2465
  });
2466
+ $3hooq$solidjs.onCleanup(() => set_view_more_button_below_group());
2465
2467
  $3hooq$solidjs.createEffect($3hooq$depictaiutilishared.catchify(async () => {
2466
2468
  if (!some_top_level_are_hidden()) {
2467
2469
  await collapse();
@@ -2971,7 +2973,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
2971
2973
  filter_: filter_,
2972
2974
  selected_filters_: [get_selected_filters, set_selected_filters],
2973
2975
  i18n_: i18n_,
2974
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
2976
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
2975
2977
  filter_query_: filter_query_
2976
2978
  } = _ref;
2977
2979
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -3092,6 +3094,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
3092
3094
  i18n_: i18n_
3093
3095
  }) : []);
3094
3096
  });
3097
+ $3hooq$solidjs.onCleanup(() => set_view_more_button_below_group_());
3095
3098
  $3hooq$solidjs.createEffect($3hooq$depictaiutilishared.catchify(async () => {
3096
3099
  if (!togglable_rest()) {
3097
3100
  await collapse();
@@ -3295,7 +3298,7 @@ function $5b88b077e48a4451$export$82eafebb825fc23f() {
3295
3298
  viewBox: "0 0 20 22"
3296
3299
  }, props), () => $3hooq$solidjsweb.ssr($5b88b077e48a4451$var$_tmpl$), true);
3297
3300
  }
3298
- const $8e7ac26c00243687$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear">', "</button></div>"];
3301
+ const $8e7ac26c00243687$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
3299
3302
  const $8e7ac26c00243687$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
3300
3303
  function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
3301
3304
  const [filter_query_, set_filter_query_] = $3hooq$solidjs.createSignal();
@@ -3307,7 +3310,7 @@ function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3307
3310
  const type = (_filter$meta = filter.meta) === null || _filter$meta === void 0 ? void 0 : _filter$meta.type;
3308
3311
  if (type === "range") continue;
3309
3312
  const length = filter.meta.values.length;
3310
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3313
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3311
3314
  }
3312
3315
 
3313
3316
  return count >= $8e7ac26c00243687$var$min_items_to_enable_filter_searching;
@@ -3368,7 +3371,9 @@ function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3368
3371
  ...filter,
3369
3372
  meta: {
3370
3373
  ...meta,
3371
- counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i]),
3374
+ ...(counts ? {
3375
+ counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i])
3376
+ } : {}),
3372
3377
  ...(names ? {
3373
3378
  names: (_meta$names = meta.names) === null || _meta$names === void 0 ? void 0 : _meta$names.filter((_, i) => filtered_indexes[i])
3374
3379
  } : {}),
@@ -9163,7 +9168,7 @@ function $f1fc9ea3e7632eba$export$f631859cab12b342(_ref) {
9163
9168
  }
9164
9169
  }))), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
9165
9170
  get when() {
9166
- return (content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description) || !content_result_;
9171
+ return content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description;
9167
9172
  },
9168
9173
  get children() {
9169
9174
  return $3hooq$solidjsweb.ssr($f1fc9ea3e7632eba$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.13";
10
+ export const version = "2.1.15";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
@@ -9,7 +9,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
9
9
  /*! Depict.ai search and product listing SDK */
10
10
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
11
11
  register_es_version("ui", "ES10");
12
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.13";
12
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.15";
13
13
  const $2855bffe06ef7a03$var$fallback_operator = "in";
14
14
  const $2855bffe06ef7a03$var$fallback_token = "";
15
15
  const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
@@ -1681,6 +1681,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
1681
1681
  i18n_: i18n_
1682
1682
  }) : []);
1683
1683
  });
1684
+ $b8hua$onCleanup(() => set_view_more_button_below_group_());
1684
1685
  $b8hua$createEffect($b8hua$catchify(async () => {
1685
1686
  if (!togglable_rest()) {
1686
1687
  await collapse();
@@ -2265,7 +2266,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
2265
2266
  filter_: filter_,
2266
2267
  selected_filters_: selected_filters_,
2267
2268
  i18n_: i18n_,
2268
- view_more_button_below_group_: view_more_button_below_group_,
2269
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2269
2270
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2270
2271
  filter_query_: filter_query_
2271
2272
  } = _ref;
@@ -2356,7 +2357,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
2356
2357
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
2357
2358
  parent_.value_ = value.map(v => v + "");
2358
2359
  parent_.name_ = names[i];
2359
- parent_.count_ = counts[i];
2360
+ parent_.count_ = counts === null || counts === void 0 ? void 0 : counts[i];
2360
2361
  parent_.is_expanded_ = $0ae614c5c7babb43$var$make_expanded_signal({
2361
2362
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2362
2363
  filter_value_: parent_.value_,
@@ -2390,11 +2391,12 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
2390
2391
  }
2391
2392
  });
2392
2393
  $b8hua$createRenderEffect(() => {
2393
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $b8hua$createComponent((0, $3e850b2f2cca761f$export$ca21a16d65b3dd8), {
2394
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $b8hua$createComponent((0, $3e850b2f2cca761f$export$ca21a16d65b3dd8), {
2394
2395
  show_extras_: show_extras,
2395
2396
  i18n_: i18n_
2396
2397
  }) : []);
2397
2398
  });
2399
+ $b8hua$onCleanup(() => set_view_more_button_below_group());
2398
2400
  $b8hua$createEffect($b8hua$catchify(async () => {
2399
2401
  if (!some_top_level_are_hidden()) {
2400
2402
  await collapse();
@@ -2904,7 +2906,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
2904
2906
  filter_: filter_,
2905
2907
  selected_filters_: [get_selected_filters, set_selected_filters],
2906
2908
  i18n_: i18n_,
2907
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
2909
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
2908
2910
  filter_query_: filter_query_
2909
2911
  } = _ref;
2910
2912
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -3025,6 +3027,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
3025
3027
  i18n_: i18n_
3026
3028
  }) : []);
3027
3029
  });
3030
+ $b8hua$onCleanup(() => set_view_more_button_below_group_());
3028
3031
  $b8hua$createEffect($b8hua$catchify(async () => {
3029
3032
  if (!togglable_rest()) {
3030
3033
  await collapse();
@@ -3228,7 +3231,7 @@ function $ef0f18a578b32578$export$82eafebb825fc23f() {
3228
3231
  viewBox: "0 0 20 22"
3229
3232
  }, props), () => $b8hua$ssr($ef0f18a578b32578$var$_tmpl$), true);
3230
3233
  }
3231
- const $e354b2f9ce33cb75$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear">', "</button></div>"];
3234
+ const $e354b2f9ce33cb75$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
3232
3235
  const $e354b2f9ce33cb75$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
3233
3236
  function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
3234
3237
  const [filter_query_, set_filter_query_] = $b8hua$createSignal();
@@ -3240,7 +3243,7 @@ function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3240
3243
  const type = (_filter$meta = filter.meta) === null || _filter$meta === void 0 ? void 0 : _filter$meta.type;
3241
3244
  if (type === "range") continue;
3242
3245
  const length = filter.meta.values.length;
3243
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3246
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3244
3247
  }
3245
3248
 
3246
3249
  return count >= $e354b2f9ce33cb75$var$min_items_to_enable_filter_searching;
@@ -3301,7 +3304,9 @@ function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3301
3304
  ...filter,
3302
3305
  meta: {
3303
3306
  ...meta,
3304
- counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i]),
3307
+ ...(counts ? {
3308
+ counts: counts === null || counts === void 0 ? void 0 : counts.filter((_, i) => filtered_indexes[i])
3309
+ } : {}),
3305
3310
  ...(names ? {
3306
3311
  names: (_meta$names = meta.names) === null || _meta$names === void 0 ? void 0 : _meta$names.filter((_, i) => filtered_indexes[i])
3307
3312
  } : {}),
@@ -9096,7 +9101,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
9096
9101
  }
9097
9102
  }))), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
9098
9103
  get when() {
9099
- return (content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description) || !content_result_;
9104
+ return content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description;
9100
9105
  },
9101
9106
  get children() {
9102
9107
  return $b8hua$ssr($22470de5f42cc35d$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
70
70
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
71
71
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
72
72
  /*! Depict.ai search and product listing SDK */
73
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.13";
73
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.15";
74
74
  const $1ab22f2cd39b3061$var$fallback_operator = "in";
75
75
  const $1ab22f2cd39b3061$var$fallback_token = "";
76
76
  const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
@@ -1660,6 +1660,7 @@ function $d94869c80e337a3d$export$dd948f91abc3a1c4({
1660
1660
  i18n_: i18n_
1661
1661
  }) : []);
1662
1662
  });
1663
+ $5vyXB$solidjs.onCleanup(() => set_view_more_button_below_group_());
1663
1664
  $5vyXB$solidjs.createEffect($5vyXB$depictaiutilishared.catchify(async () => {
1664
1665
  if (!togglable_rest()) {
1665
1666
  await collapse();
@@ -2208,7 +2209,7 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
2208
2209
  filter_: filter_,
2209
2210
  selected_filters_: selected_filters_,
2210
2211
  i18n_: i18n_,
2211
- view_more_button_below_group_: view_more_button_below_group_,
2212
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2212
2213
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2213
2214
  filter_query_: filter_query_
2214
2215
  }) {
@@ -2295,7 +2296,7 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
2295
2296
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
2296
2297
  parent_.value_ = value.map(v => v + "");
2297
2298
  parent_.name_ = names[i];
2298
- parent_.count_ = counts[i];
2299
+ parent_.count_ = counts?.[i];
2299
2300
  parent_.is_expanded_ = $3bdc00a1353c1150$var$make_expanded_signal({
2300
2301
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2301
2302
  filter_value_: parent_.value_,
@@ -2329,11 +2330,12 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
2329
2330
  }
2330
2331
  });
2331
2332
  $5vyXB$solidjs.createRenderEffect(() => {
2332
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $5vyXB$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
2333
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $5vyXB$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
2333
2334
  show_extras_: show_extras,
2334
2335
  i18n_: i18n_
2335
2336
  }) : []);
2336
2337
  });
2338
+ $5vyXB$solidjs.onCleanup(() => set_view_more_button_below_group());
2337
2339
  $5vyXB$solidjs.createEffect($5vyXB$depictaiutilishared.catchify(async () => {
2338
2340
  if (!some_top_level_are_hidden()) {
2339
2341
  await collapse();
@@ -2794,7 +2796,7 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
2794
2796
  filter_: filter_,
2795
2797
  selected_filters_: [get_selected_filters, set_selected_filters],
2796
2798
  i18n_: i18n_,
2797
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
2799
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
2798
2800
  filter_query_: filter_query_
2799
2801
  }) {
2800
2802
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -2904,6 +2906,7 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
2904
2906
  i18n_: i18n_
2905
2907
  }) : []);
2906
2908
  });
2909
+ $5vyXB$solidjs.onCleanup(() => set_view_more_button_below_group_());
2907
2910
  $5vyXB$solidjs.createEffect($5vyXB$depictaiutilishared.catchify(async () => {
2908
2911
  if (!togglable_rest()) {
2909
2912
  await collapse();
@@ -3099,7 +3102,7 @@ function $87d7574e1d89d69b$export$82eafebb825fc23f(props = {}) {
3099
3102
  viewBox: "0 0 20 22"
3100
3103
  }, props), () => $5vyXB$solidjsweb.ssr($87d7574e1d89d69b$var$_tmpl$), true);
3101
3104
  }
3102
- const $47d8681015b71901$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear">', "</button></div>"];
3105
+ const $47d8681015b71901$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
3103
3106
  const $47d8681015b71901$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
3104
3107
  function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
3105
3108
  const [filter_query_, set_filter_query_] = $5vyXB$solidjs.createSignal();
@@ -3110,7 +3113,7 @@ function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3110
3113
  const type = filter.meta?.type;
3111
3114
  if (type === "range") continue;
3112
3115
  const length = filter.meta.values.length;
3113
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3116
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3114
3117
  }
3115
3118
 
3116
3119
  return count >= $47d8681015b71901$var$min_items_to_enable_filter_searching;
@@ -3170,7 +3173,9 @@ function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3170
3173
  ...filter,
3171
3174
  meta: {
3172
3175
  ...meta,
3173
- counts: counts?.filter((_, i) => filtered_indexes[i]),
3176
+ ...(counts ? {
3177
+ counts: counts?.filter((_, i) => filtered_indexes[i])
3178
+ } : {}),
3174
3179
  ...(names ? {
3175
3180
  names: meta.names?.filter((_, i) => filtered_indexes[i])
3176
3181
  } : {}),
@@ -8486,7 +8491,7 @@ function $76227de40be817e5$export$f631859cab12b342({
8486
8491
  }
8487
8492
  }))), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
8488
8493
  get when() {
8489
- return content_result_?.().description || !content_result_;
8494
+ return content_result_?.().description;
8490
8495
  },
8491
8496
  get children() {
8492
8497
  return $5vyXB$solidjsweb.ssr($76227de40be817e5$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.13";
10
+ export const version = "2.1.15";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
@@ -6,7 +6,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
6
6
  /*! Depict.ai search and product listing SDK */
7
7
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
8
8
  register_es_version("ui", "latest");
9
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.13";
9
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.15";
10
10
  const $4147651646da990a$var$fallback_operator = "in";
11
11
  const $4147651646da990a$var$fallback_token = "";
12
12
  const $4147651646da990a$var$legacy_filter_prefix = "filter_";
@@ -1596,6 +1596,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
1596
1596
  i18n_: i18n_
1597
1597
  }) : []);
1598
1598
  });
1599
+ $i7OB2$onCleanup(() => set_view_more_button_below_group_());
1599
1600
  $i7OB2$createEffect($i7OB2$catchify(async () => {
1600
1601
  if (!togglable_rest()) {
1601
1602
  await collapse();
@@ -2144,7 +2145,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
2144
2145
  filter_: filter_,
2145
2146
  selected_filters_: selected_filters_,
2146
2147
  i18n_: i18n_,
2147
- view_more_button_below_group_: view_more_button_below_group_,
2148
+ view_more_button_below_group_: [, set_view_more_button_below_group],
2148
2149
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2149
2150
  filter_query_: filter_query_
2150
2151
  }) {
@@ -2231,7 +2232,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
2231
2232
  // In this case we want to just correct the name and value of the already created object, which will be in parent_
2232
2233
  parent_.value_ = value.map(v => v + "");
2233
2234
  parent_.name_ = names[i];
2234
- parent_.count_ = counts[i];
2235
+ parent_.count_ = counts?.[i];
2235
2236
  parent_.is_expanded_ = $1c8cac76cb67e9af$var$make_expanded_signal({
2236
2237
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
2237
2238
  filter_value_: parent_.value_,
@@ -2265,11 +2266,12 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
2265
2266
  }
2266
2267
  });
2267
2268
  $i7OB2$createRenderEffect(() => {
2268
- view_more_button_below_group_[1](some_top_level_are_hidden() ? $i7OB2$createComponent((0, $67b173f9db427028$export$ca21a16d65b3dd8), {
2269
+ set_view_more_button_below_group(some_top_level_are_hidden() ? $i7OB2$createComponent((0, $67b173f9db427028$export$ca21a16d65b3dd8), {
2269
2270
  show_extras_: show_extras,
2270
2271
  i18n_: i18n_
2271
2272
  }) : []);
2272
2273
  });
2274
+ $i7OB2$onCleanup(() => set_view_more_button_below_group());
2273
2275
  $i7OB2$createEffect($i7OB2$catchify(async () => {
2274
2276
  if (!some_top_level_are_hidden()) {
2275
2277
  await collapse();
@@ -2730,7 +2732,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
2730
2732
  filter_: filter_,
2731
2733
  selected_filters_: [get_selected_filters, set_selected_filters],
2732
2734
  i18n_: i18n_,
2733
- view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_],
2735
+ view_more_button_below_group_: [, set_view_more_button_below_group_],
2734
2736
  filter_query_: filter_query_
2735
2737
  }) {
2736
2738
  // same as in CheckboxFilter, maybe we should make this DRY at some point
@@ -2840,6 +2842,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
2840
2842
  i18n_: i18n_
2841
2843
  }) : []);
2842
2844
  });
2845
+ $i7OB2$onCleanup(() => set_view_more_button_below_group_());
2843
2846
  $i7OB2$createEffect($i7OB2$catchify(async () => {
2844
2847
  if (!togglable_rest()) {
2845
2848
  await collapse();
@@ -3035,7 +3038,7 @@ function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
3035
3038
  viewBox: "0 0 20 22"
3036
3039
  }, props), () => $i7OB2$ssr($16f0ed5ea30d8d9c$var$_tmpl$), true);
3037
3040
  }
3038
- const $e01b34f289b61435$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear">', "</button></div>"];
3041
+ const $e01b34f289b61435$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
3039
3042
  const $e01b34f289b61435$var$min_items_to_enable_filter_searching = 10; // For checkbox hierarchical we 2x this
3040
3043
  function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
3041
3044
  const [filter_query_, set_filter_query_] = $i7OB2$createSignal();
@@ -3046,7 +3049,7 @@ function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3046
3049
  const type = filter.meta?.type;
3047
3050
  if (type === "range") continue;
3048
3051
  const length = filter.meta.values.length;
3049
- count += type === "checkbox-color" ? length / 2 : type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3052
+ count += type === "checkbox-color" || type === "checkbox-grid" ? length / 3 : length; // For checkbox-color we have two columns, checkbox-grid three, so we can show search later
3050
3053
  }
3051
3054
 
3052
3055
  return count >= $e01b34f289b61435$var$min_items_to_enable_filter_searching;
@@ -3106,7 +3109,9 @@ function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_
3106
3109
  ...filter,
3107
3110
  meta: {
3108
3111
  ...meta,
3109
- counts: counts?.filter((_, i) => filtered_indexes[i]),
3112
+ ...(counts ? {
3113
+ counts: counts?.filter((_, i) => filtered_indexes[i])
3114
+ } : {}),
3110
3115
  ...(names ? {
3111
3116
  names: meta.names?.filter((_, i) => filtered_indexes[i])
3112
3117
  } : {}),
@@ -8422,7 +8427,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
8422
8427
  }
8423
8428
  }))), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
8424
8429
  get when() {
8425
- return content_result_?.().description || !content_result_;
8430
+ return content_result_?.().description;
8426
8431
  },
8427
8432
  get children() {
8428
8433
  return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {