@wix/stores 1.0.979 → 1.0.981

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.
Files changed (66) hide show
  1. package/build/cjs/context-category-by-id.d.ts +5 -1
  2. package/build/cjs/context-category-by-id.js +2 -2
  3. package/build/cjs/context-category-by-id.js.map +1 -1
  4. package/build/cjs/context-category-by-slug.d.ts +4 -0
  5. package/build/cjs/context-category-by-slug.js +596 -508
  6. package/build/cjs/context-category-by-slug.js.map +1 -1
  7. package/build/cjs/context-category-info.js +1 -1
  8. package/build/cjs/context-category-info.js.map +1 -1
  9. package/build/cjs/context-product-by-id.d.ts +5 -0
  10. package/build/cjs/context-product-by-id.js +3 -3
  11. package/build/cjs/context-product-by-id.js.map +1 -1
  12. package/build/cjs/context-product-by-slug.d.ts +5 -0
  13. package/build/cjs/context-product-by-slug.js +2 -2
  14. package/build/cjs/context-product-by-slug.js.map +1 -1
  15. package/build/cjs/context-product-item.d.ts +5 -0
  16. package/build/cjs/context-product-item.js +1 -1
  17. package/build/cjs/context-product-item.js.map +1 -1
  18. package/build/cjs/context-product-list.d.ts +4 -0
  19. package/build/cjs/context-product.d.ts +21 -0
  20. package/build/es/context-category-by-id.d.mts +5 -1
  21. package/build/es/context-category-by-id.mjs +2 -2
  22. package/build/es/context-category-by-id.mjs.map +1 -1
  23. package/build/es/context-category-by-slug.d.mts +4 -0
  24. package/build/es/context-category-by-slug.mjs +596 -508
  25. package/build/es/context-category-by-slug.mjs.map +1 -1
  26. package/build/es/context-category-info.mjs +1 -1
  27. package/build/es/context-category-info.mjs.map +1 -1
  28. package/build/es/context-product-by-id.d.mts +5 -0
  29. package/build/es/context-product-by-id.mjs +3 -3
  30. package/build/es/context-product-by-id.mjs.map +1 -1
  31. package/build/es/context-product-by-slug.d.mts +5 -0
  32. package/build/es/context-product-by-slug.mjs +2 -2
  33. package/build/es/context-product-by-slug.mjs.map +1 -1
  34. package/build/es/context-product-item.d.mts +5 -0
  35. package/build/es/context-product-item.mjs +1 -1
  36. package/build/es/context-product-item.mjs.map +1 -1
  37. package/build/es/context-product-list.d.mts +4 -0
  38. package/build/es/context-product.d.mts +21 -0
  39. package/build/internal/cjs/context-category-by-id.d.ts +5 -1
  40. package/build/internal/cjs/context-category-by-slug.d.ts +4 -0
  41. package/build/internal/cjs/context-product-by-id.d.ts +5 -0
  42. package/build/internal/cjs/context-product-by-slug.d.ts +5 -0
  43. package/build/internal/cjs/context-product-item.d.ts +5 -0
  44. package/build/internal/cjs/context-product-list.d.ts +4 -0
  45. package/build/internal/cjs/context-product.d.ts +21 -0
  46. package/build/internal/es/context-category-by-id.d.mts +5 -1
  47. package/build/internal/es/context-category-by-slug.d.mts +4 -0
  48. package/build/internal/es/context-product-by-id.d.mts +5 -0
  49. package/build/internal/es/context-product-by-slug.d.mts +5 -0
  50. package/build/internal/es/context-product-item.d.mts +5 -0
  51. package/build/internal/es/context-product-list.d.mts +4 -0
  52. package/build/internal/es/context-product.d.mts +21 -0
  53. package/context-runtime/context-category-by-id/runtime.d.ts +5 -1
  54. package/context-runtime/context-category-by-id/runtime.js +2 -2
  55. package/context-runtime/context-category-by-slug/runtime.d.ts +4 -0
  56. package/context-runtime/context-category-by-slug/runtime.js +2 -2
  57. package/context-runtime/context-category-info/runtime.js +2 -2
  58. package/context-runtime/context-product/runtime.d.ts +21 -0
  59. package/context-runtime/context-product-by-id/runtime.d.ts +5 -0
  60. package/context-runtime/context-product-by-id/runtime.js +2 -2
  61. package/context-runtime/context-product-by-slug/runtime.d.ts +5 -0
  62. package/context-runtime/context-product-by-slug/runtime.js +2 -2
  63. package/context-runtime/context-product-item/runtime.d.ts +5 -0
  64. package/context-runtime/context-product-item/runtime.js +2 -2
  65. package/context-runtime/context-product-list/runtime.d.ts +4 -0
  66. package/package.json +2 -2
@@ -3946,6 +3946,9 @@ interface ProductPriceRange {
3946
3946
  minCompareAtPrice?: number;
3947
3947
  maxCompareAtPrice?: number;
3948
3948
  }
