@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.
- package/cjs/dist/astro/actions/custom-checkout.d.ts +1 -3
- package/cjs/dist/astro/actions/custom-checkout.js +8 -4
- package/cjs/dist/astro/actions/index.js +17 -1
- package/cjs/dist/data-component-tags.js +5 -2
- package/cjs/dist/enums/index.js +18 -2
- package/cjs/dist/enums/social-platform-enums.js +7 -4
- package/cjs/dist/enums/sort-enums.js +6 -3
- package/cjs/dist/react/Category.js +64 -25
- package/cjs/dist/react/CategoryList.js +55 -14
- package/cjs/dist/react/Choice.js +32 -25
- package/cjs/dist/react/Option.js +68 -29
- package/cjs/dist/react/Product.js +194 -155
- package/cjs/dist/react/ProductList.js +84 -45
- package/cjs/dist/react/core/CategoryList.js +26 -16
- package/cjs/dist/react/core/Product.js +30 -20
- package/cjs/dist/react/core/ProductList.js +29 -21
- package/cjs/dist/react/core/ProductListFilters.js +30 -22
- package/cjs/dist/react/core/ProductListPagination.js +7 -4
- package/cjs/dist/react/core/ProductListSort.js +11 -6
- package/cjs/dist/react/core/ProductModifiers.js +25 -18
- package/cjs/dist/react/core/ProductVariantSelector.js +27 -22
- package/cjs/dist/react/core/SelectedVariant.js +28 -21
- package/cjs/dist/react/index.js +42 -6
- package/cjs/dist/react/types.js +5 -2
- package/cjs/dist/server-actions/custom-checkout-action.js +11 -8
- package/cjs/dist/server-actions/index.js +17 -1
- package/cjs/dist/services/buy-now-service.js +20 -15
- package/cjs/dist/services/categories-list-service.js +12 -8
- package/cjs/dist/services/index.js +25 -5
- package/cjs/dist/services/pay-now-service.js +16 -11
- package/cjs/dist/services/product-modifiers-service.js +16 -12
- package/cjs/dist/services/product-service.js +16 -12
- package/cjs/dist/services/products-list-search-service.d.ts +0 -1
- package/cjs/dist/services/products-list-search-service.js +1 -1
- package/cjs/dist/services/products-list-service.js +66 -59
- package/cjs/dist/services/selected-variant-service.js +21 -18
- package/cjs/dist/utils/index.js +9 -6
- package/cjs/dist/utils/url-params.js +5 -1
- package/dist/astro/actions/custom-checkout.d.ts +1 -3
- package/dist/react/core/ProductModifiers.js +0 -1
- package/dist/react/core/ProductVariantSelector.js +0 -3
- 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
|
-
|
|
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) =>
|
|
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.
|
|
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.
|
|
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.
|
|
66
|
-
"@wix/headless-media": "0.0.
|
|
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.
|
|
72
|
-
"@wix/stores": "^1.0.
|
|
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": "
|
|
87
|
+
"falconPackageHash": "7df2eaffbf54fe0f8aa536fe82588f7571a6028a3072e4f66e16c1b3"
|
|
88
88
|
}
|