@akinon/projectzero 1.69.0 → 1.70.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 +2 -0
- package/app-template/CHANGELOG.md +25 -0
- package/app-template/package.json +18 -18
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/profile/page.tsx +1 -0
- package/app-template/src/components/input.tsx +19 -7
- package/app-template/src/components/price.tsx +3 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.70.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f046f8e: ZERO-2575: update version for react-number-format
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [f046f8e]
|
|
12
|
+
- @akinon/next@1.70.0
|
|
13
|
+
- @akinon/pz-akifast@1.70.0
|
|
14
|
+
- @akinon/pz-b2b@1.70.0
|
|
15
|
+
- @akinon/pz-basket-gift-pack@1.70.0
|
|
16
|
+
- @akinon/pz-bkm@1.70.0
|
|
17
|
+
- @akinon/pz-checkout-gift-pack@1.70.0
|
|
18
|
+
- @akinon/pz-click-collect@1.70.0
|
|
19
|
+
- @akinon/pz-credit-payment@1.70.0
|
|
20
|
+
- @akinon/pz-gpay@1.70.0
|
|
21
|
+
- @akinon/pz-masterpass@1.70.0
|
|
22
|
+
- @akinon/pz-one-click-checkout@1.70.0
|
|
23
|
+
- @akinon/pz-otp@1.70.0
|
|
24
|
+
- @akinon/pz-pay-on-delivery@1.70.0
|
|
25
|
+
- @akinon/pz-saved-card@1.70.0
|
|
26
|
+
- @akinon/pz-tabby-extension@1.70.0
|
|
27
|
+
|
|
3
28
|
## 1.69.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.70.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"prestart": "pz-prestart"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@akinon/next": "1.
|
|
26
|
-
"@akinon/pz-akifast": "1.
|
|
27
|
-
"@akinon/pz-b2b": "1.
|
|
28
|
-
"@akinon/pz-basket-gift-pack": "1.
|
|
29
|
-
"@akinon/pz-bkm": "1.
|
|
30
|
-
"@akinon/pz-checkout-gift-pack": "1.
|
|
31
|
-
"@akinon/pz-click-collect": "1.
|
|
32
|
-
"@akinon/pz-credit-payment": "1.
|
|
33
|
-
"@akinon/pz-gpay": "1.
|
|
34
|
-
"@akinon/pz-masterpass": "1.
|
|
35
|
-
"@akinon/pz-one-click-checkout": "1.
|
|
36
|
-
"@akinon/pz-otp": "1.
|
|
37
|
-
"@akinon/pz-pay-on-delivery": "1.
|
|
38
|
-
"@akinon/pz-saved-card": "1.
|
|
39
|
-
"@akinon/pz-tabby-extension": "1.
|
|
25
|
+
"@akinon/next": "1.70.0",
|
|
26
|
+
"@akinon/pz-akifast": "1.70.0",
|
|
27
|
+
"@akinon/pz-b2b": "1.70.0",
|
|
28
|
+
"@akinon/pz-basket-gift-pack": "1.70.0",
|
|
29
|
+
"@akinon/pz-bkm": "1.70.0",
|
|
30
|
+
"@akinon/pz-checkout-gift-pack": "1.70.0",
|
|
31
|
+
"@akinon/pz-click-collect": "1.70.0",
|
|
32
|
+
"@akinon/pz-credit-payment": "1.70.0",
|
|
33
|
+
"@akinon/pz-gpay": "1.70.0",
|
|
34
|
+
"@akinon/pz-masterpass": "1.70.0",
|
|
35
|
+
"@akinon/pz-one-click-checkout": "1.70.0",
|
|
36
|
+
"@akinon/pz-otp": "1.70.0",
|
|
37
|
+
"@akinon/pz-pay-on-delivery": "1.70.0",
|
|
38
|
+
"@akinon/pz-saved-card": "1.70.0",
|
|
39
|
+
"@akinon/pz-tabby-extension": "1.70.0",
|
|
40
40
|
"@hookform/resolvers": "2.9.0",
|
|
41
41
|
"@next/third-parties": "14.1.0",
|
|
42
42
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"yup": "0.32.11"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
63
|
+
"@akinon/eslint-plugin-projectzero": "1.70.0",
|
|
64
64
|
"@semantic-release/changelog": "6.0.2",
|
|
65
65
|
"@semantic-release/exec": "6.0.3",
|
|
66
66
|
"@semantic-release/git": "10.0.1",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"jest-css-modules-transform": "4.3.0",
|
|
88
88
|
"lint-staged": "13.1.0",
|
|
89
89
|
"prettier": "2.6.2",
|
|
90
|
-
"react-number-format": "
|
|
90
|
+
"react-number-format": "5.3.4",
|
|
91
91
|
"sass": "1.49.9",
|
|
92
92
|
"semantic-release": "19.0.5",
|
|
93
93
|
"server-only": "0.0.1",
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
-
import { forwardRef, FocusEvent, useState } from 'react';
|
|
2
|
+
import { forwardRef, FocusEvent, useState, Ref } from 'react';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
|
-
import
|
|
4
|
+
import { PatternFormat, PatternFormatProps } from 'react-number-format';
|
|
5
5
|
import { InputProps } from '@theme/components/types';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
|
|
8
|
+
const PatternFormatWithRef = forwardRef(
|
|
9
|
+
(props: PatternFormatProps, ref: Ref<HTMLInputElement>) => {
|
|
10
|
+
return <PatternFormat {...props} getInputRef={ref} />;
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
PatternFormatWithRef.displayName = 'PatternFormatWithRef';
|
|
14
|
+
|
|
8
15
|
export const Input = forwardRef<
|
|
9
16
|
HTMLInputElement,
|
|
10
17
|
InputProps &
|
|
11
18
|
Pick<
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
>
|
|
19
|
+
PatternFormatProps,
|
|
20
|
+
'mask' | 'allowEmptyFormatting' | 'onValueChange'
|
|
21
|
+
> & {
|
|
22
|
+
format?: string;
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
type?: string;
|
|
25
|
+
}
|
|
15
26
|
>((props, ref) => {
|
|
16
27
|
const [focused, setFocused] = useState(false);
|
|
17
28
|
const [hasValue, setHasValue] = useState(false);
|
|
@@ -36,6 +47,7 @@ export const Input = forwardRef<
|
|
|
36
47
|
),
|
|
37
48
|
props.className
|
|
38
49
|
);
|
|
50
|
+
|
|
39
51
|
const inputProps: any = {
|
|
40
52
|
id,
|
|
41
53
|
ref,
|
|
@@ -78,14 +90,14 @@ export const Input = forwardRef<
|
|
|
78
90
|
<Controller
|
|
79
91
|
name={props.name ?? ''}
|
|
80
92
|
control={props.control}
|
|
81
|
-
defaultValue={false}
|
|
82
93
|
render={({ field }) => (
|
|
83
|
-
<
|
|
94
|
+
<PatternFormatWithRef
|
|
84
95
|
format={format}
|
|
85
96
|
mask={mask ?? ''}
|
|
86
97
|
{...rest}
|
|
87
98
|
{...field}
|
|
88
99
|
{...inputProps}
|
|
100
|
+
type={props.type as 'text' | 'password' | 'tel'}
|
|
89
101
|
/>
|
|
90
102
|
)}
|
|
91
103
|
/>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { NumericFormat, NumericFormatProps } from 'react-number-format';
|
|
3
3
|
import { getCurrency } from '@akinon/next/utils';
|
|
4
4
|
import { useLocalization } from '@akinon/next/hooks';
|
|
5
5
|
import { PriceProps } from '../types';
|
|
6
6
|
import Settings from '@theme/settings';
|
|
7
7
|
|
|
8
|
-
export const Price = (props:
|
|
8
|
+
export const Price = (props: NumericFormatProps & PriceProps) => {
|
|
9
9
|
const {
|
|
10
10
|
value,
|
|
11
11
|
currencyCode,
|
|
@@ -59,7 +59,7 @@ export const Price = (props: NumberFormatProps & PriceProps) => {
|
|
|
59
59
|
).decimalScale;
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
|
-
<
|
|
62
|
+
<NumericFormat
|
|
63
63
|
value={displayValue}
|
|
64
64
|
displayType={displayType}
|
|
65
65
|
thousandSeparator={thousandSeparator}
|
|
@@ -68,7 +68,6 @@ export const Price = (props: NumberFormatProps & PriceProps) => {
|
|
|
68
68
|
fixedDecimalScale={fixedDecimalScale}
|
|
69
69
|
prefix={!useCurrencyAfterPrice ? currency : undefined}
|
|
70
70
|
suffix={useCurrencyAfterPrice ? currency : undefined}
|
|
71
|
-
isNumericString={true}
|
|
72
71
|
{...rest}
|
|
73
72
|
/>
|
|
74
73
|
);
|