Skip to content

EspoCRM – Open Source CRM Application

Intl tel update

Yuriib55cb8cb2491
diff --git a/application/Espo/Resources/metadata/app/jsLibs.json b/application/Espo/Resources/metadata/app/jsLibs.json
index ad6a2d03f6..21bddae6ce 100644
--- a/application/Espo/Resources/metadata/app/jsLibs.json
+++ b/application/Espo/Resources/metadata/app/jsLibs.json
@@ -87,14 +87,6 @@
"exportsTo": "window",
"exportsAs": "intlTelInput"
},
- "intl-tel-input-utils": {
- "exportsTo": "window",
- "exportsAs": "intlTelInputUtils"
- },
- "intl-tel-input-globals": {
- "exportsTo": "window",
- "exportsAs": "intlTelInputGlobals"
- },
"cronstrue": {
"path": "client/lib/cronstrue-i18n.js",
"devPath": "client/lib/original/cronstrue-i18n.js",
diff --git a/client/src/views/fields/phone.ts b/client/src/views/fields/phone.ts
index c303cda548..329e428f94 100644
--- a/client/src/views/fields/phone.ts
+++ b/client/src/views/fields/phone.ts
@@ -31,11 +31,6 @@ import Select from 'ui/select';
import {BaseOptions, BaseParams, BaseViewSchema, FieldValidator} from 'views/fields/base';
import intlTelInput from 'intl-tel-input';
-// @ts-ignore
-import intlTelInputUtils from 'intl-tel-input-utils';
-// @ts-ignore
-import intlTelInputGlobals from 'intl-tel-input-globals';
-
/**
* Parameters.
*/
@@ -87,7 +82,7 @@ class PhoneFieldView<
private useInternational: boolean
- private intlTelInputMap: Map<HTMLInputElement, intlTelInput.Plugin & any>
+ private intlTelInputMap: Map<HTMLInputElement, typeof intlTelInput & any>
protected allowExtensions: boolean
@@ -105,7 +100,7 @@ class PhoneFieldView<
private preferredCountryList: string[]
- private _codeNames: string[]
+ private _codeNames: Record<string, string>
private _itemJustRemoved: boolean
@@ -223,7 +218,7 @@ class PhoneFieldView<
const intlObj = this.intlTelInputMap.get(element);
- const isPossible = intlObj && intlObj.isPossibleNumber();
+ const isPossible = intlObj && intlObj.isValidNumber();
if (intlObj && !isPossible) {
notValid = true;
@@ -397,11 +392,7 @@ class PhoneFieldView<
return value;
}
- return intlTelInputUtils.formatNumber(
- value,
- null,
- intlTelInputUtils.numberFormat.INTERNATIONAL
- );
+ return intlTelInput.utils!.formatNumber(value, undefined, intlTelInput.NUMBER_FORMAT.INTERNATIONAL);
}
private addPhoneNumber() {
@@ -442,24 +433,38 @@ class PhoneFieldView<
if (this.useInternational) {
const inputElements = this.element.querySelectorAll<HTMLInputElement>('input.phone-number');
+ const modalBodyElement = this.element?.closest('.modal-body');
+
+ const parent = modalBodyElement ? modalBodyElement : document.body;
+
+
inputElements.forEach(inputElement => {
// noinspection JSUnusedGlobalSymbols
const obj = intlTelInput(inputElement, {
- nationalMode: false,
- autoInsertDialCode: false,
separateDialCode: true,
showFlags: false,
- preferredCountries: this.preferredCountryList,
- localizedCountries: this._codeNames,
+ initialCountry: this.preferredCountryList[0] ?? null,
+ countryOrder: this.preferredCountryList,
+ countryNameOverrides: this._codeNames,
+ dropdownParent: parent,
+ classNames: {
+ searchInput: 'form-control input-sm',
+ },
+ uiTranslations: {
+ searchPlaceholder: '',
+ searchEmptyState: '',
+ },
+ allowNumberExtensions: this.allowExtensions,
+ strictMode: !this.allowExtensions,
customPlaceholder: (placeholder: string) => {
return placeholder.replace(/[0-9]/g, '0');
},
- } as any) as intlTelInput.Plugin & any;
+ } as any) as typeof intlTelInput & any;
this.intlTelInputMap.set(inputElement, obj);
inputElement.addEventListener('blur', () => {
- if (!obj.isPossibleNumber()) {
+ if (!obj.isValidNumber()) {
return;
}
@@ -564,7 +569,7 @@ class PhoneFieldView<
this.maxCount = this.getConfig().get('phoneNumberMaxCount');
if (this.useInternational && !this.isListMode() && !this.isSearchMode()) {
- this._codeNames = intlTelInputGlobals.getCountryData()
+ this._codeNames = intlTelInput.getAllCountries()
.reduce((map: any, item: any) => {
map[item.iso2] = item.iso2.toUpperCase();
diff --git a/client/src/views/import/step1.js b/client/src/views/import/step1.js
index f5858aa51c..59b155c636 100644
--- a/client/src/views/import/step1.js
+++ b/client/src/views/import/step1.js
@@ -28,8 +28,7 @@
import View from 'view';
import Model from 'model';
-// noinspection NpmUsedModulesInstalled
-import intlTelInputGlobals from 'intl-tel-input-globals';
+import intlTelInput from 'intl-tel-input';
class Step1ImportView extends View {
@@ -364,9 +363,9 @@ class Step1ImportView extends View {
name: 'phoneNumberCountry',
mode: 'edit',
params: {
- options: ['', ...intlTelInputGlobals.getCountryData().map(item => item.iso2)],
+ options: ['', ...intlTelInput.getAllCountries().map(item => item.iso2)],
},
- translatedOptions: intlTelInputGlobals.getCountryData()
+ translatedOptions: intlTelInput.getAllCountries()
.reduce((map, item) => {
map[item.iso2] = `${item.iso2.toUpperCase()} +${item.dialCode}`;
diff --git a/client/src/views/lead-capture/fields/phone-number-country.js b/client/src/views/lead-capture/fields/phone-number-country.js
index 92f22a59f1..ee55750b18 100644
--- a/client/src/views/lead-capture/fields/phone-number-country.js
+++ b/client/src/views/lead-capture/fields/phone-number-country.js
@@ -27,15 +27,14 @@
************************************************************************/
import EnumFieldView from 'views/fields/enum';
-// noinspection NpmUsedModulesInstalled
-import intlTelInputGlobals from 'intl-tel-input-globals';
+import intlTelInput from 'intl-tel-input';
class LeadCapturePhoneNumberCountry extends EnumFieldView {
setupOptions() {
- this.params.options = ['', ...intlTelInputGlobals.getCountryData().map(item => item.iso2)];
+ this.params.options = ['', ...intlTelInput.getAllCountries().map(item => item.iso2)];
- this.translatedOptions = intlTelInputGlobals.getCountryData()
+ this.translatedOptions = intlTelInput.getAllCountries()
.reduce((map, item) => {
map[item.iso2] = `${item.iso2.toUpperCase()} +${item.dialCode}`;
diff --git a/client/src/views/settings/fields/phone-number-preferred-country-list.js b/client/src/views/settings/fields/phone-number-preferred-country-list.js
index 987b2e3065..b485ee2bf7 100644
--- a/client/src/views/settings/fields/phone-number-preferred-country-list.js
+++ b/client/src/views/settings/fields/phone-number-preferred-country-list.js
@@ -27,14 +27,13 @@
************************************************************************/
import MultiEnumFieldView from 'views/fields/multi-enum';
-// noinspection NpmUsedModulesInstalled
-import intlTelInputGlobals from 'intl-tel-input-globals';
+import intlTelInput from 'intl-tel-input';
class SettingsPhoneNumberPreferredCountryListFieldView extends MultiEnumFieldView {
setupOptions() {
try {
- const dataList = intlTelInputGlobals.getCountryData();
+ const dataList = intlTelInput.getAllCountries();
this.params.options = dataList
.map(item => item.iso2);
@@ -44,8 +43,7 @@ class SettingsPhoneNumberPreferredCountryListFieldView extends MultiEnumFieldVie
return map;
}, {});
- }
- catch (e) {
+ } catch (e) {
console.error(e);
}
}
diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less
index 74cd91eec8..cd44a61aed 100644
--- a/frontend/less/espo/custom.less
+++ b/frontend/less/espo/custom.less
@@ -49,7 +49,7 @@ input[type=radio]:focus-visible,
input[type=checkbox]:focus-visible,
input[type=file]:focus-visible,
label.attach-file-label:focus-visible,
-.iti__selected-flag:focus-visible {
+.iti__search-input:focus-visible {
outline: var(--1px) solid var(--input-border-focus-rgba);
outline-offset: var(--minus-1px);
}
diff --git a/frontend/less/espo/misc/intl-tel-input/intlTelInput.less b/frontend/less/espo/misc/intl-tel-input/intlTelInput.less
index d577290cfa..c5af62fb35 100644
--- a/frontend/less/espo/misc/intl-tel-input/intlTelInput.less
+++ b/frontend/less/espo/misc/intl-tel-input/intlTelInput.less
@@ -1,184 +1,491 @@
+:root {
+ --iti-hover-color: var(--dropdown-link-hover-bg);
+ --iti-border-color: var(--input-border);
+ --iti-country-selector-bg: var(--dropdown-bg);
+ --iti-icon-color: var(--gray-soft);
+ --iti-spacer-horizontal: var(--padding-base-horizontal);
+ --iti-flag-height: calc(var(--iti-flag-width) * 3 / 4);
+ --iti-globe-icon-size: var(--17px);
+ --iti-clear-icon-size: var(--15px);
+ --iti-close-icon-size: var(--20px);
+ --iti-border-width: var(--input-border-width);
+ --iti-arrow-size: var(--5px);
+ --iti-arrow-width: 1.5px;
+ --iti-arrow-padding: 0;
+ --iti-mobile-popup-margin: var(--40px);
+ --iti-strict-reject-flash-color: rgba(255, 0, 0, 0);
+}
+
.iti {
- position: relative;
- display: inline-block;
+ position: relative;
+ display: inline-block;
}
.iti * {
- box-sizing: border-box;
+ box-sizing: border-box;
+}
+.iti input.iti__tel-input,
+.iti input.iti__tel-input[type=text],
+.iti input.iti__tel-input[type=tel] {
+ position: relative;
+ //z-index: 0;
+ display: block;
+ min-width: 100%;
+ margin: 0 !important;
+}
+.iti__a11y-text {
+ width: 1px;
+ height: 1px;
+ clip: rect(1px, 1px, 1px, 1px);
+ overflow: hidden;
+ position: absolute;
+}
+.iti__country-container {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ padding: var(--iti-border-width);
+}
+.iti__selected-country {
+ z-index: 1;
+ position: relative;
+ display: flex;
+ align-items: center;
+ height: 100%;
+ background: none;
+ border: 0;
+ margin: 0;
+ padding: 0;
+ font-family: inherit;
+ font-size: inherit;
+ color: inherit;
+ border-radius: 0;
+ font-weight: inherit;
+ line-height: inherit;
+ text-decoration: none;
+}
+.iti__selected-country-primary {
+ display: flex;
+ align-items: center;
+ height: 100%;
+}
+
+.iti__arrow {
+ width: var(--iti-arrow-size);
+ height: var(--iti-arrow-size);
+ box-sizing: border-box;
+ border-right: var(--iti-arrow-width) solid var(--iti-icon-color);
+ border-bottom: var(--iti-arrow-width) solid var(--iti-icon-color);
+ transform: rotate(45deg);
+}
+.iti__arrow--up {
+ transform: rotate(-135deg);
+}
+.iti__country-selector {
+ background-color: var(--iti-country-selector-bg);
+}
+.iti--inline-country-selector .iti__country-selector {
+ border: var(--iti-border-width) solid var(--iti-border-color);
+}
+.iti--inline-country-selector:not(.iti--detached-country-selector) .iti__country-selector {
+ position: absolute;
+ z-index: 2;
+ left: 0;
+}
+.iti__search-input {
+ width: 100%;
+ border-width: 0;
+}
+[dir=rtl] .iti__search-input {
+ padding-left: inherit;
+ background-position: right var(--8px) center;
+}
+.iti__search-input::-webkit-search-cancel-button {
+ appearance: none;
+}
+
+.iti__search-input-wrapper {
+ position: relative;
+ display: flex;
+ align-items: center;
+}
+.iti__search-icon {
+ position: absolute;
+ left: var(--iti-spacer-horizontal);
+ display: flex;
+ pointer-events: none;
+}
+[dir=rtl] .iti__search-icon {
+ left: auto;
+ right: var(--iti-spacer-horizontal);
+}
+.iti__search-icon-svg {
+ width: var(--iti-globe-icon-size);
+ height: var(--iti-globe-icon-size);
+ display: block;
+ stroke: var(--iti-icon-color);
+ fill: none;
+ stroke-width: 3;
+}
+.iti__search-clear {
+ position: absolute;
+ right: calc(var(--iti-spacer-horizontal) / 2);
+ background: transparent;
+ border: 0;
+ cursor: pointer;
+ padding: calc(var(--iti-spacer-horizontal) / 2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: background-color 0.15s ease;
+}
+.iti__search-clear .iti__search-clear-x {
+ stroke-width: 2;
+}
+.iti__search-clear .iti__search-clear-bg {
+ fill: var(--iti-icon-color);
+}
+[dir=rtl] .iti__search-clear {
+ right: auto;
+ left: var(--iti-spacer-horizontal);
+}
+.iti__search-clear:hover,
+.iti__search-clear:focus-visible {
+ background: var(--iti-hover-color);
+ outline: none;
+}
+.iti__search-clear-svg {
+ width: var(--iti-clear-icon-size);
+ height: var(--iti-clear-icon-size);
+ display: block;
+}
+.iti__no-results {
+ text-align: center;
+}
+.iti__country-list {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ cursor: pointer;
+ outline: none;
+ overflow-y: scroll;
+ -webkit-overflow-scrolling: touch;
+}
+
+.iti--flexible-dropdown-width .iti__country-list {
+ white-space: nowrap;
+}
+@media (max-width: 500px) {
+ .iti--flexible-dropdown-width .iti__country-list {
+ white-space: normal;
+ }
+}
+.iti__country {
+ display: flex;
+ align-items: center;
+ padding-left: var(--iti-spacer-horizontal);
+ padding-right: var(--iti-spacer-horizontal);
+}
+.iti__country.iti__highlight {
+ background-color: var(--iti-hover-color);
+}
+.iti__country-name {
+ flex-grow: 1;
+}
+.iti__country-check {
+ margin-left: var(--iti-spacer-horizontal);
+ display: flex;
+ align-items: center;
+ color: var(--iti-icon-color);
+}
+.iti__country-check-svg {
+ width: var(--iti-clear-icon-size);
+ height: var(--iti-clear-icon-size);
+ display: block;
+}
+.iti__country-list .iti__flag {
+ margin-right: var(--iti-spacer-horizontal);
+ flex-shrink: 0;
+}
+[dir=rtl] :is(.iti__country-list .iti__flag) {
+ margin-right: 0;
+ margin-left: var(--iti-spacer-horizontal);
+}
+:is(.iti--has-country-selector .iti__country-container:has(+ input[disabled]), .iti--has-country-selector .iti__country-container:has(+ input[readonly])) button.iti__selected-country {
+ cursor: not-allowed;
+}
+:is(.iti--has-country-selector .iti__country-container:has(+ input[disabled]), .iti--has-country-selector .iti__country-container:has(+ input[readonly])) button.iti__selected-country .iti__arrow {
+ visibility: hidden;
+}
+.iti--has-country-selector .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover,
+.iti--has-country-selector .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country[aria-expanded=true] .iti__selected-country-primary {
+ background-color: var(--iti-hover-color);
+}
+.iti--detached-country-selector {
+ position: fixed;
+ top: -1000px;
+ left: -1000px;
+ z-index: 1060;
+}
+.iti--detached-country-selector:hover {
+ cursor: pointer;
+}
+.iti--detached-country-selector {
+ top: calc(anchor(bottom) - var(--1px));
+ left: anchor(left);
+ position-try-fallbacks: --iti-flip-above;
+}
+@position-try --iti-flip-above {
+ top: auto;
+ bottom: calc(anchor(top));
}
.iti__hide {
- display: none;
+ display: none;
}
.iti__v-hide {
- visibility: hidden;
-}
-.iti input,
-.iti input[type=text],
-.iti input[type=tel] {
- position: relative;
- z-index: 0;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
- padding-right: var(--36px);
- margin-right: 0;
-}
-.iti__flag-container {
- position: absolute;
- top: 0;
- bottom: 0;
- right: 0;
- padding: 1px;
-}
-.iti__selected-flag {
- z-index: 1;
- position: relative;
- display: flex;
- align-items: center;
- height: 100%;
- padding: 0 var(--6px) 0 var(--8px);
- font-variant-numeric: tabular-nums; // Espo
+ visibility: hidden;
+}
+.iti--fullscreen-popup.iti--detached-country-selector {
+ background-color: rgba(0, 0, 0, 0.5);
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ position: fixed;
+ padding: var(--iti-mobile-popup-margin);
+ padding-bottom: calc(var(--iti-mobile-popup-margin) + var(--iti-virtual-keyboard-height, 0px));
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+}
+.iti--fullscreen-popup .iti__country-selector {
+ display: flex;
+ flex-direction: column;
+ max-height: 100%;
+ position: relative;
+}
+.iti--fullscreen-popup .iti__close-button {
+ position: absolute;
+ bottom: 100%;
+ right: calc(-1 * var(--iti-mobile-popup-margin));
+ width: var(--iti-mobile-popup-margin);
+ height: var(--iti-mobile-popup-margin);
+ padding: 0;
+ background: transparent;
+ border: 0;
+ border-radius: var(--border-radius-small);
+ color: white;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+[dir=rtl] :is(.iti--fullscreen-popup .iti__close-button) {
+ right: auto;
+ left: calc(-1 * var(--iti-mobile-popup-margin));
+}
+.iti__loading {
+ position: relative;
+ background: none;
+ box-shadow: none;
+}
+.iti__loading::after {
+ content: "";
+ position: absolute;
+ inset: 0;
+ margin: auto;
+ width: var(--iti-flag-height);
+ height: var(--iti-flag-height);
+ box-sizing: border-box;
+ border: 2px solid var(--iti-icon-color);
+ border-right-color: transparent;
+ border-radius: 50%;
+ animation: iti-spinner 1s linear infinite;
+}
+@keyframes iti-spinner {
+ to {
+ transform: rotate(360deg);
+ }
+}
+.iti__strict-reject-animation .iti__tel-input,
+.iti__strict-reject-animation .iti__selected-country {
+ animation: iti-strict-reject-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97);
+}
+@media (prefers-reduced-motion: reduce) {
+ .iti__strict-reject-animation .iti__tel-input {
+ animation: iti-strict-reject-flash 0.3s ease-out both;
+ }
+ .iti__strict-reject-animation .iti__selected-country {
+ animation: none;
+ }
+}
+@keyframes iti-strict-reject-shake {
+ 10%, 90% {
+ transform: translateX(-1px);
+ }
+ 20%, 80% {
+ transform: translateX(2px);
+ }
+ 30%, 50%, 70% {
+ transform: translateX(-3px);
+ }
+ 40%, 60% {
+ transform: translateX(3px);
+ }
+}
+@keyframes iti-strict-reject-flash {
+ 40% {
+ background-color: var(--iti-strict-reject-flash-color);
+ }
+}
+.iti__globe {
+ background: none;
+ box-shadow: none;
+ height: var(--iti-globe-icon-size);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0;
+}
+.iti__globe .iti__globe-svg {
+ width: 100%;
+ height: 100%;
+ fill: var(--iti-icon-color);
+}
+@supports (-webkit-appearance: none) and (not (background: -webkit-canvas(foo))) {
+ .iti__tel-input:focus {
+ outline-offset: 1px;
+ }
+}
+
+// Espo
+
+.iti__globe {
+ display: none;
+}
+
+.iti--inline-country-selector .iti__country-list {
+ max-height: calc(var(--256px) + var(--6px));
+}
+
+.iti__search-input,
+.iti__country {
+ padding-top: var(--3px);
+ padding-bottom: var(--3px);
}
+
.iti__arrow {
- margin-left: var(--6px);
- width: 0;
- height: 0;
- border-left: var(--3px) solid transparent;
- border-right: var(--3px) solid transparent;
- border-top: var(--4px) solid #555;
+ margin-left: 0;
+ margin-top: var(--minus-2px);
}
-[dir=rtl] .iti__arrow {
- margin-right: var(--6px);
- margin-left: 0;
+
+.iti__arrow.iti__arrow--up {
+ margin-top: var(--4px);
+ transform: rotate(-135deg);
}
-.iti__arrow--up {
- border-top: none;
- border-bottom: var(--4px) solid #555;
+
+.iti--input-container {
+ &:has(input.form-control:focus) {
+ .iti__selected-country {
+ z-index: 4;
+ }
+ }
}
+
.iti__country-list {
- position: absolute;
- z-index: 2;
- list-style: none;
- padding: 0;
- margin: 0 0 0 var(--minus-1px);
- box-shadow: var(--1px) var(--1px) var(--4px) rgba(0, 0, 0, 0.2);
- background-color: white;
- border: 1px solid #ccc;
- white-space: nowrap;
- max-height: var(--200px);
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
- font-variant-numeric: tabular-nums; // Espo
-}
-.iti__country-list--dropup {
- bottom: 100%;
- margin-bottom: var(--minus-1px);
+ padding-top: var(--5px);
+ padding-bottom: var(--5px);
+ border-bottom-left-radius: var(--dropdown-border-radius);
+ border-bottom-right-radius: var(--dropdown-border-radius);
}
-@media (max-width: 500px) {
- .iti__country-list {
- white-space: normal;
- }
+.iti__country-selector {
+ border-radius: var(--dropdown-border-radius);
+ padding-top: var(--5px);
}
-.iti__flag-box {
- display: inline-block;
- width: var(--20px);
+
+.iti__search-input {
+ border-radius: 0;
+ background-color: var(--input-bg);
}
-.iti__divider {
- padding-bottom: var(--5px);
- margin-bottom: var(--5px);
- border-bottom: var(--1px) solid #ccc;
+
+.iti__country-container {
+ padding-left: 0;
}
-.iti__country {
- display: flex;
- align-items: center;
- padding: var(--5px) var(--10px);
- outline: none;
+
+.iti__selected-country-primary {
+ padding: 0 var(--8px) 0 var(--6px);
+ display: none;
}
-.iti__dial-code {
- color: #999;
+
+.iti--inline-country-selector:not(.iti--detached-country-selector) .iti__country-selector {
+ z-index: 4;
}
-.iti__country.iti__highlight {
- background-color: rgba(0, 0, 0, 0.05);
-}
-.iti__flag-box, .iti__country-name {
- margin-right: var(--6px);
-}
-[dir=rtl] .iti__flag-box, [dir=rtl] .iti__country-name {
- margin-right: 0;
- margin-left: var(--6px);
-}
-.iti--allow-dropdown input,
-.iti--allow-dropdown input[type=text],
-.iti--allow-dropdown input[type=tel], .iti--separate-dial-code input,
-.iti--separate-dial-code input[type=text],
-.iti--separate-dial-code input[type=tel] {
- padding-right: var(--6px);
- padding-left: var(--50px);
- margin-left: 0;
-}
-[dir=rtl] .iti--allow-dropdown input,
-[dir=rtl] .iti--allow-dropdown input[type=text],
-[dir=rtl] .iti--allow-dropdown input[type=tel], [dir=rtl] .iti--separate-dial-code input,
-[dir=rtl] .iti--separate-dial-code input[type=text],
-[dir=rtl] .iti--separate-dial-code input[type=tel] {
- padding-right: var(--50px);
- padding-left: var(--6px);
- margin-right: 0;
-}
-.iti--allow-dropdown .iti__flag-container, .iti--separate-dial-code .iti__flag-container {
- right: auto;
- left: 0;
-}
-[dir=rtl] .iti--allow-dropdown .iti__flag-container, [dir=rtl] .iti--separate-dial-code .iti__flag-container {
- right: 0;
- left: auto;
-}
-.iti--allow-dropdown .iti__flag-container:hover {
- cursor: pointer;
-}
-.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
- background-color: rgba(0, 0, 0, 0.05);
-}
-.iti--allow-dropdown input[disabled] + .iti__flag-container:hover,
-.iti--allow-dropdown input[readonly] + .iti__flag-container:hover {
- cursor: default;
-}
-.iti--allow-dropdown input[disabled] + .iti__flag-container:hover .iti__selected-flag,
-.iti--allow-dropdown input[readonly] + .iti__flag-container:hover .iti__selected-flag {
- background-color: transparent;
-}
-.iti--separate-dial-code .iti__selected-flag {
- background-color: rgba(0, 0, 0, 0.05);
-}
-.iti--separate-dial-code.iti--show-flags .iti__selected-dial-code {
- margin-left: var(--6px);
-}
-[dir=rtl] .iti--separate-dial-code.iti--show-flags .iti__selected-dial-code {
- margin-left: 0;
- margin-right: var(--6px);
-}
-.iti--container {
- position: absolute;
- top: -1000px;
- left: -1000px;
- z-index: 1060;
- padding: 1px;
-}
-.iti--container:hover {
- cursor: pointer;
-}
-
-.iti-mobile .iti--container {
- top: var(--30px);
- bottom: var(--30px);
- left: var(--30px);
- right: var(--30px);
- position: fixed;
-}
-.iti-mobile .iti__country-list {
- max-height: 100%;
- width: 100%;
-}
-.iti-mobile .iti__country {
- padding: 10px 10px;
- line-height: 1.5em;
+
+.iti__selected-dial-code {
+ margin-left: var(--padding-base-horizontal);
+}
+
+.iti__search-icon {
+ display: none;
+}
+
+.iti__search-input.form-control {
+ padding-left: var(--padding-base-horizontal);
+ padding-right: var(--padding-base-horizontal);
+
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+
+ &,
+ &:active,
+ &:focus {
+ border-left: 0;
+ border-right: 0;
+ }
+
+ &:focus {
+ outline: none;
+ }
+}
+
+.iti__search-clear {
+ display: none;
+}
+
+.iti__search-input-wrapper {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom: 0 solid var(--iti-border-color);
+
+ input {
+ border-radius: 0;
+ }
+}
+
+.iti__no-results {
+ display: none;
+}
+
+.iti--inline-country-selector .iti__country-selector {
+ box-shadow: var(--dropdown-box-shadow);
+ margin-top: 0;
+}
+
+.iti__country-check {
+ .iti__country-check-svg {
+ display: none;
+ }
+
+ font-size: var(--icon-size-base);
+ line-height: var(--icon-line-height-base);
+ font-weight: 900;
+ --fa: "\f00c";
+ //noinspection CssNoGenericFontName
+ font-family: 'Font Awesome 6 Free';
+
+ &::before {
+ content: var(--fa);
+ --fa: "\f00c";
+ }
}
diff --git a/frontend/libs.json b/frontend/libs.json
index 99ea3ba8e1..3021a2fb39 100644
--- a/frontend/libs.json
+++ b/frontend/libs.json
@@ -110,20 +110,11 @@
"amdId": "autonumeric"
},
{
- "src": "node_modules/intl-tel-input/build/js/intlTelInput.js",
+ "src": "node_modules/intl-tel-input/dist/js/intlTelInputWithUtils.js",
"bundle": true,
"amdId": "intl-tel-input",
"suppressAmd": true
},
- {
- "src": "node_modules/intl-tel-input/build/js/utils.js",
- "bundle": true,
- "amdId": "intl-tel-input-utils"
- },
- {
- "bundle": true,
- "amdId": "intl-tel-input-globals"
- },
{
"src": "client/lib/original/shopify-draggable.js",
"bundle": true,
diff --git a/package-lock.json b/package-lock.json
index 060b447d5f..f479975095 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -34,7 +34,7 @@
"getobject": ">=1.0.0",
"gridstack": "github:yurikuzn/gridstack.js#5.1.1.e3",
"handlebars": "^4.7.10",
- "intl-tel-input": "^18.2.1",
+ "intl-tel-input": "^29.5.6",
"jquery": "^3.7.1",
"jquery-ui-espo": "github:yurikuzn/jquery-ui-espo#0.2.3",
"jquery-ui-touch-punch": "^0.2.3",
@@ -57,7 +57,6 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
- "@types/intl-tel-input": "^18.1.4",
"@types/jquery": "^4.0.0",
"@types/marked": "^4.3.2",
"@types/underscore": "^1.13.0",
@@ -2613,15 +2612,6 @@
"integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==",
"peer": true
},
- "node_modules/@types/intl-tel-input": {
- "version": "18.1.4",
- "resolved": "https://registry.npmjs.org/@types/intl-tel-input/-/intl-tel-input-18.1.4.tgz",
- "integrity": "sha512-UT4dQ4dQA0w0uxU161aPROEEwMOQj5Qedm3ImdDNfkxi3JXzBX2FhcUS72pTyZ8ypaUr2e9ruJBiK6bwSGfbew==",
- "dev": true,
- "dependencies": {
- "@types/jquery": "*"
- }
- },
"node_modules/@types/jquery": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-4.0.0.tgz",
@@ -5714,9 +5704,10 @@
"dev": true
},
"node_modules/intl-tel-input": {
- "version": "18.2.1",
- "resolved": "https://registry.npmjs.org/intl-tel-input/-/intl-tel-input-18.2.1.tgz",
- "integrity": "sha512-wOm0/61kTtpYjOOW1bhHzC4G8Om+atTxHmg31FS0KD0LQ8k8BpgO925npyi4jlT/EK4+joABABZzz0/XeSgupQ=="
+ "version": "29.5.6",
+ "resolved": "https://registry.npmjs.org/intl-tel-input/-/intl-tel-input-29.5.6.tgz",
+ "integrity": "sha512-lUxWy/qRlW80JHPs1KKZizOpHBAFyhqzRzy/vbGUHWKDAD+sk/OCnIDAv4NqayuCX+eH03hHspnpQOwK1L8Gug==",
+ "license": "MIT"
},
"node_modules/ip-address": {
"version": "10.7.4",
@@ -10452,15 +10443,6 @@
"integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==",
"peer": true
},
- "@types/intl-tel-input": {
- "version": "18.1.4",
- "resolved": "https://registry.npmjs.org/@types/intl-tel-input/-/intl-tel-input-18.1.4.tgz",
- "integrity": "sha512-UT4dQ4dQA0w0uxU161aPROEEwMOQj5Qedm3ImdDNfkxi3JXzBX2FhcUS72pTyZ8ypaUr2e9ruJBiK6bwSGfbew==",
- "dev": true,
- "requires": {
- "@types/jquery": "*"
- }
- },
"@types/jquery": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-4.0.0.tgz",
@@ -12626,9 +12608,9 @@
"dev": true
},
"intl-tel-input": {
- "version": "18.2.1",
- "resolved": "https://registry.npmjs.org/intl-tel-input/-/intl-tel-input-18.2.1.tgz",
- "integrity": "sha512-wOm0/61kTtpYjOOW1bhHzC4G8Om+atTxHmg31FS0KD0LQ8k8BpgO925npyi4jlT/EK4+joABABZzz0/XeSgupQ=="
+ "version": "29.5.6",
+ "resolved": "https://registry.npmjs.org/intl-tel-input/-/intl-tel-input-29.5.6.tgz",
+ "integrity": "sha512-lUxWy/qRlW80JHPs1KKZizOpHBAFyhqzRzy/vbGUHWKDAD+sk/OCnIDAv4NqayuCX+eH03hHspnpQOwK1L8Gug=="
},
"ip-address": {
"version": "10.7.4",
diff --git a/package.json b/package.json
index 05a061b6b1..a17aaa3584 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,6 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
- "@types/intl-tel-input": "^18.1.4",
"@types/jquery": "^4.0.0",
"@types/marked": "^4.3.2",
"@types/underscore": "^1.13.0",
@@ -83,7 +82,7 @@
"getobject": ">=1.0.0",
"gridstack": "github:yurikuzn/gridstack.js#5.1.1.e3",
"handlebars": "^4.7.10",
- "intl-tel-input": "^18.2.1",
+ "intl-tel-input": "^29.5.6",
"jquery": "^3.7.1",
"jquery-ui-espo": "github:yurikuzn/jquery-ui-espo#0.2.3",
"jquery-ui-touch-punch": "^0.2.3",