ublo-lib 1.24.2 → 1.24.3
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/es/common/components/gesco-contact-form/gesco-contact-form.d.ts.map +1 -1
- package/es/common/components/gesco-contact-form/gesco-contact-form.js +5 -1
- package/es/common/components/gesco-contact-form/services/messages.d.ts +1 -0
- package/es/common/components/gesco-contact-form/services/messages.d.ts.map +1 -1
- package/es/common/components/gesco-contact-form/services/messages.js +2 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesco-contact-form.d.ts","sourceRoot":"","sources":["../../../../src/common/components/gesco-contact-form/gesco-contact-form.tsx"],"names":[],"mappings":"AAgBA,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,IAAI,CAAC,EACD,0CAA0C,GAC1C,sDAAsD,GACtD,8CAA8C,CAAC;IAEnD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE;QAClB,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5B,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAW,EACX,OAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,KAAgB,EAChB,IAAiD,EACjD,QAAQ,EACR,iBAAsB,GACvB,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"gesco-contact-form.d.ts","sourceRoot":"","sources":["../../../../src/common/components/gesco-contact-form/gesco-contact-form.tsx"],"names":[],"mappings":"AAgBA,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,IAAI,CAAC,EACD,0CAA0C,GAC1C,sDAAsD,GACtD,8CAA8C,CAAC;IAEnD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE;QAClB,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5B,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAW,EACX,OAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,KAAgB,EAChB,IAAiD,EACjD,QAAQ,EACR,iBAAsB,GACvB,EAAE,KAAK,2CAkQP"}
|
|
@@ -102,5 +102,9 @@ export default function GescoContactForm({ lang = "fr", channel = "ESF", resort,
|
|
|
102
102
|
}), disabled: Boolean(error) || loading, required: true }), _jsx(Input, { name: "lastname", type: "text", icon: "User", label: messages.lastname, pattern: ".{2,}", patternError: Messages.format(messages.lengthError, {
|
|
103
103
|
label: messages.lastname,
|
|
104
104
|
length: "1",
|
|
105
|
-
}), disabled: Boolean(error) || loading, required: true }), _jsx(Input, { name: "email", type: "email", icon: "Mail", label: messages.email, pattern: "[^@\\s]+@[^@\\s]+\\.[^@\\s]+", patternError: messages.emailError, disabled: Boolean(error) || loading, required: true }), _jsxs("div", { className: styles.phoneGroup, children: [_jsx(PhoneCodeSelect, { messages: messages, disabled: Boolean(error) || loading }), _jsx(Input, { name: "phone", type: "phone", className: styles.phoneField, label: messages.phone, inputMode: "numeric", pattern: "[0-9 ]{9,15}$", patternError: messages.phoneError, disabled: Boolean(error) || loading, required: true })] }), _jsx(Select, { name: "country", icon: "Globe", label: messages.country, className: styles.fullWidthField, placeholder: messages.defaultCountry, options: countryOptions, disabled: Boolean(error) || loading, required: true }), needCategory && (_jsx(Select, { name: "category", icon: "Plane", label: messages.category, className: styles.fullWidthField, placeholder: messages.defaultCategory, options: categoryOptions, disabled: Boolean(error) || loading, required: true })), stayNeeded && (_jsxs(_Fragment, { children: [_jsx(Input, { name: "stayFrom", className: styles.stayField, type: "date", label: messages.stayFromDate, placeholder: messages.dateFormat, onValueChange: updateStayToMin, hint: stayFromMax, min: stayMin, max: stayFromMax, disabled: Boolean(error) || loading,
|
|
105
|
+
}), disabled: Boolean(error) || loading, required: true }), _jsx(Input, { name: "email", type: "email", icon: "Mail", label: messages.email, pattern: "[^@\\s]+@[^@\\s]+\\.[^@\\s]+", patternError: messages.emailError, disabled: Boolean(error) || loading, required: true }), _jsxs("div", { className: styles.phoneGroup, children: [_jsx(PhoneCodeSelect, { messages: messages, disabled: Boolean(error) || loading }), _jsx(Input, { name: "phone", type: "phone", className: styles.phoneField, label: messages.phone, inputMode: "numeric", pattern: "[0-9 ]{9,15}$", patternError: messages.phoneError, disabled: Boolean(error) || loading, required: true })] }), _jsx(Select, { name: "country", icon: "Globe", label: messages.country, className: styles.fullWidthField, placeholder: messages.defaultCountry, options: countryOptions, disabled: Boolean(error) || loading, required: true }), needCategory && (_jsx(Select, { name: "category", icon: "Plane", label: messages.category, className: styles.fullWidthField, placeholder: messages.defaultCategory, options: categoryOptions, disabled: Boolean(error) || loading, required: true })), stayNeeded && (_jsxs(_Fragment, { children: [_jsx(Input, { name: "stayFrom", className: styles.stayField, type: "date", label: messages.stayFromDate, placeholder: messages.dateFormat, onValueChange: updateStayToMin, hint: stayFromMax, min: stayMin, max: stayFromMax, disabled: Boolean(error) || loading, patternError: Messages.format(messages.mandatoryError, {
|
|
106
|
+
label: messages.stayFrom,
|
|
107
|
+
}), extended: true, required: true }), _jsx(Input, { name: "stayTo", className: styles.stayField, type: "date", label: messages.stayToDate, placeholder: messages.dateFormat, onValueChange: updateStayFromMax, hint: stayToMin, min: stayToMin || stayMin, disabled: Boolean(error) || loading, patternError: Messages.format(messages.mandatoryError, {
|
|
108
|
+
label: messages.stayTo,
|
|
109
|
+
}), extended: true, required: true })] })), _jsx(Textarea, { name: "message", className: styles.fullWidthField, label: messages.message, disabled: Boolean(error) || loading, required: true, autoSizing: true }), _jsx("div", { className: styles.send, children: _jsxs(Button, { type: "submit", disabled: Boolean(error) || loading || submiting, children: [submiting ? _jsx(Loader, { className: styles.loader }) : _jsx(Icons.Plane, {}), messages.submit] }) }), sendSuccess && (_jsx(Information, { className: styles.response, type: "success", close: hideSuccess, children: messages.sendSucesss })), sendError && (_jsx(Information, { className: styles.response, type: "error", close: hideError, children: messages.sendError })), error && (_jsx(Information, { className: styles.error, type: "warning", children: messages.parametersError }))] }, formKey));
|
|
106
110
|
}
|
|
@@ -26,6 +26,7 @@ declare const fr: {
|
|
|
26
26
|
emailError: string;
|
|
27
27
|
phoneError: string;
|
|
28
28
|
lengthError: string;
|
|
29
|
+
mandatoryError: string;
|
|
29
30
|
};
|
|
30
31
|
export declare function get(lang: "fr" | "en", overrides?: {}): Record<keyof typeof fr, string>;
|
|
31
32
|
export declare function format(value: string, params: Record<string, string>): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/gesco-contact-form/services/messages.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/gesco-contact-form/services/messages.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BP,CAAC;AAoCF,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,SAAS,KAAK,GACb,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAAC,CAKjC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAKnE"}
|
|
@@ -26,6 +26,7 @@ const fr = {
|
|
|
26
26
|
emailError: 'L\'email doit être au format "john.doe@domaine.com"',
|
|
27
27
|
phoneError: 'Le téléphone doit être au format "0612345678"',
|
|
28
28
|
lengthError: '"{label}" doit contenir au moins {length} caractère(s)',
|
|
29
|
+
mandatoryError: '"{label}" est obligatoire',
|
|
29
30
|
};
|
|
30
31
|
const en = {
|
|
31
32
|
subject: "Subject",
|
|
@@ -55,6 +56,7 @@ const en = {
|
|
|
55
56
|
emailError: 'The email must be in the format "john.doe@domain.com"',
|
|
56
57
|
phoneError: 'The phone number must be in the following formats: "0612345678" or "555 555 555',
|
|
57
58
|
lengthError: '"{label}" must contain at least {length} character(s)',
|
|
59
|
+
mandatoryError: '"{label}" is mandatory',
|
|
58
60
|
};
|
|
59
61
|
export function get(lang, overrides = {}) {
|
|
60
62
|
const locale = lang === "fr" ? fr : en;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ublo-lib",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"dt-design-system": "^3.1.5",
|
|
6
6
|
"leaflet": "^1.9.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"classnames": "2.5.1",
|
|
43
43
|
"cors": "2.8.5",
|
|
44
44
|
"cpx2": "4.2.3",
|
|
45
|
-
"dt-design-system": "3.7.
|
|
45
|
+
"dt-design-system": "3.7.6",
|
|
46
46
|
"eslint": "8.56.0",
|
|
47
47
|
"eslint-config-prettier": "9.1.0",
|
|
48
48
|
"eslint-config-standard": "17.1.0",
|