diff --git a/phonenumberfx-demo/src/main/java/com/dlsc/phonenumberfx/demo/PhoneNumberFieldApp.java b/phonenumberfx-demo/src/main/java/com/dlsc/phonenumberfx/demo/PhoneNumberFieldApp.java index 7b81042..0f6fcd3 100644 --- a/phonenumberfx-demo/src/main/java/com/dlsc/phonenumberfx/demo/PhoneNumberFieldApp.java +++ b/phonenumberfx-demo/src/main/java/com/dlsc/phonenumberfx/demo/PhoneNumberFieldApp.java @@ -1,23 +1,23 @@ package com.dlsc.phonenumberfx.demo; import com.dlsc.phonenumberfx.PhoneNumberField; +import com.dlsc.phonenumberfx.PhoneNumberField.Country; import javafx.application.Application; -import javafx.beans.InvalidationListener; import javafx.beans.binding.Bindings; import javafx.beans.value.ObservableValue; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Node; import javafx.scene.Scene; -import javafx.scene.control.Button; -import javafx.scene.control.CheckBox; import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; import javafx.scene.control.Separator; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; import javafx.stage.Stage; -import org.controlsfx.control.CheckComboBox; import java.util.function.Function; @@ -27,118 +27,151 @@ public class PhoneNumberFieldApp extends Application { if (c == null) { return null; } - PhoneNumberField.CountryCallingCode code = (PhoneNumberField.CountryCallingCode) c; - return "(" + code.phonePrefix() + ") " + code; + Country code = (Country) c; + return "(" + code.phonePrefix() + ")" + code; }; @Override public void start(Stage stage) { - PhoneNumberField field = new PhoneNumberField(); - - VBox controls = new VBox(10); - addControl("Available Countries", availableCountriesSelector(field), controls); - addControl("Preferred Countries", preferredCountriesSelector(field), controls); - addControl("Disable Country", disableCountryCheck(field), controls); - addControl("", clearButton(field), controls); - - VBox fields = new VBox(10); - addField(fields, "Country Code", field.countryCallingCodeProperty(), COUNTRY_CODE_CONVERTER); - addField(fields, "Raw PhoneNumber", field.rawPhoneNumberProperty()); - addField(fields, "E164 PhoneNumber", field.e164PhoneNumberProperty()); - addField(fields, "National PhoneNumber", field.nationalPhoneNumberProperty()); - VBox vBox = new VBox(20); vBox.setPadding(new Insets(20)); vBox.setAlignment(Pos.CENTER); - vBox.getChildren().addAll(controls, new Separator(), field, new Separator(), fields); - - stage.setTitle("PhoneNumberField2"); - stage.setScene(new Scene(vBox, 500, 500)); + vBox.getChildren().addAll( + buildDefaultEmptySample(), + new Separator(), + buildDefaultPrefilledSample(), + new Separator(), + buildCustomAvailableCountriesSample(), + new Separator(), + buildPreferredCountriesSample(), + new Separator(), + buildDisabledCountrySelectorSample() + ); + + ScrollPane scrollPane = new ScrollPane(); + scrollPane.setContent(vBox); + + stage.setTitle("PhoneNumberField"); + stage.setScene(new Scene(scrollPane, 900, 800)); stage.sizeToScene(); stage.centerOnScreen(); stage.show(); } - private Node availableCountriesSelector(PhoneNumberField field) { - CheckBox allCountries = new CheckBox("All"); + private Node buildDefaultEmptySample() { + PhoneNumberField field = new PhoneNumberField(); - CheckComboBox comboBox = new CheckComboBox<>(); - comboBox.getItems().addAll(PhoneNumberField.CountryCallingCode.Defaults.values()); - comboBox.setPrefWidth(250); - comboBox.getCheckModel().getCheckedItems().addListener((InvalidationListener) observable -> field.getAvailableCountryCodes().setAll(comboBox.getCheckModel().getCheckedItems())); - comboBox.getCheckModel().checkAll(); + String title = "Default Settings"; + String description = "A control without any changes to its properties."; - allCountries.selectedProperty().addListener((obs, oldV, newV) -> { - if (newV) { - comboBox.getCheckModel().checkAll(); - comboBox.setDisable(true); - } else { - comboBox.getCheckModel().clearChecks(); - comboBox.setDisable(false); - } - }); + return buildSample(title, description, field); + } - allCountries.setSelected(true); + private Node buildDefaultPrefilledSample() { + PhoneNumberField field = new PhoneNumberField(); + field.setRawPhoneNumber("+573003767182"); - HBox box = new HBox(10); - box.getChildren().addAll(allCountries, comboBox); + String title = "Initial Value"; + String description = "A control with default settings and a value set through code."; - return box; + return buildSample(title, description, field); } - private Node preferredCountriesSelector(PhoneNumberField view) { - CheckComboBox comboBox = new CheckComboBox<>(); - comboBox.getItems().addAll(PhoneNumberField.CountryCallingCode.Defaults.values()); - comboBox.setPrefWidth(300); - Bindings.bindContent(view.getPreferredCountryCodes(), comboBox.getCheckModel().getCheckedItems()); - return comboBox; + private Node buildCustomAvailableCountriesSample() { + PhoneNumberField field = new PhoneNumberField(); + field.getAvailableCountries().setAll( + Country.COLOMBIA, + Country.GERMANY, + Country.UNITED_STATES, + Country.UNITED_KINGDOM, + Country.SWITZERLAND); + + String title = "Available Countries (Customized)"; + String description = "A control with modified list of available countries."; + + return buildSample(title, description, field); } - private Node disableCountryCheck(PhoneNumberField field) { - CheckBox check = new CheckBox(); - check.selectedProperty().bindBidirectional(field.disableCountryCodeProperty()); - return check; + private Node buildPreferredCountriesSample() { + PhoneNumberField field = new PhoneNumberField(); + + field.getPreferredCountries().setAll( + Country.SWITZERLAND, + Country.GERMANY, + Country.UNITED_KINGDOM); + + String title = "Preferred Countries"; + String description = "Preferred countries all shown at the top of the list always."; + + return buildSample(title, description, field); } - private Node clearButton(PhoneNumberField field) { - Button clear = new Button("Clear all"); - clear.setOnAction(evt -> field.setRawPhoneNumber(null)); - return clear; + private Node buildDisabledCountrySelectorSample() { + PhoneNumberField field = new PhoneNumberField(); + field.setSelectedCountry(Country.GERMANY); + field.setDisableCountryDropdown(true); + + String title = "Disabled Country Selector"; + String description = "Disables the country selector button so it forces the control to keep always the same country."; + + return buildSample(title, description, field); } - private void addControl(String name, Node control, VBox controls) { - Label label = new Label(name); - label.setPrefWidth(150); - HBox hBox = new HBox(); + private Node buildSample(String title, String description, PhoneNumberField field) { + Label titleLabel = new Label(title); + titleLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 1.4em;"); + + Label descriptionLabel = new Label(description); + descriptionLabel.setWrapText(true); + + VBox leftBox = new VBox(20); + leftBox.setAlignment(Pos.CENTER_LEFT); + leftBox.getChildren().addAll(titleLabel, descriptionLabel, field); + leftBox.setPrefWidth(400); + + ColumnConstraints column1 = new ColumnConstraints(); + column1.setPercentWidth(35); + + ColumnConstraints column2 = new ColumnConstraints(); + column2.setPercentWidth(65); + + GridPane rightBox = new GridPane(); + rightBox.setHgap(10); + rightBox.setVgap(10); + rightBox.getColumnConstraints().addAll(column1, column2); + rightBox.setPrefWidth(400); + + addField(rightBox, "Country Code", field.selectedCountryProperty(), COUNTRY_CODE_CONVERTER); + addField(rightBox, "Raw Number", field.rawPhoneNumberProperty()); + addField(rightBox, "E164 Format", field.e164PhoneNumberProperty()); + addField(rightBox, "National Format", field.nationalPhoneNumberProperty()); + + HBox hBox = new HBox(30); + hBox.getChildren().addAll(leftBox, rightBox); hBox.setAlignment(Pos.CENTER_LEFT); - hBox.getChildren().addAll(label, control); - HBox.setHgrow(label, Priority.NEVER); - HBox.setHgrow(control, Priority.ALWAYS); - controls.getChildren().add(hBox); + HBox.setHgrow(leftBox, Priority.NEVER); + HBox.setHgrow(rightBox, Priority.ALWAYS); + + return hBox; } - private void addField(VBox fields, String label, ObservableValue property) { - addField(fields, label, property, null); + private void addField(GridPane pane, String name, ObservableValue value) { + addField(pane, name, value, null); } - private void addField(VBox fields, String label, ObservableValue property, Function converter) { - Label value = new Label(); + private void addField(GridPane pane, String name, ObservableValue value, Function converter) { + Label valueLbl = new Label(); if (converter == null) { - value.textProperty().bind(Bindings.convert(property)); + valueLbl.textProperty().bind(Bindings.convert(value)); } else { - value.textProperty().bind(Bindings.createStringBinding(() -> converter.apply(property.getValue()), property)); + valueLbl.textProperty().bind(Bindings.createStringBinding(() -> converter.apply(value.getValue()), value)); } - Label myLabel = new Label(label + ": "); - myLabel.setPrefWidth(150); - - HBox hBox = new HBox(); - hBox.setAlignment(Pos.CENTER_LEFT); - hBox.getChildren().addAll(myLabel, value); - HBox.setHgrow(myLabel, Priority.NEVER); - HBox.setHgrow(value, Priority.ALWAYS); + valueLbl.setStyle("-fx-font-family: monospace; -fx-font-size: 1.2em; -fx-font-weight: bold; -fx-padding: 0 0 0 10;"); - fields.getChildren().add(hBox); + int row = pane.getRowCount(); + pane.add(new Label(name + ":"), 0, row); + pane.add(valueLbl, 1, row); } public static void main(String[] args) { diff --git a/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/PhoneNumberField.java b/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/PhoneNumberField.java index f7d63e7..fc75eed 100644 --- a/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/PhoneNumberField.java +++ b/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/PhoneNumberField.java @@ -5,115 +5,61 @@ import com.google.i18n.phonenumbers.PhoneNumberUtil; import com.google.i18n.phonenumbers.Phonenumber; import javafx.application.Platform; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.ReadOnlyBooleanWrapper; -import javafx.beans.property.ReadOnlyStringProperty; -import javafx.beans.property.ReadOnlyStringWrapper; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.property.SimpleObjectProperty; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; +import javafx.beans.property.*; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.css.PseudoClass; -import javafx.scene.Node; -import javafx.scene.control.Control; -import javafx.scene.control.Skin; -import javafx.scene.control.TextField; -import javafx.scene.control.TextFormatter; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; +import javafx.scene.control.*; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; -import javafx.scene.layout.Region; -import javafx.scene.layout.StackPane; import javafx.util.Callback; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.TreeMap; +import java.util.*; import java.util.function.UnaryOperator; /** - *

A control for entering phone numbers. By default, the phone numbers are expressed in international format, including - * the country calling code and delivered by the {@link #rawPhoneNumberProperty() phone number} property.

- * - *

The control supports a list of {@link #getAvailableCountryCodes() available country codes} and works based on - * the {@link CountryCallingCode CountryCallingCode} interface. This interface allows customizing the country codes and their - * respective area codes, in case the default values are not sufficient or the numbers change. - *

+ * A control for entering phone numbers. By default, the phone numbers are expressed in international format, + * including the country calling code and delivered by the {@link #rawPhoneNumberProperty() phone number} property. + * The control supports a list of {@link #getAvailableCountries() available countries}. */ public class PhoneNumberField extends Control { - private static final Map FLAG_IMAGES = new HashMap<>(); - - static { - for (CountryCallingCode code : CountryCallingCode.Defaults.values()) { - FLAG_IMAGES.put(code, new Image(Objects.requireNonNull(PhoneNumberField.class.getResource("phonenumberfield/country-flags/" + code.iso2Code().toLowerCase() + ".png")).toExternalForm())); - } - } - /** - * Pseudo class used to visualize the error state of the control. + * Pseudo class used to visualize the validity of the control. */ - public static final PseudoClass ERROR_PSEUDO_CLASS = PseudoClass.getPseudoClass("error"); + public static final PseudoClass VALID_PSEUDO_CLASS = PseudoClass.getPseudoClass("valid"); /** * Default style class for css styling. */ public static final String DEFAULT_STYLE_CLASS = "phone-number-field"; - private final CountryCallingCodeResolver resolver; + private final CountryResolver resolver; private final PhoneNumberFormatter formatter; private final TextField textField; private final PhoneNumberUtil phoneNumberUtil; /** - * Builds a new phone number field with the default settings. The available country calling codes is taken from - * {@link CountryCallingCode.Defaults Defaults}. + * Builds a new phone number field with the default settings. The available country + * calling codes are defined on {@link Country}. */ public PhoneNumberField() { getStyleClass().add(DEFAULT_STYLE_CLASS); - getAvailableCountryCodes().setAll(CountryCallingCode.Defaults.values()); + getAvailableCountries().setAll(Country.values()); phoneNumberUtil = PhoneNumberUtil.getInstance(); textField = new TextField(); - resolver = new CountryCallingCodeResolver(); + resolver = new CountryResolver(); formatter = new PhoneNumberFormatter(textField); rawPhoneNumberProperty().addListener((obs, oldV, newV) -> Platform.runLater(() -> formatter.setFormattedNationalNumber(getRawPhoneNumber()))); - validProperty().addListener((obs, oldV, newV) -> pseudoClassStateChanged(ERROR_PSEUDO_CLASS, !newV)); + validProperty().addListener((obs, oldV, newV) -> pseudoClassStateChanged(VALID_PSEUDO_CLASS, !newV)); - countryCodeViewFactory.addListener((obs, oldValue, newValue) -> { + countryCellFactory.addListener((obs, oldValue, newValue) -> { if (newValue == null) { - setCountryCodeViewFactory(oldValue); - throw new IllegalArgumentException("country code view factory can not be null"); - } - }); - - setCountryCodeViewFactory(code -> { - if (code != null) { - ImageView imageView = new ImageView(); - imageView.setFitHeight(24); - imageView.setFitWidth(24); - imageView.setPreserveRatio(true); - imageView.getStyleClass().add("flag-image-view"); - Optional.ofNullable(FLAG_IMAGES.get(code)).ifPresent(imageView::setImage); - - StackPane wrapper = new StackPane(imageView); - wrapper.getStyleClass().add("flag-wrapper"); - - return wrapper; + setCountryCellFactory(oldValue); + throw new IllegalArgumentException("country cell factory can not be null"); } - - Region globeRegion = new Region(); - globeRegion.getStyleClass().add("globe"); - return globeRegion; }); } @@ -124,10 +70,20 @@ public String getUserAgentStylesheet() { @Override protected Skin createDefaultSkin() { - return new PhoneNumberFieldSkin(this, textField); + return new PhoneNumberFieldSkin(this); + } + + /** + * Returns the text field used as the editor for this control. + * + * @return the text field / editor + */ + public final TextField getEditor() { + return textField; } // VALUES + private final StringProperty rawPhoneNumber = new SimpleStringProperty(this, "rawPhoneNumber") { private boolean selfUpdate; @@ -144,14 +100,14 @@ public void set(String newRawPhoneNumber) { super.set(newRawPhoneNumber); // Resolve all dependencies out of the raw phone number - CountryCallingCode code = resolver.call(newRawPhoneNumber); + Country country = resolver.call(newRawPhoneNumber); - if (code != null) { - setCountryCallingCode(code); + if (country != null) { + setSelectedCountry(country); formatter.setFormattedNationalNumber(newRawPhoneNumber); try { - Phonenumber.PhoneNumber number = phoneNumberUtil.parse(getRawPhoneNumber(), code.iso2Code()); + Phonenumber.PhoneNumber number = phoneNumberUtil.parse(getRawPhoneNumber(), country.iso2Code()); setValid(phoneNumberUtil.isValidNumber(number)); setE164PhoneNumber(phoneNumberUtil.format(number, PhoneNumberUtil.PhoneNumberFormat.E164)); setNationalPhoneNumber(phoneNumberUtil.format(number, PhoneNumberUtil.PhoneNumberFormat.NATIONAL)); @@ -161,7 +117,7 @@ public void set(String newRawPhoneNumber) { setNationalPhoneNumber(null); } } else { - setCountryCallingCode(null); + setSelectedCountry(null); formatter.setFormattedNationalNumber(null); setValid(true); setE164PhoneNumber(null); @@ -190,11 +146,11 @@ public final void setRawPhoneNumber(String rawPhoneNumber) { rawPhoneNumberProperty().set(rawPhoneNumber); } - private final ObjectProperty countryCallingCode = new SimpleObjectProperty<>(this, "countryCallingCode") { + private final ObjectProperty selectedCountry = new SimpleObjectProperty<>(this, "selectedCountry") { private boolean selfUpdate; @Override - public void set(CountryCallingCode newCountryCallingCode) { + public void set(Country newCountry) { if (selfUpdate) { return; } @@ -203,9 +159,9 @@ public void set(CountryCallingCode newCountryCallingCode) { selfUpdate = true; // Set the value first, so that the binding will be triggered - super.set(newCountryCallingCode); + super.set(newCountry); - setRawPhoneNumber(newCountryCallingCode == null ? null : newCountryCallingCode.phonePrefix()); + setRawPhoneNumber(newCountry == null ? null : newCountry.phonePrefix()); } finally { selfUpdate = false; @@ -214,19 +170,20 @@ public void set(CountryCallingCode newCountryCallingCode) { }; /** - * @return The selected country calling code. Use this property if you want to define a default (pre-selected) country. - * It can also be used in conjunction with {@link #disableCountryCodeProperty() disableCountryCode} to avoid changing the country part. + * The selected country. Use this property if you want to define a default (pre-selected) country. + * It can also be used in conjunction with {@link #disableCountryDropdownProperty()} to avoid + * changing the country part. */ - public final ObjectProperty countryCallingCodeProperty() { - return countryCallingCode; + public final ObjectProperty selectedCountryProperty() { + return selectedCountry; } - public final CountryCallingCode getCountryCallingCode() { - return countryCallingCodeProperty().get(); + public final Country getSelectedCountry() { + return selectedCountryProperty().get(); } - private void setCountryCallingCode(CountryCallingCode countryCallingCode) { - countryCallingCodeProperty().set(countryCallingCode); + public final void setSelectedCountry(Country selectedCountry) { + selectedCountryProperty().set(selectedCountry); } private final ReadOnlyStringWrapper nationalPhoneNumber = new ReadOnlyStringWrapper(this, "nationalPhoneNumber"); @@ -259,74 +216,75 @@ private void setE164PhoneNumber(String e164PhoneNumber) { // SETTINGS - private final ObservableList availableCountryCodes = FXCollections.observableArrayList(); + private final ObservableList availableCountries = FXCollections.observableArrayList(); /** - * @return The list of available countries from which the user can select one and put it into the - * {@link #countryCallingCodeProperty() countryCallingCode}. + * The list of available countries from which the user can select one and put it into the + * {@link #selectedCountryProperty()}. */ - public final ObservableList getAvailableCountryCodes() { - return availableCountryCodes; + public final ObservableList getAvailableCountries() { + return availableCountries; } - private final ObservableList preferredCountryCodes = FXCollections.observableArrayList(); + private final ObservableList preferredCountries = FXCollections.observableArrayList(); /** - * @return The list of preferred countries that are shown first in the list of available countries. If one country calling code - * is added to this list, but is not present in the {@link #getAvailableCountryCodes()} then it will be ignored and not shown. + * The list of preferred countries that are shown first in the list of available countries. If a country + * is added to this list that is not present in the {@link #getAvailableCountries()} then it will be ignored + * and not shown. */ - public final ObservableList getPreferredCountryCodes() { - return preferredCountryCodes; + public final ObservableList getPreferredCountries() { + return preferredCountries; } - private final BooleanProperty disableCountryCode = new SimpleBooleanProperty(this, "disableCountryCode"); + private final BooleanProperty disableCountryDropdown = new SimpleBooleanProperty(this, "disableCountryDropdown"); /** - * @return Flag to disable the country selector button. This will allow to specify a default country code and avoid changing it + * Flag to disable the country dropdown. This will allow to specify a default country and avoid changing it * in case it is wanted to be fixed. */ - public final BooleanProperty disableCountryCodeProperty() { - return disableCountryCode; + public final BooleanProperty disableCountryDropdownProperty() { + return disableCountryDropdown; } - public final boolean isDisableCountryCode() { - return disableCountryCodeProperty().get(); + public final boolean getDisableCountryDropdown() { + return disableCountryDropdownProperty().get(); } - public final void setDisableCountryCode(boolean disableCountryCode) { - disableCountryCodeProperty().set(disableCountryCode); + public final void setDisableCountryDropdown(boolean disableCountryDropdown) { + disableCountryDropdownProperty().set(disableCountryDropdown); } - private final ObjectProperty> countryCodeViewFactory = new SimpleObjectProperty<>(this, "countryCodeViewFactory"); + private final ObjectProperty, ListCell>> countryCellFactory = new SimpleObjectProperty<>(this, "countryCellFactory"); /** - * @return Factory that allows to replace the node used to graphically represent each country calling code. + * Factory that allows to replace the list cells used to graphically represent each country. */ - public final ObjectProperty> countryCodeViewFactoryProperty() { - return countryCodeViewFactory; + public final ObjectProperty, ListCell>> countryCellFactoryProperty() { + return countryCellFactory; } - public final Callback getCountryCodeViewFactory() { - return countryCodeViewFactoryProperty().get(); + public final Callback, ListCell> getCountryCellFactory() { + return countryCellFactoryProperty().get(); } - public final void setCountryCodeViewFactory(Callback countryCodeViewFactory) { - countryCodeViewFactoryProperty().set(countryCodeViewFactory); + public final void setCountryCellFactory(Callback, ListCell> countryCellFactory) { + countryCellFactoryProperty().set(countryCellFactory); } private final ReadOnlyBooleanWrapper valid = new ReadOnlyBooleanWrapper(this, "valid") { @Override public void set(boolean newValid) { super.set(newValid); - pseudoClassStateChanged(ERROR_PSEUDO_CLASS, !newValid); + pseudoClassStateChanged(VALID_PSEUDO_CLASS, !newValid); } }; /** - * @return Read only property that indicates whether the phone number is valid or not. + * Read-only property that indicates whether the phone number is valid or not. */ - public final ReadOnlyBooleanWrapper validProperty() { - return valid; + public final ReadOnlyBooleanProperty validProperty() { + return valid.getReadOnlyProperty(); } public final boolean isValid() { @@ -338,324 +296,292 @@ private void setValid(boolean valid) { } /** - * Represents a country calling code. The country calling code is used to identify the country and the area code. This ones - * should go according the ITU-T E.164 recommendation. - * List_of_country_calling_codes. + * All countries supported by the control. */ - public interface CountryCallingCode { - - /** - * @return The code assigned to the country. - */ - int countryCode(); + public enum Country { + + AFGHANISTAN(93, "AF"), + ALAND_ISLANDS(358, "AX", 18), + ALBANIA(355, "AL"), + ALGERIA(213, "DZ"), + AMERICAN_SAMOA(1, "AS", 684), + ANDORRA(376, "AD"), + ANGOLA(244, "AO"), + ANGUILLA(1, "AI", 264), + ANTIGUA_AND_BARBUDA(1, "AG", 268), + ARGENTINA(54, "AR"), + ARMENIA(374, "AM"), + ARUBA(297, "AW"), + AUSTRALIA(61, "AU"), + AUSTRALIA_ANTARCTIC_TERRITORIES(672, "AQ", 1), + AUSTRIA(43, "AT"), + AZERBAIJAN(994, "AZ"), + BAHAMAS(1, "BS", 242), + BAHRAIN(973, "BH"), + BANGLADESH(880, "BD"), + BARBADOS(1, "BB", 246), + BELARUS(375, "BY"), + BELGIUM(32, "BE"), + BELIZE(501, "BZ"), + BENIN(229, "BJ"), + BERMUDA(1, "BM", 441), + BHUTAN(975, "BT"), + BOLIVIA(591, "BO"), + BONAIRE(599, "BQ", 7), + BOSNIA_AND_HERZEGOVINA(387, "BA"), + BOTSWANA(267, "BW"), + BRAZIL(55, "BR"), + BRITISH_INDIAN_OCEAN_TERRITORY(246, "IO"), + BRITISH_VIRGIN_ISLANDS(1, "VG", 284), + BRUNEI(673, "BN"), + BULGARIA(359, "BG"), + BURKINA_FASO(226, "BF"), + BURUNDI(257, "BI"), + CAMBODIA(855, "KH"), + CAMEROON(237, "CM"), + CANADA(1, "CA"), + CAPE_VERDE(238, "CV"), + CAYMAN_ISLANDS(1, "KY", 345), + CENTRAL_AFRICAN_REPUBLIC(236, "CF"), + CHAD(235, "TD"), + CHILE(56, "CL"), + CHINA(86, "CN"), + CHRISTMAS_ISLAND(61, "CX", 89164), + COCOS_ISLANDS(61, "CC", 89162), + COLOMBIA(57, "CO"), + COMOROS(269, "KM"), + CONGO(242, "CG"), + COOK_ISLANDS(682, "CK"), + COSTA_RICA(506, "CR"), + CROATIA(385, "HR"), + CUBA(53, "CU"), + CURACAO(599, "CW", 9), + CYPRUS(357, "CY"), + CZECH_REPUBLIC(420, "CZ"), + DEMOCRATIC_REPUBLIC_OF_THE_CONGO(243, "CD"), + DENMARK(45, "DK"), + DJIBOUTI(253, "DJ"), + DOMINICA(1, "DM", 767), + DOMINICAN_REPUBLIC(1, "DO", 809, 829, 849), + EAST_TIMOR(670, "TL"), + ECUADOR(593, "EC"), + EGYPT(20, "EG"), + EL_SALVADOR(503, "SV"), + EQUATORIAL_GUINEA(240, "GQ"), + ERITREA(291, "ER"), + ESTONIA(372, "EE"), + ETHIOPIA(251, "ET"), + FALKLAND_ISLANDS(500, "FK"), + FAROE_ISLANDS(298, "FO"), + FIJI(679, "FJ"), + FINLAND(358, "FI"), + FRANCE(33, "FR"), + FRENCH_GUIANA(594, "GF"), + FRENCH_POLYNESIA(689, "PF"), + GABON(241, "GA"), + GAMBIA(220, "GM"), + GEORGIA(995, "GE"), + GERMANY(49, "DE"), + GHANA(233, "GH"), + GIBRALTAR(350, "GI"), + GREECE(30, "GR"), + GREENLAND(299, "GL"), + GRENADA(1, "GD", 473), + GUADELOUPE(590, "GP"), + GUAM(1, "GU", 671), + GUATEMALA(502, "GT"), + GUERNSEY(44, "GG", 1481, 7781, 7839, 7911), + GUINEA(224, "GN"), + GUINEA_BISSAU(245, "GW"), + GUYANA(592, "GY"), + HAITI(509, "HT"), + HONDURAS(504, "HN"), + HONG_KONG(852, "HK"), + HUNGARY(36, "HU"), + ICELAND(354, "IS"), + INDIA(91, "IN"), + INDONESIA(62, "ID"), + IRAN(98, "IR"), + IRAQ(964, "IQ"), + IRELAND(353, "IE"), + ISLE_OF_MAN(44, "IM", 1624, 7524, 7624, 7924), + ISRAEL(972, "IL"), + ITALY(39, "IT"), + IVORY_COAST(225, "CI"), + JAMAICA(1, "JM", 658, 876), + JAN_MAYEN(47, "SJ", 79), + JAPAN(81, "JP"), + JERSEY(44, "JE", 1534), + JORDAN(962, "JO"), + KAZAKHSTAN(7, "KZ", 6, 7), + KENYA(254, "KE"), + KIRIBATI(686, "KI"), + KOREA_NORTH(850, "KP"), + KOREA_SOUTH(82, "KR"), + KOSOVO(383, "XK"), + KUWAIT(965, "KW"), + KYRGYZSTAN(996, "KG"), + LAOS(856, "LA"), + LATVIA(371, "LV"), + LEBANON(961, "LB"), + LESOTHO(266, "LS"), + LIBERIA(231, "LR"), + LIBYA(218, "LY"), + LIECHTENSTEIN(423, "LI"), + LITHUANIA(370, "LT"), + LUXEMBOURG(352, "LU"), + MACAU(853, "MO"), + MACEDONIA(389, "MK"), + MADAGASCAR(261, "MG"), + MALAWI(265, "MW"), + MALAYSIA(60, "MY"), + MALDIVES(960, "MV"), + MALI(223, "ML"), + MALTA(356, "MT"), + MARSHALL_ISLANDS(692, "MH"), + MARTINIQUE(596, "MQ"), + MAURITANIA(222, "MR"), + MAURITIUS(230, "MU"), + MAYOTTE(262, "YT", 269, 639), + MEXICO(52, "MX"), + MICRONESIA(691, "FM"), + MOLDOVA(373, "MD"), + MONACO(377, "MC"), + MONGOLIA(976, "MN"), + MONTENEGRO(382, "ME"), + MONTSERRAT(1, "MS", 664), + MOROCCO(212, "MA"), + MOZAMBIQUE(258, "MZ"), + MYANMAR(95, "MM"), + NAMIBIA(264, "NA"), + NAURU(674, "NR"), + NEPAL(977, "NP"), + NETHERLANDS(31, "NL"), + NEW_CALEDONIA(687, "NC"), + NEW_ZEALAND(64, "NZ"), + NICARAGUA(505, "NI"), + NIGER(227, "NE"), + NIGERIA(234, "NG"), + NIUE(683, "NU"), + NORFOLK_ISLAND(672, "NF", 3), + NORTHERN_MARIANA_ISLANDS(1, "MP", 670), + NORWAY(47, "NO"), + OMAN(968, "OM"), + PAKISTAN(92, "PK"), + PALAU(680, "PW"), + PALESTINE(970, "PS"), + PANAMA(507, "PA"), + PAPUA_NEW_GUINEA(675, "PG"), + PARAGUAY(595, "PY"), + PERU(51, "PE"), + PHILIPPINES(63, "PH"), + POLAND(48, "PL"), + PORTUGAL(351, "PT"), + PUERTO_RICO(1, "PR", 787, 930), + QATAR(974, "QA"), + REUNION(262, "RE"), + ROMANIA(40, "RO"), + RUSSIA(7, "RU"), + RWANDA(250, "RW"), + SAINT_HELENA(290, "SH"), + SAINT_KITTS_AND_NEVIS(1, "KN", 869), + SAINT_LUCIA(1, "LC", 758), + SAINT_PIERRE_AND_MIQUELON(508, "PM"), + SAINT_VINCENT_AND_THE_GRENADINES(1, "VC", 784), + SAMOA(685, "WS"), + SAN_MARINO(378, "SM"), + SAO_TOME_AND_PRINCIPE(239, "ST"), + SAUDI_ARABIA(966, "SA"), + SENEGAL(221, "SN"), + SERBIA(381, "RS"), + SEYCHELLES(248, "SC"), + SIERRA_LEONE(232, "SL"), + SINGAPORE(65, "SG"), + SLOVAKIA(421, "SK"), + SLOVENIA(386, "SI"), + SOLOMON_ISLANDS(677, "SB"), + SOMALIA(252, "SO"), + SOUTH_AFRICA(27, "ZA"), + SOUTH_SUDAN(211, "SS"), + SPAIN(34, "ES"), + SRI_LANKA(94, "LK"), + SUDAN(249, "SD"), + SURINAME(597, "SR"), + SVALBARD_AND_JAN_MAYEN(47, "SJ"), + SWAZILAND(268, "SZ"), + SWEDEN(46, "SE"), + SWITZERLAND(41, "CH"), + SYRIA(963, "SY"), + TAIWAN(886, "TW"), + TAJIKISTAN(992, "TJ"), + TANZANIA(255, "TZ"), + THAILAND(66, "TH"), + TOGO(228, "TG"), + TOKELAU(690, "TK"), + TONGA(676, "TO"), + TRINIDAD_AND_TOBAGO(1, "TT", 868), + TUNISIA(216, "TN"), + TURKEY(90, "TR"), + TURKMENISTAN(993, "TM"), + TURKS_AND_CAICOS_ISLANDS(1, "TC", 649), + TUVALU(688, "TV"), + UGANDA(256, "UG"), + UKRAINE(380, "UA"), + UNITED_ARAB_EMIRATES(971, "AE"), + UNITED_KINGDOM(44, "GB"), + UNITED_STATES(1, "US"), + URUGUAY(598, "UY"), + UZBEKISTAN(998, "UZ"), + VANUATU(678, "VU"), + VATICAN_CITY(379, "VA"), + VENEZUELA(58, "VE"), + VIETNAM(84, "VN"), + VIRGIN_ISLANDS(1, "VI", 340), + WALLIS_AND_FUTUNA(681, "WF"), + WESTERN_SAHARA(212, "EH"), + YEMEN(967, "YE"), + ZAMBIA(260, "ZM"), + ZANZIBAR(255, "TZ"), + ZIMBABWE(263, "ZW"); + + private final int countryCode; + private final String iso2Code; + private final int[] areaCodes; + + Country(int countryCode, String iso2Code, int... areaCodes) { + this.countryCode = countryCode; + this.iso2Code = iso2Code; + this.areaCodes = Optional.ofNullable(areaCodes).orElse(new int[0]); + } - /** - * @return The Alpha-2 code of the country as described in the ISO-3166 international standard. - */ - String iso2Code(); + public int countryCode() { + return countryCode; + } - /** - * @return Designated area codes within the country. - */ - int[] areaCodes(); + public int[] areaCodes() { + return areaCodes; + } - /** - * @return The first area code if there is any in the country. - */ - default Integer defaultAreaCode() { - return areaCodes().length > 0 ? areaCodes()[0] : null; + public String iso2Code() { + return iso2Code; } - /** - * @return The concatenation of country code and {@link #defaultAreaCode() default area code} without the plus sign. - */ - default String countryCodePrefix() { + public String countryCodePrefix() { return "+" + countryCode(); } /** - * @return The concatenation of country code and {@link #defaultAreaCode() default area code} without the plus sign. + * The first area code if there is any in the country. + * + * @return the first code in the country */ - default String phonePrefix() { - return countryCodePrefix() + Optional.ofNullable(defaultAreaCode()).map(Object::toString).orElse(""); + public Integer defaultAreaCode() { + return areaCodes().length > 0 ? areaCodes()[0] : null; } - /** - * Default country calling codes offered by the control. - */ - enum Defaults implements CountryCallingCode { - - AFGHANISTAN(93, "AF"), - ALAND_ISLANDS(358, "AX", 18), - ALBANIA(355, "AL"), - ALGERIA(213, "DZ"), - AMERICAN_SAMOA(1, "AS", 684), - ANDORRA(376, "AD"), - ANGOLA(244, "AO"), - ANGUILLA(1, "AI", 264), - ANTIGUA_AND_BARBUDA(1, "AG", 268), - ARGENTINA(54, "AR"), - ARMENIA(374, "AM"), - ARUBA(297, "AW"), - AUSTRALIA(61, "AU"), - AUSTRALIA_ANTARCTIC_TERRITORIES(672, "AQ", 1), - AUSTRIA(43, "AT"), - AZERBAIJAN(994, "AZ"), - BAHAMAS(1, "BS", 242), - BAHRAIN(973, "BH"), - BANGLADESH(880, "BD"), - BARBADOS(1, "BB", 246), - BELARUS(375, "BY"), - BELGIUM(32, "BE"), - BELIZE(501, "BZ"), - BENIN(229, "BJ"), - BERMUDA(1, "BM", 441), - BHUTAN(975, "BT"), - BOLIVIA(591, "BO"), - BONAIRE(599, "BQ", 7), - BOSNIA_AND_HERZEGOVINA(387, "BA"), - BOTSWANA(267, "BW"), - BRAZIL(55, "BR"), - BRITISH_INDIAN_OCEAN_TERRITORY(246, "IO"), - BRITISH_VIRGIN_ISLANDS(1, "VG", 284), - BRUNEI(673, "BN"), - BULGARIA(359, "BG"), - BURKINA_FASO(226, "BF"), - BURUNDI(257, "BI"), - CAMBODIA(855, "KH"), - CAMEROON(237, "CM"), - CANADA(1, "CA"), - CAPE_VERDE(238, "CV"), - CAYMAN_ISLANDS(1, "KY", 345), - CENTRAL_AFRICAN_REPUBLIC(236, "CF"), - CHAD(235, "TD"), - CHILE(56, "CL"), - CHINA(86, "CN"), - CHRISTMAS_ISLAND(61, "CX", 89164), - COCOS_ISLANDS(61, "CC", 89162), - COLOMBIA(57, "CO"), - COMOROS(269, "KM"), - CONGO(242, "CG"), - COOK_ISLANDS(682, "CK"), - COSTA_RICA(506, "CR"), - CROATIA(385, "HR"), - CUBA(53, "CU"), - CURACAO(599, "CW", 9), - CYPRUS(357, "CY"), - CZECH_REPUBLIC(420, "CZ"), - DEMOCRATIC_REPUBLIC_OF_THE_CONGO(243, "CD"), - DENMARK(45, "DK"), - DJIBOUTI(253, "DJ"), - DOMINICA(1, "DM", 767), - DOMINICAN_REPUBLIC(1, "DO", 809, 829, 849), - EAST_TIMOR(670, "TL"), - ECUADOR(593, "EC"), - EGYPT(20, "EG"), - EL_SALVADOR(503, "SV"), - EQUATORIAL_GUINEA(240, "GQ"), - ERITREA(291, "ER"), - ESTONIA(372, "EE"), - ETHIOPIA(251, "ET"), - FALKLAND_ISLANDS(500, "FK"), - FAROE_ISLANDS(298, "FO"), - FIJI(679, "FJ"), - FINLAND(358, "FI"), - FRANCE(33, "FR"), - FRENCH_GUIANA(594, "GF"), - FRENCH_POLYNESIA(689, "PF"), - GABON(241, "GA"), - GAMBIA(220, "GM"), - GEORGIA(995, "GE"), - GERMANY(49, "DE"), - GHANA(233, "GH"), - GIBRALTAR(350, "GI"), - GREECE(30, "GR"), - GREENLAND(299, "GL"), - GRENADA(1, "GD", 473), - GUADELOUPE(590, "GP"), - GUAM(1, "GU", 671), - GUATEMALA(502, "GT"), - GUERNSEY(44, "GG", 1481, 7781, 7839, 7911), - GUINEA(224, "GN"), - GUINEA_BISSAU(245, "GW"), - GUYANA(592, "GY"), - HAITI(509, "HT"), - HONDURAS(504, "HN"), - HONG_KONG(852, "HK"), - HUNGARY(36, "HU"), - ICELAND(354, "IS"), - INDIA(91, "IN"), - INDONESIA(62, "ID"), - IRAN(98, "IR"), - IRAQ(964, "IQ"), - IRELAND(353, "IE"), - ISLE_OF_MAN(44, "IM", 1624, 7524, 7624, 7924), - ISRAEL(972, "IL"), - ITALY(39, "IT"), - IVORY_COAST(225, "CI"), - JAMAICA(1, "JM", 658, 876), - JAN_MAYEN(47, "SJ", 79), - JAPAN(81, "JP"), - JERSEY(44, "JE", 1534), - JORDAN(962, "JO"), - KAZAKHSTAN(7, "KZ", 6, 7), - KENYA(254, "KE"), - KIRIBATI(686, "KI"), - KOREA_NORTH(850, "KP"), - KOREA_SOUTH(82, "KR"), - KOSOVO(383, "XK"), - KUWAIT(965, "KW"), - KYRGYZSTAN(996, "KG"), - LAOS(856, "LA"), - LATVIA(371, "LV"), - LEBANON(961, "LB"), - LESOTHO(266, "LS"), - LIBERIA(231, "LR"), - LIBYA(218, "LY"), - LIECHTENSTEIN(423, "LI"), - LITHUANIA(370, "LT"), - LUXEMBOURG(352, "LU"), - MACAU(853, "MO"), - MACEDONIA(389, "MK"), - MADAGASCAR(261, "MG"), - MALAWI(265, "MW"), - MALAYSIA(60, "MY"), - MALDIVES(960, "MV"), - MALI(223, "ML"), - MALTA(356, "MT"), - MARSHALL_ISLANDS(692, "MH"), - MARTINIQUE(596, "MQ"), - MAURITANIA(222, "MR"), - MAURITIUS(230, "MU"), - MAYOTTE(262, "YT", 269, 639), - MEXICO(52, "MX"), - MICRONESIA(691, "FM"), - MOLDOVA(373, "MD"), - MONACO(377, "MC"), - MONGOLIA(976, "MN"), - MONTENEGRO(382, "ME"), - MONTSERRAT(1, "MS", 664), - MOROCCO(212, "MA"), - MOZAMBIQUE(258, "MZ"), - MYANMAR(95, "MM"), - NAMIBIA(264, "NA"), - NAURU(674, "NR"), - NEPAL(977, "NP"), - NETHERLANDS(31, "NL"), - NEW_CALEDONIA(687, "NC"), - NEW_ZEALAND(64, "NZ"), - NICARAGUA(505, "NI"), - NIGER(227, "NE"), - NIGERIA(234, "NG"), - NIUE(683, "NU"), - NORFOLK_ISLAND(672, "NF", 3), - NORTHERN_MARIANA_ISLANDS(1, "MP", 670), - NORWAY(47, "NO"), - OMAN(968, "OM"), - PAKISTAN(92, "PK"), - PALAU(680, "PW"), - PALESTINE(970, "PS"), - PANAMA(507, "PA"), - PAPUA_NEW_GUINEA(675, "PG"), - PARAGUAY(595, "PY"), - PERU(51, "PE"), - PHILIPPINES(63, "PH"), - POLAND(48, "PL"), - PORTUGAL(351, "PT"), - PUERTO_RICO(1, "PR", 787, 930), - QATAR(974, "QA"), - REUNION(262, "RE"), - ROMANIA(40, "RO"), - RUSSIA(7, "RU"), - RWANDA(250, "RW"), - SAINT_HELENA(290, "SH"), - SAINT_KITTS_AND_NEVIS(1, "KN", 869), - SAINT_LUCIA(1, "LC", 758), - SAINT_PIERRE_AND_MIQUELON(508, "PM"), - SAINT_VINCENT_AND_THE_GRENADINES(1, "VC", 784), - SAMOA(685, "WS"), - SAN_MARINO(378, "SM"), - SAO_TOME_AND_PRINCIPE(239, "ST"), - SAUDI_ARABIA(966, "SA"), - SENEGAL(221, "SN"), - SERBIA(381, "RS"), - SEYCHELLES(248, "SC"), - SIERRA_LEONE(232, "SL"), - SINGAPORE(65, "SG"), - SLOVAKIA(421, "SK"), - SLOVENIA(386, "SI"), - SOLOMON_ISLANDS(677, "SB"), - SOMALIA(252, "SO"), - SOUTH_AFRICA(27, "ZA"), - SOUTH_SUDAN(211, "SS"), - SPAIN(34, "ES"), - SRI_LANKA(94, "LK"), - SUDAN(249, "SD"), - SURINAME(597, "SR"), - SVALBARD_AND_JAN_MAYEN(47, "SJ"), - SWAZILAND(268, "SZ"), - SWEDEN(46, "SE"), - SWITZERLAND(41, "CH"), - SYRIA(963, "SY"), - TAIWAN(886, "TW"), - TAJIKISTAN(992, "TJ"), - TANZANIA(255, "TZ"), - THAILAND(66, "TH"), - TOGO(228, "TG"), - TOKELAU(690, "TK"), - TONGA(676, "TO"), - TRINIDAD_AND_TOBAGO(1, "TT", 868), - TUNISIA(216, "TN"), - TURKEY(90, "TR"), - TURKMENISTAN(993, "TM"), - TURKS_AND_CAICOS_ISLANDS(1, "TC", 649), - TUVALU(688, "TV"), - UGANDA(256, "UG"), - UKRAINE(380, "UA"), - UNITED_ARAB_EMIRATES(971, "AE"), - UNITED_KINGDOM(44, "GB"), - UNITED_STATES(1, "US"), - URUGUAY(598, "UY"), - UZBEKISTAN(998, "UZ"), - VANUATU(678, "VU"), - VATICAN_CITY(379, "VA"), - VENEZUELA(58, "VE"), - VIETNAM(84, "VN"), - VIRGIN_ISLANDS(1, "VI", 340), - WALLIS_AND_FUTUNA(681, "WF"), - WESTERN_SAHARA(212, "EH"), - YEMEN(967, "YE"), - ZAMBIA(260, "ZM"), - ZANZIBAR(255, "TZ"), - ZIMBABWE(263, "ZW"); - - private final int countryCode; - private final String iso2Code; - private final int[] areaCodes; - - Defaults(int countryCode, String iso2Code, int... areaCodes) { - this.countryCode = countryCode; - this.iso2Code = iso2Code; - this.areaCodes = Optional.ofNullable(areaCodes).orElse(new int[0]); - } - - @Override - public int countryCode() { - return countryCode; - } - - @Override - public int[] areaCodes() { - return areaCodes; - } - - @Override - public String iso2Code() { - return iso2Code; - } - + public String phonePrefix() { + return countryCodePrefix() + Optional.ofNullable(defaultAreaCode()).map(Object::toString).orElse(""); } - } /** @@ -667,10 +593,11 @@ private PhoneNumberFormatter(TextField textField) { textField.setTextFormatter(new TextFormatter<>(this)); textField.addEventHandler(KeyEvent.KEY_PRESSED, e -> { if (e.getCode() == KeyCode.BACK_SPACE - && (textField.getText() == null || textField.getText().isEmpty()) - && getCountryCallingCode() != null) { + && (textField.getText() == null || textField.getText().isEmpty()) + && getSelectedCountry() != null + && !getDisableCountryDropdown()) { - // Clear up the country code if the user deletes the entire text + // Clear the country if the user deletes the entire text setRawPhoneNumber(null); e.consume(); } @@ -687,12 +614,12 @@ public TextFormatter.Change apply(TextFormatter.Change change) { try { selfUpdate = true; - CountryCallingCode code = getCountryCallingCode(); + Country country = getSelectedCountry(); if (change.isAdded()) { String text = change.getText(); - if (code == null && text.startsWith("+")) { + if (country == null && text.startsWith("+")) { text = text.substring(1); } @@ -700,7 +627,7 @@ public TextFormatter.Change apply(TextFormatter.Change change) { return null; } - if (code == null && !change.getControlNewText().startsWith("+")) { + if (country == null && !change.getControlNewText().startsWith("+")) { change.setText("+" + change.getText()); change.setCaretPosition(change.getCaretPosition() + 1); change.setAnchor(change.getAnchor() + 1); @@ -708,11 +635,11 @@ public TextFormatter.Change apply(TextFormatter.Change change) { } if (change.isContentChange()) { - if (code == null) { - resolveCountryCode(change); + if (country == null) { + resolveCountry(change); } else { String nationalNumber = undoFormat(change.getControlNewText()); - String newPhoneNumber = code.countryCodePrefix() + nationalNumber; + String newPhoneNumber = country.countryCodePrefix() + nationalNumber; setRawPhoneNumber(newPhoneNumber); } } @@ -724,11 +651,11 @@ public TextFormatter.Change apply(TextFormatter.Change change) { return change; } - private void resolveCountryCode(TextFormatter.Change change) { - CountryCallingCode code = resolver.call(change.getControlNewText()); - if (code != null) { - setCountryCallingCode(code); - textField.setText(Optional.ofNullable(code.defaultAreaCode()).map(String::valueOf).orElse("")); + private void resolveCountry(TextFormatter.Change change) { + Country country = resolver.call(change.getControlNewText()); + if (country != null) { + setSelectedCountry(country); + textField.setText(Optional.ofNullable(country.defaultAreaCode()).map(String::valueOf).orElse("")); change.setText(""); change.setCaretPosition(0); change.setAnchor(0); @@ -737,19 +664,19 @@ private void resolveCountryCode(TextFormatter.Change change) { } private String doFormat(String newRawPhoneNumber) { - if (newRawPhoneNumber == null || newRawPhoneNumber.isEmpty() || getCountryCallingCode() == null) { + if (newRawPhoneNumber == null || newRawPhoneNumber.isEmpty() || getSelectedCountry() == null) { return ""; } - CountryCallingCode code = getCountryCallingCode(); - AsYouTypeFormatter formatter = phoneNumberUtil.getAsYouTypeFormatter(code.iso2Code()); + Country country = getSelectedCountry(); + AsYouTypeFormatter formatter = phoneNumberUtil.getAsYouTypeFormatter(country.iso2Code()); String formattedNumber = ""; for (char c : newRawPhoneNumber.toCharArray()) { formattedNumber = formatter.inputDigit(c); } - return formattedNumber.substring(code.countryCodePrefix().length()).trim(); + return formattedNumber.substring(country.countryCodePrefix().length()).trim(); } private String undoFormat(String formattedLocalPhoneNumber) { @@ -786,10 +713,10 @@ private void setFormattedNationalNumber(String newRawPhoneNumber) { /** * For internal use only. */ - private final class CountryCallingCodeResolver implements Callback { + private final class CountryResolver implements Callback { @Override - public CountryCallingCode call(String phoneNumber) { + public Country call(String phoneNumber) { if (phoneNumber == null || phoneNumber.isEmpty()) { return null; } @@ -801,16 +728,16 @@ public CountryCallingCode call(String phoneNumber) { } } - TreeMap> scores = new TreeMap<>(); + TreeMap> scores = new TreeMap<>(); - for (CountryCallingCode code : getAvailableCountryCodes()) { - int score = calculateScore(code, phoneNumber); + for (Country country : getAvailableCountries()) { + int score = calculateScore(country, phoneNumber); if (score > 0) { - scores.computeIfAbsent(score, s -> new ArrayList<>()).add(code); + scores.computeIfAbsent(score, s -> new ArrayList<>()).add(country); } } - Map.Entry> highestScore = scores.lastEntry(); + Map.Entry> highestScore = scores.lastEntry(); if (highestScore == null) { return null; } @@ -818,15 +745,15 @@ public CountryCallingCode call(String phoneNumber) { return inferBestMatch(highestScore.getValue()); } - private int calculateScore(CountryCallingCode code, String phoneNumber) { - String countryPrefix = String.valueOf(code.countryCode()); + private int calculateScore(Country country, String phoneNumber) { + String countryPrefix = String.valueOf(country.countryCode()); - if (code.areaCodes().length == 0) { + if (country.areaCodes().length == 0) { if (phoneNumber.startsWith(countryPrefix)) { return 1; } } else { - for (int areaCode : code.areaCodes()) { + for (int areaCode : country.areaCodes()) { String areaCodePrefix = countryPrefix + areaCode; if (phoneNumber.startsWith(areaCodePrefix)) { return 2; @@ -837,26 +764,24 @@ private int calculateScore(CountryCallingCode code, String phoneNumber) { return 0; } - private CountryCallingCode inferBestMatch(List matchingCodes) { - CountryCallingCode code = null; - if (matchingCodes.size() > 1) { - // Here pick the country code that is preferred - for (CountryCallingCode c : matchingCodes) { - if (getPreferredCountryCodes().contains(c)) { + private Country inferBestMatch(List matchingCountries) { + Country code = null; + if (matchingCountries.size() > 1) { + // pick the country that is preferred + for (Country c : matchingCountries) { + if (getPreferredCountries().contains(c)) { code = c; break; } } if (code == null) { - code = matchingCodes.get(matchingCodes.size() - 1); + code = matchingCountries.get(matchingCountries.size() - 1); } } else { - code = matchingCodes.get(0); + code = matchingCountries.get(0); } return code; } - } - } diff --git a/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/skins/PhoneNumberFieldSkin.java b/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/skins/PhoneNumberFieldSkin.java index 1417411..1e8ce07 100644 --- a/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/skins/PhoneNumberFieldSkin.java +++ b/phonenumberfx/src/main/java/com/dlsc/phonenumberfx/skins/PhoneNumberFieldSkin.java @@ -1,81 +1,91 @@ package com.dlsc.phonenumberfx.skins; import com.dlsc.phonenumberfx.PhoneNumberField; +import com.dlsc.phonenumberfx.PhoneNumberField.Country; import javafx.beans.InvalidationListener; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.geometry.Bounds; +import javafx.scene.Node; import javafx.scene.control.ComboBox; import javafx.scene.control.ListCell; import javafx.scene.control.Skin; import javafx.scene.control.SkinBase; import javafx.scene.control.TextField; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.scene.layout.Region; import javafx.scene.layout.StackPane; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.Locale; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; public class PhoneNumberFieldSkin extends SkinBase { - private static final Comparator NAME_SORT_ASC = (c1, c2) -> { + private static final Map FLAG_IMAGES = new HashMap<>(); + + static { + for (Country country : Country.values()) { + FLAG_IMAGES.put(country, new Image(Objects.requireNonNull(PhoneNumberField.class.getResource("country-flags/" + country.iso2Code().toLowerCase() + ".png")).toExternalForm())); + } + } + + private static final Comparator NAME_SORT_ASC = (c1, c2) -> { String c1Name = new Locale("en", c1.iso2Code()).getDisplayCountry(); String c2Name = new Locale("en", c2.iso2Code()).getDisplayCountry(); return c1Name.compareTo(c2Name); }; - public PhoneNumberFieldSkin(PhoneNumberField field, TextField textField) { + private final ComboBox comboBox = new ComboBox<>(); + + public PhoneNumberFieldSkin(PhoneNumberField field) { super(field); - ObservableList callingCodes = FXCollections.observableArrayList(); + ObservableList countries = FXCollections.observableArrayList(); Runnable callingCodesUpdater = () -> { - Set temp1 = new TreeSet<>(NAME_SORT_ASC); - Set temp2 = new TreeSet<>(NAME_SORT_ASC); + Set temp1 = new TreeSet<>(NAME_SORT_ASC); + Set temp2 = new TreeSet<>(NAME_SORT_ASC); - field.getAvailableCountryCodes().forEach(code -> { - if (!field.getPreferredCountryCodes().contains(code)) { + field.getAvailableCountries().forEach(code -> { + if (!field.getPreferredCountries().contains(code)) { temp2.add(code); } }); - field.getPreferredCountryCodes().forEach(code -> { - if (field.getAvailableCountryCodes().contains(code)) { + field.getPreferredCountries().forEach(code -> { + if (field.getAvailableCountries().contains(code)) { temp1.add(code); } }); - List temp = new ArrayList<>(); + List temp = new ArrayList<>(); temp.addAll(temp1); temp.addAll(temp2); - callingCodes.setAll(temp); + countries.setAll(temp); - if (field.getCountryCallingCode() != null && !temp.contains(field.getCountryCallingCode())) { + if (field.getSelectedCountry() != null && !temp.contains(field.getSelectedCountry())) { field.setRawPhoneNumber(null); // Clear up the value in case the country code is not available anymore } }; InvalidationListener listener = obs -> callingCodesUpdater.run(); - field.getAvailableCountryCodes().addListener(listener); - field.getPreferredCountryCodes().addListener(listener); - field.countryCodeViewFactoryProperty().addListener(listener); + field.getAvailableCountries().addListener(listener); + field.getPreferredCountries().addListener(listener); + field.countryCellFactoryProperty().addListener(listener); callingCodesUpdater.run(); - PhoneNumberEditor editor = new PhoneNumberEditor(textField); + PhoneNumberEditor editor = new PhoneNumberEditor(field.getEditor()); + + field.setCountryCellFactory(listView -> new CountryCell()); - ComboBox comboBox = new ComboBox<>(); comboBox.setButtonCell(editor); - comboBox.setCellFactory(lv -> new CountryCallingCodeCell()); - comboBox.setItems(callingCodes); + comboBox.cellFactoryProperty().bind(field.countryCellFactoryProperty()); + comboBox.setItems(countries); comboBox.setMaxWidth(Double.MAX_VALUE); comboBox.setMaxHeight(Double.MAX_VALUE); comboBox.setFocusTraversable(false); - comboBox.valueProperty().bindBidirectional(field.countryCallingCodeProperty()); + comboBox.valueProperty().bindBidirectional(field.selectedCountryProperty()); // Manually handle mouse event either on the text field or the trigger button box field.addEventFilter(MouseEvent.MOUSE_RELEASED, evt -> { @@ -105,7 +115,7 @@ public PhoneNumberFieldSkin(PhoneNumberField field, TextField textField) { getChildren().addAll(comboBox); } - private final class PhoneNumberEditor extends ListCell { + private final class PhoneNumberEditor extends ListCell { final TextField textField; final HBox buttonBox = new HBox(); @@ -118,9 +128,9 @@ public PhoneNumberEditor(TextField textField) { StackPane flagBox = new StackPane(); flagBox.getStyleClass().add("flag-box"); - Runnable flagUpdater = () -> flagBox.getChildren().setAll(getSkinnable().getCountryCodeViewFactory().call(getSkinnable().getCountryCallingCode())); - getSkinnable().countryCallingCodeProperty().addListener(obs -> flagUpdater.run()); - getSkinnable().countryCodeViewFactoryProperty().addListener(obs -> flagUpdater.run()); + Runnable flagUpdater = () -> flagBox.getChildren().setAll(getCountryGraphic(getSkinnable().getSelectedCountry())); + getSkinnable().selectedCountryProperty().addListener(obs -> flagUpdater.run()); + getSkinnable().countryCellFactoryProperty().addListener(obs -> flagUpdater.run()); flagUpdater.run(); Region arrow = new Region(); @@ -133,11 +143,12 @@ public PhoneNumberEditor(TextField textField) { buttonBox.getStyleClass().add("button-box"); buttonBox.getChildren().addAll(flagBox, arrowButton); buttonBox.managedProperty().bind(buttonBox.visibleProperty()); - buttonBox.disableProperty().bind(getSkinnable().disableCountryCodeProperty()); + buttonBox.disableProperty().bind(getSkinnable().disableCountryDropdownProperty()); } @Override protected Skin createDefaultSkin() { + return new SkinBase<>(this) { { getChildren().addAll(buttonBox, textField); @@ -153,31 +164,29 @@ protected void layoutChildren(double x, double y, double w, double h) { } }; } - } - private final class CountryCallingCodeCell extends ListCell { + private class CountryCell extends ListCell { - private CountryCallingCodeCell() { - getStyleClass().add("country-calling-code-cell"); + private CountryCell() { + getStyleClass().add("country-cell"); } @Override public String getUserAgentStylesheet() { - // This is needed to get the cell styled up return getSkinnable().getUserAgentStylesheet(); } @Override - protected void updateItem(PhoneNumberField.CountryCallingCode code, boolean empty) { - super.updateItem(code, empty); + protected void updateItem(Country country, boolean empty) { + super.updateItem(country, empty); int index = -1; - if (code != null && !empty) { - setText(new Locale("en", code.iso2Code()).getDisplayCountry()); - setGraphic(getSkinnable().getCountryCodeViewFactory().call(code)); - index = getSkinnable().getPreferredCountryCodes().indexOf(code); + if (country != null && !empty) { + setText(new Locale("en", country.iso2Code()).getDisplayCountry()); + setGraphic(getCountryGraphic(country)); + index = getSkinnable().getPreferredCountries().indexOf(country); } else { setText(null); setGraphic(null); @@ -185,7 +194,7 @@ protected void updateItem(PhoneNumberField.CountryCallingCode code, boolean empt if (index >= 0) { getStyleClass().add("preferred"); - if (index == getSkinnable().getPreferredCountryCodes().size() - 1) { + if (index == getSkinnable().getPreferredCountries().size() - 1) { getStyleClass().add("last"); } else { getStyleClass().remove("last"); @@ -196,4 +205,32 @@ protected void updateItem(PhoneNumberField.CountryCallingCode code, boolean empt } } } + + /** + * Subclasses of this skin can easily override this method to simply return different + * flags / globe. + * + * @param country the country code + * @return a node representing the country (normally the country's flag) + */ + protected Node getCountryGraphic(Country country) { + if (country != null) { + ImageView imageView = new ImageView(); + imageView.setFitHeight(20); + imageView.setFitWidth(20); + imageView.setPreserveRatio(true); + imageView.getStyleClass().add("flag-image-view"); + Optional.ofNullable(FLAG_IMAGES.get(country)).ifPresent(imageView::setImage); + + StackPane wrapper = new StackPane(imageView); + wrapper.getStyleClass().add("flag-wrapper"); + wrapper.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE); + + return wrapper; + } + + Region globeRegion = new Region(); + globeRegion.getStyleClass().add("globe"); + return globeRegion; + } } diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ad.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ad.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ad.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ad.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ae.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ae.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ae.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ae.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/af.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/af.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/af.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/af.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ag.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ag.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ag.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ag.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ai.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ai.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ai.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ai.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/al.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/al.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/al.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/al.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/am.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/am.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/am.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/am.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ao.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ao.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ao.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ao.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/aq.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/aq.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/aq.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/aq.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ar.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ar.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ar.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ar.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/as.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/as.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/as.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/as.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/at.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/at.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/at.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/at.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/au.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/au.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/au.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/au.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/aw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/aw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/aw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/aw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ax.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ax.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ax.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ax.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/az.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/az.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/az.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/az.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ba.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ba.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ba.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ba.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bb.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bb.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bb.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bb.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bd.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bd.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bd.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bd.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/be.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/be.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/be.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/be.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bh.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bh.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bh.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bh.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bi.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bi.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bi.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bi.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bj.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bj.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bj.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bj.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bo.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bo.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bo.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bo.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bq.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bq.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bq.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bq.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/br.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/br.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/br.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/br.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bs.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bs.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bs.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bs.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bv.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bv.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bv.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bv.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/by.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/by.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/by.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/by.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/bz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/bz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ca.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ca.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ca.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ca.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cd.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cd.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cd.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cd.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ch.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ch.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ch.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ch.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ci.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ci.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ci.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ci.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ck.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ck.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ck.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ck.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/co.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/co.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/co.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/co.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cv.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cv.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cv.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cv.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cx.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cx.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cx.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cx.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cy.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cy.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cy.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cy.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/cz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/cz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/de.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/de.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/de.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/de.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dj.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dj.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dj.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dj.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/do.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/do.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/do.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/do.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/dz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/dz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ec.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ec.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ec.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ec.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ee.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ee.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ee.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ee.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/eg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/eg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/eg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/eg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/eh.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/eh.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/eh.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/eh.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/er.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/er.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/er.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/er.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/es.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/es.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/es.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/es.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/et.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/et.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/et.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/et.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fi.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fi.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fi.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fi.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fj.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fj.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fj.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fj.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fo.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fo.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fo.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fo.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/fr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/fr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ga.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ga.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ga.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ga.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-eng.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-eng.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-eng.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-eng.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-nir.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-nir.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-nir.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-nir.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-sct.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-sct.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-sct.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-sct.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-wls.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-wls.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb-wls.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb-wls.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gb.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gb.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gd.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gd.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gd.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gd.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ge.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ge.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ge.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ge.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gh.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gh.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gh.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gh.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gi.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gi.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gi.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gi.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gp.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gp.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gp.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gp.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gq.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gq.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gq.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gq.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gs.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gs.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gs.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gs.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gy.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gy.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/gy.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/gy.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ht.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ht.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ht.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ht.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/hu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/hu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/id.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/id.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/id.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/id.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ie.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ie.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ie.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ie.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/il.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/il.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/il.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/il.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/im.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/im.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/im.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/im.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/in.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/in.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/in.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/in.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/io.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/io.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/io.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/io.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/iq.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/iq.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/iq.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/iq.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ir.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ir.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ir.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ir.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/is.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/is.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/is.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/is.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/it.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/it.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/it.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/it.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/je.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/je.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/je.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/je.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/jm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/jm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/jm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/jm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/jo.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/jo.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/jo.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/jo.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/jp.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/jp.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/jp.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/jp.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ke.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ke.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ke.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ke.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kh.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kh.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kh.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kh.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ki.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ki.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ki.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ki.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/km.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/km.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/km.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/km.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kp.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kp.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kp.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kp.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ky.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ky.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ky.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ky.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/kz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/kz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/la.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/la.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/la.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/la.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lb.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lb.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lb.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lb.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/li.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/li.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/li.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/li.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ls.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ls.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ls.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ls.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lv.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lv.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/lv.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/lv.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ly.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ly.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ly.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ly.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ma.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ma.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ma.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ma.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/md.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/md.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/md.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/md.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/me.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/me.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/me.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/me.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mh.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mh.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mh.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mh.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ml.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ml.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ml.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ml.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mo.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mo.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mo.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mo.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mp.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mp.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mp.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mp.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mq.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mq.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mq.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mq.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ms.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ms.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ms.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ms.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mv.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mv.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mv.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mv.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mx.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mx.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mx.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mx.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/my.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/my.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/my.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/my.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/mz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/mz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/na.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/na.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/na.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/na.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ne.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ne.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ne.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ne.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ng.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ng.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ng.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ng.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ni.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ni.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ni.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ni.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/no.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/no.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/no.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/no.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/np.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/np.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/np.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/np.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/nz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/nz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/om.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/om.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/om.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/om.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pa.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pa.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pa.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pa.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pe.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pe.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pe.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pe.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ph.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ph.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ph.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ph.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ps.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ps.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ps.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ps.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/pw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/pw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/py.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/py.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/py.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/py.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/qa.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/qa.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/qa.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/qa.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/re.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/re.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/re.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/re.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ro.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ro.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ro.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ro.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/rs.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/rs.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/rs.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/rs.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ru.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ru.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ru.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ru.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/rw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/rw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/rw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/rw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sa.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sa.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sa.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sa.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sb.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sb.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sb.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sb.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sd.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sd.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sd.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sd.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/se.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/se.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/se.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/se.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sh.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sh.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sh.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sh.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/si.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/si.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/si.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/si.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sj.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sj.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sj.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sj.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/so.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/so.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/so.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/so.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ss.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ss.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ss.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ss.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/st.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/st.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/st.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/st.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sv.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sv.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sv.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sv.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sx.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sx.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sx.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sx.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sy.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sy.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sy.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sy.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/sz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/sz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/td.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/td.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/td.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/td.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/th.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/th.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/th.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/th.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tj.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tj.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tj.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tj.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tl.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tl.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tl.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tl.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/to.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/to.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/to.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/to.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tr.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tr.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tr.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tr.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tv.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tv.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tv.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tv.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/tz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/tz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ua.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ua.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ua.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ua.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ug.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ug.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ug.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ug.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/um.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/um.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/um.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/um.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/us.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/us.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/us.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/us.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/uy.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/uy.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/uy.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/uy.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/uz.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/uz.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/uz.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/uz.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/va.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/va.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/va.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/va.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vc.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vc.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vc.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vc.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ve.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ve.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ve.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ve.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vg.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vg.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vg.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vg.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vi.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vi.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vi.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vi.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vn.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vn.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vn.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vn.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vu.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vu.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/vu.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/vu.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/wf.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/wf.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/wf.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/wf.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ws.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ws.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ws.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ws.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/xk.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/xk.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/xk.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/xk.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ye.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ye.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/ye.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/ye.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/yt.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/yt.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/yt.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/yt.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/za.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/za.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/za.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/za.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/zm.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/zm.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/zm.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/zm.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/zw.png b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/zw.png similarity index 100% rename from phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phonenumberfield/country-flags/zw.png rename to phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/country-flags/zw.png diff --git a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phone-number-field.css b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phone-number-field.css index 60025d5..865de35 100644 --- a/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phone-number-field.css +++ b/phonenumberfx/src/main/resources/com/dlsc/phonenumberfx/phone-number-field.css @@ -32,7 +32,7 @@ -fx-padding: 0px; } -.phone-number-field:error > .combo-box > .editor > .text-field { +.phone-number-field:valid > .combo-box > .editor > .text-field { -fx-text-fill: red; } @@ -58,10 +58,16 @@ } .phone-number-field > .combo-box > .editor > .button-box > .flag-box { + -fx-background: -fx-control-inner-background; -fx-pref-width: 20px; -fx-alignment: center; } +.phone-number-field > .combo-box > .editor > .button-box > .flag-box .flag-wrapper { + -fx-padding: 1px; + -fx-background-color: -fx-selection-bar-text; +} + .phone-number-field > .combo-box .globe { -size: 1.2em; -fx-pref-width: -size; @@ -76,15 +82,15 @@ -fx-shape: "M0 12 Q0 8.7188 1.5938 5.9688 Q3.2031 3.2031 5.9531 1.6094 Q8.7188 0 12 0 Q15.2812 0 18.0312 1.6094 Q20.7969 3.2031 22.3906 5.9688 Q24 8.7188 24 12 Q24 15.2812 22.3906 18.0469 Q20.7969 20.7969 18.0312 22.4062 Q15.2812 24 12 24 Q8.7188 24 5.9531 22.4062 Q3.2031 20.7969 1.5938 18.0469 Q0 15.2812 0 12 ZM11.2812 1.5938 Q9.6875 2.0781 8.4062 4.4062 Q8.0781 5.0469 7.8438 5.6875 Q9.4375 6.0781 11.2812 6.1562 L11.2812 1.5938 ZM6.4062 5.2812 Q6.7188 4.4844 7.1094 3.7188 Q7.5156 2.9531 8 2.3125 Q6.0781 3.125 4.5625 4.5625 Q5.4375 4.9531 6.4062 5.2812 ZM5.2812 11.2812 Q5.3594 8.875 5.9219 6.7188 Q4.7188 6.3125 3.5938 5.7656 Q1.7656 8.1562 1.5156 11.2812 L5.2812 11.2812 ZM7.3594 7.125 Q6.7969 9.2031 6.7969 11.2812 L11.2812 11.2812 L11.2812 7.5938 Q9.2031 7.5938 7.3594 7.125 ZM12.7188 7.5938 L12.7188 11.2812 L17.2031 11.2812 Q17.2031 9.2031 16.6406 7.125 Q14.7969 7.5938 12.7188 7.5938 ZM6.7969 12.7188 Q6.875 14.9531 7.3594 16.875 Q9.2812 16.4062 11.2812 16.4062 L11.2812 12.7188 L6.7969 12.7188 ZM12.7188 12.7188 L12.7188 16.4062 Q14.7969 16.4062 16.6406 16.875 Q17.125 14.9531 17.2031 12.7188 L12.7188 12.7188 ZM7.8438 18.3125 Q8.0781 19.0469 8.4062 19.5938 Q9.6875 21.9219 11.2812 22.4062 L11.2812 17.8438 Q9.4375 17.9219 7.8438 18.3125 ZM8 21.6875 Q7.5156 21.0469 7.1094 20.2812 Q6.7188 19.5156 6.4062 18.7188 Q5.4375 18.9531 4.5625 19.4375 Q6.0781 20.875 8 21.6875 ZM5.9219 17.2812 Q5.3594 15.0469 5.2812 12.7188 L1.5156 12.7188 Q1.7656 15.8438 3.5938 18.2344 Q4.6406 17.6875 5.9219 17.2812 ZM16 21.6875 Q17.9219 20.875 19.4375 19.4375 Q18.5625 18.9531 17.5938 18.7188 Q17.2812 19.5156 16.875 20.2812 Q16.4844 21.0469 16 21.6875 ZM12.7188 17.8438 L12.7188 22.4062 Q14.3125 21.9219 15.5938 19.5938 Q15.9219 18.9531 16.1562 18.3125 Q14.4844 17.9219 12.7188 17.8438 ZM18.0781 17.2812 Q19.3594 17.6875 20.4062 18.2344 Q22.2344 15.8438 22.4844 12.7188 L18.7188 12.7188 Q18.6406 15.0469 18.0781 17.2812 ZM22.4844 11.2812 Q22.2344 8.1562 20.4062 5.7656 Q19.3594 6.3125 18.0781 6.7188 Q18.6406 8.875 18.7188 11.2812 L22.4844 11.2812 ZM16.875 3.6875 Q17.2812 4.4844 17.5938 5.2812 Q18.5625 5.0469 19.4375 4.5625 Q17.9219 3.125 16 2.3125 Q16.4844 2.9531 16.875 3.6875 ZM16.1562 5.6875 Q15.9219 5.0469 15.5938 4.4062 Q14.3125 2.0781 12.7188 1.5938 L12.7188 6.1562 Q14.5625 6.0781 16.1562 5.6875 Z" } -.phone-number-field > .combo-box .list-view .country-calling-code-cell { +.phone-number-field > .combo-box .list-view .country-cell { -fx-padding: 5px; } -.phone-number-field > .combo-box .list-view .country-calling-code-cell.preferred { +.phone-number-field > .combo-box .list-view .country-cell.preferred { -fx-font-weight: bold; } -.phone-number-field > .combo-box .list-view .country-calling-code-cell .flag-wrapper { +.phone-number-field > .combo-box .list-view .country-cell .flag-wrapper { -fx-padding: 1px; -fx-background-color: -fx-selection-bar-text; } \ No newline at end of file