@scayle/storefront-nuxt 7.85.16 → 7.87.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,27 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.87.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added export entry for "./composables".
|
|
8
|
+
|
|
9
|
+
Composables can now be directly imported using:
|
|
10
|
+
|
|
11
|
+
`import { useCurrentShop } from '@scayle/storefront-nuxt/composables';`
|
|
12
|
+
|
|
13
|
+
## 7.86.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- Add `formatPercentage` to `useFormatHelpers.ts`
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
**Dependencies**
|
|
22
|
+
|
|
23
|
+
- Updated dependency to @scayle/storefront-core@7.65.9
|
|
24
|
+
|
|
3
25
|
## 7.85.16
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -10,5 +10,11 @@ type FormatCurrencyOptions = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare function useFormatHelpers(): {
|
|
12
12
|
formatCurrency: (value: number, options?: FormatCurrencyOptions) => string;
|
|
13
|
+
formatPercentage: (value: number, options?: {
|
|
14
|
+
locale?: string;
|
|
15
|
+
minimumFractionDigits?: number;
|
|
16
|
+
maximumFractionDigits?: number;
|
|
17
|
+
signDisplay?: Intl.NumberFormatOptions["signDisplay"];
|
|
18
|
+
}) => string;
|
|
13
19
|
};
|
|
14
20
|
export {};
|
|
@@ -19,7 +19,19 @@ export function useFormatHelpers() {
|
|
|
19
19
|
currency
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
+
const formatPercentage = (value, options) => {
|
|
23
|
+
const locale = options?.locale ?? currentShop.value.locale;
|
|
24
|
+
const minimumFractionDigits = options?.minimumFractionDigits ?? 0;
|
|
25
|
+
const maximumFractionDigits = options?.maximumFractionDigits ?? 2;
|
|
26
|
+
return value.toLocaleString(locale, {
|
|
27
|
+
style: "percent",
|
|
28
|
+
minimumFractionDigits,
|
|
29
|
+
maximumFractionDigits,
|
|
30
|
+
signDisplay: options?.signDisplay
|
|
31
|
+
});
|
|
32
|
+
};
|
|
22
33
|
return {
|
|
23
|
-
formatCurrency
|
|
34
|
+
formatCurrency,
|
|
35
|
+
formatPercentage
|
|
24
36
|
};
|
|
25
37
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.87.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"require": "./dist/module.cjs",
|
|
26
26
|
"import": "./dist/module.mjs"
|
|
27
27
|
},
|
|
28
|
+
"./composables": {
|
|
29
|
+
"types": "./dist/runtime/composables/index.d.ts",
|
|
30
|
+
"import": "./dist/runtime/composables/index.js"
|
|
31
|
+
},
|
|
28
32
|
".": {
|
|
29
33
|
"types": "./dist/index.d.ts",
|
|
30
34
|
"default": "./dist/index.mjs"
|
|
@@ -61,7 +65,7 @@
|
|
|
61
65
|
"@nuxt/kit": "^3.12.2",
|
|
62
66
|
"@opentelemetry/api": "^1.9.0",
|
|
63
67
|
"@scayle/h3-session": "^0.4.1",
|
|
64
|
-
"@scayle/storefront-core": "7.65.
|
|
68
|
+
"@scayle/storefront-core": "7.65.9",
|
|
65
69
|
"@scayle/unstorage-compression-driver": "^0.1.4",
|
|
66
70
|
"@vueuse/core": "11.1.0",
|
|
67
71
|
"consola": "^3.2.3",
|
|
@@ -82,19 +86,19 @@
|
|
|
82
86
|
"@nuxt/eslint": "0.6.0",
|
|
83
87
|
"@nuxt/module-builder": "0.8.4",
|
|
84
88
|
"@nuxt/schema": "3.13.2",
|
|
85
|
-
"@nuxt/test-utils": "3.14.
|
|
89
|
+
"@nuxt/test-utils": "3.14.4",
|
|
86
90
|
"@scayle/eslint-config-storefront": "4.3.2",
|
|
87
91
|
"@scayle/eslint-plugin-vue-composable": "0.2.1",
|
|
88
|
-
"@types/node": "20.
|
|
89
|
-
"dprint": "0.47.
|
|
90
|
-
"eslint": "9.
|
|
92
|
+
"@types/node": "20.17.0",
|
|
93
|
+
"dprint": "0.47.4",
|
|
94
|
+
"eslint": "9.13.0",
|
|
91
95
|
"eslint-formatter-gitlab": "5.1.0",
|
|
92
96
|
"fishery": "2.2.2",
|
|
93
97
|
"h3": "1.13.0",
|
|
94
98
|
"node-mocks-http": "1.16.1",
|
|
95
|
-
"nuxi": "3.
|
|
99
|
+
"nuxi": "3.15.0",
|
|
96
100
|
"nuxt": "3.13.2",
|
|
97
|
-
"publint": "0.2.
|
|
101
|
+
"publint": "0.2.12",
|
|
98
102
|
"vitest": "2.1.3",
|
|
99
103
|
"vue-tsc": "2.1.6"
|
|
100
104
|
},
|