@scayle/storefront-nuxt 8.39.1 → 8.41.0
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 8.41.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
**Dependencies**
|
|
8
|
+
|
|
9
|
+
**@scayle/storefront-core v8.41.0**
|
|
10
|
+
|
|
11
|
+
- Minor
|
|
12
|
+
- Introduce a new `updatePromotions` RPC method to wrap the Storefront API "Bulk update promotions" endpoint.
|
|
13
|
+
This allows to update all promotions applied to basket's items in a single API call.
|
|
14
|
+
For more details, see the [Storefront API documentation](https://scayle.dev/en/api-guides/storefront-api/resources/baskets/bulk-update-promotions).
|
|
15
|
+
|
|
16
|
+
## 8.40.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- Deprecated `relativeReductions` in `useProductPrice` in favor of `appliedReductions`.
|
|
21
|
+
|
|
22
|
+
Previously, `relativeReductions` did not return absolute reductions in the correct format.
|
|
23
|
+
The new `appliedReductions` property returns all reductions as raw values, leaving formatting responsibilities to the component.
|
|
24
|
+
|
|
25
|
+
Before:
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<template>
|
|
29
|
+
<span v-for="({ value, category }, index) in relativeReductions">
|
|
30
|
+
-{{ value }}%
|
|
31
|
+
</span>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
const { relativeReductions } = useProductPrice(price);
|
|
36
|
+
</script>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After:
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<template>
|
|
43
|
+
<span v-for="({ amount, category, type }, index) in appliedReductions">
|
|
44
|
+
-{{ type === 'relative' ? `${formatPercentage(amount.relative)}` :
|
|
45
|
+
`${formatCurrency(amount.absoluteWithTax)}` }}
|
|
46
|
+
</span>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup lang="ts">
|
|
50
|
+
const { appliedReductions } = useProductPrice(price);
|
|
51
|
+
</script>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependency `@vueuse/core@13.6.0` to `@vueuse/core@13.7.0`
|
|
57
|
+
|
|
58
|
+
**Dependencies**
|
|
59
|
+
|
|
60
|
+
- Updated dependency to @scayle/unstorage-compression-driver@1.0.1
|
|
61
|
+
|
|
62
|
+
**@scayle/storefront-core v8.40.0**
|
|
63
|
+
|
|
64
|
+
- No changes in this release.
|
|
65
|
+
|
|
3
66
|
## 8.39.1
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.41.0",
|
|
4
4
|
"configKey": "storefront",
|
|
5
5
|
"compatibility": {
|
|
6
6
|
"nuxt": "^3.9.0"
|
|
7
7
|
},
|
|
8
8
|
"builder": {
|
|
9
9
|
"@nuxt/module-builder": "1.0.2",
|
|
10
|
-
"unbuild": "3.6.
|
|
10
|
+
"unbuild": "3.6.1"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -12,6 +12,7 @@ export interface UseProductPriceReturn {
|
|
|
12
12
|
/** Strike through prices, calculated by adding the reduction prices to the original price. */
|
|
13
13
|
strikeThroughPrices: ComputedRef<CentAmount[]>;
|
|
14
14
|
/** Reductions representing the relative amount and their respective categories. */
|
|
15
|
+
/** @deprecated Use {@link appliedReductions} instead. */
|
|
15
16
|
relativeReductions: ComputedRef<RelativeReductions[]>;
|
|
16
17
|
/** Total price with tax. */
|
|
17
18
|
totalPrice: ComputedRef<CentAmount>;
|
|
@@ -10,9 +10,9 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
10
10
|
if (envContext) {
|
|
11
11
|
Object.assign(event.context, envContext);
|
|
12
12
|
}
|
|
13
|
-
event.context.$fetchWithContext = (req, init) => fetchWithEvent(event, req, init, {
|
|
13
|
+
event.context.$fetchWithContext = ((req, init) => fetchWithEvent(event, req, init, {
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
15
|
fetch: $fetch
|
|
16
|
-
});
|
|
16
|
+
}));
|
|
17
17
|
});
|
|
18
18
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.41.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@opentelemetry/api": "^1.9.0",
|
|
76
76
|
"@scayle/h3-session": "0.6.1",
|
|
77
77
|
"@vercel/nft": "0.30.0",
|
|
78
|
-
"@vueuse/core": "13.
|
|
78
|
+
"@vueuse/core": "13.7.0",
|
|
79
79
|
"consola": "^3.2.3",
|
|
80
80
|
"core-js": "^3.37.1",
|
|
81
81
|
"defu": "^6.1.4",
|
|
@@ -90,23 +90,23 @@
|
|
|
90
90
|
"utility-types": "^3.11.0",
|
|
91
91
|
"vue-router": "^4.4.0",
|
|
92
92
|
"zod": "^4.0.0",
|
|
93
|
-
"@scayle/storefront-core": "8.
|
|
93
|
+
"@scayle/storefront-core": "8.41.0",
|
|
94
94
|
"@scayle/unstorage-compression-driver": "1.0.1"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@arethetypeswrong/cli": "0.18.2",
|
|
98
98
|
"@eslint/eslintrc": "3.3.1",
|
|
99
|
-
"@nuxt/eslint": "1.
|
|
100
|
-
"@nuxt/eslint-config": "1.
|
|
99
|
+
"@nuxt/eslint": "1.9.0",
|
|
100
|
+
"@nuxt/eslint-config": "1.9.0",
|
|
101
101
|
"@nuxt/kit": "3.17.7",
|
|
102
102
|
"@nuxt/module-builder": "1.0.2",
|
|
103
103
|
"@nuxt/schema": "3.17.7",
|
|
104
104
|
"@nuxt/test-utils": "3.19.2",
|
|
105
|
-
"@types/node": "22.17.
|
|
105
|
+
"@types/node": "22.17.2",
|
|
106
106
|
"@vitest/coverage-v8": "3.2.4",
|
|
107
107
|
"dprint": "0.50.1",
|
|
108
108
|
"eslint-formatter-gitlab": "6.0.1",
|
|
109
|
-
"eslint": "9.
|
|
109
|
+
"eslint": "9.33.0",
|
|
110
110
|
"fishery": "2.3.1",
|
|
111
111
|
"h3": "1.15.4",
|
|
112
112
|
"nitro-test-utils": "0.9.2",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
"nuxt": "3.17.7",
|
|
116
116
|
"publint": "0.3.12",
|
|
117
117
|
"typescript": "5.9.2",
|
|
118
|
-
"unbuild": "3.6.
|
|
118
|
+
"unbuild": "3.6.1",
|
|
119
119
|
"vitest": "3.2.4",
|
|
120
|
-
"vue-tsc": "3.0.
|
|
121
|
-
"@scayle/eslint-config-storefront": "4.7.
|
|
120
|
+
"vue-tsc": "3.0.6",
|
|
121
|
+
"@scayle/eslint-config-storefront": "4.7.5",
|
|
122
122
|
"@scayle/eslint-plugin-vue-composable": "0.2.1",
|
|
123
123
|
"@scayle/vitest-config-storefront": "1.0.0",
|
|
124
124
|
"@scayle/unstorage-scayle-kv-driver": "1.0.3"
|