@akinon/projectzero 1.56.0 → 1.57.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,29 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.57.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- dff0d59: ZERO-2659: add formData support to proxy api requests
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [fad2768]
|
|
12
|
+
- Updated dependencies [dff0d59]
|
|
13
|
+
- @akinon/next@1.57.0
|
|
14
|
+
- @akinon/pz-akifast@1.57.0
|
|
15
|
+
- @akinon/pz-b2b@1.57.0
|
|
16
|
+
- @akinon/pz-basket-gift-pack@1.57.0
|
|
17
|
+
- @akinon/pz-bkm@1.57.0
|
|
18
|
+
- @akinon/pz-checkout-gift-pack@1.57.0
|
|
19
|
+
- @akinon/pz-click-collect@1.57.0
|
|
20
|
+
- @akinon/pz-credit-payment@1.57.0
|
|
21
|
+
- @akinon/pz-gpay@1.57.0
|
|
22
|
+
- @akinon/pz-masterpass@1.57.0
|
|
23
|
+
- @akinon/pz-one-click-checkout@1.57.0
|
|
24
|
+
- @akinon/pz-otp@1.57.0
|
|
25
|
+
- @akinon/pz-pay-on-delivery@1.57.0
|
|
26
|
+
|
|
3
27
|
## 1.56.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -22,19 +22,19 @@
|
|
|
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.
|
|
25
|
+
"@akinon/next": "1.57.0",
|
|
26
|
+
"@akinon/pz-akifast": "1.57.0",
|
|
27
|
+
"@akinon/pz-b2b": "1.57.0",
|
|
28
|
+
"@akinon/pz-basket-gift-pack": "1.57.0",
|
|
29
|
+
"@akinon/pz-bkm": "1.57.0",
|
|
30
|
+
"@akinon/pz-checkout-gift-pack": "1.57.0",
|
|
31
|
+
"@akinon/pz-click-collect": "1.57.0",
|
|
32
|
+
"@akinon/pz-credit-payment": "1.57.0",
|
|
33
|
+
"@akinon/pz-gpay": "1.57.0",
|
|
34
|
+
"@akinon/pz-masterpass": "1.57.0",
|
|
35
|
+
"@akinon/pz-one-click-checkout": "1.57.0",
|
|
36
|
+
"@akinon/pz-otp": "1.57.0",
|
|
37
|
+
"@akinon/pz-pay-on-delivery": "1.57.0",
|
|
38
38
|
"@hookform/resolvers": "2.9.0",
|
|
39
39
|
"@next/third-parties": "14.1.0",
|
|
40
40
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"yup": "0.32.11"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
62
|
+
"@akinon/eslint-plugin-projectzero": "1.57.0",
|
|
63
63
|
"@semantic-release/changelog": "6.0.2",
|
|
64
64
|
"@semantic-release/exec": "6.0.3",
|
|
65
65
|
"@semantic-release/git": "10.0.1",
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
Button,
|
|
4
4
|
FileInput,
|
|
5
5
|
Input,
|
|
6
|
+
Link,
|
|
6
7
|
LoaderSpinner,
|
|
7
|
-
Select
|
|
8
|
-
Link
|
|
8
|
+
Select
|
|
9
9
|
} from '@theme/components';
|
|
10
10
|
import { useSession } from 'next-auth/react';
|
|
11
11
|
import { useEffect, useState } from 'react';
|
|
@@ -45,7 +45,8 @@ const contactFormSchema = (t) =>
|
|
|
45
45
|
.when('subject', {
|
|
46
46
|
is: (value) => value === '2',
|
|
47
47
|
then: yup.string().required(t('account.contact.form.error.required'))
|
|
48
|
-
})
|
|
48
|
+
}),
|
|
49
|
+
file: yup.mixed()
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
const ContactForm = () => {
|
|
@@ -110,8 +111,18 @@ const ContactForm = () => {
|
|
|
110
111
|
resolver: yupResolver(contactFormSchema(t))
|
|
111
112
|
});
|
|
112
113
|
|
|
113
|
-
const onSubmit: SubmitHandler<ContactFormType> = (data) => {
|
|
114
|
-
|
|
114
|
+
const onSubmit: SubmitHandler<ContactFormType> = (data, event) => {
|
|
115
|
+
const formData = new FormData();
|
|
116
|
+
|
|
117
|
+
Object.keys(data ?? {}).forEach((key) => {
|
|
118
|
+
if (key === 'file' && data[key]) {
|
|
119
|
+
formData.append(key, data[key][0]);
|
|
120
|
+
} else if (data[key] && key !== 'file') {
|
|
121
|
+
formData.append(key, data[key]);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
sendContact(formData);
|
|
115
126
|
};
|
|
116
127
|
|
|
117
128
|
const handleChange = (e) => {
|
|
@@ -234,6 +245,8 @@ const ContactForm = () => {
|
|
|
234
245
|
className="border-gray-500 border w-full text-xs p-2.5 focus-visible:outline-none focus:border-black hover:border-black"
|
|
235
246
|
rows={7}
|
|
236
247
|
name="message"
|
|
248
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
249
|
+
// @ts-ignore - Fix TS error
|
|
237
250
|
{...register('message')}
|
|
238
251
|
/>
|
|
239
252
|
{errors.message && (
|
|
@@ -242,7 +255,12 @@ const ContactForm = () => {
|
|
|
242
255
|
<label className="text-xs text-gray-800 mb-2 block">
|
|
243
256
|
{t('account.contact.form.file.title')}
|
|
244
257
|
</label>
|
|
245
|
-
<FileInput
|
|
258
|
+
<FileInput
|
|
259
|
+
name="file"
|
|
260
|
+
title="file"
|
|
261
|
+
className="w-full mb-5"
|
|
262
|
+
{...register('file')}
|
|
263
|
+
/>
|
|
246
264
|
<Button type="submit" className="w-full font-medium">
|
|
247
265
|
{t('account.contact.form.submit_button')}
|
|
248
266
|
</Button>
|