@mirai/core 0.3.171 → 0.3.175
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/build/components/Booking/Booking.js +1 -1
- package/build/components/Booking/Booking.js.map +1 -1
- package/build/components/Booking/Booking.l10n.js +15 -0
- package/build/components/Booking/Booking.l10n.js.map +1 -1
- package/build/components/Booking/Booking.module.css +9 -0
- package/build/components/{__shared__/BookingTerms/BookingTerms.js → Booking/partials/Booking.Others.js} +18 -17
- package/build/components/Booking/partials/Booking.Others.js.map +1 -0
- package/build/components/{__shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap → Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap} +8 -4
- package/build/components/Booking/partials/index.js +13 -2
- package/build/components/Booking/partials/index.js.map +1 -1
- package/build/components/Checkout/Checkout.js +5 -20
- package/build/components/Checkout/Checkout.js.map +1 -1
- package/build/components/Checkout/Checkout.module.css +0 -14
- package/build/components/Checkout/helpers/getFieldProps.js +1 -3
- package/build/components/Checkout/helpers/getFieldProps.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Confirmation.js +7 -11
- package/build/components/Checkout/partials/Checkout.Confirmation.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Form.js +4 -23
- package/build/components/Checkout/partials/Checkout.Form.js.map +1 -1
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +0 -492
- package/build/components/Profile/components/Settings/Settings.Account.js +8 -26
- package/build/components/Profile/components/Settings/Settings.Account.js.map +1 -1
- package/build/components/Profile/components/Settings/Settings.module.css +0 -4
- package/build/components/Signup/Signup.js +6 -24
- package/build/components/Signup/Signup.js.map +1 -1
- package/build/components/Signup/Signup.module.css +0 -4
- package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +9 -24
- package/build/components/__shared__/Payment/__tests__/__snapshots__/Payment.test.js.snap +0 -12
- package/build/components/__shared__/Payment/components/Card/Card.js +0 -4
- package/build/components/__shared__/Payment/components/Card/Card.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/__tests__/__snapshots__/Card.test.js.snap +0 -23
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js +0 -2
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js +0 -2
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js.map +1 -1
- package/build/components/__shared__/Payment/helpers/index.js +0 -11
- package/build/components/__shared__/Payment/helpers/index.js.map +1 -1
- package/build/components/__shared__/index.js +0 -22
- package/build/components/__shared__/index.js.map +1 -1
- package/package.json +1 -1
- package/build/components/__shared__/BookingTerms/BookingTerms.js.map +0 -1
- package/build/components/__shared__/BookingTerms/BookingTerms.l10n.js +0 -27
- package/build/components/__shared__/BookingTerms/BookingTerms.l10n.js.map +0 -1
- package/build/components/__shared__/BookingTerms/BookingTerms.module.css +0 -42
- package/build/components/__shared__/BookingTerms/index.js +0 -17
- package/build/components/__shared__/BookingTerms/index.js.map +0 -1
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.js +0 -52
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.js.map +0 -1
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.l10n.js +0 -62
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.l10n.js.map +0 -1
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.module.css +0 -8
- package/build/components/__shared__/NotificationRequiredFields/index.js +0 -17
- package/build/components/__shared__/NotificationRequiredFields/index.js.map +0 -1
- package/build/components/__shared__/Payment/helpers/formatExpire.js +0 -15
- package/build/components/__shared__/Payment/helpers/formatExpire.js.map +0 -1
|
@@ -32,7 +32,6 @@ const Account = () => {
|
|
|
32
32
|
const [countries, setCountries] = (0, _react.useState)({});
|
|
33
33
|
const [form, setForm] = (0, _react.useState)(session);
|
|
34
34
|
const [formError, setFormError] = (0, _react.useState)({});
|
|
35
|
-
const [requiredFields, setRequiredFields] = (0, _react.useState)();
|
|
36
35
|
const [responseError, setResponseError] = (0, _react.useState)();
|
|
37
36
|
const formatDate = (0, _locale.getDateFormat)(locale);
|
|
38
37
|
(0, _react.useEffect)(() => {
|
|
@@ -55,16 +54,7 @@ const Account = () => {
|
|
|
55
54
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
55
|
}, [locale]);
|
|
57
56
|
const handleSubmit = async form => {
|
|
58
|
-
const hasErrors = Object.keys(formError).length !== 0;
|
|
59
|
-
if (hasErrors) {
|
|
60
|
-
window.scrollTo({
|
|
61
|
-
top: 0,
|
|
62
|
-
behavior: 'smooth'
|
|
63
|
-
});
|
|
64
|
-
return setRequiredFields(formError);
|
|
65
|
-
}
|
|
66
57
|
setBusy(true);
|
|
67
|
-
setRequiredFields();
|
|
68
58
|
setResponseError(undefined);
|
|
69
59
|
const parameters = {
|
|
70
60
|
...form,
|
|
@@ -93,21 +83,17 @@ const Account = () => {
|
|
|
93
83
|
const countryCode = (0, _helpers.getCountryCode)(form.country, countries);
|
|
94
84
|
const has = {
|
|
95
85
|
changes: _Settings.ACCOUNT_FIELDS.some(key => form[key] !== session[key]) || countryCode !== session.country,
|
|
96
|
-
dateOfBirth: (_form$dateOfBirth = form.dateOfBirth) === null || _form$dateOfBirth === void 0 ? void 0 : _form$dateOfBirth.length
|
|
86
|
+
dateOfBirth: (_form$dateOfBirth = form.dateOfBirth) === null || _form$dateOfBirth === void 0 ? void 0 : _form$dateOfBirth.length,
|
|
87
|
+
errors: Object.keys(formError).length !== 0
|
|
97
88
|
};
|
|
98
|
-
const hasRequiredFields = Object.keys(requiredFields || {}).length > 0;
|
|
99
89
|
return /*#__PURE__*/_react.default.createElement(_ui.Form, {
|
|
100
90
|
validateOnMount: true,
|
|
101
91
|
onChange: setForm,
|
|
102
92
|
onError: setFormError,
|
|
103
93
|
onSubmit: handleSubmit
|
|
104
|
-
},
|
|
105
|
-
form: "account",
|
|
106
|
-
values: requiredFields
|
|
107
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
108
95
|
wide: true
|
|
109
96
|
}, translate(_Settings2.L10N.DESCRIPTION_ACCOUNT)), /*#__PURE__*/_react.default.createElement(_shared__.TextRequiredFields, null), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
110
|
-
id: "account-firstName",
|
|
111
97
|
name: "firstName",
|
|
112
98
|
error: formError.firstName,
|
|
113
99
|
label: translate(_Settings2.L10N.FIRSTNAME_LABEL),
|
|
@@ -116,7 +102,6 @@ const Account = () => {
|
|
|
116
102
|
success: form.firstName !== session.firstName,
|
|
117
103
|
value: form.firstName
|
|
118
104
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
119
|
-
id: "account-lastName",
|
|
120
105
|
name: "lastName",
|
|
121
106
|
error: formError.lastName,
|
|
122
107
|
label: translate(_Settings2.L10N.LASTNAME_LABEL),
|
|
@@ -125,7 +110,6 @@ const Account = () => {
|
|
|
125
110
|
success: form.lastName !== session.lastName,
|
|
126
111
|
value: form.lastName
|
|
127
112
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
128
|
-
id: "account-email",
|
|
129
113
|
name: "email",
|
|
130
114
|
disabled: true,
|
|
131
115
|
label: translate(_Settings2.L10N.EMAIL_LABEL),
|
|
@@ -134,7 +118,6 @@ const Account = () => {
|
|
|
134
118
|
type: "email",
|
|
135
119
|
value: form.email
|
|
136
120
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputDate, {
|
|
137
|
-
id: "account-dateOfBirth",
|
|
138
121
|
name: "dateOfBirth",
|
|
139
122
|
error: has.dateOfBirth && !!formError.dateOfBirth,
|
|
140
123
|
hint: has.dateOfBirth && (_formError$dateOfBirt = formError.dateOfBirth) !== null && _formError$dateOfBirt !== void 0 && _formError$dateOfBirt.max ? translate(_Settings2.L10N.DATEOFBIRTH_ERROR) : undefined,
|
|
@@ -149,14 +132,12 @@ const Account = () => {
|
|
|
149
132
|
type: "inputDate",
|
|
150
133
|
value: form.dateOfBirth
|
|
151
134
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputSelect, {
|
|
152
|
-
id: "account-country",
|
|
153
135
|
name: "country",
|
|
154
136
|
label: translate(_Settings2.L10N.COUNTRY_LABEL),
|
|
155
137
|
placeholder: translate(_Settings2.L10N.COUNTRY_PLACEHOLDER),
|
|
156
|
-
options: Object.values(countries)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
,
|
|
138
|
+
options: Object.values(countries),
|
|
139
|
+
required: true,
|
|
140
|
+
showRequired: true,
|
|
160
141
|
success: countryCode !== session.country,
|
|
161
142
|
value: form.country
|
|
162
143
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputOption, {
|
|
@@ -171,9 +152,10 @@ const Account = () => {
|
|
|
171
152
|
className: style.notification
|
|
172
153
|
}, translate(_Settings2.L10N.ERROR)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
173
154
|
busy: busy,
|
|
155
|
+
disabled: busy || has.errors || !has.changes,
|
|
174
156
|
large: true,
|
|
175
157
|
wide: true,
|
|
176
|
-
|
|
158
|
+
type: "submit"
|
|
177
159
|
}, translate(_Settings2.L10N.CTA_ACCOUNT)));
|
|
178
160
|
};
|
|
179
161
|
exports.Account = Account;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.Account.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Settings","_Settings2","style","_shared__","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Account","_form$dateOfBirth","_formError$dateOfBirt","value","locale","session","useStore","translate","useLocale","busy","setBusy","useState","countries","setCountries","form","setForm","formError","setFormError","requiredFields","setRequiredFields","responseError","setResponseError","formatDate","getDateFormat","useEffect","profile","next","ServiceCountry","list","country","handleSubmit","hasErrors","keys","length","window","scrollTo","top","behavior","undefined","parameters","getCountryCode","dateOfBirth","dateFormat","parseDate","format","response","ServiceUser","update","catch","error","Event","publish","EVENT","NOTIFICATION","success","L10N","SUCCESS_ACCOUNT","countryCode","changes","ACCOUNT_FIELDS","some","key","hasRequiredFields","createElement","Form","validateOnMount","onChange","onError","onSubmit","NotificationRequiredFields","values","Text","wide","DESCRIPTION_ACCOUNT","TextRequiredFields","InputText","id","name","firstName","label","FIRSTNAME_LABEL","required","showRequired","lastName","LASTNAME_LABEL","disabled","EMAIL_LABEL","type","email","InputDate","hint","max","DATEOFBIRTH_ERROR","DATEOFBIRTH_LABEL","dateCalc","Date","InputSelect","COUNTRY_LABEL","placeholder","COUNTRY_PLACEHOLDER","options","InputOption","checked","subscribed","SUBSCRIBED_LABEL","small","Notification","className","notification","ERROR","Button","large","onPress","CTA_ACCOUNT","exports","displayName","propTypes"],"sources":["../../../../../src/components/Profile/components/Settings/Settings.Account.jsx"],"sourcesContent":["import { Event, useStore } from '@mirai/data-sources';\nimport { dateCalc, dateFormat, getDateFormat, parseDate, useLocale } from '@mirai/locale';\nimport { ServiceCountry, ServiceUser } from '@mirai/services';\nimport { Button, Form, InputDate, InputOption, InputSelect, InputText, Notification, Text } from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { ACCOUNT_FIELDS } from './Settings.constants';\nimport { L10N } from './Settings.l10n';\nimport * as style from './Settings.module.css';\nimport { NotificationRequiredFields, TextRequiredFields } from '../../../__shared__';\nimport { EVENT, getCountryCode } from '../../../helpers';\n\nconst Account = () => {\n const {\n set,\n value: { locale, session = {} },\n } = useStore();\n const { translate } = useLocale();\n\n const [busy, setBusy] = useState(false);\n const [countries, setCountries] = useState({});\n const [form, setForm] = useState(session);\n const [formError, setFormError] = useState({});\n const [requiredFields, setRequiredFields] = useState();\n const [responseError, setResponseError] = useState();\n\n const formatDate = getDateFormat(locale);\n\n useEffect(() => {\n setResponseError();\n set({ profile: form });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form]);\n\n useEffect(() => {\n (async () => {\n const next = (await ServiceCountry.list(locale)) || {};\n\n setCountries(next);\n setForm({ ...form, country: next[session.country] });\n })();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [locale]);\n\n const handleSubmit = async (form) => {\n const hasErrors = Object.keys(formError).length !== 0;\n if (hasErrors) {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n return setRequiredFields(formError);\n }\n\n setBusy(true);\n setRequiredFields();\n setResponseError(undefined);\n\n const parameters = {\n ...form,\n country: getCountryCode(form.country, countries),\n dateOfBirth: dateFormat(parseDate(form.dateOfBirth, formatDate), { format: 'DD/MM/YYYY' }),\n };\n\n const response = await ServiceUser.update(parameters).catch((error) => {\n setResponseError(error);\n });\n\n if (response) {\n Event.publish(EVENT.NOTIFICATION, { success: true, ...L10N.SUCCESS_ACCOUNT });\n set({ session: { ...session, ...parameters } });\n }\n setBusy(false);\n };\n\n const countryCode = getCountryCode(form.country, countries);\n const has = {\n changes: ACCOUNT_FIELDS.some((key) => form[key] !== session[key]) || countryCode !== session.country,\n dateOfBirth: form.dateOfBirth?.length,\n };\n const hasRequiredFields = Object.keys(requiredFields || {}).length > 0;\n\n return (\n <Form validateOnMount onChange={setForm} onError={setFormError} onSubmit={handleSubmit}>\n {hasRequiredFields && <NotificationRequiredFields form=\"account\" values={requiredFields} />}\n\n <Text wide>{translate(L10N.DESCRIPTION_ACCOUNT)}</Text>\n <TextRequiredFields />\n <InputText\n id=\"account-firstName\"\n name=\"firstName\"\n error={formError.firstName}\n label={translate(L10N.FIRSTNAME_LABEL)}\n required\n showRequired\n success={form.firstName !== session.firstName}\n value={form.firstName}\n />\n <InputText\n id=\"account-lastName\"\n name=\"lastName\"\n error={formError.lastName}\n label={translate(L10N.LASTNAME_LABEL)}\n required\n showRequired\n success={form.lastName !== session.lastName}\n value={form.lastName}\n />\n <InputText\n id=\"account-email\"\n name=\"email\"\n disabled\n label={translate(L10N.EMAIL_LABEL)}\n required\n showRequired\n type=\"email\"\n value={form.email}\n />\n <InputDate\n id=\"account-dateOfBirth\"\n name=\"dateOfBirth\"\n error={has.dateOfBirth && !!formError.dateOfBirth}\n hint={has.dateOfBirth && formError.dateOfBirth?.max ? translate(L10N.DATEOFBIRTH_ERROR) : undefined}\n format={formatDate}\n label={translate(L10N.DATEOFBIRTH_LABEL)}\n max={dateFormat(dateCalc(new Date(), -18, 'years'), { format: formatDate })}\n required\n showRequired\n success={form.dateOfBirth !== session.dateOfBirth}\n type=\"inputDate\"\n value={form.dateOfBirth}\n />\n <InputSelect\n id=\"account-country\"\n name=\"country\"\n label={translate(L10N.COUNTRY_LABEL)}\n placeholder={translate(L10N.COUNTRY_PLACEHOLDER)}\n options={Object.values(countries)}\n // required\n // showRequired\n success={countryCode !== session.country}\n value={form.country}\n />\n <InputOption\n name=\"subscribed\"\n checked={form.subscribed}\n type=\"checkbox\"\n label={translate(L10N.SUBSCRIBED_LABEL)}\n small\n value={form.subscribed}\n />\n\n {responseError && (\n <Notification error className={style.notification}>\n {translate(L10N.ERROR)}\n </Notification>\n )}\n\n <Button busy={busy} large wide onPress={handleSubmit}>\n {translate(L10N.CTA_ACCOUNT)}\n </Button>\n </Form>\n );\n};\n\nAccount.displayName = 'Mirai:Core:Profile:Account';\n\nAccount.propTypes = {};\n\nexport { Account };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,GAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAEA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAH,uBAAA,CAAAL,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAAy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EAAa,GAC/CrG,SAAS,CAACgD,eAAI,CAACsD,KAAK,CACT,CACf,eAEDzI,MAAA,CAAAa,OAAA,CAAA8E,aAAA,CAAC5F,GAAA,CAAA2I,MAAM;IAACrG,IAAI,EAAEA,IAAK;IAACsG,KAAK;IAACvC,IAAI;IAACwC,OAAO,EAAElF;EAAa,GAClDvB,SAAS,CAACgD,eAAI,CAAC0D,WAAW,CACrB,CACJ,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAlH,OAAA,GAAAA,OAAA;AAEFA,OAAO,CAACmH,WAAW,GAAG,4BAA4B;AAElDnH,OAAO,CAACoH,SAAS,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Settings.Account.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Settings","_Settings2","style","_shared__","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Account","_form$dateOfBirth","_formError$dateOfBirt","value","locale","session","useStore","translate","useLocale","busy","setBusy","useState","countries","setCountries","form","setForm","formError","setFormError","responseError","setResponseError","formatDate","getDateFormat","useEffect","profile","next","ServiceCountry","list","country","handleSubmit","undefined","parameters","getCountryCode","dateOfBirth","dateFormat","parseDate","format","response","ServiceUser","update","catch","error","Event","publish","EVENT","NOTIFICATION","success","L10N","SUCCESS_ACCOUNT","countryCode","changes","ACCOUNT_FIELDS","some","key","length","errors","keys","createElement","Form","validateOnMount","onChange","onError","onSubmit","Text","wide","DESCRIPTION_ACCOUNT","TextRequiredFields","InputText","name","firstName","label","FIRSTNAME_LABEL","required","showRequired","lastName","LASTNAME_LABEL","disabled","EMAIL_LABEL","type","email","InputDate","hint","max","DATEOFBIRTH_ERROR","DATEOFBIRTH_LABEL","dateCalc","Date","InputSelect","COUNTRY_LABEL","placeholder","COUNTRY_PLACEHOLDER","options","values","InputOption","checked","subscribed","SUBSCRIBED_LABEL","small","Notification","className","notification","ERROR","Button","large","CTA_ACCOUNT","exports","displayName","propTypes"],"sources":["../../../../../src/components/Profile/components/Settings/Settings.Account.jsx"],"sourcesContent":["import { Event, useStore } from '@mirai/data-sources';\nimport { dateCalc, dateFormat, getDateFormat, parseDate, useLocale } from '@mirai/locale';\nimport { ServiceCountry, ServiceUser } from '@mirai/services';\nimport { Button, Form, InputDate, InputOption, InputSelect, InputText, Notification, Text } from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { ACCOUNT_FIELDS } from './Settings.constants';\nimport { L10N } from './Settings.l10n';\nimport * as style from './Settings.module.css';\nimport { TextRequiredFields } from '../../../__shared__';\nimport { EVENT, getCountryCode } from '../../../helpers';\n\nconst Account = () => {\n const {\n set,\n value: { locale, session = {} },\n } = useStore();\n const { translate } = useLocale();\n\n const [busy, setBusy] = useState(false);\n const [countries, setCountries] = useState({});\n const [form, setForm] = useState(session);\n const [formError, setFormError] = useState({});\n const [responseError, setResponseError] = useState();\n\n const formatDate = getDateFormat(locale);\n\n useEffect(() => {\n setResponseError();\n set({ profile: form });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form]);\n\n useEffect(() => {\n (async () => {\n const next = (await ServiceCountry.list(locale)) || {};\n\n setCountries(next);\n setForm({ ...form, country: next[session.country] });\n })();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [locale]);\n\n const handleSubmit = async (form) => {\n setBusy(true);\n setResponseError(undefined);\n\n const parameters = {\n ...form,\n country: getCountryCode(form.country, countries),\n dateOfBirth: dateFormat(parseDate(form.dateOfBirth, formatDate), { format: 'DD/MM/YYYY' }),\n };\n\n const response = await ServiceUser.update(parameters).catch((error) => {\n setResponseError(error);\n });\n\n if (response) {\n Event.publish(EVENT.NOTIFICATION, { success: true, ...L10N.SUCCESS_ACCOUNT });\n set({ session: { ...session, ...parameters } });\n }\n setBusy(false);\n };\n\n const countryCode = getCountryCode(form.country, countries);\n const has = {\n changes: ACCOUNT_FIELDS.some((key) => form[key] !== session[key]) || countryCode !== session.country,\n dateOfBirth: form.dateOfBirth?.length,\n errors: Object.keys(formError).length !== 0,\n };\n\n return (\n <Form validateOnMount onChange={setForm} onError={setFormError} onSubmit={handleSubmit}>\n <Text wide>{translate(L10N.DESCRIPTION_ACCOUNT)}</Text>\n <TextRequiredFields />\n <InputText\n name=\"firstName\"\n error={formError.firstName}\n label={translate(L10N.FIRSTNAME_LABEL)}\n required\n showRequired\n success={form.firstName !== session.firstName}\n value={form.firstName}\n />\n <InputText\n name=\"lastName\"\n error={formError.lastName}\n label={translate(L10N.LASTNAME_LABEL)}\n required\n showRequired\n success={form.lastName !== session.lastName}\n value={form.lastName}\n />\n <InputText\n name=\"email\"\n disabled\n label={translate(L10N.EMAIL_LABEL)}\n required\n showRequired\n type=\"email\"\n value={form.email}\n />\n <InputDate\n name=\"dateOfBirth\"\n error={has.dateOfBirth && !!formError.dateOfBirth}\n hint={has.dateOfBirth && formError.dateOfBirth?.max ? translate(L10N.DATEOFBIRTH_ERROR) : undefined}\n format={formatDate}\n label={translate(L10N.DATEOFBIRTH_LABEL)}\n max={dateFormat(dateCalc(new Date(), -18, 'years'), { format: formatDate })}\n required\n showRequired\n success={form.dateOfBirth !== session.dateOfBirth}\n type=\"inputDate\"\n value={form.dateOfBirth}\n />\n <InputSelect\n name=\"country\"\n label={translate(L10N.COUNTRY_LABEL)}\n placeholder={translate(L10N.COUNTRY_PLACEHOLDER)}\n options={Object.values(countries)}\n required\n showRequired\n success={countryCode !== session.country}\n value={form.country}\n />\n <InputOption\n name=\"subscribed\"\n checked={form.subscribed}\n type=\"checkbox\"\n label={translate(L10N.SUBSCRIBED_LABEL)}\n small\n value={form.subscribed}\n />\n\n {responseError && (\n <Notification error className={style.notification}>\n {translate(L10N.ERROR)}\n </Notification>\n )}\n\n <Button busy={busy} disabled={busy || has.errors || !has.changes} large wide type=\"submit\">\n {translate(L10N.CTA_ACCOUNT)}\n </Button>\n </Form>\n );\n};\n\nAccount.displayName = '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;IAACvC,IAAI;IAACc,IAAI,EAAC;EAAQ,GACvFtE,SAAS,CAACuC,eAAI,CAACyD,WAAW,CACrB,CACJ,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAxG,OAAA,GAAAA,OAAA;AAEFA,OAAO,CAACyG,WAAW,GAAG,4BAA4B;AAElDzG,OAAO,CAAC0G,SAAS,GAAG,CAAC,CAAC"}
|
|
@@ -34,7 +34,6 @@ const Signup = others => {
|
|
|
34
34
|
subscribed: true
|
|
35
35
|
});
|
|
36
36
|
const [formError, setFormError] = (0, _react.useState)({});
|
|
37
|
-
const [requiredFields, setRequiredFields] = (0, _react.useState)();
|
|
38
37
|
const [response, setResponse] = (0, _react.useState)();
|
|
39
38
|
const [responseError, setResponseError] = (0, _react.useState)();
|
|
40
39
|
const [language, country] = locale.split('-');
|
|
@@ -57,17 +56,8 @@ const Signup = others => {
|
|
|
57
56
|
|
|
58
57
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
58
|
}, [locale]);
|
|
60
|
-
const handleSubmit = async
|
|
61
|
-
const hasErrors = Object.keys(formError).length !== 0;
|
|
62
|
-
if (hasErrors) {
|
|
63
|
-
window.scrollTo({
|
|
64
|
-
top: 0,
|
|
65
|
-
behavior: 'smooth'
|
|
66
|
-
});
|
|
67
|
-
return setRequiredFields(formError);
|
|
68
|
-
}
|
|
59
|
+
const handleSubmit = async form => {
|
|
69
60
|
setBusy(true);
|
|
70
|
-
setRequiredFields();
|
|
71
61
|
setResponseError(undefined);
|
|
72
62
|
const response = await _services.ServiceUser.signup({
|
|
73
63
|
...form,
|
|
@@ -84,7 +74,7 @@ const Signup = others => {
|
|
|
84
74
|
setResponse(response);
|
|
85
75
|
setBusy(false);
|
|
86
76
|
};
|
|
87
|
-
const
|
|
77
|
+
const hasErrors = Object.keys(formError).length !== 0;
|
|
88
78
|
return /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
89
79
|
role: "signup",
|
|
90
80
|
className: style.container
|
|
@@ -101,17 +91,14 @@ const Signup = others => {
|
|
|
101
91
|
className: style.description
|
|
102
92
|
}, translate(_Signup.L10N.DESCRIPTION, {
|
|
103
93
|
clubName: club.name
|
|
104
|
-
}))),
|
|
105
|
-
form: "signup",
|
|
106
|
-
values: requiredFields
|
|
107
|
-
}), !response && /*#__PURE__*/_react.default.createElement(_ui.Form, {
|
|
94
|
+
}))), !response && /*#__PURE__*/_react.default.createElement(_ui.Form, {
|
|
108
95
|
validateOnMount: true,
|
|
109
96
|
onChange: setForm,
|
|
110
97
|
onError: setFormError,
|
|
98
|
+
onSubmit: handleSubmit,
|
|
111
99
|
testId: others.testId,
|
|
112
100
|
className: (0, _ui.styles)(style.form, others.className)
|
|
113
101
|
}, /*#__PURE__*/_react.default.createElement(_shared__.TextRequiredFields, null), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
114
|
-
id: "signup-firstName",
|
|
115
102
|
name: "firstName",
|
|
116
103
|
label: translate(_Signup.L10N.FIRSTNAME_LABEL),
|
|
117
104
|
required: true,
|
|
@@ -119,7 +106,6 @@ const Signup = others => {
|
|
|
119
106
|
success: ((_form$firstName = form.firstName) === null || _form$firstName === void 0 ? void 0 : _form$firstName.length) && !formError.firstName,
|
|
120
107
|
value: form.firstName
|
|
121
108
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
122
|
-
id: "signup-lastName",
|
|
123
109
|
name: "lastName",
|
|
124
110
|
label: translate(_Signup.L10N.LASTNAME_LABEL),
|
|
125
111
|
required: true,
|
|
@@ -127,7 +113,6 @@ const Signup = others => {
|
|
|
127
113
|
success: ((_form$lastName = form.lastName) === null || _form$lastName === void 0 ? void 0 : _form$lastName.length) && !formError.lastName,
|
|
128
114
|
value: form.lastName
|
|
129
115
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
130
|
-
id: "signup-email",
|
|
131
116
|
name: "email",
|
|
132
117
|
error: ((_form$email = form.email) === null || _form$email === void 0 ? void 0 : _form$email.length) && !!formError.email,
|
|
133
118
|
label: translate(_Signup.L10N.EMAIL_LABEL),
|
|
@@ -137,7 +122,6 @@ const Signup = others => {
|
|
|
137
122
|
type: "email",
|
|
138
123
|
value: form.email
|
|
139
124
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputDate, {
|
|
140
|
-
id: "signup-dateOfBirth",
|
|
141
125
|
name: "dateOfBirth",
|
|
142
126
|
error: ((_form$dateOfBirth = form.dateOfBirth) === null || _form$dateOfBirth === void 0 ? void 0 : _form$dateOfBirth.length) && !!formError.dateOfBirth,
|
|
143
127
|
hint: (_form$dateOfBirth2 = form.dateOfBirth) !== null && _form$dateOfBirth2 !== void 0 && _form$dateOfBirth2.length && (_formError$dateOfBirt = formError.dateOfBirth) !== null && _formError$dateOfBirt !== void 0 && _formError$dateOfBirt.max ? translate(_Signup.L10N.DATEOFBIRTH_ERROR) : undefined,
|
|
@@ -152,7 +136,6 @@ const Signup = others => {
|
|
|
152
136
|
type: "inputDate",
|
|
153
137
|
value: form.dateOfBirth
|
|
154
138
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputSelect, {
|
|
155
|
-
id: "signup-country",
|
|
156
139
|
name: "country",
|
|
157
140
|
label: translate(_Signup.L10N.COUNTRY_LABEL),
|
|
158
141
|
placeholder: translate(_Signup.L10N.COUNTRY_PLACEHOLDER),
|
|
@@ -162,7 +145,6 @@ const Signup = others => {
|
|
|
162
145
|
success: ((_form$country = form.country) === null || _form$country === void 0 ? void 0 : _form$country.length) && !formError.country,
|
|
163
146
|
value: form.country
|
|
164
147
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
165
|
-
id: "signup-password",
|
|
166
148
|
name: "password",
|
|
167
149
|
error: ((_form$password = form.password) === null || _form$password === void 0 ? void 0 : _form$password.length) && ((_formError$password = formError.password) === null || _formError$password === void 0 ? void 0 : _formError$password.test),
|
|
168
150
|
hint: translate(_Signup.L10N.PASSWORD_HINT),
|
|
@@ -180,7 +162,6 @@ const Signup = others => {
|
|
|
180
162
|
small: true,
|
|
181
163
|
value: form.subscribed
|
|
182
164
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputOption, {
|
|
183
|
-
id: "signup-privacy",
|
|
184
165
|
name: "privacy",
|
|
185
166
|
checked: form.privacy,
|
|
186
167
|
label: translate(_Signup.L10N.PRIVACY_LABEL, {
|
|
@@ -210,9 +191,10 @@ const Signup = others => {
|
|
|
210
191
|
className: style.notification
|
|
211
192
|
}, translate(_Signup.L10N.NOTIFICATION_ERROR)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
212
193
|
busy: busy,
|
|
194
|
+
disabled: busy || hasErrors || !form.privacy,
|
|
213
195
|
large: true,
|
|
214
196
|
wide: true,
|
|
215
|
-
|
|
197
|
+
type: "submit",
|
|
216
198
|
className: style.button
|
|
217
199
|
}, translate(_Signup.L10N.CTA))), !busy && response && /*#__PURE__*/_react.default.createElement(_ui.Notification, {
|
|
218
200
|
large: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signup.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Signup","style","_shared__","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Signup","others","_form$firstName","_form$lastName","_form$email","_form$email2","_form$dateOfBirth","_form$dateOfBirth2","_formError$dateOfBirt","_form$dateOfBirth3","_form$country","_form$password","_formError$password","_form$password2","_club$url","_club$url2","value","club","hotel","useStore","locale","translate","useLocale","busy","setBusy","useState","countries","setCountries","form","setForm","subscribed","formError","setFormError","requiredFields","setRequiredFields","response","setResponse","responseError","setResponseError","language","country","split","formatDate","getDateFormat","useEffect","signup","next","ServiceCountry","list","handleSubmit","hasErrors","keys","length","window","scrollTo","top","behavior","undefined","ServiceUser","getCountryCode","dateOfBirth","dateFormat","parseDate","format","idClub","id","idHotel","catch","error","hasRequiredFields","createElement","View","role","className","container","wide","header","Text","bold","headline","level","L10N","TITLE","clubName","name","description","DESCRIPTION","NotificationRequiredFields","values","Form","validateOnMount","onChange","onError","testId","styles","TextRequiredFields","InputText","label","FIRSTNAME_LABEL","required","showRequired","success","firstName","LASTNAME_LABEL","lastName","email","EMAIL_LABEL","type","InputDate","hint","max","DATEOFBIRTH_ERROR","DATEOFBIRTH_LABEL","dateCalc","Date","InputSelect","COUNTRY_LABEL","placeholder","COUNTRY_PLACEHOLDER","options","password","test","PASSWORD_HINT","PASSWORD_LABEL","testPassword","InputOption","checked","SUBSCRIBED_LABEL","small","privacy","PRIVACY_LABEL","conditionsLink","Action","inline","href","url","conditions","target","rel","PRIVACY_CONDITIONS_LINK","privacyPolicyLink","PRIVACY_POLICY_LINK","Notification","notification","NOTIFICATION_ERROR","Button","large","onPress","button","CTA","SUCCESS_TITLE","SUCCESS_MESSAGE","exports","displayName","propTypes"],"sources":["../../../src/components/Signup/Signup.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { dateCalc, dateFormat, getDateFormat, parseDate, useLocale } from '@mirai/locale';\nimport { ServiceCountry, ServiceUser } from '@mirai/services';\nimport {\n Action,\n Button,\n Form,\n InputDate,\n InputOption,\n InputSelect,\n InputText,\n Notification,\n styles,\n Text,\n View,\n} from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { L10N } from './Signup.l10n';\nimport * as style from './Signup.module.css';\nimport { NotificationRequiredFields, TextRequiredFields } from '../__shared__';\nimport { getCountryCode, testPassword } from '../helpers';\n\nconst Signup = (others) => {\n const {\n set,\n value: { club = {}, hotel = {} },\n } = useStore();\n const { locale, translate } = useLocale();\n\n const [busy, setBusy] = useState(false);\n const [countries, setCountries] = useState({});\n const [form, setForm] = useState({ subscribed: true });\n const [formError, setFormError] = useState({});\n const [requiredFields, setRequiredFields] = useState();\n const [response, setResponse] = useState();\n const [responseError, setResponseError] = useState();\n\n const [language, country] = locale.split('-');\n const formatDate = getDateFormat(locale);\n\n useEffect(() => {\n set({ signup: form });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form]);\n\n useEffect(() => {\n (async () => {\n const next = (await ServiceCountry.list(locale)) || {};\n\n setCountries(next);\n setForm({ ...form, country: next[country] });\n })();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [locale]);\n\n const handleSubmit = async () => {\n const hasErrors = Object.keys(formError).length !== 0;\n if (hasErrors) {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n return setRequiredFields(formError);\n }\n\n setBusy(true);\n setRequiredFields();\n setResponseError(undefined);\n\n const response = await ServiceUser.signup({\n ...form,\n country: getCountryCode(form.country, countries),\n dateOfBirth: dateFormat(parseDate(form.dateOfBirth, formatDate), { format: 'DD/MM/YYYY' }),\n idClub: club.id,\n idHotel: hotel.id,\n language,\n }).catch((error) => {\n setResponseError(error);\n });\n\n setResponse(response);\n setBusy(false);\n };\n\n const hasRequiredFields = Object.keys(requiredFields || {}).length > 0;\n\n return (\n <View role=\"signup\" className={style.container}>\n <View wide className={style.header}>\n <Text bold headline level={2}>\n {translate(L10N.TITLE, { clubName: club.name })}\n </Text>\n <Text className={style.description}>{translate(L10N.DESCRIPTION, { clubName: club.name })}</Text>\n </View>\n\n {hasRequiredFields && <NotificationRequiredFields form=\"signup\" values={requiredFields} />}\n\n {!response && (\n <Form\n validateOnMount\n onChange={setForm}\n onError={setFormError}\n testId={others.testId}\n className={styles(style.form, others.className)}\n >\n <TextRequiredFields />\n <InputText\n id=\"signup-firstName\"\n name=\"firstName\"\n label={translate(L10N.FIRSTNAME_LABEL)}\n required\n showRequired\n success={form.firstName?.length && !formError.firstName}\n value={form.firstName}\n />\n <InputText\n id=\"signup-lastName\"\n name=\"lastName\"\n label={translate(L10N.LASTNAME_LABEL)}\n required\n showRequired\n success={form.lastName?.length && !formError.lastName}\n value={form.lastName}\n />\n <InputText\n id=\"signup-email\"\n name=\"email\"\n error={form.email?.length && !!formError.email}\n label={translate(L10N.EMAIL_LABEL)}\n required\n showRequired\n success={form.email?.length && !formError.email}\n type=\"email\"\n value={form.email}\n />\n <InputDate\n id=\"signup-dateOfBirth\"\n name=\"dateOfBirth\"\n error={form.dateOfBirth?.length && !!formError.dateOfBirth}\n hint={\n form.dateOfBirth?.length && formError.dateOfBirth?.max ? translate(L10N.DATEOFBIRTH_ERROR) : undefined\n }\n format={formatDate}\n label={translate(L10N.DATEOFBIRTH_LABEL)}\n max={dateFormat(dateCalc(new Date(), -18, 'years'), { format: formatDate })}\n required\n showRequired\n success={form.dateOfBirth?.length && !formError.dateOfBirth}\n type=\"inputDate\"\n value={form.dateOfBirth}\n />\n <InputSelect\n id=\"signup-country\"\n name=\"country\"\n label={translate(L10N.COUNTRY_LABEL)}\n placeholder={translate(L10N.COUNTRY_PLACEHOLDER)}\n options={Object.values(countries)}\n required\n showRequired\n success={form.country?.length && !formError.country}\n value={form.country}\n />\n <InputText\n id=\"signup-password\"\n name=\"password\"\n error={form.password?.length && formError.password?.test}\n hint={translate(L10N.PASSWORD_HINT)}\n label={translate(L10N.PASSWORD_LABEL)}\n required\n showRequired\n success={form.password?.length && !formError.password}\n test={testPassword}\n type=\"password\"\n value={form.password}\n />\n\n <InputOption\n name=\"subscribed\"\n checked={form.subscribed}\n label={translate(L10N.SUBSCRIBED_LABEL)}\n small\n value={form.subscribed}\n />\n <InputOption\n id=\"signup-privacy\"\n name=\"privacy\"\n checked={form.privacy}\n label={translate(L10N.PRIVACY_LABEL, {\n clubName: club.name || '$club',\n conditionsLink: (\n <Action inline href={club.url?.conditions} target=\"_blank\" rel=\"noreferrer\" small>\n {translate(L10N.PRIVACY_CONDITIONS_LINK)}\n </Action>\n ),\n privacyPolicyLink: (\n <Action inline href={club.url?.privacy} target=\"_blank\" rel=\"noreferrer\" small>\n {translate(L10N.PRIVACY_POLICY_LINK)}\n </Action>\n ),\n })}\n required\n showRequired\n small\n value={form.privacy}\n className={style.privacy}\n />\n\n {!busy && responseError && (\n <Notification error className={style.notification}>\n {translate(L10N.NOTIFICATION_ERROR)}\n </Notification>\n )}\n\n <Button busy={busy} large wide onPress={handleSubmit} className={style.button}>\n {translate(L10N.CTA)}\n </Button>\n </Form>\n )}\n\n {!busy && response && (\n <Notification large success className={style.notification}>\n <Text bold>{translate(L10N.SUCCESS_TITLE)}</Text>\n <Text>{translate(L10N.SUCCESS_MESSAGE)}</Text>\n </Notification>\n )}\n </View>\n );\n};\n\nSignup.displayName = 'Mirai:Core:Signup';\n\nSignup.propTypes = {};\n\nexport { Signup };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,GAAA,GAAAH,OAAA;AAaA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAF,uBAAA,CAAAL,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAA0D,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,I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CAAA6K,MAAM;IAAC1H,IAAI,EAAEA,IAAK;IAAC2H,KAAK;IAACvE,IAAI;IAACwE,OAAO,EAAElG,YAAa;IAACwB,SAAS,EAAEjG,KAAK,CAAC4K;EAAO,GAC3E/H,SAAS,CAAC4D,YAAI,CAACoE,GAAG,CACb,CACJ,CACP,EAEA,CAAC9H,IAAI,IAAIY,QAAQ,iBAChB9D,MAAA,CAAAY,OAAA,CAAAqF,aAAA,CAAClG,GAAA,CAAA0K,YAAY;IAACI,KAAK;IAAC7C,OAAO;IAAC5B,SAAS,EAAEjG,KAAK,CAACuK;EAAa,gBACxD1K,MAAA,CAAAY,OAAA,CAAAqF,aAAA,CAAClG,GAAA,CAAAyG,IAAI;IAACC,IAAI;EAAA,GAAEzD,SAAS,CAAC4D,YAAI,CAACqE,aAAa,CAAQ,CAAC,eACjDjL,MAAA,CAAAY,OAAA,CAAAqF,aAAA,CAAClG,GAAA,CAAAyG,IAAI,QAAExD,SAAS,CAAC4D,YAAI,CAACsE,eAAe,CAAQ,CACjC,CAEZ,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAxJ,MAAA,GAAAA,MAAA;AAEFA,MAAM,CAACyJ,WAAW,GAAG,mBAAmB;AAExCzJ,MAAM,CAAC0J,SAAS,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Signup.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Signup","style","_shared__","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Signup","others","_form$firstName","_form$lastName","_form$email","_form$email2","_form$dateOfBirth","_form$dateOfBirth2","_formError$dateOfBirt","_form$dateOfBirth3","_form$country","_form$password","_formError$password","_form$password2","_club$url","_club$url2","value","club","hotel","useStore","locale","translate","useLocale","busy","setBusy","useState","countries","setCountries","form","setForm","subscribed","formError","setFormError","response","setResponse","responseError","setResponseError","language","country","split","formatDate","getDateFormat","useEffect","signup","next","ServiceCountry","list","handleSubmit","undefined","ServiceUser","getCountryCode","dateOfBirth","dateFormat","parseDate","format","idClub","id","idHotel","catch","error","hasErrors","keys","length","createElement","View","role","className","container","wide","header","Text","bold","headline","level","L10N","TITLE","clubName","name","description","DESCRIPTION","Form","validateOnMount","onChange","onError","onSubmit","testId","styles","TextRequiredFields","InputText","label","FIRSTNAME_LABEL","required","showRequired","success","firstName","LASTNAME_LABEL","lastName","email","EMAIL_LABEL","type","InputDate","hint","max","DATEOFBIRTH_ERROR","DATEOFBIRTH_LABEL","dateCalc","Date","InputSelect","COUNTRY_LABEL","placeholder","COUNTRY_PLACEHOLDER","options","values","password","test","PASSWORD_HINT","PASSWORD_LABEL","testPassword","InputOption","checked","SUBSCRIBED_LABEL","small","privacy","PRIVACY_LABEL","conditionsLink","Action","inline","href","url","conditions","target","rel","PRIVACY_CONDITIONS_LINK","privacyPolicyLink","PRIVACY_POLICY_LINK","Notification","notification","NOTIFICATION_ERROR","Button","disabled","large","button","CTA","SUCCESS_TITLE","SUCCESS_MESSAGE","exports","displayName","propTypes"],"sources":["../../../src/components/Signup/Signup.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { dateCalc, dateFormat, getDateFormat, parseDate, useLocale } from '@mirai/locale';\nimport { ServiceCountry, ServiceUser } from '@mirai/services';\nimport {\n Action,\n Button,\n Form,\n InputDate,\n InputOption,\n InputSelect,\n InputText,\n Notification,\n styles,\n Text,\n View,\n} from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { L10N } from './Signup.l10n';\nimport * as style from './Signup.module.css';\nimport { TextRequiredFields } from '../__shared__';\nimport { getCountryCode, testPassword } from '../helpers';\n\nconst Signup = (others) => {\n const {\n set,\n value: { club = {}, hotel = {} },\n } = useStore();\n const { locale, translate } = useLocale();\n\n const [busy, setBusy] = useState(false);\n const [countries, setCountries] = useState({});\n const [form, setForm] = useState({ subscribed: true });\n const [formError, setFormError] = useState({});\n const [response, setResponse] = useState();\n const [responseError, setResponseError] = useState();\n\n const [language, country] = locale.split('-');\n const formatDate = getDateFormat(locale);\n\n useEffect(() => {\n set({ signup: form });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form]);\n\n useEffect(() => {\n (async () => {\n const next = (await ServiceCountry.list(locale)) || {};\n\n setCountries(next);\n setForm({ ...form, country: next[country] });\n })();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [locale]);\n\n const handleSubmit = async (form) => {\n setBusy(true);\n setResponseError(undefined);\n\n const response = await ServiceUser.signup({\n ...form,\n country: getCountryCode(form.country, countries),\n dateOfBirth: dateFormat(parseDate(form.dateOfBirth, formatDate), { format: 'DD/MM/YYYY' }),\n idClub: club.id,\n idHotel: hotel.id,\n language,\n }).catch((error) => {\n setResponseError(error);\n });\n\n setResponse(response);\n setBusy(false);\n };\n\n const hasErrors = Object.keys(formError).length !== 0;\n\n return (\n <View role=\"signup\" className={style.container}>\n <View wide className={style.header}>\n <Text bold headline level={2}>\n {translate(L10N.TITLE, { clubName: club.name })}\n </Text>\n <Text className={style.description}>{translate(L10N.DESCRIPTION, { clubName: club.name })}</Text>\n </View>\n\n {!response && (\n <Form\n validateOnMount\n onChange={setForm}\n onError={setFormError}\n onSubmit={handleSubmit}\n testId={others.testId}\n className={styles(style.form, others.className)}\n >\n <TextRequiredFields />\n <InputText\n name=\"firstName\"\n label={translate(L10N.FIRSTNAME_LABEL)}\n required\n showRequired\n success={form.firstName?.length && !formError.firstName}\n value={form.firstName}\n />\n <InputText\n name=\"lastName\"\n label={translate(L10N.LASTNAME_LABEL)}\n required\n showRequired\n success={form.lastName?.length && !formError.lastName}\n value={form.lastName}\n />\n <InputText\n name=\"email\"\n error={form.email?.length && !!formError.email}\n label={translate(L10N.EMAIL_LABEL)}\n required\n showRequired\n success={form.email?.length && !formError.email}\n type=\"email\"\n value={form.email}\n />\n <InputDate\n name=\"dateOfBirth\"\n error={form.dateOfBirth?.length && !!formError.dateOfBirth}\n hint={\n form.dateOfBirth?.length && formError.dateOfBirth?.max ? translate(L10N.DATEOFBIRTH_ERROR) : undefined\n }\n format={formatDate}\n label={translate(L10N.DATEOFBIRTH_LABEL)}\n max={dateFormat(dateCalc(new Date(), -18, 'years'), { format: formatDate })}\n required\n showRequired\n success={form.dateOfBirth?.length && !formError.dateOfBirth}\n type=\"inputDate\"\n value={form.dateOfBirth}\n />\n <InputSelect\n name=\"country\"\n label={translate(L10N.COUNTRY_LABEL)}\n placeholder={translate(L10N.COUNTRY_PLACEHOLDER)}\n options={Object.values(countries)}\n required\n showRequired\n success={form.country?.length && !formError.country}\n value={form.country}\n />\n <InputText\n name=\"password\"\n error={form.password?.length && formError.password?.test}\n hint={translate(L10N.PASSWORD_HINT)}\n label={translate(L10N.PASSWORD_LABEL)}\n required\n showRequired\n success={form.password?.length && !formError.password}\n test={testPassword}\n type=\"password\"\n value={form.password}\n />\n\n <InputOption\n name=\"subscribed\"\n checked={form.subscribed}\n label={translate(L10N.SUBSCRIBED_LABEL)}\n small\n value={form.subscribed}\n />\n <InputOption\n name=\"privacy\"\n checked={form.privacy}\n label={translate(L10N.PRIVACY_LABEL, {\n clubName: club.name || '$club',\n conditionsLink: (\n <Action inline href={club.url?.conditions} target=\"_blank\" rel=\"noreferrer\" small>\n {translate(L10N.PRIVACY_CONDITIONS_LINK)}\n </Action>\n ),\n privacyPolicyLink: (\n <Action inline href={club.url?.privacy} target=\"_blank\" rel=\"noreferrer\" small>\n {translate(L10N.PRIVACY_POLICY_LINK)}\n </Action>\n ),\n })}\n required\n showRequired\n small\n value={form.privacy}\n className={style.privacy}\n />\n\n {!busy && responseError && (\n <Notification error className={style.notification}>\n {translate(L10N.NOTIFICATION_ERROR)}\n </Notification>\n )}\n\n <Button\n busy={busy}\n disabled={busy || hasErrors || !form.privacy}\n large\n wide\n type=\"submit\"\n className={style.button}\n >\n {translate(L10N.CTA)}\n </Button>\n </Form>\n )}\n\n {!busy && response && (\n <Notification large success className={style.notification}>\n <Text bold>{translate(L10N.SUCCESS_TITLE)}</Text>\n <Text>{translate(L10N.SUCCESS_MESSAGE)}</Text>\n </Notification>\n )}\n </View>\n );\n};\n\nSignup.displayName = 'Mirai:Core:Signup';\n\nSignup.propTypes = {};\n\nexport { Signup };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,GAAA,GAAAH,OAAA;AAaA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAF,uBAAA,CAAAL,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAA0D,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA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,SAAS,GAAG,CAAC,CAAC"}
|
|
@@ -51,7 +51,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
51
51
|
</span>
|
|
52
52
|
<input
|
|
53
53
|
class="input input withLabel"
|
|
54
|
-
id="signup-firstName"
|
|
55
54
|
name="firstName"
|
|
56
55
|
required=""
|
|
57
56
|
type="text"
|
|
@@ -81,7 +80,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
81
80
|
</span>
|
|
82
81
|
<input
|
|
83
82
|
class="input input withLabel"
|
|
84
|
-
id="signup-lastName"
|
|
85
83
|
name="lastName"
|
|
86
84
|
required=""
|
|
87
85
|
type="text"
|
|
@@ -111,7 +109,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
111
109
|
</span>
|
|
112
110
|
<input
|
|
113
111
|
class="input input withLabel"
|
|
114
|
-
id="signup-email"
|
|
115
112
|
name="email"
|
|
116
113
|
required=""
|
|
117
114
|
type="email"
|
|
@@ -141,7 +138,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
141
138
|
</span>
|
|
142
139
|
<input
|
|
143
140
|
class="input input withLabel"
|
|
144
|
-
id="signup-dateOfBirth"
|
|
145
141
|
maxlength="10"
|
|
146
142
|
name="dateOfBirth"
|
|
147
143
|
placeholder="DD/MM/YYYY"
|
|
@@ -173,7 +169,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
173
169
|
</span>
|
|
174
170
|
<select
|
|
175
171
|
class="select empty input withLabel empty"
|
|
176
|
-
id="signup-country"
|
|
177
172
|
name="country"
|
|
178
173
|
placeholder="common.label.select"
|
|
179
174
|
required=""
|
|
@@ -224,7 +219,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
224
219
|
</span>
|
|
225
220
|
<input
|
|
226
221
|
class="input input withLabel"
|
|
227
|
-
id="signup-password"
|
|
228
222
|
name="password"
|
|
229
223
|
required=""
|
|
230
224
|
type="password"
|
|
@@ -307,7 +301,6 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
307
301
|
</div>
|
|
308
302
|
<div
|
|
309
303
|
class="pressable inputOption"
|
|
310
|
-
id="signup-privacy"
|
|
311
304
|
>
|
|
312
305
|
<div
|
|
313
306
|
class="checkbox"
|
|
@@ -331,7 +324,9 @@ exports[`component:<Signup> inherit:className 1`] = `
|
|
|
331
324
|
</span>
|
|
332
325
|
</div>
|
|
333
326
|
<button
|
|
334
|
-
class="pressable button large wide"
|
|
327
|
+
class="pressable disabled button large disabled wide"
|
|
328
|
+
disabled=""
|
|
329
|
+
type="submit"
|
|
335
330
|
>
|
|
336
331
|
<div
|
|
337
332
|
class="view busyContainer"
|
|
@@ -400,7 +395,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
400
395
|
</span>
|
|
401
396
|
<input
|
|
402
397
|
class="input input withLabel"
|
|
403
|
-
id="signup-firstName"
|
|
404
398
|
name="firstName"
|
|
405
399
|
required=""
|
|
406
400
|
type="text"
|
|
@@ -430,7 +424,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
430
424
|
</span>
|
|
431
425
|
<input
|
|
432
426
|
class="input input withLabel"
|
|
433
|
-
id="signup-lastName"
|
|
434
427
|
name="lastName"
|
|
435
428
|
required=""
|
|
436
429
|
type="text"
|
|
@@ -460,7 +453,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
460
453
|
</span>
|
|
461
454
|
<input
|
|
462
455
|
class="input input withLabel"
|
|
463
|
-
id="signup-email"
|
|
464
456
|
name="email"
|
|
465
457
|
required=""
|
|
466
458
|
type="email"
|
|
@@ -490,7 +482,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
490
482
|
</span>
|
|
491
483
|
<input
|
|
492
484
|
class="input input withLabel"
|
|
493
|
-
id="signup-dateOfBirth"
|
|
494
485
|
maxlength="10"
|
|
495
486
|
name="dateOfBirth"
|
|
496
487
|
placeholder="DD/MM/YYYY"
|
|
@@ -522,7 +513,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
522
513
|
</span>
|
|
523
514
|
<select
|
|
524
515
|
class="select empty input withLabel empty"
|
|
525
|
-
id="signup-country"
|
|
526
516
|
name="country"
|
|
527
517
|
placeholder="common.label.select"
|
|
528
518
|
required=""
|
|
@@ -573,7 +563,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
573
563
|
</span>
|
|
574
564
|
<input
|
|
575
565
|
class="input input withLabel"
|
|
576
|
-
id="signup-password"
|
|
577
566
|
name="password"
|
|
578
567
|
required=""
|
|
579
568
|
type="password"
|
|
@@ -656,7 +645,6 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
656
645
|
</div>
|
|
657
646
|
<div
|
|
658
647
|
class="pressable inputOption"
|
|
659
|
-
id="signup-privacy"
|
|
660
648
|
>
|
|
661
649
|
<div
|
|
662
650
|
class="checkbox"
|
|
@@ -680,7 +668,9 @@ exports[`component:<Signup> renders 1`] = `
|
|
|
680
668
|
</span>
|
|
681
669
|
</div>
|
|
682
670
|
<button
|
|
683
|
-
class="pressable button large wide"
|
|
671
|
+
class="pressable disabled button large disabled wide"
|
|
672
|
+
disabled=""
|
|
673
|
+
type="submit"
|
|
684
674
|
>
|
|
685
675
|
<div
|
|
686
676
|
class="view busyContainer"
|
|
@@ -751,7 +741,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
751
741
|
</span>
|
|
752
742
|
<input
|
|
753
743
|
class="input input withLabel"
|
|
754
|
-
id="signup-firstName"
|
|
755
744
|
name="firstName"
|
|
756
745
|
required=""
|
|
757
746
|
type="text"
|
|
@@ -781,7 +770,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
781
770
|
</span>
|
|
782
771
|
<input
|
|
783
772
|
class="input input withLabel"
|
|
784
|
-
id="signup-lastName"
|
|
785
773
|
name="lastName"
|
|
786
774
|
required=""
|
|
787
775
|
type="text"
|
|
@@ -811,7 +799,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
811
799
|
</span>
|
|
812
800
|
<input
|
|
813
801
|
class="input input withLabel"
|
|
814
|
-
id="signup-email"
|
|
815
802
|
name="email"
|
|
816
803
|
required=""
|
|
817
804
|
type="email"
|
|
@@ -841,7 +828,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
841
828
|
</span>
|
|
842
829
|
<input
|
|
843
830
|
class="input input withLabel"
|
|
844
|
-
id="signup-dateOfBirth"
|
|
845
831
|
maxlength="10"
|
|
846
832
|
name="dateOfBirth"
|
|
847
833
|
placeholder="DD/MM/YYYY"
|
|
@@ -873,7 +859,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
873
859
|
</span>
|
|
874
860
|
<select
|
|
875
861
|
class="select empty input withLabel empty"
|
|
876
|
-
id="signup-country"
|
|
877
862
|
name="country"
|
|
878
863
|
placeholder="common.label.select"
|
|
879
864
|
required=""
|
|
@@ -924,7 +909,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
924
909
|
</span>
|
|
925
910
|
<input
|
|
926
911
|
class="input input withLabel"
|
|
927
|
-
id="signup-password"
|
|
928
912
|
name="password"
|
|
929
913
|
required=""
|
|
930
914
|
type="password"
|
|
@@ -1007,7 +991,6 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
1007
991
|
</div>
|
|
1008
992
|
<div
|
|
1009
993
|
class="pressable inputOption"
|
|
1010
|
-
id="signup-privacy"
|
|
1011
994
|
>
|
|
1012
995
|
<div
|
|
1013
996
|
class="checkbox"
|
|
@@ -1031,7 +1014,9 @@ exports[`component:<Signup> testID 1`] = `
|
|
|
1031
1014
|
</span>
|
|
1032
1015
|
</div>
|
|
1033
1016
|
<button
|
|
1034
|
-
class="pressable button large wide"
|
|
1017
|
+
class="pressable disabled button large disabled wide"
|
|
1018
|
+
disabled=""
|
|
1019
|
+
type="submit"
|
|
1035
1020
|
>
|
|
1036
1021
|
<div
|
|
1037
1022
|
class="view busyContainer"
|