ordering-ui-external 14.1.28 → 14.1.30
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/_bundles/{7.ordering-ui.36016a0f06226bace26a.js → 7.ordering-ui.190402c3fe50b957bac2.js} +1 -1
- package/_bundles/ordering-ui.190402c3fe50b957bac2.js +2 -0
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +10 -3
- package/_modules/themes/five/src/components/UserFormDetails/index.js +9 -2
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +8 -3
- package/src/themes/five/src/components/UserFormDetails/index.js +7 -2
- package/template/app.js +6 -6
- package/template/config.js +4 -1
- package/template/config.json +3 -0
- package/_bundles/ordering-ui.36016a0f06226bace26a.js +0 -2
- /package/_bundles/{0.ordering-ui.36016a0f06226bace26a.js → 0.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{1.ordering-ui.36016a0f06226bace26a.js → 1.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{2.ordering-ui.36016a0f06226bace26a.js → 2.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{4.ordering-ui.36016a0f06226bace26a.js → 4.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{5.ordering-ui.36016a0f06226bace26a.js → 5.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{6.ordering-ui.36016a0f06226bace26a.js → 6.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{7.ordering-ui.36016a0f06226bace26a.js.LICENSE.txt → 7.ordering-ui.190402c3fe50b957bac2.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.36016a0f06226bace26a.js → 8.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{9.ordering-ui.36016a0f06226bace26a.js → 9.ordering-ui.190402c3fe50b957bac2.js} +0 -0
- /package/_bundles/{ordering-ui.36016a0f06226bace26a.js.LICENSE.txt → ordering-ui.190402c3fe50b957bac2.js.LICENSE.txt} +0 -0
|
@@ -171,7 +171,7 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
171
171
|
}, [customersPhones === null || customersPhones === void 0 ? void 0 : customersPhones.error]);
|
|
172
172
|
var onInputChange = function onInputChange(inputValue, _ref2) {
|
|
173
173
|
var action = _ref2.action;
|
|
174
|
-
if (action === 'menu-close' || action === 'input-blur' || action === 'set-value'
|
|
174
|
+
if (action === 'menu-close' || action === 'input-blur' || action === 'set-value') {
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
if (!inputValue) {
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _reactHookForm = require("react-hook-form");
|
|
10
10
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
11
11
|
var _libphonenumberJs = _interopRequireDefault(require("libphonenumber-js"));
|
|
12
|
+
var _reactPhoneNumberInput = require("react-phone-number-input");
|
|
12
13
|
var _reactOtpInput = _interopRequireDefault(require("react-otp-input"));
|
|
13
14
|
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
14
15
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
@@ -260,17 +261,23 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
260
261
|
}
|
|
261
262
|
};
|
|
262
263
|
if (isValid) {
|
|
264
|
+
var _configs$validation_p, _configs$validation_p2;
|
|
263
265
|
phoneNumberParser = (0, _libphonenumberJs.default)(number);
|
|
266
|
+
if (!parseInt((_configs$validation_p = configs === null || configs === void 0 || (_configs$validation_p2 = configs.validation_phone_number_lib) === null || _configs$validation_p2 === void 0 ? void 0 : _configs$validation_p2.value) !== null && _configs$validation_p !== void 0 ? _configs$validation_p : 1, 10)) {
|
|
267
|
+
var _phoneNumberParser;
|
|
268
|
+
if ((_phoneNumberParser = phoneNumberParser) !== null && _phoneNumberParser !== void 0 && _phoneNumberParser.nationalNumber) phoneNumberParser.nationalNumber = (0, _reactPhoneNumberInput.formatPhoneNumber)(number);
|
|
269
|
+
}
|
|
264
270
|
}
|
|
265
271
|
if (phoneNumberParser) {
|
|
272
|
+
var _phoneNumberParser2, _phoneNumberParser3;
|
|
266
273
|
phoneNumber = {
|
|
267
274
|
country_phone_code: {
|
|
268
275
|
name: 'country_phone_code',
|
|
269
|
-
value: phoneNumberParser.countryCallingCode
|
|
276
|
+
value: (_phoneNumberParser2 = phoneNumberParser) === null || _phoneNumberParser2 === void 0 ? void 0 : _phoneNumberParser2.countryCallingCode
|
|
270
277
|
},
|
|
271
278
|
cellphone: {
|
|
272
279
|
name: 'cellphone',
|
|
273
|
-
value: phoneNumberParser.nationalNumber
|
|
280
|
+
value: (_phoneNumberParser3 = phoneNumberParser) === null || _phoneNumberParser3 === void 0 ? void 0 : _phoneNumberParser3.nationalNumber
|
|
274
281
|
}
|
|
275
282
|
};
|
|
276
283
|
}
|
|
@@ -368,7 +375,7 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
368
375
|
}
|
|
369
376
|
}, [recaptchaConfig]);
|
|
370
377
|
var preventWhiteSpaceOnKeyDown = function preventWhiteSpaceOnKeyDown(e) {
|
|
371
|
-
if (e.key ===
|
|
378
|
+
if (e.key === ' ') {
|
|
372
379
|
e.preventDefault();
|
|
373
380
|
}
|
|
374
381
|
};
|
|
@@ -10,6 +10,7 @@ var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skelet
|
|
|
10
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
11
11
|
var _reactHookForm = require("react-hook-form");
|
|
12
12
|
var _libphonenumberJs = _interopRequireDefault(require("libphonenumber-js"));
|
|
13
|
+
var _reactPhoneNumberInput = require("react-phone-number-input");
|
|
13
14
|
var _styledComponents = require("styled-components");
|
|
14
15
|
var _SignUpForm = require("../SignUpForm");
|
|
15
16
|
var _styles = require("./styles");
|
|
@@ -249,17 +250,23 @@ var UserFormDetailsUI = exports.UserFormDetailsUI = function UserFormDetailsUI(p
|
|
|
249
250
|
}
|
|
250
251
|
};
|
|
251
252
|
if (isValid) {
|
|
253
|
+
var _configs$validation_p, _configs$validation_p2;
|
|
252
254
|
phoneNumberParser = (0, _libphonenumberJs.default)(number);
|
|
255
|
+
if (!parseInt((_configs$validation_p = configs === null || configs === void 0 || (_configs$validation_p2 = configs.validation_phone_number_lib) === null || _configs$validation_p2 === void 0 ? void 0 : _configs$validation_p2.value) !== null && _configs$validation_p !== void 0 ? _configs$validation_p : 1, 10)) {
|
|
256
|
+
var _phoneNumberParser;
|
|
257
|
+
if ((_phoneNumberParser = phoneNumberParser) !== null && _phoneNumberParser !== void 0 && _phoneNumberParser.nationalNumber) phoneNumberParser.nationalNumber = (0, _reactPhoneNumberInput.formatPhoneNumber)(number);
|
|
258
|
+
}
|
|
253
259
|
}
|
|
254
260
|
if (phoneNumberParser) {
|
|
261
|
+
var _phoneNumberParser2, _phoneNumberParser3;
|
|
255
262
|
phoneNumber = {
|
|
256
263
|
country_phone_code: {
|
|
257
264
|
name: 'country_phone_code',
|
|
258
|
-
value: phoneNumberParser.countryCallingCode
|
|
265
|
+
value: (_phoneNumberParser2 = phoneNumberParser) === null || _phoneNumberParser2 === void 0 ? void 0 : _phoneNumberParser2.countryCallingCode
|
|
259
266
|
},
|
|
260
267
|
cellphone: {
|
|
261
268
|
name: 'cellphone',
|
|
262
|
-
value: phoneNumberParser.nationalNumber
|
|
269
|
+
value: (_phoneNumberParser3 = phoneNumberParser) === null || _phoneNumberParser3 === void 0 ? void 0 : _phoneNumberParser3.nationalNumber
|
|
263
270
|
}
|
|
264
271
|
};
|
|
265
272
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.30",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"lodash": "^4.17.19",
|
|
89
89
|
"moment": "^2.29.4",
|
|
90
90
|
"nanoid": "^4.0.0",
|
|
91
|
-
"ordering-components-external": "13.0.
|
|
91
|
+
"ordering-components-external": "13.0.34",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -123,7 +123,7 @@ const PhoneAutocompleteUI = (props) => {
|
|
|
123
123
|
}, [customersPhones?.error])
|
|
124
124
|
|
|
125
125
|
const onInputChange = (inputValue, { action }) => {
|
|
126
|
-
if (action === 'menu-close' || action === 'input-blur' || action === 'set-value'
|
|
126
|
+
if (action === 'menu-close' || action === 'input-blur' || action === 'set-value') {
|
|
127
127
|
return
|
|
128
128
|
}
|
|
129
129
|
if (!inputValue) {
|
|
@@ -2,6 +2,8 @@ import React, { useState, useEffect } from 'react'
|
|
|
2
2
|
import { useForm } from 'react-hook-form'
|
|
3
3
|
import Skeleton from 'react-loading-skeleton'
|
|
4
4
|
import parsePhoneNumber from 'libphonenumber-js'
|
|
5
|
+
import { formatPhoneNumber } from 'react-phone-number-input'
|
|
6
|
+
|
|
5
7
|
import OtpInput from 'react-otp-input'
|
|
6
8
|
|
|
7
9
|
import {
|
|
@@ -229,16 +231,19 @@ const SignUpFormUI = (props) => {
|
|
|
229
231
|
}
|
|
230
232
|
if (isValid) {
|
|
231
233
|
phoneNumberParser = parsePhoneNumber(number)
|
|
234
|
+
if (!parseInt(configs?.validation_phone_number_lib?.value ?? 1, 10)) {
|
|
235
|
+
if (phoneNumberParser?.nationalNumber) phoneNumberParser.nationalNumber = formatPhoneNumber(number)
|
|
236
|
+
}
|
|
232
237
|
}
|
|
233
238
|
if (phoneNumberParser) {
|
|
234
239
|
phoneNumber = {
|
|
235
240
|
country_phone_code: {
|
|
236
241
|
name: 'country_phone_code',
|
|
237
|
-
value: phoneNumberParser
|
|
242
|
+
value: phoneNumberParser?.countryCallingCode
|
|
238
243
|
},
|
|
239
244
|
cellphone: {
|
|
240
245
|
name: 'cellphone',
|
|
241
|
-
value: phoneNumberParser
|
|
246
|
+
value: phoneNumberParser?.nationalNumber
|
|
242
247
|
}
|
|
243
248
|
}
|
|
244
249
|
}
|
|
@@ -327,7 +332,7 @@ const SignUpFormUI = (props) => {
|
|
|
327
332
|
}, [recaptchaConfig])
|
|
328
333
|
|
|
329
334
|
const preventWhiteSpaceOnKeyDown = (e) => {
|
|
330
|
-
if (e.key ===
|
|
335
|
+
if (e.key === ' ') {
|
|
331
336
|
e.preventDefault()
|
|
332
337
|
}
|
|
333
338
|
}
|
|
@@ -3,6 +3,8 @@ import Skeleton from 'react-loading-skeleton'
|
|
|
3
3
|
import { useSession, useLanguage, useCustomer, useConfig } from 'ordering-components-external'
|
|
4
4
|
import { useForm } from 'react-hook-form'
|
|
5
5
|
import parsePhoneNumber from 'libphonenumber-js'
|
|
6
|
+
import { formatPhoneNumber } from 'react-phone-number-input'
|
|
7
|
+
|
|
6
8
|
import { useTheme } from 'styled-components'
|
|
7
9
|
import { SignUpForm } from '../SignUpForm'
|
|
8
10
|
|
|
@@ -205,16 +207,19 @@ export const UserFormDetailsUI = (props) => {
|
|
|
205
207
|
}
|
|
206
208
|
if (isValid) {
|
|
207
209
|
phoneNumberParser = parsePhoneNumber(number)
|
|
210
|
+
if (!parseInt(configs?.validation_phone_number_lib?.value ?? 1, 10)) {
|
|
211
|
+
if (phoneNumberParser?.nationalNumber) phoneNumberParser.nationalNumber = formatPhoneNumber(number)
|
|
212
|
+
}
|
|
208
213
|
}
|
|
209
214
|
if (phoneNumberParser) {
|
|
210
215
|
phoneNumber = {
|
|
211
216
|
country_phone_code: {
|
|
212
217
|
name: 'country_phone_code',
|
|
213
|
-
value: phoneNumberParser
|
|
218
|
+
value: phoneNumberParser?.countryCallingCode
|
|
214
219
|
},
|
|
215
220
|
cellphone: {
|
|
216
221
|
name: 'cellphone',
|
|
217
|
-
value: phoneNumberParser
|
|
222
|
+
value: phoneNumberParser?.nationalNumber
|
|
218
223
|
}
|
|
219
224
|
}
|
|
220
225
|
}
|
package/template/app.js
CHANGED
|
@@ -517,14 +517,14 @@ export const App = () => {
|
|
|
517
517
|
/>
|
|
518
518
|
) : (
|
|
519
519
|
<div style={{ marginBottom: windowSize.width < 576 && onlineStatus ? 80 : 0 }}>
|
|
520
|
-
{!!configs?.track_id_google_analytics?.value && (
|
|
521
|
-
<Analytics trackId={configs?.track_id_google_analytics?.value} />
|
|
520
|
+
{(!!configs?.track_id_google_analytics?.value || !!settings?.store_google_analytics_id) && (
|
|
521
|
+
<Analytics trackId={singleBusinessConfig?.isActive ? settings?.store_google_analytics_id : configs?.track_id_google_analytics?.value} />
|
|
522
522
|
)}
|
|
523
|
-
{!!configs?.segment_track_id?.value && (
|
|
524
|
-
<AnalyticsSegment writeKey={configs?.segment_track_id?.value} />
|
|
523
|
+
{(!!configs?.segment_track_id?.value || !!settings?.store_segment_id) && (
|
|
524
|
+
<AnalyticsSegment writeKey={singleBusinessConfig?.isActive ? settings?.store_segment_id : configs?.segment_track_id?.value} />
|
|
525
525
|
)}
|
|
526
|
-
{!!configs?.facebook_id?.value && FacebookPixel && (
|
|
527
|
-
<FacebookPixel trackId={configs?.facebook_id?.value} />
|
|
526
|
+
{(!!configs?.facebook_id?.value || !!settings?.store_facebook_pixel_id) && FacebookPixel && (
|
|
527
|
+
<FacebookPixel trackId={singleBusinessConfig?.isActive ? settings?.store_facebook_pixel_id : configs?.facebook_id?.value} />
|
|
528
528
|
)}
|
|
529
529
|
{!loaded && <SpinnerLoader />}
|
|
530
530
|
<SmartAppBanner
|
package/template/config.js
CHANGED
package/template/config.json
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"store_android_id": "",
|
|
18
18
|
"store_apple_id": "",
|
|
19
19
|
"store_kindle_id": "",
|
|
20
|
+
"store_facebook_pixel_id": "0",
|
|
21
|
+
"store_google_analytics_id": "0",
|
|
22
|
+
"store_segment_id": "0",
|
|
20
23
|
"url_dashboard": "https://app.tryordering.com",
|
|
21
24
|
"contact_email": "support@ordering.co",
|
|
22
25
|
"use_kiosk": false,
|