ordering-ui-external 14.1.56 → 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.
@@ -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 ? void 0 : _e$clipboardData$getD.call(_e$clipboardData, 'text').replace(/\s/g, '');
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("../../../../../components/InputPhoneNumber");
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "14.1.56",
3
+ "version": "14.1.57",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -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').replace(/\s/g, '')
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 '../../../../../components/InputPhoneNumber'
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
  )}