3949
+ interface ProductExtendedFields {
3950
+ namespaces: Record<string, Record<string, unknown>>;
3951
+ }
3949
3952
  interface Product {
3950
3953
  id: string;
3951
3954
  slug?: string;
@@ -3969,6 +3972,7 @@ interface Product {
3969
3972
  inventory: ProductInventory;
3970
3973
  discountRuleNames?: DiscountInfo['discountRuleNames'];
3971
3974
  productGroupId?: string;
3975
+ extendedFields: ProductExtendedFields;
3972
3976
  }
3973
3977
  //#endregion
3974
3978
  //#region src/extensions/product/providers/selectors/validate-user-input/validate-user-input.d.ts
@@ -4216,6 +4220,7 @@ declare function useStandaloneProductContextValue({
4216
4220
  discountRules: {
4217
4221
  name: string;
4218
4222
  }[] | undefined;
4223
+ extendedFields: ProductExtendedFields;
4219
4224
  };
4220
4225
  //#endregion
4221
4226
  //#region src/extensions/product/providers/product-by-id-context/product-by-id-context-provider.d.ts
@@ -1555,7 +1555,7 @@ var Ci = { nodes: [] };
1555
1555
  var wi = `@stores/product-groups`;
1556
1556
  function Ti(e2) {
1557
1557
  let t2 = hi(e2.options ?? []), n2 = _i(e2.modifiers ?? []), r2 = ki(e2.subscriptionDetails?.subscriptions ?? []), i2 = vi(e2.variantsInfo?.variants ?? []), a2 = { subscriptions: r2, allowOneTimePurchases: e2.subscriptionDetails?.allowOneTimePurchases ?? false }, o2 = e2.additionalRibbons ?? [], s2 = { primary: e2.ribbon?.name ?? void 0, additional: o2.map((e3) => e3.name ?? void 0).filter((e3) => !!e3) }, c2 = e2.description ? Ai(e2.description) : Ci, l2 = e2.discountInfo?.discountRuleNames, u2 = Di(e2);
1558
- return { id: e2._id, slug: e2.slug ?? void 0, url: e2.url ? { href: e2.url } : void 0, name: e2.name, description: c2, media: zi(e2), mainMedia: Ri(e2.media?.main), ribbons: s2, breadcrumbs: ji(e2), mainCategoryId: e2.mainCategoryId ?? void 0, categories: Mi(e2), infoSections: Ei(e2), currency: e2.currency, options: t2, modifiers: n2, variants: i2, minPriceVariant: Ii(e2), priceRange: Li(e2), subscriptionDetails: a2, inventory: { availabilityStatus: e2.inventory?.availabilityStatus, preorderAvailability: e2.inventory?.preorderAvailability }, discountRuleNames: l2, productGroupId: u2 };
1558
+ return { id: e2._id, slug: e2.slug ?? void 0, url: e2.url ? { href: e2.url } : void 0, name: e2.name, description: c2, media: zi(e2), mainMedia: Ri(e2.media?.main), ribbons: s2, breadcrumbs: ji(e2), mainCategoryId: e2.mainCategoryId ?? void 0, categories: Mi(e2), infoSections: Ei(e2), currency: e2.currency, options: t2, modifiers: n2, variants: i2, minPriceVariant: Ii(e2), priceRange: Li(e2), subscriptionDetails: a2, inventory: { availabilityStatus: e2.inventory?.availabilityStatus, preorderAvailability: e2.inventory?.preorderAvailability }, discountRuleNames: l2, productGroupId: u2, extendedFields: { namespaces: e2.extendedFields?.namespaces ?? {} } };
1559
1559
  }
1560
1560
  function Ei(e2) {
1561
1561
  return (e2.infoSections ?? []).map((e3) => ({ _id: e3.uniqueName ?? e3._id, name: e3.title, body: e3.description ? Ai(e3.description) : void 0 }));
@@ -3041,7 +3041,7 @@ function Mc(e2, r2) {
3041
3041
  return n(() => ({ handleNotifyMe: i2 }), [i2]);
3042
3042
  }
3043
3043
  function Nc(e2, t2) {
3044
- return n(() => ({ id: e2.id, name: e2.name, description: e2.description, ribbons: e2.ribbons, breadcrumbs: e2.breadcrumbs, mainCategoryId: e2.mainCategoryId, categories: e2.categories, infoSections: e2.infoSections, sku: t2?.sku, discountRules: e2.discountRuleNames?.map((e3) => ({ name: e3 })) }), [e2, t2]);
3044
+ return n(() => ({ id: e2.id, name: e2.name, description: e2.description, ribbons: e2.ribbons, breadcrumbs: e2.breadcrumbs, mainCategoryId: e2.mainCategoryId, categories: e2.categories, infoSections: e2.infoSections, sku: t2?.sku, discountRules: e2.discountRuleNames?.map((e3) => ({ name: e3 })), extendedFields: e2.extendedFields }), [e2, t2]);
3045
3045
  }
3046
3046
  function Pc(e2) {
3047
3047
  return { type: `image`, src: e2.url, width: e2.width, height: e2.height, ...e2.name === void 0 ? {} : { title: e2.name }, ...e2.alt === void 0 ? {} : { parameters: { alt: e2.alt } } };
@@ -3423,7 +3423,7 @@ function Yl({ productId: e2, children: t2 }) {
3423
3423
  return c(Il, { productPromise: n2, source: ql.PRODUCT_BY_ID, children: t2 });
3424
3424
  }
3425
3425
  function Xl({ productId: e2, children: t2 }) {
3426
- return e2 ? c(Yl, { productId: e2, children: t2 }, e2) : null;
3426
+ return e2 ? c(Yl, { productId: e2, children: t2 }, e2) : t2;
3427
3427
  }
3428
3428
  var Zl = Dn(`213f32a8-6f88-4024-a54b-f1264433e878`);
3429
3429
  export {