@depict-ai/ui 2.0.19 → 2.0.20

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
@@ -72,7 +72,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
72
72
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
73
73
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
74
74
  /*! Depict.ai search and product listing SDK */
75
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.19";
75
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.20";
76
76
  const $d067f3a30f047b41$var$ListingContext = /*@__PURE__*/$52FdA$solidjs.createContext();
77
77
  function $d067f3a30f047b41$export$e68cff63f76bd15b(props) {
78
78
  const our_object = {};
@@ -535,22 +535,28 @@ function $76012c4468a53d1f$export$43f0fb951fcb0c54(_ref) {
535
535
  }
536
536
  });
537
537
  }
538
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
539
- function $76012c4468a53d1f$var$deep_equal(object1, object2) {
540
- const keys1 = Object.keys(object1);
541
- const keys2 = Object.keys(object2);
542
- if (keys1.length !== keys2.length) return false;
543
- for (const key of keys1) {
544
- if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore result ids that change per response
545
- const val1 = object1[key];
546
- const val2 = object2[key];
547
- const areObjects = $76012c4468a53d1f$var$is_object(val1) && $76012c4468a53d1f$var$is_object(val2);
548
- if (areObjects && !$76012c4468a53d1f$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
538
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
539
+ function $76012c4468a53d1f$var$deep_equal(obj1, obj2) {
540
+ if (obj1 === obj2) return true;
541
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
542
+ if (obj1.length !== obj2.length) return false;
543
+ return obj1.every((elem, index) => {
544
+ return $76012c4468a53d1f$var$deep_equal(elem, obj2[index]);
545
+ });
549
546
  }
550
- return true;
551
- }
552
- function $76012c4468a53d1f$var$is_object(object) {
553
- return object != null && typeof object === "object";
547
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
548
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
549
+ const keys1 = Object.keys(obj1);
550
+ const keys2 = Object.keys(obj2);
551
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
552
+ for (const key in obj1) {
553
+ if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore keys changing with every request
554
+ const isEqual = $76012c4468a53d1f$var$deep_equal(obj1[key], obj2[key]);
555
+ if (!isEqual) return false;
556
+ }
557
+ return true;
558
+ }
559
+ return false;
554
560
  }
555
561
 
556
562
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.19";
10
+ export const version = "2.0.20";
11
11
  /**
12
12
  * Provider to wrap every listing (group of products) in
13
13
  * Used for example for deduplicating ResizeObservers for responsive images
package/ES10/index.js CHANGED
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.19";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.20";
12
12
  const $5441862cd2f5e111$var$ListingContext = /*@__PURE__*/$8tj43$createContext();
13
13
  function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
14
14
  const our_object = {};
@@ -471,22 +471,28 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
471
471
  }
472
472
  });
473
473
  }
474
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
475
- function $2d7bad8684bc7f44$var$deep_equal(object1, object2) {
476
- const keys1 = Object.keys(object1);
477
- const keys2 = Object.keys(object2);
478
- if (keys1.length !== keys2.length) return false;
479
- for (const key of keys1) {
480
- if ($2d7bad8684bc7f44$var$result_ids.includes(key)) continue; // ignore result ids that change per response
481
- const val1 = object1[key];
482
- const val2 = object2[key];
483
- const areObjects = $2d7bad8684bc7f44$var$is_object(val1) && $2d7bad8684bc7f44$var$is_object(val2);
484
- if (areObjects && !$2d7bad8684bc7f44$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
474
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
475
+ function $2d7bad8684bc7f44$var$deep_equal(obj1, obj2) {
476
+ if (obj1 === obj2) return true;
477
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
478
+ if (obj1.length !== obj2.length) return false;
479
+ return obj1.every((elem, index) => {
480
+ return $2d7bad8684bc7f44$var$deep_equal(elem, obj2[index]);
481
+ });
485
482
  }
486
- return true;
487
- }
488
- function $2d7bad8684bc7f44$var$is_object(object) {
489
- return object != null && typeof object === "object";
483
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
484
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
485
+ const keys1 = Object.keys(obj1);
486
+ const keys2 = Object.keys(obj2);
487
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
488
+ for (const key in obj1) {
489
+ if ($2d7bad8684bc7f44$var$result_ids.includes(key)) continue; // ignore keys changing with every request
490
+ const isEqual = $2d7bad8684bc7f44$var$deep_equal(obj1[key], obj2[key]);
491
+ if (!isEqual) return false;
492
+ }
493
+ return true;
494
+ }
495
+ return false;
490
496
  }
491
497
 
492
498
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
package/latest/index.cjs CHANGED
@@ -66,7 +66,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
66
66
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
67
67
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
68
68
  /*! Depict.ai search and product listing SDK */
69
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.19";
69
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.20";
70
70
  const $84798aaa863a4909$var$ListingContext = /*@__PURE__*/$gVhhF$solidjs.createContext();
71
71
  function $84798aaa863a4909$export$e68cff63f76bd15b(props) {
72
72
  const our_object = {};
@@ -504,22 +504,28 @@ function $a73063cc642f3e5f$export$43f0fb951fcb0c54({
504
504
  }
505
505
  });
506
506
  }
