@wix/headless-stores 0.0.110 → 0.0.112

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 (42) hide show
  1. package/cjs/dist/astro/actions/custom-checkout.d.ts +1 -3
  2. package/cjs/dist/astro/actions/custom-checkout.js +8 -4
  3. package/cjs/dist/astro/actions/index.js +17 -1
  4. package/cjs/dist/data-component-tags.js +5 -2
  5. package/cjs/dist/enums/index.js +18 -2
  6. package/cjs/dist/enums/social-platform-enums.js +7 -4
  7. package/cjs/dist/enums/sort-enums.js +6 -3
  8. package/cjs/dist/react/Category.js +64 -25
  9. package/cjs/dist/react/CategoryList.js +55 -14
  10. package/cjs/dist/react/Choice.js +32 -25
  11. package/cjs/dist/react/Option.js +68 -29
  12. package/cjs/dist/react/Product.js +194 -155
  13. package/cjs/dist/react/ProductList.js +84 -45
  14. package/cjs/dist/react/core/CategoryList.js +26 -16
  15. package/cjs/dist/react/core/Product.js +30 -20
  16. package/cjs/dist/react/core/ProductList.js +29 -21
  17. package/cjs/dist/react/core/ProductListFilters.js +30 -22
  18. package/cjs/dist/react/core/ProductListPagination.js +7 -4
  19. package/cjs/dist/react/core/ProductListSort.js +11 -6
  20. package/cjs/dist/react/core/ProductModifiers.js +25 -18
  21. package/cjs/dist/react/core/ProductVariantSelector.js +27 -22
  22. package/cjs/dist/react/core/SelectedVariant.js +28 -21
  23. package/cjs/dist/react/index.js +42 -6
  24. package/cjs/dist/react/types.js +5 -2
  25. package/cjs/dist/server-actions/custom-checkout-action.js +11 -8
  26. package/cjs/dist/server-actions/index.js +17 -1
  27. package/cjs/dist/services/buy-now-service.js +20 -15
  28. package/cjs/dist/services/categories-list-service.js +12 -8
  29. package/cjs/dist/services/index.js +25 -5
  30. package/cjs/dist/services/pay-now-service.js +16 -11
  31. package/cjs/dist/services/product-modifiers-service.js +16 -12
  32. package/cjs/dist/services/product-service.js +16 -12
  33. package/cjs/dist/services/products-list-search-service.d.ts +0 -1
  34. package/cjs/dist/services/products-list-search-service.js +1 -1
  35. package/cjs/dist/services/products-list-service.js +66 -59
  36. package/cjs/dist/services/selected-variant-service.js +21 -18
  37. package/cjs/dist/utils/index.js +9 -6
  38. package/cjs/dist/utils/url-params.js +5 -1
  39. package/dist/astro/actions/custom-checkout.d.ts +1 -3
  40. package/dist/react/core/ProductModifiers.js +0 -1
  41. package/dist/react/core/ProductVariantSelector.js +0 -3
  42. package/package.json +7 -7
@@ -1,10 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.URLParamsUtils = void 0;
1
4
  /**
2
5
  * Utility class for managing URL parameters in web applications.
3
6
  * Provides methods to parse, update, and retrieve URL search parameters with support for multiple values.
4
7
  *
5
8
  * @class URLParamsUtils
6
9
  */
