ordering-ui-external 14.1.55 → 14.1.57
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.0dace0837e9cf353a976.js → 7.ordering-ui.270da2cab837d32183e2.js} +1 -1
- package/_bundles/{ordering-ui.0dace0837e9cf353a976.js → ordering-ui.270da2cab837d32183e2.js} +2 -2
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +2 -2
- package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/index.js +3 -2
- package/_modules/utils/index.js +24 -30
- package/package.json +1 -1
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/UserFormDetails/index.js +2 -1
- package/src/utils/index.js +20 -27
- /package/_bundles/{0.ordering-ui.0dace0837e9cf353a976.js → 0.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{1.ordering-ui.0dace0837e9cf353a976.js → 1.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{2.ordering-ui.0dace0837e9cf353a976.js → 2.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{4.ordering-ui.0dace0837e9cf353a976.js → 4.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{5.ordering-ui.0dace0837e9cf353a976.js → 5.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{6.ordering-ui.0dace0837e9cf353a976.js → 6.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{7.ordering-ui.0dace0837e9cf353a976.js.LICENSE.txt → 7.ordering-ui.270da2cab837d32183e2.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.0dace0837e9cf353a976.js → 8.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{9.ordering-ui.0dace0837e9cf353a976.js → 9.ordering-ui.270da2cab837d32183e2.js} +0 -0
- /package/_bundles/{ordering-ui.0dace0837e9cf353a976.js.LICENSE.txt → ordering-ui.270da2cab837d32183e2.js.LICENSE.txt} +0 -0
|
@@ -259,9 +259,9 @@ var PhoneAutocompleteUI = function PhoneAutocompleteUI(props) {
|
|
|
259
259
|
deleteUserCustomer(true);
|
|
260
260
|
};
|
|
261
261
|
var handleOnPaste = function handleOnPaste(e) {
|
|
262
|
-
var _e$clipboardData, _e$clipboardData$getD;
|
|
262
|
+
var _e$clipboardData, _e$clipboardData$getD, _e$clipboardData$getD2;
|
|
263
263
|
var regex = /\D/;
|
|
264
|
-
var textCellphone = e === null || e === void 0 || (_e$clipboardData = e.clipboardData) === null || _e$clipboardData === void 0 || (_e$clipboardData$getD = _e$clipboardData.getData) === null || _e$clipboardData$getD === void 0
|
|
264
|
+
var textCellphone = e === null || e === void 0 || (_e$clipboardData = e.clipboardData) === null || _e$clipboardData === void 0 || (_e$clipboardData$getD = _e$clipboardData.getData) === null || _e$clipboardData$getD === void 0 || (_e$clipboardData$getD = _e$clipboardData$getD.call(_e$clipboardData, 'text')) === null || _e$clipboardData$getD === void 0 || (_e$clipboardData$getD2 = _e$clipboardData$getD.replace) === null || _e$clipboardData$getD2 === void 0 ? void 0 : _e$clipboardData$getD2.call(_e$clipboardData$getD, /[^0-9]/g, '');
|
|
265
265
|
var value = parseInt(textCellphone);
|
|
266
266
|
if (!regex.test(value) && (textCellphone === null || textCellphone === void 0 ? void 0 : textCellphone.length) >= 7 && !optSelected) {
|
|
267
267
|
getUsers(value);
|
|
@@ -14,7 +14,7 @@ var _reactPhoneNumberInput = require("react-phone-number-input");
|
|
|
14
14
|
var _styles = require("./styles");
|
|
15
15
|
var _Inputs = require("../../styles/Inputs");
|
|
16
16
|
var _Buttons = require("../../styles/Buttons");
|
|
17
|
-
var _InputPhoneNumber = require("
|
|
17
|
+
var _InputPhoneNumber = require("../InputPhoneNumber");
|
|
18
18
|
var _Confirm = require("../Confirm");
|
|
19
19
|
var _utils = require("../../../../../utils");
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -337,7 +337,8 @@ var UserFormDetailsUI = exports.UserFormDetailsUI = function UserFormDetailsUI(p
|
|
|
337
337
|
value: userPhoneNumber,
|
|
338
338
|
setValue: handleChangePhoneNumber,
|
|
339
339
|
handleIsValid: setIsValidPhoneNumber,
|
|
340
|
-
disabled: !isEdit
|
|
340
|
+
disabled: !isEdit,
|
|
341
|
+
useProfileFormStyle: true
|
|
341
342
|
})), !confirmDataLayout && /*#__PURE__*/_react.default.createElement(_styles.Divider, null), (_props$afterMidElemen = props.afterMidElements) === null || _props$afterMidElemen === void 0 ? void 0 : _props$afterMidElemen.map(function (MidElement, i) {
|
|
342
343
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
343
344
|
key: i
|
package/_modules/utils/index.js
CHANGED
|
@@ -173,7 +173,7 @@ var lightenDarkenColor = exports.lightenDarkenColor = function lightenDarkenColo
|
|
|
173
173
|
b = color[3];
|
|
174
174
|
} else {
|
|
175
175
|
// If RGB --> Convert it to HEX
|
|
176
|
-
color = +(
|
|
176
|
+
color = +('0x' + color.slice(1).replace(color.length < 5 && /./g, '$&$&'));
|
|
177
177
|
r = color >> 16;
|
|
178
178
|
g = color >> 8 & 255;
|
|
179
179
|
b = color & 255;
|
|
@@ -184,7 +184,7 @@ var lightenDarkenColor = exports.lightenDarkenColor = function lightenDarkenColo
|
|
|
184
184
|
|
|
185
185
|
// Using the HSP value, determine whether the color is light or dark
|
|
186
186
|
if (hsp > 197) {
|
|
187
|
-
return true; //is light color
|
|
187
|
+
return true; // is light color
|
|
188
188
|
} else {
|
|
189
189
|
return false;
|
|
190
190
|
}
|
|
@@ -1128,36 +1128,30 @@ var calendarLanguages = exports.calendarLanguages = {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
};
|
|
1130
1130
|
var getCateringValues = exports.getCateringValues = function getCateringValues(cateringTypeString, configs) {
|
|
1131
|
-
var
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
var
|
|
1135
|
-
|
|
1131
|
+
var getValue = function getValue(configName) {
|
|
1132
|
+
var config = configs === null || configs === void 0 ? void 0 : configs[configName];
|
|
1133
|
+
if (config && config.value) {
|
|
1134
|
+
var _config$value$split$f;
|
|
1135
|
+
var value = (_config$value$split$f = config.value.split('|').find(function (val) {
|
|
1136
1136
|
return val.includes(cateringTypeString);
|
|
1137
|
-
})) === null ||
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
}
|
|
1149
|
-
var preorderSlotInterval = parseInt(splitCateringValue('preorder_slot_interval'));
|
|
1150
|
-
var preorderLeadTime = parseInt(splitCateringValue('preorder_lead_time'));
|
|
1151
|
-
var preorderTimeRange = parseInt(splitCateringValue('preorder_time_range'));
|
|
1152
|
-
var preorderMaximumDays = parseInt(splitCateringValue('preorder_maximum_days'));
|
|
1153
|
-
var preorderMinimumDays = parseInt(splitCateringValue('preorder_minimum_days'));
|
|
1154
|
-
return {
|
|
1155
|
-
preorderSlotInterval: preorderSlotInterval,
|
|
1156
|
-
preorderLeadTime: preorderLeadTime,
|
|
1157
|
-
preorderTimeRange: preorderTimeRange,
|
|
1158
|
-
preorderMaximumDays: preorderMaximumDays,
|
|
1159
|
-
preorderMinimumDays: preorderMinimumDays
|
|
1137
|
+
})) === null || _config$value$split$f === void 0 ? void 0 : _config$value$split$f.split(',')[1];
|
|
1138
|
+
return isNaN(value) ? null : parseInt(value);
|
|
1139
|
+
}
|
|
1140
|
+
return null;
|
|
1141
|
+
};
|
|
1142
|
+
var values = {
|
|
1143
|
+
preorderSlotInterval: getValue('preorder_slot_interval'),
|
|
1144
|
+
preorderLeadTime: getValue('preorder_lead_time'),
|
|
1145
|
+
preorderTimeRange: getValue('preorder_time_range'),
|
|
1146
|
+
preorderMaximumDays: getValue('preorder_maximum_days'),
|
|
1147
|
+
preorderMinimumDays: getValue('preorder_minimum_days')
|
|
1160
1148
|
};
|
|
1149
|
+
return Object.fromEntries(Object.entries(values).filter(function (_ref3) {
|
|
1150
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1151
|
+
_ = _ref4[0],
|
|
1152
|
+
v = _ref4[1];
|
|
1153
|
+
return v !== null;
|
|
1154
|
+
}));
|
|
1161
1155
|
};
|
|
1162
1156
|
var getCurrenySymbol = exports.getCurrenySymbol = function getCurrenySymbol(code) {
|
|
1163
1157
|
var _CURRENCY$code$symbol, _CURRENCY$code;
|
package/package.json
CHANGED
|
@@ -189,7 +189,7 @@ const PhoneAutocompleteUI = (props) => {
|
|
|
189
189
|
|
|
190
190
|
const handleOnPaste = (e) => {
|
|
191
191
|
const regex = /\D/
|
|
192
|
-
const textCellphone = e?.clipboardData?.getData?.('text')
|
|
192
|
+
const textCellphone = e?.clipboardData?.getData?.('text')?.replace?.(/[^0-9]/g, '')
|
|
193
193
|
const value = parseInt(textCellphone)
|
|
194
194
|
if (!regex.test(value) && textCellphone?.length >= 7 && !optSelected) {
|
|
195
195
|
getUsers(value)
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
|
|
17
17
|
import { Input } from '../../styles/Inputs'
|
|
18
18
|
import { Button } from '../../styles/Buttons'
|
|
19
|
-
import { InputPhoneNumber } from '
|
|
19
|
+
import { InputPhoneNumber } from '../InputPhoneNumber'
|
|
20
20
|
import { Alert } from '../Confirm'
|
|
21
21
|
import { sortInputFields } from '../../../../../utils'
|
|
22
22
|
|
|
@@ -336,6 +336,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
336
336
|
setValue={handleChangePhoneNumber}
|
|
337
337
|
handleIsValid={setIsValidPhoneNumber}
|
|
338
338
|
disabled={!isEdit}
|
|
339
|
+
useProfileFormStyle
|
|
339
340
|
/>
|
|
340
341
|
</InputPhoneNumberWrapper>
|
|
341
342
|
)}
|
package/src/utils/index.js
CHANGED
|
@@ -118,7 +118,7 @@ export const getTraduction = key => {
|
|
|
118
118
|
ERROR_PLACE_PAY_WITH_PAYPAL_CAPTURE: 'An error occurred while trying to pay by PayPal',
|
|
119
119
|
ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
|
|
120
120
|
ERROR_INVALID_OFFER: 'The offer doesn\'t exist',
|
|
121
|
-
ERROR_CASH_WALLET_FEATURE_DISABLED: 'Cash wallet feature is disabled'
|
|
121
|
+
ERROR_CASH_WALLET_FEATURE_DISABLED: 'Cash wallet feature is disabled'
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
return keyList[key] ? t(key, keyList[key]) : t(key)
|
|
@@ -136,7 +136,6 @@ export const bytesConverter = bytes => {
|
|
|
136
136
|
* Function to get brightness of color.
|
|
137
137
|
*/
|
|
138
138
|
export const lightenDarkenColor = (color) => {
|
|
139
|
-
|
|
140
139
|
let r, g, b, hsp
|
|
141
140
|
if (color.match(/^rgb/)) {
|
|
142
141
|
// If HEX --> store the red, green, blue values in separate variables
|
|
@@ -147,7 +146,7 @@ export const lightenDarkenColor = (color) => {
|
|
|
147
146
|
b = color[3]
|
|
148
147
|
} else {
|
|
149
148
|
// If RGB --> Convert it to HEX
|
|
150
|
-
color = +(
|
|
149
|
+
color = +('0x' + color.slice(1).replace(color.length < 5 && /./g, '$&$&'))
|
|
151
150
|
|
|
152
151
|
r = color >> 16
|
|
153
152
|
g = color >> 8 & 255
|
|
@@ -163,7 +162,7 @@ export const lightenDarkenColor = (color) => {
|
|
|
163
162
|
|
|
164
163
|
// Using the HSP value, determine whether the color is light or dark
|
|
165
164
|
if (hsp > 197) {
|
|
166
|
-
return true //is light color
|
|
165
|
+
return true // is light color
|
|
167
166
|
} else {
|
|
168
167
|
return false
|
|
169
168
|
}
|
|
@@ -678,7 +677,7 @@ export const getOrderStatuPickUp = (s) => {
|
|
|
678
677
|
{ key: 16, value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_STATUS_CANCELLED_BY_CUSTOMER || 'Order cancelled by customer'), slug: 'ORDER_STATUS_CANCELLED_BY_CUSTOMER', percentage: 0 },
|
|
679
678
|
{ key: 17, value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_NOT_PICKEDUP_BY_CUSTOMER || 'Order not picked up by customer'), slug: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER', percentage: 0 },
|
|
680
679
|
{ key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS || 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', percentage: 70 },
|
|
681
|
-
{ key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 90 }
|
|
680
|
+
{ key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 90 }
|
|
682
681
|
]
|
|
683
682
|
const objectStatus = orderStatus.find((o) => o.key === status)
|
|
684
683
|
return objectStatus && objectStatus
|
|
@@ -711,30 +710,24 @@ export const calendarLanguages = {
|
|
|
711
710
|
}
|
|
712
711
|
|
|
713
712
|
export const getCateringValues = (cateringTypeString, configs) => {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
?.find(config => config?.key === configName)
|
|
722
|
-
?.value?.split('|')
|
|
723
|
-
?.find(val => val.includes(cateringTypeString))?.split(',')[1]
|
|
713
|
+
const getValue = (configName) => {
|
|
714
|
+
const config = configs?.[configName]
|
|
715
|
+
if (config && config.value) {
|
|
716
|
+
const value = config.value.split('|').find(val => val.includes(cateringTypeString))?.split(',')[1]
|
|
717
|
+
return isNaN(value) ? null : parseInt(value)
|
|
718
|
+
}
|
|
719
|
+
return null
|
|
724
720
|
}
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
preorderSlotInterval,
|
|
733
|
-
preorderLeadTime,
|
|
734
|
-
preorderTimeRange,
|
|
735
|
-
preorderMaximumDays,
|
|
736
|
-
preorderMinimumDays
|
|
721
|
+
|
|
722
|
+
const values = {
|
|
723
|
+
preorderSlotInterval: getValue('preorder_slot_interval'),
|
|
724
|
+
preorderLeadTime: getValue('preorder_lead_time'),
|
|
725
|
+
preorderTimeRange: getValue('preorder_time_range'),
|
|
726
|
+
preorderMaximumDays: getValue('preorder_maximum_days'),
|
|
727
|
+
preorderMinimumDays: getValue('preorder_minimum_days')
|
|
737
728
|
}
|
|
729
|
+
|
|
730
|
+
return Object.fromEntries(Object.entries(values).filter(([_, v]) => v !== null))
|
|
738
731
|
}
|
|
739
732
|
|
|
740
733
|
export const getCurrenySymbol = (code) => {
|
/package/_bundles/{0.ordering-ui.0dace0837e9cf353a976.js → 0.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
/package/_bundles/{1.ordering-ui.0dace0837e9cf353a976.js → 1.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
/package/_bundles/{2.ordering-ui.0dace0837e9cf353a976.js → 2.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
/package/_bundles/{4.ordering-ui.0dace0837e9cf353a976.js → 4.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
/package/_bundles/{5.ordering-ui.0dace0837e9cf353a976.js → 5.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
/package/_bundles/{6.ordering-ui.0dace0837e9cf353a976.js → 6.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/_bundles/{8.ordering-ui.0dace0837e9cf353a976.js → 8.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|
/package/_bundles/{9.ordering-ui.0dace0837e9cf353a976.js → 9.ordering-ui.270da2cab837d32183e2.js}
RENAMED
|
File without changes
|