authscape 1.0.147 → 1.0.148
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/index.js +8 -6
- package/package.json +1 -1
- package/src/components/GoogleMapsAutoComplete.js +12 -11
package/index.js
CHANGED
|
@@ -987,7 +987,7 @@ var AutoCompleteDialog = function AutoCompleteDialog(_ref) {
|
|
|
987
987
|
fullWidth: true,
|
|
988
988
|
value: value,
|
|
989
989
|
onChange: handleInput
|
|
990
|
-
}),
|
|
990
|
+
}), react_hook_form_errors != null && react_hook_form_errors.address && react_hook_form_errors.address.type === 'required' && /*#__PURE__*/_react["default"].createElement(Typography, {
|
|
991
991
|
sx: {
|
|
992
992
|
color: "red"
|
|
993
993
|
}
|
|
@@ -1009,7 +1009,7 @@ var AutoCompleteDialog = function AutoCompleteDialog(_ref) {
|
|
|
1009
1009
|
fullWidth: true,
|
|
1010
1010
|
value: value,
|
|
1011
1011
|
onChange: handleInput
|
|
1012
|
-
})),
|
|
1012
|
+
})), react_hook_form_errors != null && react_hook_form_errors.address && react_hook_form_errors.address.type === 'required' && /*#__PURE__*/_react["default"].createElement(Typography, {
|
|
1013
1013
|
sx: {
|
|
1014
1014
|
color: "red"
|
|
1015
1015
|
}
|
|
@@ -1036,7 +1036,9 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
|
|
|
1036
1036
|
_ref4$_postalCode = _ref4._postalCode,
|
|
1037
1037
|
_postalCode = _ref4$_postalCode === void 0 ? "" : _ref4$_postalCode,
|
|
1038
1038
|
_ref4$react_hook_form = _ref4.react_hook_form_Control,
|
|
1039
|
-
react_hook_form_Control = _ref4$react_hook_form === void 0 ? null : _ref4$react_hook_form
|
|
1039
|
+
react_hook_form_Control = _ref4$react_hook_form === void 0 ? null : _ref4$react_hook_form,
|
|
1040
|
+
_ref4$react_hook_form2 = _ref4.react_hook_form_errors,
|
|
1041
|
+
react_hook_form_errors = _ref4$react_hook_form2 === void 0 ? null : _ref4$react_hook_form2;
|
|
1040
1042
|
var _useState = (0, _react.useState)(_address),
|
|
1041
1043
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1042
1044
|
address = _useState2[0],
|
|
@@ -1115,7 +1117,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
|
|
|
1115
1117
|
onChange: function onChange(val) {
|
|
1116
1118
|
setCity(val.currentTarget.value);
|
|
1117
1119
|
}
|
|
1118
|
-
})),
|
|
1120
|
+
})), react_hook_form_errors != null && react_hook_form_errors.city && react_hook_form_errors.city.type === 'required' && /*#__PURE__*/_react["default"].createElement(Typography, {
|
|
1119
1121
|
sx: {
|
|
1120
1122
|
color: "red"
|
|
1121
1123
|
}
|
|
@@ -1153,7 +1155,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
|
|
|
1153
1155
|
onChange: function onChange(val) {
|
|
1154
1156
|
setState(val.currentTarget.value);
|
|
1155
1157
|
}
|
|
1156
|
-
})),
|
|
1158
|
+
})), react_hook_form_errors != null && react_hook_form_errors.state && react_hook_form_errors.state.type === 'required' && /*#__PURE__*/_react["default"].createElement(Typography, {
|
|
1157
1159
|
sx: {
|
|
1158
1160
|
color: "red"
|
|
1159
1161
|
}
|
|
@@ -1192,7 +1194,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
|
|
|
1192
1194
|
onChange: function onChange(val) {
|
|
1193
1195
|
setPostalcode(val.currentTarget.value);
|
|
1194
1196
|
}
|
|
1195
|
-
})),
|
|
1197
|
+
})), react_hook_form_errors != null && react_hook_form_errors.postalCode && react_hook_form_errors.postalCode.type === 'required' && /*#__PURE__*/_react["default"].createElement(Typography, {
|
|
1196
1198
|
sx: {
|
|
1197
1199
|
color: "red"
|
|
1198
1200
|
}
|
package/package.json
CHANGED
|
@@ -328,8 +328,8 @@ const AutoCompleteDialog = ({placeholder, onSelected, defaultValue, react_hook_f
|
|
|
328
328
|
{react_hook_form_Control == null &&
|
|
329
329
|
<Stack>
|
|
330
330
|
<TextField ref={txtAddressField} name="address" autoComplete="new-password" label={placeholder} variant="outlined" fullWidth={true} value={value} onChange={handleInput} />
|
|
331
|
-
{
|
|
332
|
-
|
|
331
|
+
{react_hook_form_errors != null && react_hook_form_errors.address &&
|
|
332
|
+
react_hook_form_errors.address.type === 'required'
|
|
333
333
|
&& <Typography sx={{color: "red"}}>Address is required.</Typography>}
|
|
334
334
|
</Stack>
|
|
335
335
|
}
|
|
@@ -342,8 +342,8 @@ const AutoCompleteDialog = ({placeholder, onSelected, defaultValue, react_hook_f
|
|
|
342
342
|
render={({ field }) => (
|
|
343
343
|
<Stack>
|
|
344
344
|
<TextField ref={txtAddressField} name="address" {...field} autoComplete="new-password" label={placeholder} variant="outlined" fullWidth={true} value={value} onChange={handleInput} />
|
|
345
|
-
{
|
|
346
|
-
|
|
345
|
+
{react_hook_form_errors != null && react_hook_form_errors.address &&
|
|
346
|
+
react_hook_form_errors.address.type === 'required'
|
|
347
347
|
&& <Typography sx={{color: "red"}}>Address is required.</Typography>}
|
|
348
348
|
</Stack>
|
|
349
349
|
)}
|
|
@@ -371,7 +371,8 @@ export const GooglePlacesModal = ({
|
|
|
371
371
|
_city = "",
|
|
372
372
|
_state = "",
|
|
373
373
|
_postalCode = "",
|
|
374
|
-
react_hook_form_Control = null
|
|
374
|
+
react_hook_form_Control = null,
|
|
375
|
+
react_hook_form_errors = null
|
|
375
376
|
}) => {
|
|
376
377
|
const [address, setAddress] = useState(_address);
|
|
377
378
|
const [city, setCity] = useState(_city);
|
|
@@ -441,8 +442,8 @@ export const GooglePlacesModal = ({
|
|
|
441
442
|
}}
|
|
442
443
|
/>
|
|
443
444
|
|
|
444
|
-
{
|
|
445
|
-
|
|
445
|
+
{react_hook_form_errors != null && react_hook_form_errors.city &&
|
|
446
|
+
react_hook_form_errors.city.type === 'required'
|
|
446
447
|
&& <Typography sx={{color: "red"}}>City is required.</Typography>}
|
|
447
448
|
</Stack>
|
|
448
449
|
)}
|
|
@@ -492,8 +493,8 @@ export const GooglePlacesModal = ({
|
|
|
492
493
|
}}
|
|
493
494
|
/>
|
|
494
495
|
|
|
495
|
-
{
|
|
496
|
-
|
|
496
|
+
{react_hook_form_errors != null && react_hook_form_errors.state &&
|
|
497
|
+
react_hook_form_errors.state.type === 'required'
|
|
497
498
|
&& <Typography sx={{color: "red"}}>State is required.</Typography>}
|
|
498
499
|
</Stack>
|
|
499
500
|
)}
|
|
@@ -546,8 +547,8 @@ export const GooglePlacesModal = ({
|
|
|
546
547
|
}}
|
|
547
548
|
/>
|
|
548
549
|
|
|
549
|
-
{
|
|
550
|
-
|
|
550
|
+
{react_hook_form_errors != null && react_hook_form_errors.postalCode &&
|
|
551
|
+
react_hook_form_errors.postalCode.type === 'required'
|
|
551
552
|
&& <Typography sx={{color: "red"}}>Postal Code is required.</Typography>}
|
|
552
553
|
</Stack>
|
|
553
554
|
)}
|