@kingteza/crud-component 1.22.2 → 1.23.0

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.
Files changed (209) hide show
  1. package/dist/_virtual/_commonjsHelpers.cjs.js +1 -0
  2. package/dist/_virtual/_commonjsHelpers.es.js +6 -0
  3. package/dist/_virtual/index.cjs.js +1 -0
  4. package/dist/_virtual/index.cjs2.js +1 -0
  5. package/dist/_virtual/index.cjs3.js +1 -0
  6. package/dist/_virtual/index.cjs4.js +1 -0
  7. package/dist/_virtual/index.cjs5.js +1 -0
  8. package/dist/_virtual/index.es.js +7 -0
  9. package/dist/_virtual/index.es2.js +7 -0
  10. package/dist/_virtual/index.es3.js +4 -0
  11. package/dist/_virtual/index.es4.js +4 -0
  12. package/dist/_virtual/index.es5.js +4 -0
  13. package/dist/_virtual/react-is.development.cjs.js +1 -0
  14. package/dist/_virtual/react-is.development.es.js +4 -0
  15. package/dist/_virtual/react-is.production.min.cjs.js +1 -0
  16. package/dist/_virtual/react-is.production.min.es.js +4 -0
  17. package/dist/common/text-field/PhoneNumberField.cjs.js +1 -1
  18. package/dist/common/text-field/PhoneNumberField.d.ts +9 -1
  19. package/dist/common/text-field/PhoneNumberField.es.js +70 -15
  20. package/dist/common/text-field/index.d.ts +1 -0
  21. package/dist/crud/CrudComponent.d.ts +5 -0
  22. package/dist/crud/CrudField.cjs.js +1 -1
  23. package/dist/crud/CrudField.es.js +238 -213
  24. package/dist/crud/import/CrudImportComponent.cjs.js +2 -2
  25. package/dist/crud/import/CrudImportComponent.es.js +14 -15
  26. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +5 -0
  27. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +42 -0
  28. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/react/3x2/index.cjs.js +1 -0
  29. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/react/3x2/index.es.js +6214 -0
  30. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/unicode.cjs.js +1 -0
  31. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/unicode.es.js +9 -0
  32. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/closeBraces.cjs.js +1 -0
  33. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/closeBraces.es.js +9 -0
  34. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/dom.cjs.js +1 -0
  35. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/dom.es.js +43 -0
  36. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/edit.cjs.js +1 -0
  37. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/edit.es.js +17 -0
  38. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/format.cjs.js +1 -0
  39. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/format.es.js +28 -0
  40. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/helpers.cjs.js +2 -0
  41. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/helpers.es.js +37 -0
  42. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/inputControl.cjs.js +1 -0
  43. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/inputControl.es.js +36 -0
  44. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/parse.cjs.js +1 -0
  45. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/parse.es.js +15 -0
  46. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.cjs.js +1 -0
  47. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.es.js +86 -0
  48. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/useInput.cjs.js +1 -0
  49. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/useInput.es.js +69 -0
  50. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/templateFormatter.cjs.js +2 -0
  51. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/templateFormatter.es.js +62 -0
  52. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.cjs.js +2 -0
  53. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.es.js +366 -0
  54. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.cjs.js +4 -0
  55. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.es.js +172 -0
  56. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.cjs.js +1 -0
  57. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.es.js +157 -0
  58. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.cjs.js +2 -0
  59. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.cjs.js +1 -0
  60. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.es.js +49 -0
  61. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.es.js +264 -0
  62. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.cjs.js +2 -0
  63. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.es.js +63 -0
  64. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeParser.cjs.js +2 -0
  65. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeParser.es.js +265 -0
  66. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeState.cjs.js +1 -0
  67. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeState.es.js +110 -0
  68. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/ParseError.cjs.js +1 -0
  69. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/ParseError.es.js +89 -0
  70. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.js +1 -0
  71. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/PhoneNumber.es.js +188 -0
  72. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/constants.cjs.js +1 -0
  73. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/constants.es.js +10 -0
  74. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/format.cjs.js +1 -0
  75. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/format.es.js +98 -0
  76. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.cjs.js +1 -0
  77. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.es.js +7 -0
  78. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.cjs.js +1 -0
  79. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.es.js +7 -0
  80. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.js +1 -0
  81. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/RFC3966.es.js +11 -0
  82. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.js +1 -0
  83. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.es.js +7 -0
  84. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.js +1 -0
  85. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.es.js +16 -0
  86. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.js +1 -0
  87. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.es.js +11 -0
  88. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.js +1 -0
  89. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.es.js +18 -0
  90. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.js +1 -0
  91. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.es.js +47 -0
  92. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.js +1 -0
  93. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.es.js +22 -0
  94. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.js +1 -0
  95. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.es.js +23 -0
  96. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.js +1 -0
  97. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.es.js +39 -0
  98. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.js +1 -0
  99. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.es.js +31 -0
  100. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.js +1 -0
  101. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.es.js +23 -0
  102. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.js +1 -0
  103. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.es.js +27 -0
  104. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.js +1 -0
  105. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.es.js +12 -0
  106. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.js +2 -0
  107. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.es.js +45 -0
  108. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.js +1 -0
  109. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.es.js +12 -0
  110. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.js +2 -0
  111. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getNumberType.es.js +50 -0
  112. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.js +1 -0
  113. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.es.js +14 -0
  114. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.js +1 -0
  115. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isObject.es.js +7 -0
  116. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.js +1 -0
  117. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.es.js +20 -0
  118. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.js +1 -0
  119. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.es.js +6 -0
  120. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.js +2 -0
  121. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/parseDigits.es.js +112 -0
  122. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.js +1 -0
  123. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.es.js +19 -0
  124. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isPossible.cjs.js +1 -0
  125. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isPossible.es.js +42 -0
  126. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValid.cjs.js +1 -0
  127. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValid.es.js +12 -0
  128. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValidPhoneNumber.cjs.js +1 -0
  129. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValidPhoneNumber.es.js +59 -0
  130. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/metadata.cjs.js +1 -0
  131. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/metadata.es.js +473 -0
  132. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.js +2 -0
  133. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/normalizeArguments.es.js +108 -0
  134. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parse.cjs.js +1 -0
  135. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parse.es.js +119 -0
  136. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.js +2 -0
  137. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.es.js +47 -0
  138. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.js +1 -0
  139. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber.es.js +9 -0
  140. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.js +1 -0
  141. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.es.js +55 -0
  142. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.js +1 -0
  143. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber_.es.js +62 -0
  144. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.js +1 -0
  145. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/tools/semver-compare.es.js +14 -0
  146. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/metadata.min.json.cjs.js +1 -0
  147. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/metadata.min.json.es.js +4 -0
  148. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.cjs.js +5 -0
  149. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +54 -0
  150. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.cjs.js +1 -0
  151. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +54 -0
  152. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.cjs.js +1 -0
  153. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +52 -0
  154. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.cjs.js +2 -0
  155. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +329 -0
  156. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.cjs.js +1 -0
  157. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +17 -0
  158. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.cjs.js +1 -0
  159. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +10 -0
  160. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.cjs.js +1 -0
  161. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +7 -0
  162. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.cjs.js +8 -0
  163. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +95 -0
  164. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.cjs.js +8 -0
  165. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +78 -0
  166. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.cjs.js +1 -0
  167. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +10 -0
  168. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/locale/en.json.cjs.js +1 -0
  169. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/locale/en.json.es.js +263 -0
  170. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/min/index.cjs.js +1 -0
  171. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/min/index.es.js +20 -0
  172. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountryIcon.cjs.js +1 -0
  173. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountryIcon.es.js +69 -0
  174. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountrySelect.cjs.js +2 -0
  175. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountrySelect.es.js +158 -0
  176. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/Flag.cjs.js +1 -0
  177. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/Flag.es.js +62 -0
  178. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputBasic.cjs.js +1 -0
  179. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputBasic.es.js +113 -0
  180. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputSmart.cjs.js +1 -0
  181. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputSmart.es.js +106 -0
  182. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InternationalIcon.cjs.js +1 -0
  183. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InternationalIcon.es.js +122 -0
  184. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.cjs.js +1 -0
  185. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.es.js +830 -0
  186. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.cjs.js +1 -0
  187. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.es.js +50 -0
  188. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PropTypes.cjs.js +1 -0
  189. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PropTypes.es.js +9 -0
  190. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/countries.cjs.js +2 -0
  191. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/countries.es.js +78 -0
  192. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.cjs.js +1 -0
  193. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.es.js +8 -0
  194. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.cjs.js +1 -0
  195. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.es.js +141 -0
  196. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.cjs.js +1 -0
  197. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.es.js +12 -0
  198. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/isE164Number.cjs.js +1 -0
  199. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/isE164Number.es.js +17 -0
  200. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.cjs.js +1 -0
  201. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.es.js +17 -0
  202. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.cjs.js +1 -0
  203. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.es.js +203 -0
  204. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useExternalRef.cjs.js +2 -0
  205. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useExternalRef.es.js +39 -0
  206. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useInputKeyDownHandler.cjs.js +1 -0
  207. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useInputKeyDownHandler.es.js +18 -0
  208. package/dist/style.css +1 -1
  209. package/package.json +5 -4