507
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
508
- function $a73063cc642f3e5f$var$deep_equal(object1, object2) {
509
- const keys1 = Object.keys(object1);
510
- const keys2 = Object.keys(object2);
511
- if (keys1.length !== keys2.length) return false;
512
- for (const key of keys1) {
513
- if ($a73063cc642f3e5f$var$result_ids.includes(key)) continue; // ignore result ids that change per response
514
- const val1 = object1[key];
515
- const val2 = object2[key];
516
- const areObjects = $a73063cc642f3e5f$var$is_object(val1) && $a73063cc642f3e5f$var$is_object(val2);
517
- if (areObjects && !$a73063cc642f3e5f$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
507
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
508
+ function $a73063cc642f3e5f$var$deep_equal(obj1, obj2) {
509
+ if (obj1 === obj2) return true;
510
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
511
+ if (obj1.length !== obj2.length) return false;
512
+ return obj1.every((elem, index) => {
513
+ return $a73063cc642f3e5f$var$deep_equal(elem, obj2[index]);
514
+ });
518
515
  }
519
- return true;
520
- }
521
- function $a73063cc642f3e5f$var$is_object(object) {
522
- return object != null && typeof object === "object";
516
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
517
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
518
+ const keys1 = Object.keys(obj1);
519
+ const keys2 = Object.keys(obj2);
520
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
521
+ for (const key in obj1) {
522
+ if ($a73063cc642f3e5f$var$result_ids.includes(key)) continue; // ignore keys changing with every request
523
+ const isEqual = $a73063cc642f3e5f$var$deep_equal(obj1[key], obj2[key]);
524
+ if (!isEqual) return false;
525
+ }
526
+ return true;
527
+ }
528
+ return false;
523
529
  }
524
530
 
525
531
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.19";
10
+ export const version = "2.0.20";
11
11
  /**
12
12
  * Provider to wrap every listing (group of products) in
13
13
  * Used for example for deduplicating ResizeObservers for responsive images
package/latest/index.js CHANGED
@@ -5,7 +5,7 @@ import { createSignal as $9HbP8$createSignal, getOwner as $9HbP8$getOwner, creat
5
5
  /*! Depict.ai search and product listing SDK */
6
6
  import { register_es_version } from "../multi_import_deduplicator.mjs";
7
7
  register_es_version("ui", "latest");
8
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.19";
8
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.20";
9
9
  const $011607bdf658f807$var$ListingContext = /*@__PURE__*/$9HbP8$createContext();
10
10
  function $011607bdf658f807$export$e68cff63f76bd15b(props) {
11
11
  const our_object = {};
@@ -443,22 +443,28 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({
443
443
  }
444
444
  });
445
445
  }
