Skip to content

Commit

Permalink
Release v23.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jackocnr committed Aug 7, 2024
1 parent b550e01 commit 7d4e0c0
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- IMPORTANT: please read the New Issue Checklist before creating a new issue: https://github.com/jackocnr/intl-tel-input/wiki/New-Issue-Checklist -->

### Plugin version
e.g. v23.8.0 (please try latest version)
e.g. v23.8.1 (please try latest version)

### Steps to reproduce
1.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because
## Getting Started (Using a CDN)
1. Add the CSS
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].0/build/css/intlTelInput.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].1/build/css/intlTelInput.css">
```

2. Add the plugin script and initialise it on your input element
```html
<script src="https://cdn.jsdelivr.net/npm/[email protected].0/build/js/intlTelInput.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].1/build/js/intlTelInput.min.js"></script>
<script>
const input = document.querySelector("#phone");
window.intlTelInput(input, {
utilsScript: "https://cdn.jsdelivr.net/npm/[email protected].0/build/js/utils.js",
utilsScript: "https://cdn.jsdelivr.net/npm/[email protected].1/build/js/utils.js",
});
</script>
```
Expand Down Expand Up @@ -329,7 +329,7 @@ Control when the country list appears as a fullscreen popup vs an inline dropdow

**utilsScript**
Type: `String` Default: `""` Example: `"/build/js/utils.js"`
This is one way to (lazy) load the included utils.js (to enable formatting/validation etc) - see [Loading The Utilities Script](#loading-the-utilities-script) for more options. You will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js"`. The script is loaded via a [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) statement, which means the URL cannot be relative - it must be absolute. The script is only fetched when you initialise the plugin, and additionally, only when the page has finished loading (on the window load event) to prevent blocking (the script is ~260KB). When instantiating the plugin, a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) object is returned under the `promise` instance property, so you can do something like `iti.promise.then(callback)` to know when initialisation requests like this have finished. See [Utilities Script](#utilities-script) for more information.
This is one way to (lazy) load the included utils.js (to enable formatting/validation etc) - see [Loading The Utilities Script](#loading-the-utilities-script) for more options. You will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js"`. The script is loaded via a [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) statement, which means the URL cannot be relative - it must be absolute. The script is only fetched when you initialise the plugin, and additionally, only when the page has finished loading (on the window load event) to prevent blocking (the script is ~260KB). When instantiating the plugin, a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) object is returned under the `promise` instance property, so you can do something like `iti.promise.then(callback)` to know when initialisation requests like this have finished. See [Utilities Script](#utilities-script) for more information.

**validationNumberType**
Type: `String` Default: `"MOBILE"`
Expand Down Expand Up @@ -544,7 +544,7 @@ The utils script provides lots of great functionality (see above section), but c
If you're not concerned about filesize (e.g. you're lazy loading this script), the easiest thing to do is to just use the full bundle /build/js/intlTelInputWithUtils.js, which comes with the utils script included. This script can be used exactly like the main intlTelInput.js - so it can either be loaded directly onto the page (which defines `window.intlTelInput` like usual), or it can be imported like so: `import intlTelInput from "intl-tel-input/intlTelInputWithUtils"`.

**Option 2: utilsScript**
If you *are* concerned about filesize, you can lazy load the utils script when the plugin intitialises, using the `utilsScript` initialisation option. You will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/[email protected].0/build/js/utils.js"`. If you want more control over when this file is lazy loaded, you can manually invoke the `loadUtils` static method, instead of using `utilsScript`.
If you *are* concerned about filesize, you can lazy load the utils script when the plugin intitialises, using the `utilsScript` initialisation option. You will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/[email protected].1/build/js/utils.js"`. If you want more control over when this file is lazy loaded, you can manually invoke the `loadUtils` static method, instead of using `utilsScript`.

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion build/js/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* International Telephone Input v23.8.0
* International Telephone Input v23.8.1
* https://github.com/jackocnr/intl-tel-input.git
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion build/js/data.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/js/intlTelInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* International Telephone Input v23.8.0
* International Telephone Input v23.8.1
* https://github.com/jackocnr/intl-tel-input.git
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -2843,7 +2843,7 @@ var factoryOutput = (() => {
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
4 changes: 2 additions & 2 deletions build/js/intlTelInput.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/js/intlTelInputWithUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* International Telephone Input v23.8.0
* International Telephone Input v23.8.1
* https://github.com/jackocnr/intl-tel-input.git
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -2842,7 +2842,7 @@ var factoryOutput = (() => {
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
4 changes: 2 additions & 2 deletions build/js/intlTelInputWithUtils.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jackocnr/intl-tel-input",
"version": "23.8.0",
"version": "23.8.1",
"description": "A JavaScript plugin for entering and validating international telephone numbers",
"keywords": [
"international",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "intl-tel-input",
"version": "23.8.0",
"version": "23.8.1",
"description": "A JavaScript plugin for entering and validating international telephone numbers",
"keywords": [
"international",
Expand Down
2 changes: 1 addition & 1 deletion react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import "intl-tel-input/styles";

See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/ValidationApp.tsx) for a more fleshed-out example of how to handle validation.

A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"` instead, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `utilsScript` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/[email protected].0/build/js/utils.js"`.
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"` instead, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `utilsScript` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/[email protected].1/build/js/utils.js"`.

## Props
Here's a list of all of the current props you can pass to the IntlTelInput react component.
Expand Down
2 changes: 1 addition & 1 deletion react/build/IntlTelInput.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ var intlTelInput = Object.assign(
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/build/IntlTelInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@ var intlTelInput = Object.assign(
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/build/IntlTelInputWithUtils.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ var intlTelInput = Object.assign(
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/build/IntlTelInputWithUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@ var intlTelInput = Object.assign(
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/demo/set-number-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26331,7 +26331,7 @@
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/demo/simple-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26331,7 +26331,7 @@
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/demo/toggle-disabled-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26331,7 +26331,7 @@
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down
2 changes: 1 addition & 1 deletion react/demo/validation-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26331,7 +26331,7 @@
//* A map from instance ID to instance object.
instances: {},
loadUtils,
version: "23.8.0"
version: "23.8.1"
}
);
var intl_tel_input_default = intlTelInput;
Expand Down

0 comments on commit 7d4e0c0

Please sign in to comment.