7
- export class URLParamsUtils {
10
+ class URLParamsUtils {
8
11
  /**
9
12
  * Parses URLSearchParams into a more convenient format that supports multiple values for the same key.
10
13
  * Converts multiple parameters with the same key into an array.
@@ -112,3 +115,4 @@ export class URLParamsUtils {
112
115
  return this.parseSearchParams(new URLSearchParams(window.location.search));
113
116
  }
114
117
  }
118
+ exports.URLParamsUtils = URLParamsUtils;
@@ -45,6 +45,4 @@ import { type CustomLineItemCheckoutOptions } from '../../server-actions/index.j
45
45
  * @see {@link https://docs.astro.build/en/guides/actions/} Astro Actions Documentation
46
46
  * @see {@link https://dev.wix.com/docs/sdk/headless/api-reference/stores/checkout} Wix Stores Checkout API
47
47
  */
48
- export declare const customCheckoutActionFactory: (factoryOpts: CustomLineItemCheckoutOptions) => ((input?: any) => Promise<import("astro:actions").SafeResult<never, string>>) & {
49
- orThrow: (input?: any) => Promise<string>;
50
- } & string;
48
+ export declare const customCheckoutActionFactory: (factoryOpts: CustomLineItemCheckoutOptions) => any;
@@ -208,7 +208,6 @@ export function Modifier(props) {
208
208
  const modifiersService = useModifiersService();
209
209
  const { modifier } = props;
210
210
  const name = modifier.name || '';
211
- // @ts-expect-error - This field is currently INTERNAL but will be public in the future
212
211
  const key = modifier.key || name;
213
212
  const type = modifier.modifierRenderType;
214
213
  const mandatory = modifier.mandatory || false;
@@ -122,7 +122,6 @@ export function Option(props) {
122
122
  const selectedChoices = variantService.selectedChoices.get();
123
123
  const { option } = props;
124
124
  const name = option.name || '';
125
- // @ts-expect-error - This field is currently INTERNAL but will be public in the future
126
125
  const key = option.key || name;
127
126
  const choices = option.choicesSettings?.choices || [];
128
127
  const selectedValue = selectedChoices[name] || null;
@@ -165,10 +164,8 @@ export function Choice(props) {
165
164
  const selectedChoices = variantService.selectedChoices.get();
166
165
  const { option, choice } = props;
167
166
  const optionName = option.name || '';
168
- // @ts-expect-error - This field is currently INTERNAL but will be public in the future
169
167
  const optionKey = option.key || optionName;
170
168
  const choiceValue = choice.name || '';
171
- // @ts-expect-error - This field is currently INTERNAL but will be public in the future
172
169
  const choiceKey = choice.key || choiceValue;
173
170
  const isSelected = selectedChoices[optionKey] === choiceKey;
174
171
  // Check if this choice is available based on current selections
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-stores",
3
- "version": "0.0.110",
3
+ "version": "0.0.112",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -50,7 +50,7 @@
50
50
  "@vitest/ui": "^3.1.4",
51
51
  "@wix/categories": "^1.0.133",
52
52
  "@wix/headless-components": "0.0.0",
53
- "@wix/stores": "^1.0.606",
53
+ "@wix/stores": "^1.0.650",
54
54
  "jsdom": "^26.1.0",
55
55
  "prettier": "^3.4.2",
56
56
  "typescript": "^5.8.3",
@@ -62,14 +62,14 @@
62
62
  "@wix/auto_sdk_categories_categories": "^1.0.62",
63
63
  "@wix/ecom": "^1.0.1560",
64
64
  "@wix/essentials": "^0.1.24",
65
- "@wix/headless-ecom": "0.0.40",
66
- "@wix/headless-media": "0.0.20",
65
+ "@wix/headless-ecom": "0.0.41",
66
+ "@wix/headless-media": "0.0.21",
67
67
  "@wix/headless-utils": "0.0.8",
68
68
  "@wix/redirects": "^1.0.83",
69
69
  "@wix/services-definitions": "^1.0.1",
70
70
  "@wix/services-manager-react": "^1.0.3",
71
- "@wix/site": "^1.37.0",
72
- "@wix/stores": "^1.0.606"
71
+ "@wix/site": "^1.40.0",
72
+ "@wix/stores": "^1.0.650"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@wix/headless-components": "^0.0.0"
@@ -84,5 +84,5 @@
84
84
  "groupId": "com.wixpress.headless-components"
85
85
  }
86
86
  },
87
- "falconPackageHash": "e79814227d4cd34b0668b23e7546816fe87356b9f32a12275b686ca0"
87
+ "falconPackageHash": "7df2eaffbf54fe0f8aa536fe82588f7571a6028a3072e4f66e16c1b3"
88
88
  }