authscape 1.0.145 → 1.0.146

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 CHANGED
@@ -745,6 +745,7 @@ var AutoCompleteDialog = function AutoCompleteDialog(_ref) {
745
745
  var placeholder = _ref.placeholder,
746
746
  onSelected = _ref.onSelected,
747
747
  defaultValue = _ref.defaultValue,
748
+ react_hook_form_Control = _ref.react_hook_form_Control,
748
749
  onChange = _ref.onChange;
749
750
  var txtAddressField = (0, _react.useRef)(null);
750
751
  var dismissSuggestions = function dismissSuggestions() {
@@ -977,7 +978,7 @@ var AutoCompleteDialog = function AutoCompleteDialog(_ref) {
977
978
  });
978
979
  };
979
980
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_reactHookForm.Controller, {
980
- control: control,
981
+ control: react_hook_form_Control,
981
982
  rules: {
982
983
  required: true
983
984
  },
@@ -1019,7 +1020,9 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
1019
1020
  _ref4$_state = _ref4._state,
1020
1021
  _state = _ref4$_state === void 0 ? "" : _ref4$_state,
1021
1022
  _ref4$_postalCode = _ref4._postalCode,
1022
- _postalCode = _ref4$_postalCode === void 0 ? "" : _ref4$_postalCode;
1023
+ _postalCode = _ref4$_postalCode === void 0 ? "" : _ref4$_postalCode,
1024
+ _ref4$react_hook_form = _ref4.react_hook_form_Control,
1025
+ react_hook_form_Control = _ref4$react_hook_form === void 0 ? null : _ref4$react_hook_form;
1023
1026
  var _useState = (0, _react.useState)(_address),
1024
1027
  _useState2 = _slicedToArray(_useState, 2),
1025
1028
  address = _useState2[0],
@@ -1046,6 +1049,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
1046
1049
  setLng = _useState12[1];
1047
1050
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(AutoCompleteDialog, {
1048
1051
  placeholder: "Address",
1052
+ react_hook_form_Control: react_hook_form_Control,
1049
1053
  defaultValue: address,
1050
1054
  onSelected: function onSelected(data) {
1051
1055
  setAddress(data.address);
@@ -1069,7 +1073,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
1069
1073
  item: true,
1070
1074
  xs: 6
1071
1075
  }, /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_reactHookForm.Controller, {
1072
- control: control,
1076
+ control: react_hook_form_Control,
1073
1077
  rules: {
1074
1078
  required: true
1075
1079
  },
@@ -1097,7 +1101,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
1097
1101
  item: true,
1098
1102
  xs: 6
1099
1103
  }, /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_reactHookForm.Controller, {
1100
- control: control,
1104
+ control: react_hook_form_Control,
1101
1105
  rules: {
1102
1106
  required: true
1103
1107
  },
@@ -1126,7 +1130,7 @@ var GooglePlacesModal = function GooglePlacesModal(_ref4) {
1126
1130
  marginTop: 2
1127
1131
  }
1128
1132
  }, /*#__PURE__*/_react["default"].createElement(_reactHookForm.Controller, {
1129
- control: control,
1133
+ control: react_hook_form_Control,
1130
1134
  rules: {
1131
1135
  required: true
1132
1136
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.145",
3
+ "version": "1.0.146",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@ import usePlacesAutocomplete, {
18
18
  getLatLng,
19
19
  } from "use-places-autocomplete";
20
20
 
21
- const AutoCompleteDialog = ({placeholder, onSelected, defaultValue, onChange}) => {
21
+ const AutoCompleteDialog = ({placeholder, onSelected, defaultValue, react_hook_form_Control, onChange}) => {
22
22
 
23
23
  const txtAddressField = useRef(null);
24
24
 
@@ -325,7 +325,7 @@ const AutoCompleteDialog = ({placeholder, onSelected, defaultValue, onChange}) =
325
325
  <>
326
326
 
327
327
  <Controller
328
- control={control}
328
+ control={react_hook_form_Control}
329
329
  rules={{ required: true }}
330
330
  name="address"
331
331
  render={({ field }) => (
@@ -358,7 +358,8 @@ export const GooglePlacesModal = ({
358
358
  _address = "",
359
359
  _city = "",
360
360
  _state = "",
361
- _postalCode = ""
361
+ _postalCode = "",
362
+ react_hook_form_Control = null
362
363
  }) => {
363
364
  const [address, setAddress] = useState(_address);
364
365
  const [city, setCity] = useState(_city);
@@ -373,6 +374,7 @@ export const GooglePlacesModal = ({
373
374
  <Box>
374
375
  <AutoCompleteDialog
375
376
  placeholder={"Address"}
377
+ react_hook_form_Control={react_hook_form_Control}
376
378
  defaultValue={address}
377
379
  onSelected={(data) => {
378
380
  setAddress(data.address);
@@ -395,7 +397,7 @@ export const GooglePlacesModal = ({
395
397
 
396
398
 
397
399
  <Controller
398
- control={control}
400
+ control={react_hook_form_Control}
399
401
  rules={{ required: true }}
400
402
  name="city"
401
403
  render={({ field }) => (
@@ -429,7 +431,7 @@ export const GooglePlacesModal = ({
429
431
 
430
432
 
431
433
  <Controller
432
- control={control}
434
+ control={react_hook_form_Control}
433
435
  rules={{ required: true }}
434
436
  name="state"
435
437
  render={({ field }) => (
@@ -468,7 +470,7 @@ export const GooglePlacesModal = ({
468
470
 
469
471
 
470
472
  <Controller
471
- control={control}
473
+ control={react_hook_form_Control}
472
474
  rules={{ required: true }}
473
475
  name="postalCode"
474
476
  render={({ field }) => (