Skip to content

Commit

Permalink
Merge pull request #7 from alexiscirmi/v11.10.6
Browse files Browse the repository at this point in the history
V11.10.6
  • Loading branch information
alexiscirmi authored Mar 7, 2024
2 parents 79e122c + b333322 commit 9ef9ea3
Show file tree
Hide file tree
Showing 9 changed files with 494 additions and 532 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [11.10.6](https://github.com/sweetalert2/sweetalert2/compare/v11.10.5...v11.10.6) (2024-03-05)


### Bug Fixes

* allow single quotes in default email validator ([#2717](https://github.com/sweetalert2/sweetalert2/issues/2717)) ([e4b7a3a](https://github.com/sweetalert2/sweetalert2/commit/e4b7a3a9a19a5e9009dbe594022ab338ad5bb21c))

## [11.10.5](https://github.com/sweetalert2/sweetalert2/compare/v11.10.4...v11.10.5) (2024-02-05)


### Bug Fixes

* show the browser validation message for input ([#2704](https://github.com/sweetalert2/sweetalert2/issues/2704)) ([68d6d35](https://github.com/sweetalert2/sweetalert2/commit/68d6d35b3a285fe50ee0857966885fdc1368f0f8))

## [11.10.4](https://github.com/sweetalert2/sweetalert2/compare/v11.10.3...v11.10.4) (2024-01-23)


Expand Down
16 changes: 7 additions & 9 deletions SPONSORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ For all questions related to sponsorship please contact me via email sweetalert2
<table>
<tr>
<td align="center"><a href="SPONSORS.md#sponsors"><img src="https://sweetalert2.github.io/images/plus.png" width="80"><br>Become a sponsor</a></td>
<td align="center"><a href="https://insadown.com/"><img src="https://sweetalert2.github.io/images/sponsors/insadown.png" width="80"><br>InsaDown</a></td>
<td align="center"><a href="https://dlxplugins.com/"><img src="https://avatars.githubusercontent.com/u/106675919?s=200&v=4" width="80"><br>DLX Plugins</a></td>
<td align="center"><a href="https://github.com/tiagostutz"><img src="https://avatars0.githubusercontent.com/u/3986989?s=80&v=4" width="80"><br>Tiago de Oliveira Stutz</a></td>
<td align="center"><a href="https://refermate.com/"><img src="https://sweetalert2.github.io/images/sponsors/refermate.png" width="80"><br>Refermate</a>
Expand Down Expand Up @@ -48,53 +49,51 @@ NSFW Sponsors
<table>
<tr>
<td align="center"><a href="SPONSORS.md#sponsors"><img src="https://sweetalert2.github.io/images/plus.png" width="80"><br>Become a NSFW sponsor</a></td>
<td align="center"><a href="https://www.sexdollpartner.com/"><img src="https://sweetalert2.github.io/images/sponsors/sexdollpartner.jpg" width="80"><br>SexDollPartner</a></td>
<td align="center"><a href="https://nexromance.com/playstore/index.php?sweetalert"><img src="https://sweetalert2.github.io/images/sponsors/chatforsex.jpg" width="80"><br>ChatGPT for Sex</a></td>
<td align="center"><a href="https://pinktoys.co.uk/pocket-pussy/"><img src="https://sweetalert2.github.io/images/sponsors/pinktoys.png" width="80"><br>Pocket pussy</a></td>
<td align="center"><a href="https://www.xspacecup.com/"><img src="https://sweetalert2.github.io/images/sponsors/xspacecup.png" width="80"><br>XspaceCup - Top Male <br> Masturbator Brand</a></td>
<td align="center"><a href="https://vlixa.com/"><img src="https://sweetalert2.github.io/images/sponsors/vlixa.png" width="80"><br>Vlixa</a></td>
</tr>
</table>
<table>
<tr>
<td align="center"><a href="https://taboodude.com/"><img src="https://sweetalert2.github.io/images/sponsors/taboodude.png" width="80"><br>TabooDude</a></td>
<td align="center"><a href="https://vlixa.com/"><img src="https://sweetalert2.github.io/images/sponsors/vlixa.png" width="80"><br>Vlixa</a></td>
<td align="center"><a href="https://sexsitoys.com/lovense-games/"><img src="https://sweetalert2.github.io/images/sponsors/sexsitoys.jpg" width="80"><br>Sexsi Toys</a></td>
<td align="center"><a href="https://www.cheapestsexdolls.com"><img src="https://sweetalert2.github.io/images/sponsors/cheapestsexdolls.png" width="80"><br>CheapestSexDolls</a></td>
<td align="center"><a href="https://www.bestblowjobmachines.com/"><img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80"><br>Best Blowjob Machines</a></td>
<td align="center"><a href="https://escortsear.ch/"><img src="https://sweetalert2.github.io/images/sponsors/escortsearch.jpg" width="80"><br>EscortSearch</a></td>
<td align="center"><a href="https://nakedoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/nakedoll.png" width="80"><br>NakeDoll</a></td>
</tr>
</table>
<table>
<tr>
<td align="center"><a href="https://nakedoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/nakedoll.png" width="80"><br>NakeDoll</a></td>
<td align="center"><a href="https://readysetcam.com/"><img src="https://sweetalert2.github.io/images/sponsors/readysetcam.png" width="80"><br>Ready Set Cam</a></td>
<td align="center"><a href="https://www.onahole.com/"><img src="https://sweetalert2.github.io/images/sponsors/onahole.png" width="80"><br>hentai sex toys</a></td>
<td align="center"><a href="https://blowupdollshop.com/inflatable-sex-doll/"><img src="https://sweetalert2.github.io/images/sponsors/blowupdollshop.png" width="80"><br>Inflatable sex doll</a></td>
<td align="center"><a href="https://sexdollsmarket.com/"><img src="https://sweetalert2.github.io/images/sponsors/sexdollsmarket.png" width="80"><br>Sex Doll Torso</a></td>
<td align="center"><a href="https://sexydollies.com/"><img src="https://sweetalert2.github.io/images/sponsors/sexydollies.png" width="80"><br>porn sexdoll</a></td>
<td align="center"><a href="https://bululusexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/bululusexdoll.png" width="80"><br>cheap sex doll</a></td>
</tr>
</table>
<table>
<tr>
<td align="center"><a href="https://bululusexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/bululusexdoll.png" width="80"><br>cheap sex doll</a></td>
<td align="center"><a href="https://bululu.shop/"><img src="https://sweetalert2.github.io/images/sponsors/bululu.png" width="80"><br>BULULU</a></td>
<td align="center"><a href="https://vsdoll.net/"><img src="https://sweetalert2.github.io/images/sponsors/vsdoll.png" width="80"><br>VSDoll</a></td>
<td align="center"><a href="https://www.xndoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/xndoll.jpeg" width="80"><br>XNDOLL</a></td>
<td align="center"><a href="https://www.sextorso.com/"><img src="https://sweetalert2.github.io/images/sponsors/sextorso.png" width="80"><br>sexdoll torso</a></td>
<td align="center"><a href="https://www.minisexdoll.com/anime-sexdoll/"><img src="https://sweetalert2.github.io/images/sponsors/minisexdoll.png" width="80"><br>anime sexdoll</a></td>
<td align="center"><a href="https://www.myminisexdoll.com/under-300/"><img src="https://sweetalert2.github.io/images/sponsors/myminisexdoll.png" width="80"><br>cheap sexdoll</a></td>
</tr>
</table>
<table>
<tr>
<td align="center"><a href="https://www.myminisexdoll.com/under-300/"><img src="https://sweetalert2.github.io/images/sponsors/myminisexdoll.png" width="80"><br>cheap sexdoll</a></td>
<td align="center"><a href="https://www.hugedildo.com/"><img src="https://sweetalert2.github.io/images/sponsors/hugedildo.png" width="80"><br>huge dildo</a></td>
<td align="center"><a href="https://www.uusexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/uusexdoll.png" width="80"><br>sexdoll</a></td>
<td align="center"><a href="https://cutesexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/cutesexdoll.jpg" width="80"><br>Cute Sex Doll</a></td>
<td align="center"><a href="https://www.uusextoy.com/best-pocket-pussy/"><img src="https://sweetalert2.github.io/images/sponsors/uusextoy.png" width="80"><br>best pocket pussy</a></td>
<td align="center"><a href="https://www.lovedolltorso.com/female-torso-sex-doll/"><img src="https://sweetalert2.github.io/images/sponsors/lovedolltorso.png" width="80"><br>female torso sex doll</a></td>
</tr>
</table>
<table>
<tr>
<td align="center"><a href="https://www.lovedolltorso.com/female-torso-sex-doll/"><img src="https://sweetalert2.github.io/images/sponsors/lovedolltorso.png" width="80"><br>female torso sex doll</a></td>
<td align="center"><a href="https://www.mymasturbators.com/"><img src="https://sweetalert2.github.io/images/sponsors/mymasturbators.png" width="80"><br>male masturbator</a></td>
<td align="center"><a href="https://www.buypenispump.com/"><img src="https://sweetalert2.github.io/images/sponsors/buypenispump.png" width="80"><br>penis pump</a></td>
<td align="center"><a href="https://www.bestrealdoll.com/collections/us-warehouse"><img src="https://sweetalert2.github.io/images/sponsors/bestrealdoll.jpeg" width="80"><br>BestRealDoll</a></td>
Expand All @@ -111,7 +110,6 @@ NSFW Sponsors
</table>
<table>
<tr>
<td align="center"><a href="https://www.mysextoyguide.com/"><img src="https://sweetalert2.github.io/images/sponsors/my-sex-toy-guide.jpg" width="80"><br>My Sex Toy Guide</a></td>
<td align="center"><a href="https://sextoycollective.com/"><img src="https://sweetalert2.github.io/images/sponsors/sextoycollective.jpg" width="80"><br>STC</a></td>
<td align="center"><a href="https://doctorclimax.com/"><img src="https://sweetalert2.github.io/images/sponsors/doctorclimax.png" width="80"><br>DoctorClimax</a></td>
<td align="center"><a href="https://www.bsdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/bsdoll.jpg" width="80"><br>BSDoll</a></td>
Expand Down
45 changes: 42 additions & 3 deletions cypress/e2e/inputs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ describe('Inputs', () => {
})
})

it('browser validation + browser validation message', (done) => {
SwalWithoutAnimation.fire({ input: 'text', inputAttributes: { pattern: '[0-9]+' } })

Swal.getInput().value = 'a'
Swal.clickConfirm()
setTimeout(() => {
expect(isVisible(Swal.getValidationMessage())).to.be.true
// Chrome: Please match the format requested.
// Firefox: Please match the requested format.
// Safari: Match the requested format.
expect(Swal.getValidationMessage().textContent.indexOf('atch the') !== -1).to.be.true
done()
}, TIMEOUT)
})

it('input email + built-in email validation', (done) => {
const invalidEmailAddress = 'blah-blah@zzz'
const validEmailAddress = 'team+support+a.b@example.com'
Expand Down Expand Up @@ -570,20 +585,44 @@ describe('Validation', () => {
}, TIMEOUT)
})

it('default email validator: test@example.com', (done) => {
defaultInputValidators.email('test@example.com').then((data) => {
expect(data).be.undefined
done()
})
})

it(`default email validator: o'test@example.com`, (done) => {
defaultInputValidators.email(`o'test@example.com`).then((data) => {
expect(data).be.undefined
done()
})
})

it(`default email validator: invalid email`, (done) => {
defaultInputValidators.email(`invalid email@example.com`).then((data) => {
expect(data).to.equal('Invalid email address')
done()
})
})

it('default URL validator: https://google.com', (done) => {
defaultInputValidators.url('https://google.com').then(() => {
defaultInputValidators.url('https://google.com').then((data) => {
expect(data).be.undefined
done()
})
})

it('default URL validator: http://g.co', (done) => {
defaultInputValidators.url('http://g.co').then(() => {
defaultInputValidators.url('http://g.co').then((data) => {
expect(data).be.undefined
done()
})
})

it('default URL validator: http://foo.localhost/', (done) => {
defaultInputValidators.url('http://foo.localhost/').then(() => {
defaultInputValidators.url('http://foo.localhost/').then((data) => {
expect(data).be.undefined
done()
})
})
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sweetalert2-uncensored",
"version": "11.10.4-uncensored",
"version": "11.10.6-uncensored",
"repository": "alexiscirmi/sweetalert2-uncensored",
"homepage": "https://sweetalert2.github.io/",
"description": "SweetAlert 2 without protestware.",
Expand All @@ -26,7 +26,7 @@
"rollup": "^4.0.0",
"sass": "^1.55.0",
"stylelint": "^16.0.0",
"typescript": "4.3.5",
"typescript": "4.7.4",
"vite": "^5.0.0",
"zx": "^7.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/SweetAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,6 @@ Object.keys(instanceMethods).forEach((key) => {

SweetAlert.DismissReason = DismissReason

SweetAlert.version = '11.10.4'
SweetAlert.version = '11.10.6'

export default SweetAlert
2 changes: 1 addition & 1 deletion src/buttons-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const handleConfirmOrDenyWithInput = (instance, type) => {
handleInputValidator(instance, inputValue, type)
} else if (input && !input.checkValidity()) {
instance.enableButtons()
instance.showValidationMessage(innerParams.validationMessage)
instance.showValidationMessage(innerParams.validationMessage || input.validationMessage)
} else if (type === 'deny') {
deny(instance, inputValue)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/defaultInputValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
* @returns {Promise<string | void>}
*/
email: (string, validationMessage) => {
return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string)
return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string)
? Promise.resolve()
: Promise.resolve(validationMessage || 'Invalid email address')
},
Expand Down
Loading

0 comments on commit 9ef9ea3

Please sign in to comment.