Skip to content

Commit

Permalink
update to intl-tel-input v22.0.2 ( #1533 ) (#1550)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaIsotta committed May 16, 2024
1 parent f4e103b commit 454f2c4
Show file tree
Hide file tree
Showing 6 changed files with 3,801 additions and 2,772 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public enum PropertyKeys {
allowDropdown,
autoHideDialCode,
autoPlaceholder,
countrySearch,
excludeCountries,
fixDropdownWidth,
formatAsYouType,
Expand Down Expand Up @@ -317,14 +316,6 @@ public void setLocalizedCountries(final Object localizedCountries) {
getStateHelper().put(PropertyKeys.localizedCountries, localizedCountries);
}

public boolean isCountrySearch() {
return (Boolean) getStateHelper().eval(PropertyKeys.countrySearch, true);
}

public void setCountrySearch(final boolean countrySearch) {
getStateHelper().put(PropertyKeys.countrySearch, countrySearch);
}

@Override
public Collection<String> getEventNames() {
return EVENT_NAMES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ protected void encodeScript(final FacesContext context, final InputPhone inputPh
wb.attr("formatOnDisplay", inputPhone.isFormatOnDisplay(), true);
wb.attr("formatAsYouType", inputPhone.isFormatAsYouType(), true);
wb.attr("nationalMode", inputPhone.isNationalMode(), true);
wb.attr("countrySearch", inputPhone.isCountrySearch(), true);
wb.attr("showSelectedDialCode", inputPhone.isSeparateDialCode(), false);
wb.attr("separateDialCode", inputPhone.isSeparateDialCode(), false);
if (inputPhone.getAutoPlaceholderEnum() != InputPhone.AutoPlaceholder.polite) {
wb.attr("autoPlaceholder", inputPhone.getAutoPlaceholder());
}
Expand All @@ -205,12 +204,12 @@ protected void encodeScript(final FacesContext context, final InputPhone inputPh
if (inputPhone.getPlaceholderNumberTypeEnum() != InputPhone.PlaceholderNumberType.mobile) {
wb.attr("placeholderNumberType", inputPhone.getPlaceholderNumberType().toUpperCase());
}
encodeCountries(wb, "preferredCountries", inputPhone.getPreferredCountries());
encodeCountries(wb, "countryOrder", inputPhone.getPreferredCountries());

wb.attr("utilsScript",
context.getApplication()
.getResourceHandler()
.createResource("inputphone/utils.js", "primefaces-extensions")
.createResource("inputphone/utils.js", org.primefaces.extensions.util.Constants.LIBRARY)
.getRequestPath());
if (inputPhone.getLocalizedCountries() != null) {
wb.nativeAttr("i18n", objectToJsonString(inputPhone.getLocalizedCountries()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9781,14 +9781,6 @@ If you leave initialCountry blank, it will default to the first country in the l
<required>false</required>
<type>java.lang.String</type>
</attribute>
<attribute>
<description>
<![CDATA[Add a search input to the top of the dropdown, so users can filter the displayed countries. Defaul false.]]>
</description>
<name>countrySearch</name>
<required>false</required>
<type>boolean</type>
</attribute>
<attribute>
<description>
<![CDATA[Allow users to enter national numbers (and not have to think about international dial codes).
Expand Down

0 comments on commit 454f2c4

Please sign in to comment.