{"_id":"@ahmard/modal-helper","_rev":"7-03a7b0cabae64cd3bf46a0768f679f70","name":"@ahmard/modal-helper","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"dependencies":{"jquery":"^3.6.0"},"name":"@ahmard/modal-helper","version":"0.0.1","description":"Bootstrap 5 modal UI helper","main":"helper.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"author":{"name":"Ahmard"},"license":"MIT","bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"homepage":"https://github.com/ahmard/modal-helper#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"a1847718adde5ff42f619a4e301610fb7bb00af4","_id":"@ahmard/modal-helper@0.0.1","_nodeVersion":"16.7.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-S+zz+x7pcUr1pSjDEOG/Pcu+65cV+uinfZnPKlvQb6ozh6Mq5aHIwTt+05AspwEonjIGED7Bz56/aTZR5M5+GA==","shasum":"cf1bf976124b0cd72e2eb51db4077df14cc959fa","tarball":"https://registry.npmjs.org/@ahmard/modal-helper/-/modal-helper-0.0.1.tgz","fileCount":3,"unpackedSize":9154,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALAPEN54INTZvauXg/SSO/uDhZPDZsrLHSrUmVZoYQYAiEAr6VFUXTf3R3hIar0A++lCoGyn+f7lUhRLKScmWHS9b0="}]},"_npmUser":{"name":"ahmard","email":"ahmard06@gmail.com"},"directories":{},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal-helper_0.0.1_1635619363115_0.7628799662505803"},"_hasShrinkwrap":false},"0.0.2":{"dependencies":{"jquery":"^3.6.0"},"name":"@ahmard/modal-helper","version":"0.0.2","description":"Bootstrap 5 modal UI helper","main":"index.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"author":{"name":"Ahmard"},"license":"MIT","bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"homepage":"https://github.com/ahmard/modal-helper#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"0e26b4ec8de9c25f3761f2c775ebd56bf838e3f8","_id":"@ahmard/modal-helper@0.0.2","_nodeVersion":"16.7.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-XdwHqOJCjoq+SXRJIn5z0jVyNIJUHPhg8qx5gAgE6MZf0Aj66xv1qz6l0zYZx8KX+mU1SE4Uirniar4hnM16PQ==","shasum":"c5ae57dddf65bdbd4d362ff0dad10f0f6eb8c695","tarball":"https://registry.npmjs.org/@ahmard/modal-helper/-/modal-helper-0.0.2.tgz","fileCount":3,"unpackedSize":9060,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHWNilflwKOT6O3wCWiePYlxFS0scWwjKvmu75JnL13FAiBm+rAw0Lhen/sSRqHpAWjjtbE07DqPXdDULjH1P4kxRw=="}]},"_npmUser":{"name":"ahmard","email":"ahmard06@gmail.com"},"directories":{},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal-helper_0.0.2_1635620408487_0.05894319160856032"},"_hasShrinkwrap":false},"0.0.3":{"dependencies":{"jquery":"^3.6.0"},"name":"@ahmard/modal-helper","version":"0.0.3","description":"Bootstrap 5 modal UI helper","main":"index.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"author":{"name":"Ahmard"},"license":"MIT","bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"homepage":"https://github.com/ahmard/modal-helper#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"291329cf0fd734b198b05b7498eef8cbe2a4dc8c","_id":"@ahmard/modal-helper@0.0.3","_nodeVersion":"16.7.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-J3vOYIwKVUMmsZzHikHQKTy4t5LENdhmYN/uU3sRUxwvDNdf7wQXdzLLdmb8DWuI/o00tsfjcC2aUdN6fQz2CQ==","shasum":"5b28260074552d3967dcc1943d85048b171206c3","tarball":"https://registry.npmjs.org/@ahmard/modal-helper/-/modal-helper-0.0.3.tgz","fileCount":3,"unpackedSize":9028,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0qE7ho0OckYbNcWwe/7+NjPD86e6bLI24jJ1Yj0X+fAiBaAqOBjvmpSdQe5BQ5H5oyxdRWCP3oFC4aj5lSGwc0fQ=="}]},"_npmUser":{"name":"ahmard","email":"ahmard06@gmail.com"},"directories":{},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal-helper_0.0.3_1635622460793_0.9293522197602149"},"_hasShrinkwrap":false},"0.0.4":{"dependencies":{"jquery":"^3.6.0"},"name":"@ahmard/modal-helper","version":"0.0.4","description":"Bootstrap 5 modal UI helper","main":"index.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"author":{"name":"Ahmard"},"license":"MIT","bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"homepage":"https://github.com/ahmard/modal-helper#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"50c08f410835dd90cfe5faf8a72107c2da5e392a","_id":"@ahmard/modal-helper@0.0.4","_nodeVersion":"16.7.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-aHT5axlJM9l4zNdjXYxvq1SNpyH8bLiSGDJh3V5LYotJYd4xEbTBEdbjqwZuitywLFdO4P8tZTDbOucHm9vZUw==","shasum":"793eb9302ac4582a8b26f4409c4cad9385bd155c","tarball":"https://registry.npmjs.org/@ahmard/modal-helper/-/modal-helper-0.0.4.tgz","fileCount":3,"unpackedSize":9099,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBATo7qKh+XsmaLIJGVfVvROieH+KHCTou5ayJOdRnNgAiAtt1HPHuNeoVb5Aqyc1KBRI3Z56/MgYdL8Y7uhziwfAA=="}]},"_npmUser":{"name":"ahmard","email":"ahmard06@gmail.com"},"directories":{},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal-helper_0.0.4_1636221364486_0.7077060412341081"},"_hasShrinkwrap":false},"0.0.5":{"dependencies":{"jquery":"^3.6.0"},"name":"@ahmard/modal-helper","version":"0.0.5","description":"Bootstrap 5 modal UI helper","main":"index.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"author":{"name":"Ahmard"},"license":"MIT","bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"homepage":"https://github.com/ahmard/modal-helper#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"488f6b9edf7b3ea87d24b54c56eac9c0cf7a04af","_id":"@ahmard/modal-helper@0.0.5","_nodeVersion":"16.7.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-Ao/P0tnsJmGyaK+gOWBaCdAbwS6NhFopsEzfcmNCzO9G+8HRj4DoNHts6YxR8Bh5sN0oLwfF+4vlIx3d4WDn/A==","shasum":"78788b0c9d2f9c25fbc166c7008fa62321f0581a","tarball":"https://registry.npmjs.org/@ahmard/modal-helper/-/modal-helper-0.0.5.tgz","fileCount":3,"unpackedSize":9174,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0GmYRZbphHC3kcfAcmLFZm+wHeBdoopFdWrmqlECZJgIhAK/FINSod4W0G039Ib69Deb5OCzmCBjED6YPNkMI0ZT/"}]},"_npmUser":{"name":"ahmard","email":"ahmard06@gmail.com"},"directories":{},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal-helper_0.0.5_1636233188823_0.17880906109893413"},"_hasShrinkwrap":false},"0.0.6":{"dependencies":{"jquery":"^3.6.0"},"name":"@ahmard/modal-helper","version":"0.0.6","description":"Bootstrap 5 modal UI helper","main":"index.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"author":{"name":"Ahmard"},"license":"MIT","bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"homepage":"https://github.com/ahmard/modal-helper#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"f4eac025f0f69e1000de61c912c0a37e02c8057f","_id":"@ahmard/modal-helper@0.0.6","_nodeVersion":"16.7.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-I5stTCo1Xh8lAC82fTYhgZGgvxZUzAiRozgQelqZJHz2aeiw9s4Ygg4TFNnkuB0NH1BM1CS0P1keOwe8vZBhsQ==","shasum":"3e0ac4f3e218299660a486805d459c4a9ee969e3","tarball":"https://registry.npmjs.org/@ahmard/modal-helper/-/modal-helper-0.0.6.tgz","fileCount":3,"unpackedSize":10583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwwLrCRA9TVsSAnZWagAA2NQP/itiinV/OJPPMv6uoGpF\nO4/MBxyxXVv9IteEl+2QVeVZ7tZB1xmsN2O3NgUVC1DMWB0hOTWy2nNw9IRO\n4y0EzYqCKztF42bm5dQ5ARWDjNdPFHFFDx83Ipikkf3WJUTONmRQqcSh3TIm\nkInytVyzGnhfYdS86fSuL7iy+PvWrTf7Pb8jQGLpq0kZU0lMq8GPnkRRzIDj\nrKWyymINsONSSlQuXfoUQykYbTSCqz1TsmOMZBmPNmx5xmWQ/Kt+MocLH+86\n2MKIp//5Bh1c2UNm4akuE9NXKE2oyrALZ3IkerIikIHjiJKDCdh6vWvkoxJU\n8O6ah8hPURre0+VV9B8EX87ALKQsQ3zMh7hoXptd4GqWH4E3+zkLNwfXHK8b\n01NYdg9CxF9qY5F6VjdylVwiuc8jrIzCPF7dpO7XoajCPkJ/OqVTssRIXnqH\nfJFtPOBm5ko2sXS+et3F1A/E3FWMgEpCDAaBPcXu3KXPvlqjoFiSPuVAy4K6\nx+JbIHML/XnUJVFaRRJ3Y6cuFXn25Q7QVxjY122Y4VYiKpwzGWYWtHwW6Utk\n4WsUKyUH97CKQoRHTmRy1Fyljo3BS5Pd1odNg8wGYzDjGyrtj1rQfkPDA80/\nVhOx639e45rhnpAO9nfdjHUOXu1H2qHJtXoFSyrjfEPmhlHHfeq8STOX750K\nyFah\r\n=jJrt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3U4MQ25JVFZSuQZkePhI7y81LotgWGO7RYb/wSwixSQIgFNkwVFoYeS4C1wQiLJKwsszkFnRvqFQP2ejq/tDEf6A="}]},"_npmUser":{"name":"ahmard","email":"ahmard06@gmail.com"},"directories":{},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal-helper_0.0.6_1636279774009_0.684464750754449"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-30T18:42:43.051Z","0.0.1":"2021-10-30T18:42:43.231Z","modified":"2022-04-04T12:12:27.603Z","0.0.2":"2021-10-30T19:00:08.617Z","0.0.3":"2021-10-30T19:34:20.948Z","0.0.4":"2021-11-06T17:56:04.615Z","0.0.5":"2021-11-06T21:13:09.011Z","0.0.6":"2021-11-07T10:09:34.153Z"},"maintainers":[{"name":"ahmard","email":"ahmard06@gmail.com"}],"description":"Bootstrap 5 modal UI helper","homepage":"https://github.com/ahmard/modal-helper#readme","keywords":["modal","bootstrap modal","bootstrap 5 modal","modal helper"],"repository":{"type":"git","url":"git+https://github.com/ahmard/modal-helper.git"},"author":{"name":"Ahmard"},"bugs":{"url":"https://github.com/ahmard/modal-helper/issues"},"license":"MIT","readme":"# Modal Helper\n\n[Bootstrap](https://getbootstrap.com) 5 javascript modal helper.\n\n# Requirements\nThis library requires\n[Bootstrap](https://getbootstrap.com) and\n[jQuery](https://jquery.com) to work\n.\n# Installation\n\n```\nnpm install @ahmard/modal-helper\n```\n\n## Basic Usage\n\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.setTitle('Login')\n    .setBody('<b>Login Form</b>')\n    .setFooter('Footer')\n    .show();\n\nsetTimeout(() => modal.hide(), 2500);\n```\n\n## Sizing\n\nWhen setting the size of modal, the following values are expected: **small**, **large** & **extra-large**\nor you can provide **sm**, **lg** & **xl** of course\n\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.setTitle('Login');\nmodal.setBody('<b>Login Form</b>');\nmodal.setSize('medium');\n\nmodal.show();\n```\n\n## Fullscreen\n\nWhen providing modal fullscreen value, the following values are expected: **small**, **medium**, **large**, \n**extra-large** & **extra-extra-large**\nor provide **sm**, **md**, **lg**, **xl** & **xxl**\n\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.setTitle('Login');\nmodal.setBody('<b>Login Form</b>');\nmodal.setFullScreen('medium');\n\nmodal.show();\n```\n\n## Options\n\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.setTitle('Login');\nmodal.setBody('<b>Login Form</b>');\n\nmodal.setFullScreen('medium');\n\nmodal.setOption({\n    backdrop: false,\n    keyboard: false,\n    focus: true\n});\n\nmodal.show();\n```\n\n## Events\n\n**ModalHelper** makes it easier to work with **BS** event system too\n- Adding Listeners\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.getEvent().onShow(function () {\n    console.log('Modal is showing...');\n});\n\nmodal.getEvent().onShown(function () {\n    console.log('Modal has shown');\n});\n\nmodal.getEvent().onHide(function () {\n    console.log('Modal is hiding...');\n});\n\nmodal.getEvent().onHidden(function () {\n    console.log('Modal is hidden');\n});\n\nmodal.getEvent().onHidePrevented(function () {\n    console.log('Modal is hide prevented');\n});\n```\n\nBoth of the methods above accept second parameter **fireOnce**\nthat indicated this event shall fire once, this parameter has **false** as default.\n\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\nconst listener = function () {\n    console.log('Modal has shown, and this message won\\'t be showing again.');\n};\n\nmodal.getEvent().onShown(listener, false);\n\nmodal.show();\n```\n\n- Removing Listeners\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.getEvent().offShow(); // Remove \"showing event\"\nmodal.getEvent().offShown(); // Remove \"shown event\"\nmodal.getEvent().offHide(); // Remove \"hide event\"\nmodal.getEvent().offHidden(); // Remove \"hidden event\"\nmodal.getEvent().offHidePrevented(); // Remove \"hide prevented event\"\n```\n\n## Miscellaneous\n\n```js\nconst modal = ModalHelper.create(jQuery('#modal'));\n\nmodal.setScrollable(true); // Make the modal scrollable\nmodal.setVerticallyCentered(true); // Make the modal vertically centered\n\nmodal.show();\n```","readmeFilename":"README.md"}