446
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
447
- function $29ec7cddbe1d3484$var$deep_equal(object1, object2) {
448
- const keys1 = Object.keys(object1);
449
- const keys2 = Object.keys(object2);
450
- if (keys1.length !== keys2.length) return false;
451
- for (const key of keys1) {
452
- if ($29ec7cddbe1d3484$var$result_ids.includes(key)) continue; // ignore result ids that change per response
453
- const val1 = object1[key];
454
- const val2 = object2[key];
455
- const areObjects = $29ec7cddbe1d3484$var$is_object(val1) && $29ec7cddbe1d3484$var$is_object(val2);
456
- if (areObjects && !$29ec7cddbe1d3484$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
446
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
447
+ function $29ec7cddbe1d3484$var$deep_equal(obj1, obj2) {
448
+ if (obj1 === obj2) return true;
449
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
450
+ if (obj1.length !== obj2.length) return false;
451
+ return obj1.every((elem, index) => {
452
+ return $29ec7cddbe1d3484$var$deep_equal(elem, obj2[index]);
453
+ });
457
454
  }
458
- return true;
459
- }
460
- function $29ec7cddbe1d3484$var$is_object(object) {
461
- return object != null && typeof object === "object";
455
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
456
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
457
+ const keys1 = Object.keys(obj1);
458
+ const keys2 = Object.keys(obj2);
459
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
460
+ for (const key in obj1) {
461
+ if ($29ec7cddbe1d3484$var$result_ids.includes(key)) continue; // ignore keys changing with every request
462
+ const isEqual = $29ec7cddbe1d3484$var$deep_equal(obj1[key], obj2[key]);
463
+ if (!isEqual) return false;
464
+ }
465
+ return true;
466
+ }
467
+ return false;
462
468
  }
463
469
 
464
470
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
@@ -87,7 +87,7 @@ const $07db801ee546c1bd$export$434b5d2e9cbbcde1 = {
87
87
  "clear_filters_query_sorting_after_submit_": "Clear query. Also clear sorting and filters after next submit.",
88
88
  "placeholder_text_": "Search",
89
89
  search_submit_button_aria_label_: "Search",
90
- search_field_field_aria_label_: "Search query field",
90
+ query_input_field_aria_label_: "Search query field",
91
91
  previous_searches_delete_entry_from_history_: "Remove query from history",
92
92
  get_showing_results_for_: (q, number_of_results)=>{
93
93
  return q.textContent !== "" ? [
@@ -182,7 +182,7 @@ const $261a4d82817f7737$export$62ef558576ddaf3d = {
182
182
  "clear_filters_query_sorting_after_submit_": "Vymazat dotaz. Vymazat i tř\xedděn\xed a filtry po př\xedšt\xedm odesl\xe1n\xed.",
183
183
  "placeholder_text_": "Hled\xe1n\xed",
184
184
  search_submit_button_aria_label_: "Hled\xe1n\xed",
185
- "search_field_field_aria_label_": "Pol\xedčko dotazu hled\xe1n\xed",
185
+ "query_input_field_aria_label_": "Pol\xedčko dotazu hled\xe1n\xed",
186
186
  "previous_searches_delete_entry_from_history_": "Odebrat dotaz z historie"
187
187
  };
188
188
 
@@ -254,7 +254,7 @@ const $00908f6ac561c3a8$export$70578856b2420b5d = {
254
254
  "previous_searches_text_": "Dine tidligere s\xf8gninger",
255
255
  "placeholder_text_": "S\xf8gning",
256
256
  "search_submit_button_aria_label_": "S\xf8gning",
257
- "search_field_field_aria_label_": "Felt til s\xf8gning",
257
+ "query_input_field_aria_label_": "Felt til s\xf8gning",
258
258
  "previous_searches_delete_entry_from_history_": "Fjern foresp\xf8rgsel fra historik",
259
259
  get_showing_results_for_: (q, number_of_results)=>{
260
260
  return q.textContent !== "" ? [
@@ -350,7 +350,7 @@ const $fc1dde9179ef0a66$export$5d14584e27bf4bc5 = {
350
350
  "clear_filters_query_sorting_after_submit_": "Zoekopdracht wissen. Wis ook sortering en filters na volgende verzending.",
351
351
  "placeholder_text_": "Zoeken",
352
352
  search_submit_button_aria_label_: "Zoeken",
353
- "search_field_field_aria_label_": "Zoeken met zoekveld",
353
+ "query_input_field_aria_label_": "Zoeken met zoekveld",
354
354
  "previous_searches_delete_entry_from_history_": "Verwijder zoekopdracht uit geschiedenis"
355
355
  };
356
356
 
@@ -435,7 +435,7 @@ const $35be04fa51a001db$export$bb9c5e11b9203620 = {
435
435
  "search_recs_title_": "Muita vaihtoehtoja",
436
436
  "placeholder_text_": "Hae",
437
437
  search_submit_button_aria_label_: "Hae",
438
- "search_field_field_aria_label_": "Hakukentt\xe4",
438
+ "query_input_field_aria_label_": "Hakukentt\xe4",
439
439
  "previous_searches_delete_entry_from_history_": "Poista haku historiasta"
440
440
  };
441
441
 
@@ -519,7 +519,7 @@ const $590f0e69b6cd50a9$export$e608b2bb21ba1862 = {
519
519
  "clear_filters_query_sorting_after_submit_": "Effacer la demande. Effacer aussi le tri et les filtres apr\xe8s le prochain envoi.",
520
520
  "placeholder_text_": "Rechercher",
521
521
  search_submit_button_aria_label_: "Rechercher",
522
- "search_field_field_aria_label_": "Champ de requ\xeate Rechercher",
522
+ "query_input_field_aria_label_": "Champ de requ\xeate Rechercher",
523
523
  "previous_searches_delete_entry_from_history_": "Supprimer une requ\xeate de l’historique"
524
524
  };
525
525
 
@@ -590,7 +590,7 @@ const $5b1e507b0a7fe0ba$export$b43a5e72c07b4d2a = {
590
590
  "modal_discover_more_": "Mehr erforschen",
591
591
  search_submit_button_aria_label_: "Suchen",
592
592
  previous_searches_delete_entry_from_history_: "Anfrage aus Verlauf l\xf6schen",
593
- "search_field_field_aria_label_": "Suchanfragenfeld",
593
+ "query_input_field_aria_label_": "Suchanfragenfeld",
594
594
  "placeholder_text_": "Suchen",
595
595
  get_showing_results_for_: (q, number_of_results)=>{
596
596
  return q.textContent !== "" ? [
@@ -685,7 +685,7 @@ const $d5d486bbb5a01dfd$export$c05550c0848a3fe4 = {
685
685
  "clear_filters_query_sorting_after_submit_": "Cancella query. Cancella anche selezione e filtri dopo il prossimo invio.",
686
686
  "placeholder_text_": "Ricerca",
687
687
  search_submit_button_aria_label_: "Ricerca",
688
- "search_field_field_aria_label_": "Cerca campo query",
688
+ "query_input_field_aria_label_": "Cerca campo query",
689
689
  "previous_searches_delete_entry_from_history_": "Rimuovi query dalla cronologia"
690
690
  };
691
691
 
@@ -758,7 +758,7 @@ const $3e0b02b5e1ab2064$export$dcb702a89633f297 = {
758
758
  "placeholder_text_": "S\xf8k",
759
759
  search_submit_button_aria_label_: "S\xf8k",
760
760
  "previous_searches_delete_entry_from_history_": "Slett sp\xf8rsm\xe5l fra loggen",
761
- "search_field_field_aria_label_": "S\xf8k sp\xf8rsm\xe5lfelt",
761
+ "query_input_field_aria_label_": "S\xf8k sp\xf8rsm\xe5lfelt",
762
762
  get_showing_results_for_: (q, number_of_results)=>{
763
763
  return q.textContent !== "" ? [
764
764
  `Viser `,
@@ -849,7 +849,7 @@ const $8e05c59dcfcb636b$export$b0eb0dd41442f532 = {
849
849
  "clear_filters_query_sorting_after_submit_": "Wyczyść zapytanie. Wyczyść r\xf3wnież sortowanie i filtry po następnym przesłaniu.",
850
850
  "placeholder_text_": "Wyszukaj",
851
851
  search_submit_button_aria_label_: "Wyszukaj",
852
- "search_field_field_aria_label_": "Pole wyszukiwania",
852
+ "query_input_field_aria_label_": "Pole wyszukiwania",
853
853
  "previous_searches_delete_entry_from_history_": "Usuń zapytanie z historii"
854
854
  };
855
855
 
@@ -922,7 +922,7 @@ const $c62c6ac8a38bed4c$export$b3b5aa2c4df8976f = {
922
922
  "clear_filters_query_sorting_after_submit_": "Limpar consulta. Limpar a sele\xe7\xe3o e os filtros depois do pr\xf3ximo envio.",
923
923
  "placeholder_text_": "Pesquisa",
924
924
  search_submit_button_aria_label_: "Pesquisa",
925
- "search_field_field_aria_label_": "Campo de consulta de pesquisa",
925
+ "query_input_field_aria_label_": "Campo de consulta de pesquisa",
926
926
  "previous_searches_delete_entry_from_history_": "Remover consultas do hist\xf3rico"
927
927
  };
928
928
 
@@ -1006,7 +1006,7 @@ const $2fc92e29bfc8e851$export$49b8f20513f0ff25 = {
1006
1006
  "clear_filters_query_sorting_after_submit_": "Borrar consulta. Eliminar tambi\xe9n la selecci\xf3n y los filtros despu\xe9s del pr\xf3ximo env\xedo.",
1007
1007
  "placeholder_text_": "B\xfasqueda",
1008
1008
  search_submit_button_aria_label_: "B\xfasqueda",
1009
- "search_field_field_aria_label_": "Campo de consulta de b\xfasqueda",
1009
+ "query_input_field_aria_label_": "Campo de consulta de b\xfasqueda",
1010
1010
  "previous_searches_delete_entry_from_history_": "Eliminar consulta del historial"
1011
1011
  };
1012
1012
 
@@ -1074,7 +1074,7 @@ const $e6136be0f36561ba$export$596caee559c76764 = {
1074
1074
  "modal_discover_more_": "Utforska mer",
1075
1075
  "placeholder_text_": "S\xf6k",
1076
1076
  search_submit_button_aria_label_: "S\xf6k",
1077
- search_field_field_aria_label_: "S\xf6kf\xe4lt",
1077
+ query_input_field_aria_label_: "S\xf6kf\xe4lt",
1078
1078
  previous_searches_delete_entry_from_history_: "Ta bort f\xf6rfr\xe5ga fr\xe5n historiken",
1079
1079
  get_showing_results_for_: (q, number_of_results)=>{
1080
1080
  return q.textContent !== "" ? [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
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",
@@ -72,7 +72,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
72
72
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
73
73
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
74
74
  /*! Depict.ai search and product listing SDK */
75
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.19";
75
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.20";
76
76
  const $d067f3a30f047b41$var$ListingContext = /*@__PURE__*/$3hooq$solidjs.createContext();
77
77
  function $d067f3a30f047b41$export$e68cff63f76bd15b(props) {
78
78
  const our_object = {};
@@ -504,22 +504,28 @@ function $76012c4468a53d1f$export$43f0fb951fcb0c54(_ref) {
504
504
  }
505
505
  });
506
506
  }
507
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
508
- function $76012c4468a53d1f$var$deep_equal(object1, object2) {
509
- const keys1 = Object.keys(object1);
510
- const keys2 = Object.keys(object2);
511
- if (keys1.length !== keys2.length) return false;
512
- for (const key of keys1) {
513
- if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore result ids that change per response
514
- const val1 = object1[key];
515
- const val2 = object2[key];
516
- const areObjects = $76012c4468a53d1f$var$is_object(val1) && $76012c4468a53d1f$var$is_object(val2);
517
- if (areObjects && !$76012c4468a53d1f$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
507
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
508
+ function $76012c4468a53d1f$var$deep_equal(obj1, obj2) {
509
+ if (obj1 === obj2) return true;
510
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
511
+ if (obj1.length !== obj2.length) return false;
512
+ return obj1.every((elem, index) => {
513
+ return $76012c4468a53d1f$var$deep_equal(elem, obj2[index]);
514
+ });
518
515
  }
519
- return true;
520
- }
521
- function $76012c4468a53d1f$var$is_object(object) {
522
- return object != null && typeof object === "object";
516
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
517
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
518
+ const keys1 = Object.keys(obj1);
519
+ const keys2 = Object.keys(obj2);
520
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
521
+ for (const key in obj1) {
522
+ if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore keys changing with every request
523
+ const isEqual = $76012c4468a53d1f$var$deep_equal(obj1[key], obj2[key]);
524
+ if (!isEqual) return false;
525
+ }
526
+ return true;
527
+ }
528
+ return false;
523
529
  }
524
530
 
525
531
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
@@ -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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.19";
10
+ export const version = "2.0.20";
11
11
  /**
12
12
  * Provider to wrap every listing (group of products) in
13
13
  * Used for example for deduplicating ResizeObservers for responsive images
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.19";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.20";
12
12
  const $5441862cd2f5e111$var$ListingContext = /*@__PURE__*/$b8hua$createContext();
13
13
  function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
14
14
  const our_object = {};
@@ -440,22 +440,28 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
440
440
  }
441
441
  });
442
442
  }
443
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
444
- function $2d7bad8684bc7f44$var$deep_equal(object1, object2) {
445
- const keys1 = Object.keys(object1);
446
- const keys2 = Object.keys(object2);
447
- if (keys1.length !== keys2.length) return false;
448
- for (const key of keys1) {
449
- if ($2d7bad8684bc7f44$var$result_ids.includes(key)) continue; // ignore result ids that change per response
450
- const val1 = object1[key];
451
- const val2 = object2[key];
452
- const areObjects = $2d7bad8684bc7f44$var$is_object(val1) && $2d7bad8684bc7f44$var$is_object(val2);
453
- if (areObjects && !$2d7bad8684bc7f44$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
443
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
444
+ function $2d7bad8684bc7f44$var$deep_equal(obj1, obj2) {
445
+ if (obj1 === obj2) return true;
446
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
447
+ if (obj1.length !== obj2.length) return false;
448
+ return obj1.every((elem, index) => {
449
+ return $2d7bad8684bc7f44$var$deep_equal(elem, obj2[index]);
450
+ });
454
451
  }
455
- return true;
456
- }
457
- function $2d7bad8684bc7f44$var$is_object(object) {
458
- return object != null && typeof object === "object";
452
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
453
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
454
+ const keys1 = Object.keys(obj1);
455
+ const keys2 = Object.keys(obj2);
456
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
457
+ for (const key in obj1) {
458
+ if ($2d7bad8684bc7f44$var$result_ids.includes(key)) continue; // ignore keys changing with every request
459
+ const isEqual = $2d7bad8684bc7f44$var$deep_equal(obj1[key], obj2[key]);
460
+ if (!isEqual) return false;
461
+ }
462
+ return true;
463
+ }
464
+ return false;
459
465
  }
460
466
 
461
467
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
@@ -66,7 +66,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
66
66
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
67
67
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
68
68
  /*! Depict.ai search and product listing SDK */
69
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.19";
69
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.20";
70
70
  const $84798aaa863a4909$var$ListingContext = /*@__PURE__*/$5vyXB$solidjs.createContext();
71
71
  function $84798aaa863a4909$export$e68cff63f76bd15b(props) {
72
72
  const our_object = {};
@@ -473,22 +473,28 @@ function $a73063cc642f3e5f$export$43f0fb951fcb0c54({
473
473
  }
474
474
  });
475
475
  }
476
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
477
- function $a73063cc642f3e5f$var$deep_equal(object1, object2) {
478
- const keys1 = Object.keys(object1);
479
- const keys2 = Object.keys(object2);
480
- if (keys1.length !== keys2.length) return false;
481
- for (const key of keys1) {
482
- if ($a73063cc642f3e5f$var$result_ids.includes(key)) continue; // ignore result ids that change per response
483
- const val1 = object1[key];
484
- const val2 = object2[key];
485
- const areObjects = $a73063cc642f3e5f$var$is_object(val1) && $a73063cc642f3e5f$var$is_object(val2);
486
- if (areObjects && !$a73063cc642f3e5f$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
476
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
477
+ function $a73063cc642f3e5f$var$deep_equal(obj1, obj2) {
478
+ if (obj1 === obj2) return true;
479
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
480
+ if (obj1.length !== obj2.length) return false;
481
+ return obj1.every((elem, index) => {
482
+ return $a73063cc642f3e5f$var$deep_equal(elem, obj2[index]);
483
+ });
487
484
  }
488
- return true;
489
- }
490
- function $a73063cc642f3e5f$var$is_object(object) {
491
- return object != null && typeof object === "object";
485
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
486
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
487
+ const keys1 = Object.keys(obj1);
488
+ const keys2 = Object.keys(obj2);
489
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
490
+ for (const key in obj1) {
491
+ if ($a73063cc642f3e5f$var$result_ids.includes(key)) continue; // ignore keys changing with every request
492
+ const isEqual = $a73063cc642f3e5f$var$deep_equal(obj1[key], obj2[key]);
493
+ if (!isEqual) return false;
494
+ }
495
+ return true;
496
+ }
497
+ return false;
492
498
  }
493
499
 
494
500
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
@@ -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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.19";
10
+ export const version = "2.0.20";
11
11
  /**
12
12
  * Provider to wrap every listing (group of products) in
13
13
  * Used for example for deduplicating ResizeObservers for responsive images
@@ -5,7 +5,7 @@ import { createSignal as $i7OB2$createSignal, getOwner as $i7OB2$getOwner, creat
5
5
  /*! Depict.ai search and product listing SDK */
6
6
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
7
7
  register_es_version("ui", "latest");
8
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.19";
8
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.20";
9
9
  const $011607bdf658f807$var$ListingContext = /*@__PURE__*/$i7OB2$createContext();
10
10
  function $011607bdf658f807$export$e68cff63f76bd15b(props) {
11
11
  const our_object = {};
@@ -412,22 +412,28 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({
412
412
  }
413
413
  });
414
414
  }
415
- // Source: https://dmitripavlutin.com/how-to-compare-objects-in-javascript/
416
- function $29ec7cddbe1d3484$var$deep_equal(object1, object2) {
417
- const keys1 = Object.keys(object1);
418
- const keys2 = Object.keys(object2);
419
- if (keys1.length !== keys2.length) return false;
420
- for (const key of keys1) {
421
- if ($29ec7cddbe1d3484$var$result_ids.includes(key)) continue; // ignore result ids that change per response
422
- const val1 = object1[key];
423
- const val2 = object2[key];
424
- const areObjects = $29ec7cddbe1d3484$var$is_object(val1) && $29ec7cddbe1d3484$var$is_object(val2);
425
- if (areObjects && !$29ec7cddbe1d3484$var$deep_equal(val1, val2) || !areObjects && val1 !== val2) return false;
415
+ // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
416
+ function $29ec7cddbe1d3484$var$deep_equal(obj1, obj2) {
417
+ if (obj1 === obj2) return true;
418
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
419
+ if (obj1.length !== obj2.length) return false;
420
+ return obj1.every((elem, index) => {
421
+ return $29ec7cddbe1d3484$var$deep_equal(elem, obj2[index]);
422
+ });
426
423
  }
427
- return true;
428
- }
429
- function $29ec7cddbe1d3484$var$is_object(object) {
430
- return object != null && typeof object === "object";
424
+ if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
425
+ if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
426
+ const keys1 = Object.keys(obj1);
427
+ const keys2 = Object.keys(obj2);
428
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
429
+ for (const key in obj1) {
430
+ if ($29ec7cddbe1d3484$var$result_ids.includes(key)) continue; // ignore keys changing with every request
431
+ const isEqual = $29ec7cddbe1d3484$var$deep_equal(obj1[key], obj2[key]);
432
+ if (!isEqual) return false;
433
+ }
434
+ return true;
435
+ }
436
+ return false;
431
437
  }
432
438
 
433
439
  // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages