@bigbinary/neeto-molecules 1.0.23 → 1.0.24

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.
@@ -1,4 +1,4 @@
1
- import React, { useState, forwardRef } from 'react';
1
+ import React, { useState, forwardRef, useRef, useEffect } from 'react';
2
2
  import { useField } from 'formik';
3
3
  import { noop } from '@bigbinary/neeto-commons-frontend/pure';
4
4
  import { Tooltip, Typography, Select, Input } from '@bigbinary/neetoui';
@@ -7052,10 +7052,10 @@ var SingleValue = function SingleValue(_ref) {
7052
7052
  }, otherProps), countryData.emoji));
7053
7053
  };
7054
7054
 
7055
- var _excluded$3 = ["country", "setCountry", "onInputChange", "prefix"];
7055
+ var _excluded$3 = ["country", "setCountry", "onInputChange", "prefix", "phoneNumber"];
7056
7056
  function cov_145kndm1ew() {
7057
7057
  var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/PhoneNumber/CountryPicker/index.jsx";
7058
- var hash = "3dfa1a97a2886f5c0303b2b3b246072f161164b3";
7058
+ var hash = "e0c16b85eb2af3443273b4a39f2ed6ecf1869a68";
7059
7059
  var global = new Function("return this")();
7060
7060
  var gcv = "__coverage__";
7061
7061
  var coverageData = {
@@ -7067,87 +7067,77 @@ function cov_145kndm1ew() {
7067
7067
  column: 22
7068
7068
  },
7069
7069
  end: {
7070
- line: 52,
7070
+ line: 53,
7071
7071
  column: 1
7072
7072
  }
7073
7073
  },
7074
7074
  "1": {
7075
7075
  start: {
7076
- line: 17,
7076
+ line: 18,
7077
7077
  column: 38
7078
7078
  },
7079
7079
  end: {
7080
- line: 17,
7080
+ line: 18,
7081
7081
  column: 50
7082
7082
  }
7083
7083
  },
7084
7084
  "2": {
7085
7085
  start: {
7086
- line: 19,
7086
+ line: 20,
7087
7087
  column: 30
7088
7088
  },
7089
7089
  end: {
7090
- line: 24,
7090
+ line: 25,
7091
7091
  column: 3
7092
7092
  }
7093
7093
  },
7094
7094
  "3": {
7095
7095
  start: {
7096
- line: 20,
7096
+ line: 21,
7097
7097
  column: 4
7098
7098
  },
7099
7099
  end: {
7100
- line: 20,
7100
+ line: 21,
7101
7101
  column: 22
7102
7102
  }
7103
7103
  },
7104
7104
  "4": {
7105
7105
  start: {
7106
- line: 21,
7106
+ line: 22,
7107
7107
  column: 4
7108
7108
  },
7109
7109
  end: {
7110
- line: 23,
7110
+ line: 24,
7111
7111
  column: 6
7112
7112
  }
7113
7113
  },
7114
7114
  "5": {
7115
7115
  start: {
7116
- line: 22,
7117
- column: 6
7118
- },
7119
- end: {
7120
- line: 22,
7121
- column: 69
7122
- }
7123
- },
7124
- "6": {
7125
- start: {
7126
- line: 26,
7116
+ line: 27,
7127
7117
  column: 2
7128
7118
  },
7129
7119
  end: {
7130
- line: 51,
7120
+ line: 52,
7131
7121
  column: 4
7132
7122
  }
7133
7123
  },
7134
- "7": {
7124
+ "6": {
7135
7125
  start: {
7136
- line: 41,
7126
+ line: 42,
7137
7127
  column: 29
7138
7128
  },
7139
7129
  end: {
7140
- line: 41,
7130
+ line: 42,
7141
7131
  column: 72
7142
7132
  }
7143
7133
  },
7144
- "8": {
7134
+ "7": {
7145
7135
  start: {
7146
- line: 44,
7136
+ line: 45,
7147
7137
  column: 10
7148
7138
  },
7149
7139
  end: {
7150
- line: 44,
7140
+ line: 45,
7151
7141
  column: 40
7152
7142
  }
7153
7143
  }
@@ -7167,111 +7157,87 @@ function cov_145kndm1ew() {
7167
7157
  },
7168
7158
  loc: {
7169
7159
  start: {
7170
- line: 16,
7160
+ line: 17,
7171
7161
  column: 6
7172
7162
  },
7173
7163
  end: {
7174
- line: 52,
7164
+ line: 53,
7175
7165
  column: 1
7176
7166
  }
7177
7167
  },
7178
- line: 16
7168
+ line: 17
7179
7169
  },
7180
7170
  "1": {
7181
7171
  name: "(anonymous_1)",
7182
7172
  decl: {
7183
7173
  start: {
7184
- line: 19,
7174
+ line: 20,
7185
7175
  column: 30
7186
7176
  },
7187
7177
  end: {
7188
- line: 19,
7178
+ line: 20,
7189
7179
  column: 31
7190
7180
  }
7191
7181
  },
7192
7182
  loc: {
7193
7183
  start: {
7194
- line: 19,
7184
+ line: 20,
7195
7185
  column: 45
7196
7186
  },
7197
7187
  end: {
7198
- line: 24,
7188
+ line: 25,
7199
7189
  column: 3
7200
7190
  }
7201
7191
  },
7202
- line: 19
7192
+ line: 20
7203
7193
  },
7204
7194
  "2": {
7205
7195
  name: "(anonymous_2)",
7206
7196
  decl: {
7207
7197
  start: {
7208
- line: 21,
7209
- column: 18
7210
- },
7211
- end: {
7212
- line: 21,
7213
- column: 19
7214
- }
7215
- },
7216
- loc: {
7217
- start: {
7218
- line: 22,
7219
- column: 6
7220
- },
7221
- end: {
7222
- line: 22,
7223
- column: 69
7224
- }
7225
- },
7226
- line: 22
7227
- },
7228
- "3": {
7229
- name: "(anonymous_3)",
7230
- decl: {
7231
- start: {
7232
- line: 41,
7198
+ line: 42,
7233
7199
  column: 23
7234
7200
  },
7235
7201
  end: {
7236
- line: 41,
7202
+ line: 42,
7237
7203
  column: 24
7238
7204
  }
7239
7205
  },
7240
7206
  loc: {
7241
7207
  start: {
7242
- line: 41,
7208
+ line: 42,
7243
7209
  column: 29
7244
7210
  },
7245
7211
  end: {
7246
- line: 41,
7212
+ line: 42,
7247
7213
  column: 72
7248
7214
  }
7249
7215
  },
7250
- line: 41
7216
+ line: 42
7251
7217
  },
7252
- "4": {
7253
- name: "(anonymous_4)",
7218
+ "3": {
7219
+ name: "(anonymous_3)",
7254
7220
  decl: {
7255
7221
  start: {
7256
- line: 43,
7222
+ line: 44,
7257
7223
  column: 26
7258
7224
  },
7259
7225
  end: {
7260
- line: 43,
7226
+ line: 44,
7261
7227
  column: 27
7262
7228
  }
7263
7229
  },
7264
7230
  loc: {
7265
7231
  start: {
7266
- line: 44,
7232
+ line: 45,
7267
7233
  column: 10
7268
7234
  },
7269
7235
  end: {
7270
- line: 44,
7236
+ line: 45,
7271
7237
  column: 40
7272
7238
  }
7273
7239
  },
7274
- line: 44
7240
+ line: 45
7275
7241
  }
7276
7242
  },
7277
7243
  branchMap: {},
@@ -7283,19 +7249,17 @@ function cov_145kndm1ew() {
7283
7249
  "4": 0,
7284
7250
  "5": 0,
7285
7251
  "6": 0,
7286
- "7": 0,
7287
- "8": 0
7252
+ "7": 0
7288
7253
  },
7289
7254
  f: {
7290
7255
  "0": 0,
7291
7256
  "1": 0,
7292
7257
  "2": 0,
7293
- "3": 0,
7294
- "4": 0
7258
+ "3": 0
7295
7259
  },
7296
7260
  b: {},
7297
7261
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
7298
- hash: "3dfa1a97a2886f5c0303b2b3b246072f161164b3"
7262
+ hash: "e0c16b85eb2af3443273b4a39f2ed6ecf1869a68"
7299
7263
  };
7300
7264
  var coverage = global[gcv] || (global[gcv] = {});
7301
7265
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -7317,6 +7281,7 @@ var CountryPicker = function CountryPicker(_ref) {
7317
7281
  setCountry = _ref.setCountry,
7318
7282
  onInputChange = _ref.onInputChange,
7319
7283
  prefix = _ref.prefix,
7284
+ phoneNumber = _ref.phoneNumber,
7320
7285
  otherProps = _objectWithoutProperties(_ref, _excluded$3);
7321
7286
  cov_145kndm1ew().f[0]++;
7322
7287
  var _ref2 = (cov_145kndm1ew().s[1]++, useState("")),
@@ -7330,13 +7295,9 @@ var CountryPicker = function CountryPicker(_ref) {
7330
7295
  cov_145kndm1ew().s[3]++;
7331
7296
  setCountry(value);
7332
7297
  cov_145kndm1ew().s[4]++;
7333
- onInputChange(function (phoneNumber) {
7334
- cov_145kndm1ew().f[2]++;
7335
- cov_145kndm1ew().s[5]++;
7336
- return phoneNumber.replace(prefix, "+".concat(getCountryCallingCode(value)));
7337
- });
7298
+ onInputChange(phoneNumber.replace(prefix, "+".concat(getCountryCallingCode(value))));
7338
7299
  };
7339
- cov_145kndm1ew().s[6]++;
7300
+ cov_145kndm1ew().s[5]++;
7340
7301
  return /*#__PURE__*/React.createElement("div", {
7341
7302
  className: classnames("flex-shrink-0", {
7342
7303
  "w-10": !searchTerm,
@@ -7353,8 +7314,8 @@ var CountryPicker = function CountryPicker(_ref) {
7353
7314
  },
7354
7315
  components: {
7355
7316
  SingleValue: function SingleValue$1() {
7356
- cov_145kndm1ew().f[3]++;
7357
- cov_145kndm1ew().s[7]++;
7317
+ cov_145kndm1ew().f[2]++;
7318
+ cov_145kndm1ew().s[6]++;
7358
7319
  return /*#__PURE__*/React.createElement(SingleValue, {
7359
7320
  showEmoji: true,
7360
7321
  country: country
@@ -7365,8 +7326,8 @@ var CountryPicker = function CountryPicker(_ref) {
7365
7326
  var value = _ref5.value;
7366
7327
  var _ref7 = _slicedToArray$3(_ref6, 1),
7367
7328
  selectedOption = _ref7[0];
7368
- cov_145kndm1ew().f[4]++;
7369
- cov_145kndm1ew().s[8]++;
7329
+ cov_145kndm1ew().f[3]++;
7330
+ cov_145kndm1ew().s[7]++;
7370
7331
  return (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.name) === value;
7371
7332
  },
7372
7333
  onChange: handleCountryChange,
@@ -7784,7 +7745,7 @@ var getPhoneData = function getPhoneData(value, defaultCountry) {
7784
7745
  var _excluded$2 = ["value", "onChange", "className", "error", "defaultCountry", "selectProps"];
7785
7746
  function cov_2n7wvllbx0() {
7786
7747
  var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/PhoneNumber/PhoneNumberInput.jsx";
7787
- var hash = "c6942f346cc183b9eb89f5ddf08ddc3dba254d3f";
7748
+ var hash = "ff15f225b3da68d847ab6fb0d3ba460a2861d5eb";
7788
7749
  var global = new Function("return this")();
7789
7750
  var gcv = "__coverage__";
7790
7751
  var coverageData = {
@@ -7796,7 +7757,7 @@ function cov_2n7wvllbx0() {
7796
7757
  column: 25
7797
7758
  },
7798
7759
  end: {
7799
- line: 67,
7760
+ line: 78,
7800
7761
  column: 1
7801
7762
  }
7802
7763
  },
@@ -7813,80 +7774,150 @@ function cov_2n7wvllbx0() {
7813
7774
  "2": {
7814
7775
  start: {
7815
7776
  line: 29,
7816
- column: 34
7777
+ column: 26
7817
7778
  },
7818
7779
  end: {
7819
- line: 31,
7820
- column: 5
7780
+ line: 29,
7781
+ column: 39
7821
7782
  }
7822
7783
  },
7823
7784
  "3": {
7824
7785
  start: {
7825
- line: 33,
7786
+ line: 30,
7787
+ column: 34
7788
+ },
7789
+ end: {
7790
+ line: 30,
7791
+ column: 58
7792
+ }
7793
+ },
7794
+ "4": {
7795
+ start: {
7796
+ line: 32,
7826
7797
  column: 19
7827
7798
  },
7828
7799
  end: {
7829
- line: 33,
7800
+ line: 32,
7830
7801
  column: 70
7831
7802
  }
7832
7803
  },
7833
- "4": {
7804
+ "5": {
7805
+ start: {
7806
+ line: 34,
7807
+ column: 30
7808
+ },
7809
+ end: {
7810
+ line: 37,
7811
+ column: 5
7812
+ }
7813
+ },
7814
+ "6": {
7834
7815
  start: {
7835
7816
  line: 35,
7836
- column: 25
7817
+ column: 6
7818
+ },
7819
+ end: {
7820
+ line: 35,
7821
+ column: 22
7822
+ }
7823
+ },
7824
+ "7": {
7825
+ start: {
7826
+ line: 36,
7827
+ column: 6
7837
7828
  },
7838
7829
  end: {
7830
+ line: 36,
7831
+ column: 36
7832
+ }
7833
+ },
7834
+ "8": {
7835
+ start: {
7839
7836
  line: 39,
7837
+ column: 25
7838
+ },
7839
+ end: {
7840
+ line: 43,
7840
7841
  column: 5
7841
7842
  }
7842
7843
  },
7843
- "5": {
7844
+ "9": {
7844
7845
  start: {
7845
- line: 36,
7846
+ line: 40,
7846
7847
  column: 39
7847
7848
  },
7848
7849
  end: {
7849
- line: 36,
7850
+ line: 40,
7850
7851
  column: 74
7851
7852
  }
7852
7853
  },
7853
- "6": {
7854
+ "10": {
7854
7855
  start: {
7855
- line: 37,
7856
+ line: 41,
7856
7857
  column: 6
7857
7858
  },
7858
7859
  end: {
7859
- line: 37,
7860
- column: 28
7860
+ line: 41,
7861
+ column: 37
7861
7862
  }
7862
7863
  },
7863
- "7": {
7864
+ "11": {
7864
7865
  start: {
7865
- line: 38,
7866
+ line: 42,
7866
7867
  column: 6
7867
7868
  },
7868
7869
  end: {
7869
- line: 38,
7870
+ line: 42,
7870
7871
  column: 26
7871
7872
  }
7872
7873
  },
7873
- "8": {
7874
+ "12": {
7874
7875
  start: {
7875
- line: 41,
7876
+ line: 45,
7876
7877
  column: 4
7877
7878
  },
7878
7879
  end: {
7879
- line: 65,
7880
+ line: 49,
7881
+ column: 16
7882
+ }
7883
+ },
7884
+ "13": {
7885
+ start: {
7886
+ line: 46,
7880
7887
  column: 6
7888
+ },
7889
+ end: {
7890
+ line: 48,
7891
+ column: 7
7881
7892
  }
7882
7893
  },
7883
- "9": {
7894
+ "14": {
7895
+ start: {
7896
+ line: 47,
7897
+ column: 8
7898
+ },
7899
+ end: {
7900
+ line: 47,
7901
+ column: 64
7902
+ }
7903
+ },
7904
+ "15": {
7905
+ start: {
7906
+ line: 51,
7907
+ column: 4
7908
+ },
7909
+ end: {
7910
+ line: 76,
7911
+ column: 6
7912
+ }
7913
+ },
7914
+ "16": {
7884
7915
  start: {
7885
- line: 69,
7916
+ line: 80,
7886
7917
  column: 0
7887
7918
  },
7888
7919
  end: {
7889
- line: 69,
7920
+ line: 80,
7890
7921
  column: 50
7891
7922
  }
7892
7923
  }
@@ -7910,7 +7941,7 @@ function cov_2n7wvllbx0() {
7910
7941
  column: 7
7911
7942
  },
7912
7943
  end: {
7913
- line: 66,
7944
+ line: 77,
7914
7945
  column: 3
7915
7946
  }
7916
7947
  },
@@ -7920,25 +7951,73 @@ function cov_2n7wvllbx0() {
7920
7951
  name: "(anonymous_1)",
7921
7952
  decl: {
7922
7953
  start: {
7923
- line: 35,
7954
+ line: 34,
7955
+ column: 30
7956
+ },
7957
+ end: {
7958
+ line: 34,
7959
+ column: 31
7960
+ }
7961
+ },
7962
+ loc: {
7963
+ start: {
7964
+ line: 34,
7965
+ column: 39
7966
+ },
7967
+ end: {
7968
+ line: 37,
7969
+ column: 5
7970
+ }
7971
+ },
7972
+ line: 34
7973
+ },
7974
+ "2": {
7975
+ name: "(anonymous_2)",
7976
+ decl: {
7977
+ start: {
7978
+ line: 39,
7924
7979
  column: 25
7925
7980
  },
7926
7981
  end: {
7927
- line: 35,
7982
+ line: 39,
7928
7983
  column: 26
7929
7984
  }
7930
7985
  },
7931
7986
  loc: {
7932
7987
  start: {
7933
- line: 35,
7988
+ line: 39,
7934
7989
  column: 52
7935
7990
  },
7936
7991
  end: {
7937
- line: 39,
7992
+ line: 43,
7938
7993
  column: 5
7939
7994
  }
7940
7995
  },
7941
- line: 35
7996
+ line: 39
7997
+ },
7998
+ "3": {
7999
+ name: "(anonymous_3)",
8000
+ decl: {
8001
+ start: {
8002
+ line: 45,
8003
+ column: 14
8004
+ },
8005
+ end: {
8006
+ line: 45,
8007
+ column: 15
8008
+ }
8009
+ },
8010
+ loc: {
8011
+ start: {
8012
+ line: 45,
8013
+ column: 20
8014
+ },
8015
+ end: {
8016
+ line: 49,
8017
+ column: 5
8018
+ }
8019
+ },
8020
+ line: 45
7942
8021
  }
7943
8022
  },
7944
8023
  branchMap: {
@@ -8017,35 +8096,68 @@ function cov_2n7wvllbx0() {
8017
8096
  "3": {
8018
8097
  loc: {
8019
8098
  start: {
8020
- line: 33,
8099
+ line: 32,
8021
8100
  column: 19
8022
8101
  },
8023
8102
  end: {
8024
- line: 33,
8103
+ line: 32,
8025
8104
  column: 70
8026
8105
  }
8027
8106
  },
8028
8107
  type: "cond-expr",
8029
8108
  locations: [{
8030
8109
  start: {
8031
- line: 33,
8110
+ line: 32,
8032
8111
  column: 29
8033
8112
  },
8034
8113
  end: {
8035
- line: 33,
8114
+ line: 32,
8036
8115
  column: 65
8037
8116
  }
8038
8117
  }, {
8039
8118
  start: {
8040
- line: 33,
8119
+ line: 32,
8041
8120
  column: 68
8042
8121
  },
8043
8122
  end: {
8044
- line: 33,
8123
+ line: 32,
8045
8124
  column: 70
8046
8125
  }
8047
8126
  }],
8048
- line: 33
8127
+ line: 32
8128
+ },
8129
+ "4": {
8130
+ loc: {
8131
+ start: {
8132
+ line: 46,
8133
+ column: 6
8134
+ },
8135
+ end: {
8136
+ line: 48,
8137
+ column: 7
8138
+ }
8139
+ },
8140
+ type: "if",
8141
+ locations: [{
8142
+ start: {
8143
+ line: 46,
8144
+ column: 6
8145
+ },
8146
+ end: {
8147
+ line: 48,
8148
+ column: 7
8149
+ }
8150
+ }, {
8151
+ start: {
8152
+ line: undefined,
8153
+ column: undefined
8154
+ },
8155
+ end: {
8156
+ line: undefined,
8157
+ column: undefined
8158
+ }
8159
+ }],
8160
+ line: 46
8049
8161
  }
8050
8162
  },
8051
8163
  s: {
@@ -8058,20 +8170,30 @@ function cov_2n7wvllbx0() {
8058
8170
  "6": 0,
8059
8171
  "7": 0,
8060
8172
  "8": 0,
8061
- "9": 0
8173
+ "9": 0,
8174
+ "10": 0,
8175
+ "11": 0,
8176
+ "12": 0,
8177
+ "13": 0,
8178
+ "14": 0,
8179
+ "15": 0,
8180
+ "16": 0
8062
8181
  },
8063
8182
  f: {
8064
8183
  "0": 0,
8065
- "1": 0
8184
+ "1": 0,
8185
+ "2": 0,
8186
+ "3": 0
8066
8187
  },
8067
8188
  b: {
8068
8189
  "0": [0],
8069
8190
  "1": [0],
8070
8191
  "2": [0],
8071
- "3": [0, 0]
8192
+ "3": [0, 0],
8193
+ "4": [0, 0]
8072
8194
  },
8073
8195
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
8074
- hash: "c6942f346cc183b9eb89f5ddf08ddc3dba254d3f"
8196
+ hash: "ff15f225b3da68d847ab6fb0d3ba460a2861d5eb"
8075
8197
  };
8076
8198
  var coverage = global[gcv] || (global[gcv] = {});
8077
8199
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -8101,24 +8223,45 @@ var PhoneNumberInput = (cov_2n7wvllbx0().s[0]++, /*#__PURE__*/forwardRef(functio
8101
8223
  cov_2n7wvllbx0().f[0]++;
8102
8224
  var _ref2 = (cov_2n7wvllbx0().s[1]++, useTranslation()),
8103
8225
  t = _ref2.t;
8104
- var _ref3 = (cov_2n7wvllbx0().s[2]++, useState(getPhoneData(value, defaultCountry).country)),
8226
+ var internalValue = (cov_2n7wvllbx0().s[2]++, useRef(value));
8227
+ var _ref3 = (cov_2n7wvllbx0().s[3]++, useState(defaultCountry)),
8105
8228
  _ref4 = _slicedToArray$3(_ref3, 2),
8106
8229
  country = _ref4[0],
8107
8230
  setCountry = _ref4[1];
8108
- var prefix = (cov_2n7wvllbx0().s[3]++, country ? (cov_2n7wvllbx0().b[3][0]++, "+".concat(getCountryCallingCode(country))) : (cov_2n7wvllbx0().b[3][1]++, ""));
8109
- cov_2n7wvllbx0().s[4]++;
8231
+ var prefix = (cov_2n7wvllbx0().s[4]++, country ? (cov_2n7wvllbx0().b[3][0]++, "+".concat(getCountryCallingCode(country))) : (cov_2n7wvllbx0().b[3][1]++, ""));
8232
+ cov_2n7wvllbx0().s[5]++;
8233
+ var handleInputChange = function handleInputChange(value) {
8234
+ cov_2n7wvllbx0().f[1]++;
8235
+ cov_2n7wvllbx0().s[6]++;
8236
+ onChange(value);
8237
+ cov_2n7wvllbx0().s[7]++;
8238
+ internalValue.current = value;
8239
+ };
8240
+ cov_2n7wvllbx0().s[8]++;
8110
8241
  var handleChange = function handleChange(_ref5) {
8111
8242
  var value = _ref5.target.value;
8112
- cov_2n7wvllbx0().f[1]++;
8113
- var _ref6 = (cov_2n7wvllbx0().s[5]++, getPhoneData(value, defaultCountry)),
8243
+ cov_2n7wvllbx0().f[2]++;
8244
+ var _ref6 = (cov_2n7wvllbx0().s[9]++, getPhoneData(value, defaultCountry)),
8114
8245
  phoneNumber = _ref6.phoneNumber,
8115
8246
  country = _ref6.country;
8116
- cov_2n7wvllbx0().s[6]++;
8117
- onChange(phoneNumber);
8118
- cov_2n7wvllbx0().s[7]++;
8247
+ cov_2n7wvllbx0().s[10]++;
8248
+ handleInputChange(phoneNumber);
8249
+ cov_2n7wvllbx0().s[11]++;
8119
8250
  setCountry(country);
8120
8251
  };
8121
- cov_2n7wvllbx0().s[8]++;
8252
+ cov_2n7wvllbx0().s[12]++;
8253
+ useEffect(function () {
8254
+ cov_2n7wvllbx0().f[3]++;
8255
+ cov_2n7wvllbx0().s[13]++;
8256
+ if (internalValue.current !== value) {
8257
+ cov_2n7wvllbx0().b[4][0]++;
8258
+ cov_2n7wvllbx0().s[14]++;
8259
+ setCountry(getPhoneData(value, defaultCountry).country);
8260
+ } else {
8261
+ cov_2n7wvllbx0().b[4][1]++;
8262
+ }
8263
+ }, [value]);
8264
+ cov_2n7wvllbx0().s[15]++;
8122
8265
  return /*#__PURE__*/React.createElement("div", {
8123
8266
  className: classnames([className])
8124
8267
  }, /*#__PURE__*/React.createElement(Input, _extends({
@@ -8132,14 +8275,15 @@ var PhoneNumberInput = (cov_2n7wvllbx0().s[0]++, /*#__PURE__*/forwardRef(functio
8132
8275
  }),
8133
8276
  prefix: /*#__PURE__*/React.createElement(CountryPicker, _extends({
8134
8277
  country: country,
8278
+ phoneNumber: value,
8135
8279
  prefix: prefix,
8136
8280
  setCountry: setCountry,
8137
- onInputChange: onChange
8281
+ onInputChange: handleInputChange
8138
8282
  }, selectProps)),
8139
8283
  onChange: handleChange
8140
8284
  }, inputProps)));
8141
8285
  }));
8142
- cov_2n7wvllbx0().s[9]++;
8286
+ cov_2n7wvllbx0().s[16]++;
8143
8287
  PhoneNumberInput.displayName = "PhoneNumberInput";
8144
8288
 
8145
8289
  var _excluded$1 = ["name"];