Skip to content

Commit

Permalink
Version 3.2.2
Browse files Browse the repository at this point in the history
Fixed: `Notiflix.Confirm.prompt()`: Input `maxlength` attribute value should not be directly related to the default answer length.
  - Fixes => [#43](#43)
  • Loading branch information
furcan committed Nov 8, 2021
1 parent 07f9bc6 commit fd6bd41
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 45 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@3.2.2
* **Fixed:** `Notiflix.Confirm.prompt()`: Input `maxlength` attribute value should not be directly related to the default answer length.
- Fixes => [#43](https://github.com/notiflix/Notiflix/issues/43)

---

@3.2.1
* **Fixed:** `index.d.ts`:
- `Notiflix.Notify.*` module: `callbackOrOptions` type definition issue has been fixed.
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
[downloads-url]: https://npmjs.org/package/notiflix
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/notiflix/badge?style=rounded
[jsdelivr-url]: https://www.jsdelivr.com/package/npm/notiflix
[size-badge]: https://img.badgesize.io/https://cdn.jsdelivr.net/npm/[email protected].1/dist/notiflix-aio-3.2.1.min.js?compression=gzip
[size-url]: https://cdn.jsdelivr.net/npm/[email protected].1/dist/notiflix-aio-3.2.1.min.js
[size-badge]: https://img.badgesize.io/https://cdn.jsdelivr.net/npm/[email protected].2/dist/notiflix-aio-3.2.2.min.js?compression=gzip
[size-url]: https://cdn.jsdelivr.net/npm/[email protected].2/dist/notiflix-aio-3.2.2.min.js
[lic-badge]: https://img.shields.io/github/license/notiflix/Notiflix.svg
[lic-url]: https://github.com/notiflix/Notiflix/blob/main/LICENSE

Expand All @@ -39,7 +39,7 @@ Notiflix is a JavaScript library for client-side non-blocking notifications, pop

### Current Version

3.2.1 [*](https://github.com/notiflix/Notiflix/blob/main/CHANGELOG.md "CHANGELOG")
3.2.2 [*](https://github.com/notiflix/Notiflix/blob/main/CHANGELOG.md "CHANGELOG")

### Browser Compatibility

Expand Down Expand Up @@ -100,27 +100,27 @@ import { Block } from 'notiflix/build/notiflix-block-aio';

#### CSS and JS
```html
<link rel="stylesheet" href="dist/notiflix-3.2.1.min.css" />
<link rel="stylesheet" href="dist/notiflix-3.2.2.min.css" />

<script src="dist/notiflix-3.2.1.min.js"></script>
<script src="dist/notiflix-3.2.2.min.js"></script>
```

#### or only JS (All in One - Internal CSS)
```html
<script src="dist/notiflix-aio-3.2.1.min.js"></script>
<script src="dist/notiflix-aio-3.2.2.min.js"></script>
```

#### or only Modules JS (All in One - Internal CSS)
```html
<script src="dist/notiflix-notify-aio-3.2.1.min.js"></script>
<script src="dist/notiflix-notify-aio-3.2.2.min.js"></script>

<script src="dist/notiflix-report-aio-3.2.1.min.js"></script>
<script src="dist/notiflix-report-aio-3.2.2.min.js"></script>

<script src="dist/notiflix-confirm-aio-3.2.1.min.js"></script>
<script src="dist/notiflix-confirm-aio-3.2.2.min.js"></script>

<script src="dist/notiflix-loading-aio-3.2.1.min.js"></script>
<script src="dist/notiflix-loading-aio-3.2.2.min.js"></script>

<script src="dist/notiflix-block-aio-3.2.1.min.js"></script>
<script src="dist/notiflix-block-aio-3.2.2.min.js"></script>
```

---------
Expand Down
4 changes: 2 additions & 2 deletions build/notiflix-aio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Notiflix AIO (https://notiflix.github.io)
* Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files.
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -1137,7 +1137,7 @@
var theClientAnswer = undefined;
if (confirmType === typesConfirm.Ask || confirmType === typesConfirm.Prompt) {
theExpectedAnswer = answer || '';
var inputMaxLength = Math.ceil(theExpectedAnswer.length * (confirmType === typesConfirm.Ask ? 1 : 1.5));
var inputMaxLength = (confirmType === typesConfirm.Ask) ? Math.ceil(theExpectedAnswer.length * 1.5) : (theExpectedAnswer.length > 200 ? Math.ceil(theExpectedAnswer.length * 1.5) : 250);
var inputDefaultValueAttr = confirmType === typesConfirm.Prompt ? ('value="' + theExpectedAnswer + '"') : '';
setValidationInput = '<div><input id="NXConfirmValidationInput" type="text" ' + inputDefaultValueAttr + ' maxlength="' + inputMaxLength + '" style="font-size:' + newConfirmSettings.messageFontSize + ';border-radius: ' + newConfirmSettings.borderRadius + ';" autocomplete="off" spellcheck="false" autocapitalize="none" /></div>';
}
Expand Down
2 changes: 1 addition & 1 deletion build/notiflix-block-aio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Notiflix Block AIO (https://notiflix.github.io)
* Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files.
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down
4 changes: 2 additions & 2 deletions build/notiflix-confirm-aio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Notiflix Confirm AIO (https://notiflix.github.io)
* Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files.
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -278,7 +278,7 @@
var theClientAnswer = undefined;
if (confirmType === typesConfirm.Ask || confirmType === typesConfirm.Prompt) {
theExpectedAnswer = answer || '';
var inputMaxLength = Math.ceil(theExpectedAnswer.length * (confirmType === typesConfirm.Ask ? 1 : 1.5));
var inputMaxLength = (confirmType === typesConfirm.Ask) ? Math.ceil(theExpectedAnswer.length * 1.5) : (theExpectedAnswer.length > 200 ? Math.ceil(theExpectedAnswer.length * 1.5) : 250);
var inputDefaultValueAttr = confirmType === typesConfirm.Prompt ? ('value="' + theExpectedAnswer + '"') : '';
setValidationInput = '<div><input id="NXConfirmValidationInput" type="text" ' + inputDefaultValueAttr + ' maxlength="' + inputMaxLength + '" style="font-size:' + newConfirmSettings.messageFontSize + ';border-radius: ' + newConfirmSettings.borderRadius + ';" autocomplete="off" spellcheck="false" autocapitalize="none" /></div>';
}
Expand Down
2 changes: 1 addition & 1 deletion build/notiflix-loading-aio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Notiflix Loading AIO (https://notiflix.github.io)
* Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files.
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion build/notiflix-notify-aio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Notiflix Notify AIO (https://notiflix.github.io)
* Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files.
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion build/notiflix-report-aio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Notiflix Report AIO (https://notiflix.github.io)
* Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files.
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/notiflix-3.2.1.min.js → dist/notiflix-3.2.2.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions docs/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@
<!-- <script src="../build/notiflix-block-aio.js"></script> -->


<!-- <link href="../dist/notiflix-3.2.1.min.css" rel="stylesheet" /> -->
<!-- <script src="../dist/notiflix-3.2.1.min.js"></script> -->

<!-- <script src="../dist/notiflix-aio-3.2.1.min.js"></script> -->
<script src="../dist/notiflix-notify-aio-3.2.1.min.js"></script>
<script src="../dist/notiflix-report-aio-3.2.1.min.js"></script>
<script src="../dist/notiflix-confirm-aio-3.2.1.min.js"></script>
<script src="../dist/notiflix-loading-aio-3.2.1.min.js"></script>
<script src="../dist/notiflix-block-aio-3.2.1.min.js"></script>
<!-- <link href="../dist/notiflix-3.2.2.min.css" rel="stylesheet" /> -->
<!-- <script src="../dist/notiflix-3.2.2.min.js"></script> -->

<!-- <script src="../dist/notiflix-aio-3.2.2.min.js"></script> -->
<script src="../dist/notiflix-notify-aio-3.2.2.min.js"></script>
<script src="../dist/notiflix-report-aio-3.2.2.min.js"></script>
<script src="../dist/notiflix-confirm-aio-3.2.2.min.js"></script>
<script src="../dist/notiflix-loading-aio-3.2.2.min.js"></script>
<script src="../dist/notiflix-block-aio-3.2.2.min.js"></script>


<script>
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Notiflix (https://notiflix.github.io)
* Version: 3.2.1
* Version: 3.2.2
* Description: TypeScript Declaration.
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "notiflix",
"main": "dist/notiflix-aio-3.2.1.min.js",
"main": "dist/notiflix-aio-3.2.2.min.js",
"types": "index.d.ts",
"version": "3.2.1",
"version": "3.2.2",
"description": "Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more...",
"homepage": "https://github.com/notiflix/Notiflix",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/notiflix.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Notiflix (https://notiflix.github.io)
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down
4 changes: 2 additions & 2 deletions src/notiflix.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Notiflix (https://notiflix.github.io)
* Version: 3.2.1
* Version: 3.2.2
* Author: Furkan MT (https://github.com/furcan)
* Copyright 2019 - 2021 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -1139,7 +1139,7 @@
var theClientAnswer = undefined;
if (confirmType === typesConfirm.Ask || confirmType === typesConfirm.Prompt) {
theExpectedAnswer = answer || '';
var inputMaxLength = Math.ceil(theExpectedAnswer.length * (confirmType === typesConfirm.Ask ? 1 : 1.5));
var inputMaxLength = (confirmType === typesConfirm.Ask) ? Math.ceil(theExpectedAnswer.length * 1.5) : (theExpectedAnswer.length > 200 ? Math.ceil(theExpectedAnswer.length * 1.5) : 250);
var inputDefaultValueAttr = confirmType === typesConfirm.Prompt ? ('value="' + theExpectedAnswer + '"') : '';
setValidationInput = '<div><input id="NXConfirmValidationInput" type="text" ' + inputDefaultValueAttr + ' maxlength="' + inputMaxLength + '" style="font-size:' + newConfirmSettings.messageFontSize + ';border-radius: ' + newConfirmSettings.borderRadius + ';" autocomplete="off" spellcheck="false" autocapitalize="none" /></div>';
}
Expand Down

0 comments on commit fd6bd41

Please sign in to comment.