@apolitical/component-library 4.7.0 → 4.7.2
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/form/types/profile-form/profile-form.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +12 -5
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -20792,9 +20792,12 @@ const oC = ({ hooks: e, functions: t, meta: n = {}, gtm: r }) => {
|
|
|
20792
20792
|
label: a.formatMessage({ id: `${i}location` }),
|
|
20793
20793
|
placeholder: a.formatMessage({ id: `${i}location_placeholder` }),
|
|
20794
20794
|
value: (w = s.location) == null ? void 0 : w.country,
|
|
20795
|
-
validation: [
|
|
20796
|
-
|
|
20797
|
-
|
|
20795
|
+
validation: [
|
|
20796
|
+
{ condition: "required" },
|
|
20797
|
+
{
|
|
20798
|
+
condition: ({ location: _ }) => !g(_)
|
|
20799
|
+
}
|
|
20800
|
+
],
|
|
20798
20801
|
functions: {
|
|
20799
20802
|
onChange: () => {
|
|
20800
20803
|
},
|
|
@@ -21407,8 +21410,12 @@ const mC = ({
|
|
|
21407
21410
|
functions: {
|
|
21408
21411
|
...r.props.functions,
|
|
21409
21412
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21410
|
-
onSuccess: (b) => {
|
|
21411
|
-
|
|
21413
|
+
onSuccess: async (b) => {
|
|
21414
|
+
try {
|
|
21415
|
+
r.props.functions.onSuccess && await r.props.functions.onSuccess(b);
|
|
21416
|
+
} finally {
|
|
21417
|
+
p();
|
|
21418
|
+
}
|
|
21412
21419
|
},
|
|
21413
21420
|
onCancel: () => {
|
|
21414
21421
|
r.props.functions.onCancel && r.props.functions.onCancel(), p();
|