@lancom/shared 0.0.377 → 0.0.378
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.
|
@@ -3,11 +3,18 @@ const phoneValidators = {
|
|
|
3
3
|
'+61': /^[0-9]{9,10}$/
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
// export const phone = {
|
|
7
|
+
// validate: (value, params) => {
|
|
8
|
+
// const [code] = params || [];
|
|
9
|
+
// const exp = phoneValidators[code] || /^[0-9-()\s+]+$/;
|
|
10
|
+
// return exp.test(`${value || ''}`);
|
|
11
|
+
// },
|
|
12
|
+
// message: 'Phone number is not valid'
|
|
13
|
+
// };
|
|
14
|
+
|
|
6
15
|
export const phone = {
|
|
7
|
-
validate:
|
|
8
|
-
|
|
9
|
-
const exp = phoneValidators[code] || /^[0-9-()\s+]+$/;
|
|
10
|
-
return exp.test(`${value || ''}`);
|
|
16
|
+
validate: value => {
|
|
17
|
+
return /^[0-9-()\s+]+$/.test(`${value}`); // todo add validation for phone number
|
|
11
18
|
},
|
|
12
19
|
message: 'Phone number is not valid'
|
|
13
20
|
};
|
package/package.json
CHANGED
package/store/index.js
CHANGED
|
@@ -124,9 +124,8 @@ export const actions = {
|
|
|
124
124
|
dispatch('cart/calculateCartPrice', { shop, country });
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
127
|
+
commit('setGoogleClickId', query.gclid || state?.googleClickId || null);
|
|
128
|
+
|
|
130
129
|
const closedNotification = localStorage.getItem(CLOSED_NOTIFICATION);
|
|
131
130
|
if (notificationBar?.text === closedNotification) {
|
|
132
131
|
commit('setNotificationBar', { ...notificationBar, enabled: false });
|