@@ -0,0 +1,830 @@
1
+ import S from "react";
2
+ import i from "../../../../../../_virtual/index.es.js";
3
+ import V from "../../../../../../_virtual/index.es2.js";
4
+ import J from "./InputSmart.es.js";
5
+ import Q from "./InputBasic.es.js";
6
+ import { CountrySelectWithIcon as Y } from "./CountrySelect.es.js";
7
+ import Z from "./Flag.es.js";
8
+ import tt from "./InternationalIcon.es.js";
9
+ import { validateE164Number as et } from "./helpers/isE164Number.es.js";
10
+ import { sortCountryOptions as nt, getSupportedCountryOptions as ot, isCountrySupportedWithError as rt, getSupportedCountries as it } from "./helpers/countries.es.js";
11
+ import { createCountryIconComponent as at } from "./CountryIcon.es.js";
12
+ import { setRefsValue as ut } from "./useExternalRef.es.js";
13
+ import { metadata as lt, labels as st } from "./PropTypes.es.js";
14
+ import { getCountrySelectOptions as ct, getPhoneDigitsForNewCountry as pt, e164 as ft, onPhoneDigitsChange as yt, couldNumberBelongToCountry as mt, parsePhoneNumber as dt, getPreSelectedCountry as Ct, getInitialPhoneDigits as gt } from "./helpers/phoneInputHelpers.es.js";
15
+ import ht from "./helpers/getPhoneInputWithCountryStateUpdateFromNewProps.es.js";
16
+ import $ from "../../../../libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.es.js";
17
+ var bt = ["name", "disabled", "readOnly", "autoComplete", "style", "className", "inputRef", "inputComponent", "numberInputProps", "smartCaret", "countrySelectComponent", "countrySelectProps", "containerComponent", "containerComponentProps", "defaultCountry", "countries", "countryOptionsOrder", "labels", "flags", "flagComponent", "flagUrl", "addInternationalOption", "internationalIcon", "displayInitialValueAsLocalNumber", "initialValueFormat", "onCountryChange", "limitMaxLength", "countryCallingCodeEditable", "focusInputOnCountrySelection", "reset", "metadata", "international", "locales"];
18
+ function F(n) {
19
+ "@babel/helpers - typeof";
20
+ return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
21
+ return typeof e;
22
+ } : function(e) {
23
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
24
+ }, F(n);
25
+ }
26
+ function W(n, e) {
27
+ var o = Object.keys(n);
28
+ if (Object.getOwnPropertySymbols) {
29
+ var t = Object.getOwnPropertySymbols(n);
30
+ e && (t = t.filter(function(r) {
31
+ return Object.getOwnPropertyDescriptor(n, r).enumerable;
32
+ })), o.push.apply(o, t);
33
+ }
34
+ return o;
35
+ }
36
+ function K(n) {
37
+ for (var e = 1; e < arguments.length; e++) {
38
+ var o = arguments[e] != null ? arguments[e] : {};
39
+ e % 2 ? W(Object(o), !0).forEach(function(t) {
40
+ p(n, t, o[t]);
41
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(o)) : W(Object(o)).forEach(function(t) {
42
+ Object.defineProperty(n, t, Object.getOwnPropertyDescriptor(o, t));
43
+ });
44
+ }
45
+ return n;
46
+ }
47
+ function D() {
48
+ return D = Object.assign ? Object.assign.bind() : function(n) {
49
+ for (var e = 1; e < arguments.length; e++) {
50
+ var o = arguments[e];
51
+ for (var t in o)
52
+ Object.prototype.hasOwnProperty.call(o, t) && (n[t] = o[t]);
53
+ }
54
+ return n;
55
+ }, D.apply(this, arguments);
56
+ }
57
+ function Ot(n, e) {
58
+ if (n == null) return {};
59
+ var o = vt(n, e), t, r;
60
+ if (Object.getOwnPropertySymbols) {
61
+ var a = Object.getOwnPropertySymbols(n);
62
+ for (r = 0; r < a.length; r++)
63
+ t = a[r], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(n, t) && (o[t] = n[t]);
64
+ }
65
+ return o;
66
+ }
67
+ function vt(n, e) {
68
+ if (n == null) return {};
69
+ var o = {}, t = Object.keys(n), r, a;
70
+ for (a = 0; a < t.length; a++)
71
+ r = t[a], !(e.indexOf(r) >= 0) && (o[r] = n[r]);
72
+ return o;
73
+ }
74
+ function St(n, e) {
75
+ if (!(n instanceof e))
76
+ throw new TypeError("Cannot call a class as a function");
77
+ }
78
+ function k(n, e) {
79
+ for (var o = 0; o < e.length; o++) {
80
+ var t = e[o];
81
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(n, z(t.key), t);
82
+ }
83
+ }
84
+ function Pt(n, e, o) {
85
+ return e && k(n.prototype, e), o && k(n, o), Object.defineProperty(n, "prototype", { writable: !1 }), n;
86
+ }
87
+ function It(n, e, o) {
88
+ return e = R(e), _t(n, X() ? Reflect.construct(e, o || [], R(n).constructor) : e.apply(n, o));
89
+ }
90
+ function _t(n, e) {
91
+ if (e && (F(e) === "object" || typeof e == "function"))
92
+ return e;
93
+ if (e !== void 0)
94
+ throw new TypeError("Derived constructors may only return object or undefined");
95
+ return Nt(n);
96
+ }
97
+ function Nt(n) {
98
+ if (n === void 0)
99
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
100
+ return n;
101
+ }
102
+ function X() {
103
+ try {
104
+ var n = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
105
+ }));
106
+ } catch {
107
+ }
108
+ return (X = function() {
109
+ return !!n;
110
+ })();
111
+ }
112
+ function R(n) {
113
+ return R = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
114
+ return o.__proto__ || Object.getPrototypeOf(o);
115
+ }, R(n);
116
+ }
117
+ function jt(n, e) {
118
+ if (typeof e != "function" && e !== null)
119
+ throw new TypeError("Super expression must either be null or a function");
120
+ n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && U(n, e);
121
+ }
122
+ function U(n, e) {
123
+ return U = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
124
+ return t.__proto__ = r, t;
125
+ }, U(n, e);
126
+ }
127
+ function p(n, e, o) {
128
+ return e = z(e), e in n ? Object.defineProperty(n, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = o, n;
129
+ }
130
+ function z(n) {
131
+ var e = Dt(n, "string");
132
+ return F(e) == "symbol" ? e : e + "";
133
+ }
134
+ function Dt(n, e) {
135
+ if (F(n) != "object" || !n) return n;
136
+ var o = n[Symbol.toPrimitive];
137
+ if (o !== void 0) {
138
+ var t = o.call(n, e);
139
+ if (F(t) != "object") return t;
140
+ throw new TypeError("@@toPrimitive must return a primitive value.");
141
+ }
142
+ return (e === "string" ? String : Number)(n);
143
+ }
144
+ var Ft = /* @__PURE__ */ (function(n) {
145
+ function e(o) {
146
+ var t;
147
+ St(this, e), t = It(this, e, [o]), p(t, "setInputRef", function(l) {
148
+ ut([t.props.inputRef, t.inputRef], l);
149
+ }), p(t, "isCountrySupportedWithError", function(l) {
150
+ var u = t.props.metadata;
151
+ return rt(l, u);
152
+ }), p(t, "onCountryChange", function(l) {
153
+ var u = t.props, c = u.international, m = u.metadata, _ = u.onChange, h = u.focusInputOnCountrySelection, O = t.state, N = O.phoneDigits, j = O.country, d = pt(N, {
154
+ prevCountry: j,
155
+ newCountry: l,
156
+ metadata: m,
157
+ // Convert the phone number to "national" format
158
+ // when the user changes the selected country by hand.
159
+ useNationalFormat: !c
160
+ }), v = ft(d, l, m);
161
+ h && t.inputRef.current.focus(), t.setState({
162
+ country: l,
163
+ latestCountrySelectedByUser: l,
164
+ hasUserSelectedACountry: !0,
165
+ phoneDigits: d,
166
+ value: v
167
+ }, function() {
168
+ _(v);
169
+ });
170
+ }), p(t, "onChange", function(l) {
171
+ var u = t.props, c = u.defaultCountry, m = u.onChange, _ = u.addInternationalOption, h = u.international, O = u.limitMaxLength, N = u.countryCallingCodeEditable, j = u.metadata, d = t.state, v = d.countries, T = d.phoneDigits, G = d.country, A = d.latestCountrySelectedByUser, L = yt(l, {
172
+ prevPhoneDigits: T,
173
+ country: G,
174
+ countryRequired: !_,
175
+ defaultCountry: c,
176
+ latestCountrySelectedByUser: A,
177
+ getAnyCountry: function() {
178
+ return t.getFirstSupportedCountry({
179
+ countries: v
180
+ });
181
+ },
182
+ countries: v,
183
+ international: h,
184
+ limitMaxLength: O,
185
+ countryCallingCodeEditable: N,
186
+ metadata: j
187
+ }), x = L.phoneDigits, H = L.country, E = L.value, M = {
188
+ phoneDigits: x,
189
+ value: E,
190
+ country: H
191
+ };
192
+ A && E && !mt(E, A, j) && (M.latestCountrySelectedByUser = void 0), N === !1 && !E && x === t.state.phoneDigits && (M.forceRerender = {}), t.setState(
193
+ M,
194
+ // Update the new `value` property.
195
+ // Doing it after the `state` has been updated
196
+ // because `onChange()` will trigger `getDerivedStateFromProps()`
197
+ // with the new `value` which will be compared to `state.value` there.
198
+ function() {
199
+ return m(E);
200
+ }
201
+ );
202
+ }), p(t, "_onFocus", function() {
203
+ return t.setState({
204
+ isFocused: !0
205
+ });
206
+ }), p(t, "_onBlur", function() {
207
+ return t.setState({
208
+ isFocused: !1
209
+ });
210
+ }), p(t, "onFocus", function(l) {
211
+ t._onFocus();
212
+ var u = t.props.onFocus;
213
+ u && u(l);
214
+ }), p(t, "onBlur", function(l) {
215
+ var u = t.props.onBlur;
216
+ t._onBlur(), u && u(l);
217
+ }), p(t, "onCountryFocus", function(l) {
218
+ t._onFocus();
219
+ var u = t.props.countrySelectProps;
220
+ if (u) {
221
+ var c = u.onFocus;
222
+ c && c(l);
223
+ }
224
+ }), p(t, "onCountryBlur", function(l) {
225
+ t._onBlur();
226
+ var u = t.props.countrySelectProps;
227
+ if (u) {
228
+ var c = u.onBlur;
229
+ c && c(l);
230
+ }
231
+ }), t.inputRef = /* @__PURE__ */ S.createRef();
232
+ var r = t.props, a = r.value;
233
+ r.labels;
234
+ var f = r.international, w = r.addInternationalOption, P = r.displayInitialValueAsLocalNumber, I = r.initialValueFormat, y = r.metadata, C = t.props, s = C.defaultCountry, b = C.countries;
235
+ s && (t.isCountrySupportedWithError(s) || (s = void 0)), a && et(a), b = it(b, y);
236
+ var g = dt(a, y);
237
+ t.CountryIcon = at(t.props);
238
+ var B = Ct({
239
+ value: a,
240
+ phoneNumber: g,
241
+ defaultCountry: s,
242
+ required: !w,
243
+ countries: b || $(y),
244
+ getAnyCountry: function() {
245
+ return t.getFirstSupportedCountry({
246
+ countries: b
247
+ });
248
+ },
249
+ metadata: y
250
+ });
251
+ return t.state = {
252
+ // Workaround for `this.props` inside `getDerivedStateFromProps()`.
253
+ props: t.props,
254
+ // The country selected.
255
+ country: B,
256
+ // `countries` are stored in `this.state` because they're filtered.
257
+ // For example, a developer might theoretically pass some unsupported
258
+ // countries as part of the `countries` property, and because of that
259
+ // the component uses `this.state.countries` (which are filtered)
260
+ // instead of `this.props.countries`
261
+ // (which could potentially contain unsupported countries).
262
+ countries: b,
263
+ // `phoneDigits` state property holds non-formatted user's input.
264
+ // The reason is that there's no way of finding out
265
+ // in which form should `value` be displayed: international or national.
266
+ // E.g. if `value` is `+78005553535` then it could be input
267
+ // by a user both as `8 (800) 555-35-35` and `+7 800 555 35 35`.
268
+ // Hence storing just `value` is not sufficient for correct formatting.
269
+ // E.g. if a user entered `8 (800) 555-35-35`
270
+ // then value is `+78005553535` and `phoneDigits` are `88005553535`
271
+ // and if a user entered `+7 800 555 35 35`
272
+ // then value is `+78005553535` and `phoneDigits` are `+78005553535`.
273
+ phoneDigits: gt({
274
+ value: a,
275
+ phoneNumber: g,
276
+ defaultCountry: s,
277
+ international: f,
278
+ useNationalFormat: P || I === "national",
279
+ metadata: y
280
+ }),
281
+ // `value` property is duplicated in state.
282
+ // The reason is that `getDerivedStateFromProps()`
283
+ // needs this `value` to compare to the new `value` property
284
+ // to find out if `phoneDigits` needs updating:
285
+ // If the `value` property was changed externally
286
+ // then it won't be equal to `state.value`
287
+ // in which case `phoneDigits` and `country` should be updated.
288
+ value: a
289
+ }, t;
290
+ }
291
+ return jt(e, n), Pt(e, [{
292
+ key: "componentDidMount",
293
+ value: function() {
294
+ var t = this.props.onCountryChange, r = this.props.defaultCountry, a = this.state.country;
295
+ t && (r && (this.isCountrySupportedWithError(r) || (r = void 0)), a !== r && t(a));
296
+ }
297
+ }, {
298
+ key: "componentDidUpdate",
299
+ value: function(t, r) {
300
+ var a = this.props.onCountryChange, f = this.state.country;
301
+ a && f !== r.country && a(f);
302
+ }
303
+ }, {
304
+ key: "getCountrySelectOptions",
305
+ value: function(t) {
306
+ var r = t.countries, a = this.props, f = a.international, w = a.countryCallingCodeEditable, P = a.countryOptionsOrder, I = a.addInternationalOption, y = a.labels, C = a.locales, s = a.metadata;
307
+ return this.useMemoCountrySelectOptions(function() {
308
+ return nt(ct({
309
+ countries: r || $(s),
310
+ countryNames: y,
311
+ addInternationalOption: f && w === !1 ? !1 : I,
312
+ compareStringsLocales: C
313
+ // compareStrings
314
+ }), ot(P, s));
315
+ }, [r, P, I, y, s]);
316
+ }
317
+ }, {
318
+ key: "useMemoCountrySelectOptions",
319
+ value: function(t, r) {
320
+ return (!this.countrySelectOptionsMemoDependencies || !Rt(r, this.countrySelectOptionsMemoDependencies)) && (this.countrySelectOptionsMemo = t(), this.countrySelectOptionsMemoDependencies = r), this.countrySelectOptionsMemo;
321
+ }
322
+ }, {
323
+ key: "getFirstSupportedCountry",
324
+ value: function(t) {
325
+ var r = t.countries, a = this.getCountrySelectOptions({
326
+ countries: r
327
+ });
328
+ return a[0].value;
329
+ }
330
+ }, {
331
+ key: "render",
332
+ value: function() {
333
+ var t = this.props, r = t.name, a = t.disabled, f = t.readOnly, w = t.autoComplete, P = t.style, I = t.className;
334
+ t.inputRef;
335
+ var y = t.inputComponent, C = t.numberInputProps, s = t.smartCaret, b = t.countrySelectComponent, g = t.countrySelectProps, B = t.containerComponent, l = t.containerComponentProps;
336
+ t.defaultCountry, t.countries, t.countryOptionsOrder;
337
+ var u = t.labels;
338
+ t.flags, t.flagComponent, t.flagUrl, t.addInternationalOption, t.internationalIcon, t.displayInitialValueAsLocalNumber, t.initialValueFormat, t.onCountryChange, t.limitMaxLength, t.countryCallingCodeEditable, t.focusInputOnCountrySelection, t.reset;
339
+ var c = t.metadata, m = t.international;
340
+ t.locales;
341
+ var _ = Ot(t, bt), h = this.state, O = h.country, N = h.countries, j = h.phoneDigits, d = h.isFocused, v = s ? J : Q, T = this.getCountrySelectOptions({
342
+ countries: N
343
+ });
344
+ return /* @__PURE__ */ S.createElement(B, D({
345
+ style: P,
346
+ className: V(I, "PhoneInput", {
347
+ "PhoneInput--focus": d,
348
+ "PhoneInput--disabled": a,
349
+ "PhoneInput--readOnly": f
350
+ })
351
+ }, l), /* @__PURE__ */ S.createElement(b, D({
352
+ name: r ? "".concat(r, "Country") : void 0,
353
+ "aria-label": u.country
354
+ }, g, {
355
+ value: O,
356
+ options: T,
357
+ onChange: this.onCountryChange,
358
+ onFocus: this.onCountryFocus,
359
+ onBlur: this.onCountryBlur,
360
+ disabled: a || g && g.disabled,
361
+ readOnly: f || g && g.readOnly,
362
+ iconComponent: this.CountryIcon
363
+ })), /* @__PURE__ */ S.createElement(v, D({
364
+ ref: this.setInputRef,
365
+ type: "tel",
366
+ autoComplete: w
367
+ }, C, _, {
368
+ inputFormat: m === !0 ? "INTERNATIONAL" : m === !1 ? "NATIONAL" : "INTERNATIONAL_OR_NATIONAL",
369
+ international: m ? !0 : void 0,
370
+ withCountryCallingCode: m ? !0 : void 0,
371
+ name: r,
372
+ metadata: c,
373
+ country: O,
374
+ value: j || "",
375
+ onChange: this.onChange,
376
+ onFocus: this.onFocus,
377
+ onBlur: this.onBlur,
378
+ disabled: a,
379
+ readOnly: f,
380
+ inputComponent: y,
381
+ className: V("PhoneInputInput", C && C.className, _.className)
382
+ })));
383
+ }
384
+ }], [{
385
+ key: "getDerivedStateFromProps",
386
+ value: (
387
+ // `state` holds previous props as `props`, and also:
388
+ // * `country` — The currently selected country, e.g. `"RU"`.
389
+ // * `value` — The currently entered phone number (E.164), e.g. `+78005553535`.
390
+ // * `phoneDigits` — The parsed `<input/>` value, e.g. `8005553535`.
391
+ // (and a couple of other less significant properties)
392
+ function(t, r) {
393
+ return K({
394
+ // Emulate `prevProps` via `state.props`.
395
+ props: t
396
+ }, ht(t, r.props, r));
397
+ }
398
+ )
399
+ }]);
400
+ })(S.PureComponent), wt = /* @__PURE__ */ S.forwardRef(function(n, e) {
401
+ return /* @__PURE__ */ S.createElement(Ft, D({}, Et(n), {
402
+ inputRef: e
403
+ }));
404
+ });
405
+ wt.propTypes = {
406
+ /**
407
+ * Phone number in `E.164` format.
408
+ *
409
+ * Example:
410
+ *
411
+ * `"+12223333333"`
412
+ *
413
+ * Any "falsy" value like `undefined`, `null` or an empty string `""` is treated like "empty".
414
+ */
415
+ value: i.string,
416
+ /**
417
+ * A function of `value: string?`.
418
+ *
419
+ * Updates the `value` property as the user inputs a phone number.
420
+ *
421
+ * If the user erases the input value, the argument is `undefined`.
422
+ */
423
+ onChange: i.func.isRequired,
424
+ /**
425
+ * Toggles the `--focus` CSS class.
426
+ * @ignore
427
+ */
428
+ onFocus: i.func,
429
+ /**
430
+ * `onBlur` is usually passed by `redux-form`.
431
+ * @ignore
432
+ */
433
+ onBlur: i.func,
434
+ /**
435
+ * Set to `true` to mark both the phone number `<input/>`
436
+ * and the country `<select/>` as `disabled`.
437
+ */
438
+ disabled: i.bool,
439
+ /**
440
+ * Set to `true` to mark both the phone number `<input/>`
441
+ * and the country `<select/>` as `readonly`.
442
+ */
443
+ readOnly: i.bool,
444
+ /**
445
+ * Sets `autoComplete` property for phone number `<input/>`.
446
+ *
447
+ * Web browser's "autocomplete" feature
448
+ * remembers the phone number being input
449
+ * and can also autofill the `<input/>`
450
+ * with previously remembered phone numbers.
451
+ *
452
+ * https://developers.google.com
453
+ * /web/updates/2015/06/checkout-faster-with-autofill
454
+ *
455
+ * For example, can be used to turn it off:
456
+ *
457
+ * "So when should you use `autocomplete="off"`?
458
+ * One example is when you've implemented your own version
459
+ * of autocomplete for search. Another example is any form field
460
+ * where users will input and submit different kinds of information
461
+ * where it would not be useful to have the browser remember
462
+ * what was submitted previously".
463
+ */
464
+ // (is `"tel"` by default)
465
+ autoComplete: i.string,
466
+ /**
467
+ * Set to `"national"` to show the initial `value` in
468
+ * "national" format rather than "international".
469
+ *
470
+ * For example, if `initialValueFormat` is `"national"`
471
+ * and the initial `value="+12133734253"` is passed
472
+ * then the `<input/>` value will be `"(213) 373-4253"`.
473
+ *
474
+ * By default, `initialValueFormat` is `undefined`,
475
+ * meaning that if the initial `value="+12133734253"` is passed
476
+ * then the `<input/>` value will be `"+1 213 373 4253"`.
477
+ *
478
+ * The reason for such default behaviour is that
479
+ * the newer generation grows up when there are no stationary phones
480
+ * and therefore everyone inputs phone numbers in international format
481
+ * in their smartphones so people gradually get more accustomed to
482
+ * writing phone numbers in international format rather than in local format.
483
+ * Future people won't be using "national" format, only "international".
484
+ */
485
+ // (is `undefined` by default)
486
+ initialValueFormat: i.oneOf(["national"]),
487
+ // `displayInitialValueAsLocalNumber` property has been
488
+ // superceded by `initialValueFormat` property.
489
+ displayInitialValueAsLocalNumber: i.bool,
490
+ /**
491
+ * The country to be selected by default.
492
+ * For example, can be set after a GeoIP lookup.
493
+ *
494
+ * Example: `"US"`.
495
+ */
496
+ // A two-letter country code ("ISO 3166-1 alpha-2").
497
+ defaultCountry: i.string,
498
+ /**
499
+ * If specified, only these countries will be available for selection.
500
+ *
501
+ * Example:
502
+ *
503
+ * `["RU", "UA", "KZ"]`
504
+ */
505
+ countries: i.arrayOf(i.string),
506
+ /**
507
+ * Custom country `<select/>` option names.
508
+ * Also some labels like "ext" and country `<select/>` `aria-label`.
509
+ *
510
+ * Example:
511
+ *
512
+ * `{ "ZZ": "Международный", RU: "Россия", US: "США", ... }`
513
+ *
514
+ * See the `locales` directory for examples.
515
+ */
516
+ labels: st,
517
+ /**
518
+ * Country `<select/>` options are sorted by their labels.
519
+ * The default sorting function uses `a.localeCompare(b, locales)`,
520
+ * and, if that's not available, falls back to simple `a > b` / `a < b`.
521
+ * Some languages, like Chinese, support multiple sorting variants
522
+ * (called "collations"), and the user might prefer one or another.
523
+ * Also, sometimes the Operating System language is not always
524
+ * the preferred language for a person using a website or an application,
525
+ * so there should be a way to specify custom locale.
526
+ * This `locales` property mimicks the `locales` argument of `Intl` constructors,
527
+ * and can be either a Unicode BCP 47 locale identifier or an array of such locale identifiers.
528
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument
529
+ */
530
+ locales: i.oneOfType([i.string, i.arrayOf(i.string)]),
531
+ /*
532
+ * Custom country `<select/>` options sorting function.
533
+ * The default one uses `a.localeCompare(b)`, and,
534
+ * if that's not available, falls back to simple `a > b`/`a < b`.
535
+ * There have been requests to add custom sorter for cases
536
+ * like Chinese language and "pinyin" (non-default) sorting order.
537
+ * https://stackoverflow.com/questions/22907288/chinese-sorting-by-pinyin-in-javascript-with-localecompare
538
+ compareStrings: PropTypes.func,
539
+ */
540
+ /**
541
+ * A URL template of a country flag, where
542
+ * "{XX}" is a two-letter country code in upper case,
543
+ * or where "{xx}" is a two-letter country code in lower case.
544
+ * By default it points to `country-flag-icons` gitlab pages website.
545
+ * I imagine someone might want to download those country flag icons
546
+ * and host them on their own servers instead
547
+ * (all flags are available in the `country-flag-icons` library).
548
+ * There's a catch though: new countries may be added in future,
549
+ * so when hosting country flag icons on your own server
550
+ * one should check the `CHANGELOG.md` every time before updating this library,
551
+ * otherwise there's a possibility that some new country flag would be missing.
552
+ */
553
+ flagUrl: i.string,
554
+ /**
555
+ * Custom country flag icon components.
556
+ * These flags will be used instead of the default ones.
557
+ * The the "Flags" section of the readme for more info.
558
+ *
559
+ * The shape is an object where keys are country codes
560
+ * and values are flag icon components.
561
+ * Flag icon components receive the same properties
562
+ * as `flagComponent` (see below).
563
+ *
564
+ * Example:
565
+ *
566
+ * `{ "RU": (props) => <img src="..."/> }`
567
+ *
568
+ * Example:
569
+ *
570
+ * `import flags from 'country-flag-icons/react/3x2'`
571
+ *
572
+ * `import PhoneInput from 'react-phone-number-input'`
573
+ *
574
+ * `<PhoneInput flags={flags} .../>`
575
+ */
576
+ flags: i.objectOf(i.elementType),
577
+ /**
578
+ * Country flag icon component.
579
+ *
580
+ * Takes properties:
581
+ *
582
+ * * `country: string` — The country code.
583
+ * * `countryName: string` — The country name.
584
+ * * `flagUrl: string` — The `flagUrl` property (see above).
585
+ * * `flags: object` — The `flags` property (see above).
586
+ */
587
+ flagComponent: i.elementType,
588
+ /**
589
+ * Set to `false` to remove the "International" option from country `<select/>`.
590
+ */
591
+ addInternationalOption: i.bool,
592
+ /**
593
+ * "International" icon component.
594
+ * Should have the same aspect ratio.
595
+ *
596
+ * Receives properties:
597
+ *
598
+ * * `title: string` — "International" country option label.
599
+ */
600
+ internationalIcon: i.elementType,
601
+ /**
602
+ * Can be used to place some countries on top of the list of country `<select/>` options.
603
+ *
604
+ * * `"XX"` — inserts an option for "XX" country.
605
+ * * `"🌐"` — inserts "International" option.
606
+ * * `"|"` — inserts a separator.
607
+ * * `"..."` — inserts options for the rest of the countries (can be omitted, in which case it will be automatically added at the end).
608
+ *
609
+ * Example:
610
+ *
611
+ * `["US", "CA", "AU", "|", "..."]`
612
+ */
613
+ countryOptionsOrder: i.arrayOf(i.string),
614
+ /**
615
+ * `<Phone/>` component CSS style object.
616
+ */
617
+ style: i.object,
618
+ /**
619
+ * `<Phone/>` component CSS class.
620
+ */
621
+ className: i.string,
622
+ /**
623
+ * Country `<select/>` component.
624
+ *
625
+ * Receives properties:
626
+ *
627
+ * * `name: string?` — HTML `name` attribute.
628
+ * * `value: string?` — The currently selected country code.
629
+ * * `onChange(value: string?)` — Updates the `value`.
630
+ * * `onFocus()` — Is used to toggle the `--focus` CSS class.
631
+ * * `onBlur()` — Is used to toggle the `--focus` CSS class.
632
+ * * `options: object[]` — The list of all selectable countries (including "International") each being an object of shape `{ value: string?, label: string }`.
633
+ * * `iconComponent: PropTypes.elementType` — React component that renders a country icon: `<Icon country={value}/>`. If `country` is `undefined` then it renders an "International" icon.
634
+ * * `disabled: boolean?` — HTML `disabled` attribute.
635
+ * * `readOnly: boolean?` — HTML `readOnly` attribute.
636
+ * * `tabIndex: (number|string)?` — HTML `tabIndex` attribute.
637
+ * * `className: string` — CSS class name.
638
+ */
639
+ countrySelectComponent: i.elementType,
640
+ /**
641
+ * Country `<select/>` component props.
642
+ * Along with the usual DOM properties such as `aria-label` and `tabIndex`,
643
+ * some custom properties are supported, such as `arrowComponent` and `unicodeFlags`.
644
+ */
645
+ countrySelectProps: i.object,
646
+ /**
647
+ * Phone number `<input/>` component.
648
+ *
649
+ * Receives properties:
650
+ *
651
+ * * `value: string` — The formatted `value`.
652
+ * * `onChange(event: Event)` — Updates the formatted `value` from `event.target.value`.
653
+ * * `onFocus()` — Is used to toggle the `--focus` CSS class.
654
+ * * `onBlur()` — Is used to toggle the `--focus` CSS class.
655
+ * * Other properties like `type="tel"` or `autoComplete="tel"` that should be passed through to the DOM `<input/>`.
656
+ *
657
+ * Must also either use `React.forwardRef()` to "forward" `ref` to the `<input/>` or implement `.focus()` method.
658
+ */
659
+ inputComponent: i.elementType,
660
+ /**
661
+ * Phone number `<input/>` component props.
662
+ */
663
+ numberInputProps: i.object,
664
+ /**
665
+ * Wrapping `<div/>` component.
666
+ *
667
+ * Receives properties:
668
+ *
669
+ * * `style: object` — A component CSS style object.
670
+ * * `className: string` — Classes to attach to the component, typically changes when component focuses or blurs.
671
+ */
672
+ containerComponent: i.elementType,
673
+ /**
674
+ * Wrapping `<div/>` component props.
675
+ */
676
+ containerComponentProps: i.object,
677
+ /**
678
+ * When the user attempts to insert a digit somewhere in the middle of a phone number,
679
+ * the caret position is moved right before the next available digit skipping
680
+ * any punctuation in between. This is called "smart" caret positioning.
681
+ * Another case would be the phone number format changing as a result of
682
+ * the user inserting the digit somewhere in the middle, which would require
683
+ * re-positioning the caret because all digit positions have changed.
684
+ * This "smart" caret positioning feature can be turned off by passing
685
+ * `smartCaret={false}` property: use it in case of any possible issues
686
+ * with caret position during phone number input.
687
+ */
688
+ // Is `true` by default.
689
+ smartCaret: i.bool,
690
+ /**
691
+ * Set to `true` to force "international" phone number format.
692
+ * Set to `false` to force "national" phone number format.
693
+ * By default it's `undefined` meaning that it doesn't enforce any phone number format:
694
+ * the user can input their phone number in either "national" or "international" format.
695
+ */
696
+ international: i.bool,
697
+ /**
698
+ * If set to `true`, the phone number input will get trimmed
699
+ * if it exceeds the maximum length for the country.
700
+ */
701
+ limitMaxLength: i.bool,
702
+ /**
703
+ * If set to `false`, and `international` is `true`, then
704
+ * users won't be able to erase the "country calling part"
705
+ * of a phone number in the `<input/>`.
706
+ */
707
+ countryCallingCodeEditable: i.bool,
708
+ /**
709
+ * `libphonenumber-js` metadata.
710
+ *
711
+ * Can be used to pass custom `libphonenumber-js` metadata
712
+ * to reduce the overall bundle size for those who compile "custom" metadata.
713
+ */
714
+ metadata: lt,
715
+ /**
716
+ * Is called every time the selected country changes:
717
+ * either programmatically or when user selects it manually from the list.
718
+ */
719
+ // People have been asking for a way to get the selected country.
720
+ // @see https://github.com/catamphetamine/react-phone-number-input/issues/128
721
+ // For some it's just a "business requirement".
722
+ // I guess it's about gathering as much info on the user as a website can
723
+ // without introducing any addional fields that would complicate the form
724
+ // therefore reducing "conversion" (that's a marketing term).
725
+ // Assuming that the phone number's country is the user's country
726
+ // is not 100% correct but in most cases I guess it's valid.
727
+ onCountryChange: i.func,
728
+ /**
729
+ * If set to `false`, will not focus the `<input/>` component
730
+ * when the user selects a country from the list of countries.
731
+ * This can be used to conform to the Web Content Accessibility Guidelines (WCAG).
732
+ * Quote:
733
+ * "On input: Changing the setting of any user interface component
734
+ * does not automatically cause a change of context unless the user
735
+ * has been advised of the behaviour before using the component."
736
+ */
737
+ focusInputOnCountrySelection: i.bool
738
+ };
739
+ var q = {
740
+ /**
741
+ * Remember (and autofill) the value as a phone number.
742
+ */
743
+ autoComplete: "tel",
744
+ /**
745
+ * Country `<select/>` component.
746
+ */
747
+ countrySelectComponent: Y,
748
+ /**
749
+ * Flag icon component.
750
+ */
751
+ flagComponent: Z,
752
+ /**
753
+ * By default, uses icons from `country-flag-icons` gitlab pages website.
754
+ */
755
+ // Must be equal to `flagUrl` in `./CountryIcon.js`.
756
+ flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
757
+ /**
758
+ * Default "International" country `<select/>` option icon.
759
+ */
760
+ internationalIcon: tt,
761
+ /**
762
+ * Phone number `<input/>` component.
763
+ */
764
+ inputComponent: "input",
765
+ /**
766
+ * Wrapping `<div/>` component.
767
+ */
768
+ containerComponent: "div",
769
+ /**
770
+ * Some users requested a way to reset the component:
771
+ * both number `<input/>` and country `<select/>`.
772
+ * Whenever `reset` property changes both number `<input/>`
773
+ * and country `<select/>` are reset.
774
+ * It's not implemented as some instance `.reset()` method
775
+ * because `ref` is forwarded to `<input/>`.
776
+ * It's also not replaced with just resetting `country` on
777
+ * external `value` reset, because a user could select a country
778
+ * and then not input any `value`, and so the selected country
779
+ * would be "stuck", if not using this `reset` property.
780
+ */
781
+ // https://github.com/catamphetamine/react-phone-number-input/issues/300
782
+ reset: i.any,
783
+ /**
784
+ *
785
+ */
786
+ /**
787
+ * Set to `false` to use "basic" caret instead of the "smart" one.
788
+ */
789
+ smartCaret: !0,
790
+ /**
791
+ * Whether to add the "International" option
792
+ * to the list of countries.
793
+ */
794
+ addInternationalOption: !0,
795
+ /**
796
+ * If set to `false`, and `international` is `true`, then
797
+ * users won't be able to erase the "country calling part"
798
+ * of a phone number in the `<input/>`.
799
+ */
800
+ countryCallingCodeEditable: !0,
801
+ /**
802
+ * If set to `false`, will not focus the `<input/>` component
803
+ * when the user selects a country from the list of countries.
804
+ * This can be used to conform to the Web Content Accessibility Guidelines (WCAG).
805
+ * Quote:
806
+ * "On input: Changing the setting of any user interface component
807
+ * does not automatically cause a change of context unless the user
808
+ * has been advised of the behaviour before using the component."
809
+ */
810
+ focusInputOnCountrySelection: !0
811
+ };
812
+ function Et(n) {
813
+ n = K({}, n);
814
+ for (var e in q)
815
+ n[e] === void 0 && (n[e] = q[e]);
816
+ return n;
817
+ }
818
+ function Rt(n, e) {
819
+ if (n.length !== e.length)
820
+ return !1;
821
+ for (var o = 0; o < n.length; ) {
822
+ if (n[o] !== e[o])
823
+ return !1;
824
+ o++;
825
+ }
826
+ return !0;
827
+ }
828
+ export {
829
+ wt as default
830
+ };