Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXES] Fix deprecated sass, Polish translation, types, build command #1929

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
**/third_party/**
**/tmp/**
Gruntfile.js
**/utils-compiled.js
**/utils.js
2 changes: 1 addition & 1 deletion build/css/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ input.error {

.hide {
display: none;
}
}
2 changes: 1 addition & 1 deletion build/css/intlTelInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -1202,4 +1202,4 @@
.iti__globe {
background-image: var(--iti-path-globe-2x);
}
}
}
Binary file modified build/img/flags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/img/flags.webp
Binary file not shown.
Binary file modified build/img/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/img/[email protected]
Binary file not shown.
2 changes: 1 addition & 1 deletion build/js/i18n/pl/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const interfaceTranslations = {
searchPlaceholder: "Szukaj",
zeroSearchResults: "Nie znaleziono wyników",
oneSearchResult: "Znaleziono 1 wynik",
multipleSearchResults: "Znaleziono ${count} ${count > 1 && count < 5 ? 'wyniki' : 'wyników'}",
multipleSearchResults: "Znaleziono ${count} ${(count % 10 >= 2 && count % 10 <= 4 && !(count % 100 >= 12 && count % 100 <= 14)) ? 'wyniki' : 'wyników'}",
// additional countries (not supported by country-list library)
ac: "Wyspa Wniebowstąpienia",
xk: "Kosowo"
Expand Down
7 changes: 6 additions & 1 deletion build/js/intlTelInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ declare module "intl-tel-input/i18n/en" {
declare module "intl-tel-input" {
import { Country } from "intl-tel-input/data";
import { I18n } from "intl-tel-input/i18n/types";
global {
interface HTMLInputElement {
iti?: Iti;
}
}
type UtilsLoader = () => Promise<{
default: ItiUtils;
}>;
Expand Down Expand Up @@ -480,7 +485,7 @@ declare module "intl-tel-input" {
const intlTelInput: IntlTelInputInterface;
export default intlTelInput;
}
declare module "intl-tel-input/utils-compiled" {
declare module "intl-tel-input/utils" {
export default utils;
const utils: any;
}
Expand Down
5 changes: 5 additions & 0 deletions build/js/intlTelInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2533,6 +2533,9 @@ var factoryOutput = (() => {
searchText = i18n.oneSearchResult;
} else {
searchText = i18n.multipleSearchResults.replace("${count}", count.toString());
if (searchText.includes("{") && searchText.includes("}")) {
searchText = new Function("count", `return \`${searchText.replace(/`/g, "\\`")}\`;`)(count);
}
}
this.searchResultsA11yText.textContent = searchText;
}
Expand Down Expand Up @@ -2966,6 +2969,7 @@ var factoryOutput = (() => {
//********************
//* Remove plugin.
destroy() {
this.telInput.iti = void 0;
const { allowDropdown, separateDialCode } = this.options;
if (allowDropdown) {
this._closeDropdown();
Expand Down Expand Up @@ -3151,6 +3155,7 @@ var factoryOutput = (() => {
iti._init();
input.setAttribute("data-intl-tel-input-id", iti.id.toString());
intlTelInput.instances[iti.id] = iti;
input.iti = iti;
return iti;
},
{
Expand Down
2 changes: 1 addition & 1 deletion build/js/intlTelInput.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions build/js/intlTelInputWithUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2532,6 +2532,9 @@ var factoryOutput = (() => {
searchText = i18n.oneSearchResult;
} else {
searchText = i18n.multipleSearchResults.replace("${count}", count.toString());
if (searchText.includes("{") && searchText.includes("}")) {
searchText = new Function("count", `return \`${searchText.replace(/`/g, "\\`")}\`;`)(count);
}
}
this.searchResultsA11yText.textContent = searchText;
}
Expand Down Expand Up @@ -2965,6 +2968,7 @@ var factoryOutput = (() => {
//********************
//* Remove plugin.
destroy() {
this.telInput.iti = void 0;
const { allowDropdown, separateDialCode } = this.options;
if (allowDropdown) {
this._closeDropdown();
Expand Down Expand Up @@ -3150,6 +3154,7 @@ var factoryOutput = (() => {
iti._init();
input.setAttribute("data-intl-tel-input-id", iti.id.toString());
intlTelInput.instances[iti.id] = iti;
input.iti = iti;
return iti;
},
{
Expand Down
2 changes: 1 addition & 1 deletion build/js/intlTelInputWithUtils.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions grunt/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = function(grunt) {
options: {
implementation: sass,
sourcemap: "none",
style: "compressed"
},
files: {
'build/css/intlTelInput.css': 'src/css/intlTelInput.scss'
Expand All @@ -15,7 +14,7 @@ module.exports = function(grunt) {
demo: {
options: {
implementation: sass,
sourcemap: "none"
sourcemap: "none",
},
files: {
'build/css/demo.css': 'src/css/demo.scss'
Expand Down
4 changes: 2 additions & 2 deletions grunt/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module.exports = function(grunt) {
},
genTsDeclaration: {
//* Clean up the module names by removing the /index suffix as this is how they will be used.
command: 'tsc --p tsconfig.json && sed -i "" -e "s/\\/index\\"/\\"/g" build/js/intlTelInput.d.ts'
command: 'tsc --p tsconfig.json && sed -i -e "s/\\/index\\"/\\"/g" build/js/intlTelInput.d.ts'
},
genReactTsDeclaration: {
//* Clean up the module names by removing the /index suffix as this is how they will be used.
command: 'tsc --p react/tsconfig.json && sed -i "" -e "s/\\/index\\"/\\"/g" react/build/IntlTelInput.d.ts'
command: 'tsc --p react/tsconfig.json && sed -i -e "s/\\/index\\"/\\"/g" react/build/IntlTelInput.d.ts'
},
eslint: {
command: 'eslint .'
Expand Down
Loading