{"_id":"stimulus-flatpickr","_rev":"37-486933e94d66e8abe05e1b038bb61b06","name":"stimulus-flatpickr","dist-tags":{"latest":"1.4.0","beta":"3.0.0-0"},"versions":{"0.1.0":{"name":"stimulus-flatpickr","version":"0.1.0","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/flatpickr_controller.js","source":"src/flatpickr_controller.js","umd:main":"dist/flatpickr_controller.umd.js","module":"dist/flatpickr_controller.m.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"gitHead":"846901005c8df8b40cc0f08ddcb62d16a367b317","_id":"stimulus-flatpickr@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-+MHzhVJNVQm0Q0sxP4atL8ssWiKOHalxYJ71tAG+QapMZ3uimZrgEOP4VkY8YSFSRTrZy3hd16VDMQ3EQRHEzQ==","shasum":"047c551594a1ddfccba5ef40b5bb496e02c3ac40","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.1.0.tgz","fileCount":13,"unpackedSize":112301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7gqQCRA9TVsSAnZWagAAvX0QAJCu34hrbShNiM0G4ZA8\n0EF//3oi2nSjvtyVqw54UMxpn4G+Xn/SyWxlHAcZauIjS6xyrWa7MW726VJ1\nhcsow0Be9Kxck5nJqXczxh94JMoaRSKYkK90hrtXPNITsL8txm4lZJG3/FNf\ncKhUIo/+4Yq7O4FkILZ3yLpsBL1pxx6GF2xBFX6Rd9VjCdUVVGR0vPpfoykt\njUgGPzN4Q43BCfVgxoPS53lSVv5/GPFVys4VSaICqVyo5uk365EDQfUgrIc6\nnAVs3lD/ZeGECv4c1kZVw5e0QnP3DJQkGcCiePLfD/dFg/jna9ktIIBY+j8c\npcobUTday1qo4Id1s74jbAQxuSXzU4DYetSELIKT6Clco5xeEVzhqyfKLnKJ\nTN6LDULIZFvIZ9nA3mMRnYxLrvDSSsG0kbQkEgSQMWoe+X4U4dy/YZJrB0Qx\nTziZWnA61mjbnXZUqoYO0IA2GmdsabZDpV1vZRBcqlIABYVNiXBZ62uOg3Ph\nGeG9MP4SS7bU9qxd1GlDd/eu6Y9jWP7T/rKEJUuqqvrBl3epWBXR+ZPswreO\nAjL023/IjpaUziZxgAmI3qhUsM7azSxytVaXxv6e2IjI7OY1tvojTNdw7k+4\ni6xZzcJtVpd+MotrLrJ4lAADfZHqxNQ9X0jbuNp1oBqHmJwr13d8uoaX617I\njKy1\r\n=Qsvi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVDcw+LgTw4iAW1sMVwYPedfTyg4cLbGed1I7E70rwvAIhAN8aZo2saMwJqtou/rDRiGBZYSIOyQ/zcCWukPsOIoek"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.1.0_1525549711342_0.5255314753576978"},"_hasShrinkwrap":false},"0.1.1":{"name":"stimulus-flatpickr","version":"0.1.1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/flatpickr_controller.js","source":"src/flatpickr_controller.js","umd:main":"dist/flatpickr_controller.umd.js","module":"dist/flatpickr_controller.m.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"gitHead":"80e2f27d6e72a5a24f228273c4b4a9c465d01ee6","_id":"stimulus-flatpickr@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-txVSMrSxsfoNt6wlEKKvFSuAnRESfPXcLE2Yq0I4fXFzz9506xTGzDDEomI/Bd5FEkeVd+C80EshyxLDATrtxg==","shasum":"a5840c1cbc1331d1d955c6cef67d79b7d666b3b2","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.1.1.tgz","fileCount":13,"unpackedSize":112307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7g40CRA9TVsSAnZWagAAJS0P/jw57FknRiihkPcLfoNb\nhXaLg3RJQ1/yvIXmiEKCX9+lTnmVFpqHRRbDqTybMXZjp7Ku5phg2dxVYFdj\nOCgR4FB9cbbgaU3JXLlnfj1xmcIkQ38a0l0R09h4FcHHDXB7IF65IWIhH3bV\n0ybuPMGGeJftWX01uUXdPRKuLCGMQRdL2eXQA5+dzghklk4Ii4+jUFps6/V5\nLyi5jfQQ0QscBnzWzfW5uaN/YrYys66/hiPa6QZEYP3Cw/4r2y1UnNnjm1S0\nE4U0iBiJGEIMo1W4wh+xYsp1Byvne66Yqn9XPpxFnJZbKJwGeQHU0BvU2UWG\nvGRWS19OHB/nfb+/O4vYi52AFazHOYeUFCKAenlH01KlewypA6q4McZt/QmT\nF1Oeod9wqkaOudIHd6g0qBhNLCt54NhcHcUWgxOr0pau31kBX27WhexJ1SGg\ncB+5aoyl0gI/ItnJdXExbYbfEO62W7ywsMNtyxc9mUIjDD4JLAlOTZcZUZ6b\nL2DQD377G42VkRWWo4hT0BiQdp1VkOgFKrdQbRx7SFM96DrNVhtUQJCy131L\nTDTp16b/be6SOX26H9yXcQRwWwMzAIIQo0uhwjLQp26DTzGnSTvL5UbZr5fb\ndUUXCloCaAbZTInxQQJ+AhMiixoI8FKDcZyfx2U1vqGMmh6+9qY7gp76EHud\n+V5e\r\n=RVrP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7m1Wn98htUccRRo29keFA62N0pg2Pl9O6AwhFdaj/vAiEA60vjtxkvQIxsZivTJ49Dc5HZm5VQmo6yqpUbspGiPy8="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.1.1_1525550643836_0.16832253303467093"},"_hasShrinkwrap":false},"0.1.2":{"name":"stimulus-flatpickr","version":"0.1.2","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/flatpickr_controller.js","source":"src/flatpickr_controller.js","umd:main":"dist/flatpickr_controller.umd.js","module":"dist/flatpickr_controller.m.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"4533d5794d0ade887cc178cd0c4a82458058fa85","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.1.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-zAtgX5ru2wGMh+uMAKJwRtU06d2BNviIAxSQG65b/iUibGqxoMkYUaHjVKN0sj4+aZ9zoHmwmPiFOBWbPi5VGA==","shasum":"367a13c29e2e9fbac17274be77c0ccb677226cf1","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.1.2.tgz","fileCount":14,"unpackedSize":113861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7hJECRA9TVsSAnZWagAAK+QP/AlviOHbpY/grNr4oX0P\nL9QrTfxCsSVJSirZUr3tNhOiu41OY8xyOtMcNnNentFToerjwBhKIRUKQo0Z\nEYi8jCrbuzyGFJOMcHjzMuZEVGocZMjUsSNtw8LbhClVJjsbO5o/Z80XQxAz\nxT/KzKBL4cMmQKTI9pmskAtbeVgg5yyN+nscySUbqEkwbJw85qcnc+flOXT2\nyxmEnQPXsLsqYrfQenROBr6YmCnmIrI2KA63jMCE9AxeyjBabIM2YT2JTnKx\nEQLVRNbsN0Xc1ZseFo5MAvciwil4AWVn/t/MHXhHBUMA9MDVXRa0mkSYl/fv\nhbp7KXwoLlv+EAVn7qumuX9C3SrRfyGgGGlxd2NGhLZt/VpaxW/UTzwKOkMl\nofjIIUiMjWpIBQd9G+fOJFtHgN216wCKA5lQVfrgBHGE7QQajKjSKSXcCelE\npAYoLcD5vzJlQ47LHXRtbxJcs9+pCeWq7ytydAkq8FLI3utYEyAN/XiKZP6m\n+9TVojzmt/ut2QKaY4ne1cVSEpCa+jKJIH7YOXs/hHXgqnx00H/3iCR7DA3J\nOb1qnK2P06v1PEwHUbHIEY+58Mm6zPNV0JcprKvU44koOl+xGOuOodYvV3ip\nPyP67dcX2OtFkkYQ8L3vVAAkLIaarSXqmPmOVtI/0BbZERew9UAyyvK8k+l4\nCynQ\r\n=zMA3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC//Ipg/PdlAvjyvWpZRVHXu8f2FcnpWO1z5LOn4hm1oAIhAOFhlOnLI5mUiS3zk9uEtuneseaQx7+3YELXIuyz2qU9"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.1.2_1525551683062_0.878695512606035"},"_hasShrinkwrap":false},"0.1.3":{"name":"stimulus-flatpickr","version":"0.1.3","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/flatpickr_controller.js","source":"src/flatpickr_controller.js","umd:main":"dist/flatpickr_controller.umd.js","module":"dist/flatpickr_controller.m.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"8c40b33a0c8e192ba316d523c2ebfb88515433dd","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.1.3","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-BbswqDjQgkHBow38l1U6zCMMX3b0qUD+wMhvbxFd2nsXmFGsREFOieWRfJ/mTF9Q10G4Ic+XKPbb3v3ph9V8+Q==","shasum":"e442c44811cba8f249bc7d7dcc51894befb99b15","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.1.3.tgz","fileCount":14,"unpackedSize":113861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7h30CRA9TVsSAnZWagAATcgQAIo6Pbck1yqOoRFnYlgP\nvkxHr3FnV72LEThTEEParW7cyHz0hk7d/70QDUc0R7w9QMBsKD2CZzbEufCw\nYPI2Zm+k8mxH7rY31dsdLDMnRSmwlZVLuDzDWe05lR323THvFWobNMPt8qbE\nDB87leW1n6PKoEnvrwhphFe08cCuPVJWHihbTFFMSB6rq27T2vHALdaHiDoe\nJsx7Bo91Jic6FNYqflqmsIB1xlj7tiLb5DG/wVU3N3zm2aTGVcevSJUem0yh\n3TmFK4yXdxw5O0PNA0wAsPQ3KP9fanKf5Qr7wQJMiurEk9LuRRLl/UdSaW4h\njjxkTiMRh92lKdN11Allq67omMUxddpcsy0zh/d+jRZmdpztoNzKXnFoa9QM\nQpJYWj2b0L5DRoVUuA+qJhC/7kwLq9qho0WDjyF7ESbuAMZTYDUM3x27XVEL\ncO108co6BfQcXg5dQfUKoMVvyNuZ6oF3Bthi09wgg/FNe/DeuED4Iczas7Ou\nOLwvKBVtkIU2trPjs6amfYlvFJV5KEGl7BwYBIZhfcbIwro2NxejQOTg5Kzw\noD7WvtTQlnkflrSyOdLSk0c4pCddfRecdKN5O1WEOW4j5v0eVa8Tz1qd5RC8\nrOR4Xpk37B1cFaXFjpVcMV/DR3BFBuiqZFJJNMGcnN7Hvs3D+Ab7K2k1R7i5\n2fgm\r\n=a/Jr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcWtTjzChO2fuUhdO7BPF2SZlHOvuWgwCPqFqXcl634wIgQhUm5gEbAUxo8oPWMILMQxuMQ2hKmzb2HT76ggGLkgI="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.1.3_1525554675537_0.7043439215056153"},"_hasShrinkwrap":false},"0.1.4":{"name":"stimulus-flatpickr","version":"0.1.4","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/flatpickr_controller.js","source":"src/flatpickr_controller.js","umd:main":"dist/flatpickr_controller.umd.js","module":"dist/flatpickr_controller.m.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"f64adce8452eaf4328f9e956804f5ba3eeea9c7b","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.1.4","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-+EgAaeRsuSRoH6my4sz8t/HESXJgIqUrwN4YjeDkEtRTjZULCJM2tL2LT2YnpJU91R/lk3ZcFAeO7tcRY3r+/Q==","shasum":"e96ab9120841c1611a1ef6d9d81e0742657744c5","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.1.4.tgz","fileCount":14,"unpackedSize":113861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7h4YCRA9TVsSAnZWagAAJLEP/2pr1nuy1b0HNmCaMWS4\nNdpHlbidXV/mNclPcFZuoBV92gmpqE7aZD/IkWLlhSfCh/YK8YUsJSD47900\nvphyruaoJU8KDeuAo5wAeEYjbYvBLku71uzKJkgul+pvU4c0uRBLOkBnIJo1\nstk2UoTofNMTSOUsE2PNeW1KAQC/GZy5c6E0JLXuqB3fB59QHrfcZVBfwHa4\nCTlyP0ShNfgQgsPisEq/BvaYZVKjxkF+IybmRSLkZJTm+IPMOovIga2TrxGt\nFEM51PL4oAgHRR+hYPvdlfjcuTFanQvsBQ/7mSsu7iO4p+qM/TTp8iVeFjWD\n8G352qPobcJ4cGxMgAWTuOxHacYcKbNFo2GKCLzOMT4UVldGNaUS1NozrlT1\nSXX5m2FtKDO+4o0XsMelFjhKoyaxlWiodKYkaInFEphLluexa7Q9WDrFoz8B\nGmjTBO5ThwB7Goaz7vSjJGSfx3p6fZSigisLoRI3SX0i9nWaN6M4DEAVkRkw\nwYfFoAzovSVfGkebV18hgUpNqNxuopBsfGC6UmpXhbZCBYDhtpLtNiBMfQVw\nNLf7jXoQyGheUCWl5srLKXeK+XCod5lyQ0fB8aV3SGoyF8VgzUOlRz9qRMCK\ng9vpTaU/sD2BSkRcGqSA/q9ZMR+arMIlEfnziYUOXtDa6VBmg2awRe7rby5U\nsZ7d\r\n=Df7f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/sfh1Sx5ibd2yOujBl5b40yujxKAr9GzUMWbCLI4vxwIgHN3+4hElw4CoZ5TM1j7Eq5dAsLUG9iKbOiVIM5gaYv0="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.1.4_1525554711666_0.7846730096557355"},"_hasShrinkwrap":false},"0.1.5":{"name":"stimulus-flatpickr","version":"0.1.5","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"7086b107a9a7c3f4e2fa01ad046419d030fa080c","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.1.5","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-eqP6Smpm6LbWoRZjdkqSuAuD35GT43FZlX4ix0cdU0z2DdZnL21gaWZyDq/jELWIEssm3GnkucJkPk6h/HJGGw==","shasum":"bcfb18abd19b1191ecfa2bf87e1857dcc1b64033","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.1.5.tgz","fileCount":14,"unpackedSize":113743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7iDxCRA9TVsSAnZWagAAe8YP/16enPiCy8tob1kUNI1y\n/Dyts4trxe+mDtAKSscGkujhgcD5LTNBYiYIuEjc2kK02jdf3HzgZZGGz4CU\nHPFFls5ntHYC0IDjj+XEstNiKIc6fAcx5DypA+TTwwD7aHPCBhcDKWeE6cCG\n65YasaDscuOFfN6xoR3k0mH/oSNk7jvYNwEE1G3VC9XVtEk3TICvBvwxwNw4\nXaKQQ8xJk9WQEqoyj6wrA0Epic3dUaumElqoUCNItHOUTVH9eGli29mO6AuE\nhCaQk5Zm12agPhAS6h/rd7mhazknJh3HlN4hKEaJY4tEuIgGFYqtOrtvEmdW\nypS1Jv9UMLdPiEg4+d1h5oDuUCJW0kfnOoo/OmlB7IVA3dJ8Uz6VZPGAJ0x1\nf/MWiL1bgbzU33frU7tJTbdcz6Ubrv+qeIwO3G/RgdTr+w3MW7ZoCTJimydr\n7JNFd3Z/i8mVKIUQtajzRhmlb0ZxwNff9TQc+X81tnkGcIQd5nZcjXMUn7El\n6ODN96wPTsaleQGx3v9YZCYOuvgAhC9Lb74bPwt31mTy8Gt5X0OOGdEiHZ80\n5ydJpvY6GnSAWOMFdaJtjHcWk4vSmxKDiNoXjjDT3UlXQfEm4mvzbSybgg1p\n3tMy1lxsAWKLivx2D32mc7yXZyIUptdUddMq/XNlU2GyXsRBxl5ESLWi+2/0\n0kh1\r\n=GKky\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkv1RqMD/HjXMB2aQ0gGbrDQlWlekhj0jleOOqHQLZegIhANTSRtoYetNPwjqqrpLocNTKdzE37Lt+Ugen1z5IDduT"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.1.5_1525555441070_0.4992913055111481"},"_hasShrinkwrap":false},"0.2.0":{"name":"stimulus-flatpickr","version":"0.2.0","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"2906c876c091c0884c067d522adcdf65e50ac531","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-4vXAieWSkJxtgcFT34nkQjoZiSocadTDb2hhRAK/BVkQgDPcoM8tZo7qU9loYNGwokh3zI12cjxYqLZoWkUe+w==","shasum":"ac0cad57a4c688fe6ac41b14bca4c2d6ad376292","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.2.0.tgz","fileCount":16,"unpackedSize":149802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8HymCRA9TVsSAnZWagAAdXIQAJ3Xx1PG9RFypju1qIv2\n9/16k07+aDLWYahr2Z4NvC8GAl9me66Zr1GnHjhr7wmaGJKPaS6RWDJqY9n/\nAjZKSxhEoEO5OM8q5vl4PwCst+1hqVdEYV4CizaNzEEoegXv6iciWM2vHpND\n0/RwfhdtqjK3oxB+lSUOOFnXjDhxfJFpQlzBbIIjKblzBrXTArno3FULgDez\nSHzGbM4ws1ExkCuHn/fFTLsLxv4mIf6dIgezeUO3rcn6QWRjl4ehQl1lbi4n\n3pTSVI6hbxb99wemoivrjmzkMXwPNVOMk9Cqg2GeMjXvXD486SZ8oVD/In1d\nj/cQv79i6pJ78LLnBCeW5zGT8fsvqPGMTB1Mqvft1bsby/BjWOwh76swIQkj\nMquT4lvDDLzQsv7WE82CIDDlutL26eT/Ll+vY1N410sgwFYs9KiDDktvUnEk\ntonTsc/cdhLjBc4YZWkfMXD18dNrxjVfnyw3NIddxGTeoQJsnPSzREgWBvYo\nYwYT5sysT5Q79iYkxUDiSpINsdJndIgFgqCNCTqO1SIvF6+At16yvi9w5tuU\nqahOtfGJnt3C8s0NfBOSd4Qewrn553U5bNAxTFHsnBHIbY2H4nkvd0CMaqxX\n5axMs8kGYuhcoVF321j4G8+WT6//n/UNtoULK5ezjoU+z3UfLytu6iKoDT/e\nqhq9\r\n=e1zD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq87lVPpHtjemLOycn3KYJDdgfc0QP+e7rH6nTe/ZDYQIhAOWbatO0PP7hKGBQZwmWxaAaPrMlw4L30anxXN34F1l7"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.2.0_1525709988856_0.5119764565419671"},"_hasShrinkwrap":false},"0.2.1":{"name":"stimulus-flatpickr","version":"0.2.1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"bf0b69377799b923227836e36c401894abc6489c","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-dmPX05Nffbjf0wfneIaf+ipZre6ujIVDcN/o9f+PLWv3i5AZMUm1HsxbzaNTb6qbACPwAXcbVB2EhIH1ldQmhA==","shasum":"e4b0dc74bc826416971f6fb96a7015477c73426d","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.2.1.tgz","fileCount":16,"unpackedSize":145801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8IpzCRA9TVsSAnZWagAAOV0QAIaD694r8T3Q05DhfxqL\nsHb/Y+tUiw+FwVO2H/5oLOdWD47TXEMO6eE0CnM2JuOoeNMC/zy/x9bXBlgb\n7l/bEQ/SY1BycfHZU5PQ5L973SLFULI5l36xcrpOcoWQBLKIDsB6dTDWk51f\nASkFsgWr5tZ6Wg7TrxDjL/4O+Y2f6qxyCjGmXm4OoFI7stC/arRaGZ6lCwcV\n4qmQWNrmoeIeUv3CfF9zIL9TE4WAhEklAy+0/BhFZKusXOnYzMaumQnmI3jw\n0AKwEPmMposO2mCz0XsgI0bCPf2+o8vqn5mV7FuDRPdrQwWBb0AaxVaHeIys\noZix1myC6LJYgnsfEDiJiF6IWUSpi+iTwMHr7rvhUkE3/omzFg3FO3gE284T\ncir/ZoyPzHhsFM+U2tNdvoKCzSUAnYAZCWYgaBULwCAg5MZYGZoxT2n6wic+\nj6+BHormiUfL47kV9MsYDvqwi0Mz2rPFPK8MXQHnuN9Aw2KH3rD9dUubRV0P\nt/TxNxuv2j2DDXLwjdilykD31LcONQQKbNjIlK6KH1Vl84brVe/zyw7/LmgW\nvRK6vq8AuDgKfV/T+GzlbSdmINK3LM0Z+tMpgtP+TXxPJdbZIaeCfxchDXFM\nalR2gdZWhhDtBM0GKWU39ktDhWgvQ1PGZ9r1PNLf86N4kw8z/LxONcw7Tf7J\nRbqF\r\n=vvFt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3jWbBTxf60MjtB9Hv/VNR33MPG1qjyr7ULA5fPLasaAIgR+0TMga4kAUGauz1o1dhfL/vO6MKzGI98MM0KtspfrM="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.2.1_1525713522732_0.9177077955169237"},"_hasShrinkwrap":false},"0.3.0":{"name":"stimulus-flatpickr","version":"0.3.0","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"6f5a00d74f0a1e11e944f14a53f52a730ed9a709","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-1aHSmWaFWFAJzSbFfFSb7WQdoDXueUErt02LDUB6HbPp8AqIpZw038l6+ZV2WCBR4TT4StZnUsHp5YNrEiwB8w==","shasum":"2f938b378fff8b5302b03c78344c979706be8130","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.3.0.tgz","fileCount":17,"unpackedSize":151281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8VDgCRA9TVsSAnZWagAAFMkP/RbsjcDG9aBwZEOruEAJ\nNiKSyr1nieLK/lqi38FgPutnwwZEfECAzgSIOeC0DZnPL5tJ2mn0qQNI/B0n\nBNxWhb9IehXqIZDfVHzU1/sUqNEhHgi521vYx09dws4kiIVgN6fYxrd/YCsG\nEJlw22blAVJ7kRFb3MZepPN94tHWfpSfgaquilE9F25lpZPXRRS000LMdY1Y\nOmk6VwlA4jW8vyS1tTe3lD5o9TAIirEvLesTcxpQt8Htr1VfKk9qQxkib2Zt\nJDx8Ks4JKDgjKpSbYLpDyLD+dlIKMskc15WqNJMZIIx1AooK8FdD3jZU5GKo\n+FNeDaLn9lURszIbfgfhJO+eLdb/LoRqVfmKe9qXll9IclUe/Ac6qRymJyez\npEpJ+xg9lKrRRhrwILdxNq+w5cD+fVIui9kJsR0widGnKNMwWMmu5prDBxG8\nW2rZbJ3uNvy77cr8cFnVWE/4di1VKrzEb6J6bbHKFAQlC6ZCJ+fYd0QOl6hg\nfi/BG5lTTw8sk+QWmbMgN07FL8EIa9x8JSG5lWPmv8mWj8lFZ0LcfD4jOPcc\no60b3/da70v2n52ZdnhlahBBUQ69TG0qFALm+oQJ0lE0ktsOT7tKeiEoseVI\nVJoUCsqMJbReZeWUEFyOwH02mwvbtmX/78uK+Fkirh4C2Cgy02TvcDEkgduO\nGy8/\r\n=6BwE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHnORF8q9My+iYya9Om+SmK/MoFR/SQXKaCqvwHp1TFAiEArB4laB8R+hE7OmlYGAN6YXVZwfjEJ2BwSHxiWuE3lcw="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.3.0_1525764319722_0.5609815794924871"},"_hasShrinkwrap":false},"0.4.0":{"name":"stimulus-flatpickr","version":"0.4.0","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"readme":"[![npm version](https://badge.fury.io/js/stimulus-flatpickr.svg)](https://www.npmjs.com/package/stimulus-flatpickr)\n\n# Stimulus Flatpickr\n\n## A modest wrapper of Flatpickr for Stimulus\n\nThis is a wrapper of [Flatpickr](http://flatpickr.js.org/) for Stimulus.js. All configurations for the DateTime picker can be set directly from the `data-attributes` of the HTML. This makes it very handy to pass information from the backend to the datepicker.\n\nhere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_enable_time: true,\n      flatpickr_max_date: Time.zone.now + 3.days\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\nAn example of a Rails app showcasing a localized date picker with availabilities is available here :\n[Rails Stimulus Flatpickr]()\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project add the `stimulus-flatpickr` and `flatpickr` module.\n\n```bash\n$ yarn add stimulus-flatpickr flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new stimulus controller in your main js entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-black-fr.png)\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-formats.png)\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.currentMonthElementTarget`: The span holding the current month’s name.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n#### Properties\n\nComing ....\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  super.connect();\n  // ...\n  // Your connect code\n  // ...\n}\n```\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/adrienpoly/stimulus-flatpickr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","readmeFilename":"readme.md","gitHead":"7ef326f76934425f23164df846c220bc6f896bb3","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.4.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-VHHC0VlT1TkYjy6uj8pVVq5pxV8xa7l91Xo8Esvl8g0Ggjvk/sfekXDv4ZsxwSbj2l9mXJtB+uINLIGjCKoQuQ==","shasum":"0bf685b26c2efaabc5f222cd277797955f64d036","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.4.0.tgz","fileCount":20,"unpackedSize":218774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBfhCRA9TVsSAnZWagAA6u8P/0pBurC0yPSHOW4JPkL4\nlyIpgyYJ+r2gzb6Ye2lfsREScAbE2xt5iQSfZfSHGa3jVnry38FVTASt0Dgp\niJHmJp9hvWsW3/ee9cl2b/Lsr+Xj7Anr6p1squDpjNW0OPQcQHjbXabe4ovY\nzay/qwZa8vNrp/hpztBZdcJ+R7aPNpgEMtNWsEJK+GcRs0Ncu7RmlAuomu7/\nhT2gmwrCwnMVQuZcBrD23vFMPbZPrj285DYKD4q7xhhNlLyZHuGxD7gQRt7R\nKJJwLPzakZJsvQfLLM6U2ZBZ1Q8U3CBXWThoujBjn1tf3bAKQUZkCwx+lsjB\nEW3syFwf1fk0xehwwwOLp6FcikeRFbOiJdkn8Ee1iax7TQaQlL6yL+tvobWw\nAA25vMbb0EE6JH2ONs+ryPOWrV2a9gk+F+0+KqkquX/LsyS1PqIqp8TrMdYq\n2q40rUWr/LFM5nkzvvsnQkl9/MMjrpg1Lh8rOzarxXyjkgsa8ZSmNcmyYkpB\nPKYvfrQRijnJPywvi4Cx+ONsRtbvEwm9LfsgA5HE5mt27gZWZFHj/ez/Vlp8\nSEdsd+tbV1FrrEM8EEI366K81xD1kyxA8+LntcrRjJEUW3r4hilj6TQX4KHO\njf/1f4P5FR64/0+RlmapZZ86BT+ziaQUvd0ut2msPiL7JnO4bJHUvZ2YHF+K\nRH4Z\r\n=UBC8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxnU4qufP2GYYLZxjlfVhH9ee861kUeZ8lx5rn4nQULQIgNtiPIa3h756v3PPXVdIed/OXq706Ra74NaAnDJH+FW8="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.4.0_1535121377019_0.47869096940790357"},"_hasShrinkwrap":false},"0.4.1-beta.1":{"name":"stimulus-flatpickr","version":"0.4.1-beta.1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"readme":"[![npm version](https://badge.fury.io/js/stimulus-flatpickr.svg)](https://www.npmjs.com/package/stimulus-flatpickr)\n\n# Stimulus Flatpickr\n\n## A modest wrapper of Flatpickr for Stimulus\n\nThis is a wrapper of [Flatpickr](http://flatpickr.js.org/) for Stimulus.js. All configurations for the DateTime picker can be set directly from the `data-attributes` of the HTML. This makes it very handy to pass information from the backend to the datepicker.\n\nhere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_enable_time: true,\n      flatpickr_max_date: Time.zone.now + 3.days\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\nAn example of a Rails app showcasing a localized date picker with availabilities is available here :\n[Rails Stimulus Flatpickr]()\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project add the `stimulus-flatpickr` and `flatpickr` module.\n\n```bash\n$ yarn add stimulus-flatpickr flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new stimulus controller in your main js entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-black-fr.png)\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-formats.png)\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.currentMonthElementTarget`: The span holding the current month’s name.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n#### Properties\n\nComing ....\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  super.connect();\n  // ...\n  // Your connect code\n  // ...\n}\n```\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/adrienpoly/stimulus-flatpickr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","readmeFilename":"readme.md","gitHead":"c3c918a33e58a2389bccd5271d5519e88396d033","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.4.1-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-TcGi0x3hZ8WLAoAvZUQbhAe3plFR2/EZ+RB9/alk9oNEVtk2ZD4GCGWZlBfSe9acP1J/ZxTjdfx09E3s7NS+TQ==","shasum":"bb8827b4f3ed998f38212c54b5e4e33a712909a8","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.4.1-beta.1.tgz","fileCount":20,"unpackedSize":219830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhFm1CRA9TVsSAnZWagAAhtwP/1EFBHtM8SdKKc9+l/Rv\nQjDf1cfN+CIOoUB5KWgIrA/2Y0Omvml8GPsbvO+49ipgcfunw1NgRarZjb3v\ne671JiD4zN+WWHKvctzv6LJswaDYdkqdHZ7JTjyYHoYKh7vFed1A7wrRam7s\nQWnnDeyomTiifV7n1lkXvA0XYzo5hqmIGcoB9gZlxfNh2NFlPCRmF/4jJrLr\n+eaar1L58CeU8ATc1+gFm4RLg1LX9e40xGGFZvhCDd3UMeRjXK5AzJPwQXLO\n4G8YJ4r3X/LjRM9sSl+9ka1fJ0JdAOdWrxLzID5y3kNWi0Ua3YS/0DwA3jxc\n9ariD1M+bN8wR3Sy9HKLERU+fLXzmSOAHyo6eg22CX+9ulvFy09xZugF0lHR\nFoI/Ppi1IzhuPYxu9f5+QusruOwHs6xwLjA3rfByanfwg3i/FXOtHpMSBh1z\nAeR4xofyoV273PrKI3kJbasBJEnBXyf1wHQ0hEETf692xLsIfvzBQbl13QPn\n5gnBWCAiVVwTgo/IyqL5JwUIEGiZdvJ9vQvHP1uA+ayifMMTCpOR3JZhD8Xf\nFPZfowk0EosfSP8nKVxRTffC3gQta7iEreGq5fxtzlUrnk5V+j/LLW5tqeQ6\nP2SCIE7t6BRAMOJZDBYNpUoKu0T4410/9SitPTWU7SPSakNCpKvYORhZdO5y\nwguv\r\n=KDEI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZoUi8R7yiTfCADrUZg3UG/4FO17X5HexmatL1CnrPVwIhANoNI86hSDpkMgF5pvsRIQ6/hQzcuQYvg5k2dixkn7++"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.4.1-beta.1_1535400372695_0.8271129762649303"},"_hasShrinkwrap":false},"0.4.1":{"name":"stimulus-flatpickr","version":"0.4.1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"microbundle --external all","dev":"microbundle watch"},"dependencies":{"stimulus":"^1.0.1","flatpickr":"^4.4.6"},"devDependencies":{"microbundle":"^0.4.4"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"0ce577f9a0e1ca65d8da87260236fdbe83f8d22d","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@0.4.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-ONH/fsQD/t516hCTs8APTU8kn6yfmRlaXGY86U299H3GbejSj/PHnETZ80sbjwLkDtfPlGOm/powrgqC9edCTw==","shasum":"a86b4ee922617e055223335c494eded50a52efad","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-0.4.1.tgz","fileCount":19,"unpackedSize":220443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbi97yCRA9TVsSAnZWagAABooP/1sXnqnwMZW85n2YlS9f\nlvLEeoVD2kb0Z22lMBr1eJd5JUDqzWfNvQTBvhS82DapYc+OnlKXXZ0j/Qdf\nPPyEg1OTaH1IZyKhFBevFZmFBg2gHpqz6m04SgFgwzYRmrOwWfAYsP0gx4Iy\nfPH6T/Tcjo+SrMuaU8IKFu8Pmi8/qBm2xaKYtlpgSI/0QtWsRPD6BikDk66b\ns7q32C94NjrToGE6fLSTjYTg32mwrvquEsiEMZy3hKSufa4TqKBhLUI1yDz0\nQWZ4AqzlOE6SCOXDsh4jXiXTAoRoO9tHIkr7nZdSJilzHi/vHT63y+Fz5cPz\niqziU1mVoP5qYGp4ZAaaSdpNdDUzTeUgRDvnNk6N0LhCpWWQ3Bb1cpsuMowp\n4jERQC9GL3jHpJWPvQTKhh326ddTQSjty/CtKYnrgvjvPnOuJKUk19NJ3xC3\n6Tz12UJF9MROBBfsaLyJ1AYZgvLh+oqadEAhgFJ7wQp0DiDCMSlsWlNwsJ6Q\nyL8uxQgUNf3c9jsyhr/osgntr0sM8LabGfiCtQyUJRNZXDvnaXCgaR6StzYH\ngC/ycXR/XGVSj4vIyyb2tWsLH478Sz1C1G8Zw2b00ermOULXtlBjhAaXB7d8\ndQTpzgsGgsn04w+aJ7zQzgZ7Cxv3s8KQIXrGfEzE3ugAuamm85v6vSAPonsG\nUltH\r\n=dxu1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClxqTJ/hFQvoFsNn1XicbuMdKNcOw5wA+Vlizb/7BlzAIgG2pn6DvE2J5N3PMTIuPHq+SwpV9pyhA/8YkNsSFOVKo="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_0.4.1_1535893233204_0.30791471560229233"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"stimulus-flatpickr","version":"1.0.0-beta.1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","umd:main":"dist/stimulus-flatpickr.umd.js","module":"dist/stimulus-flatpickr.m.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"karma start","test:watch":"yarn test --auto-watch --no-single-run","test:browser":"yarn test:watch --browsers Chrome"},"dependencies":{"flatpickr":"^4.4.6","stimulus":"^1.0.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-syntax-async-functions":"^6.13.0","babel-plugin-transform-async-functions":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-dom":"^1.8.0","css-loader":"^1.0.0","karma":"^3.0.0","karma-babel-preprocessor":"6","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^6.0.1","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0","mocha":"^5.2.0","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.2","rollup-plugin-filesize":"^4.0.1","rollup-plugin-node-resolve":"^3.3.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.5.0","webpack-cli":"^2.0.14","webpack-dev-middleware":"^3.1.2"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"readme":"[![npm version](https://badge.fury.io/js/stimulus-flatpickr.svg)](https://www.npmjs.com/package/stimulus-flatpickr)\n\n# Stimulus Flatpickr\n\n## A modest wrapper of Flatpickr for Stimulus\n\nThis is a wrapper of [Flatpickr](http://flatpickr.js.org/) for Stimulus.js. All configurations for the DateTime picker can be set directly from the `data-attributes` of the HTML. This makes it very handy to pass information from the backend to the datepicker.\n\nhere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_enable_time: true,\n      flatpickr_max_date: Time.zone.now + 3.days\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\nAn example of a Rails app showcasing a localized date picker with availabilities is available here :\n[Rails Stimulus Flatpickr]()\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project add the `stimulus-flatpickr` and `flatpickr` module.\n\n```bash\n$ yarn add stimulus-flatpickr flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new stimulus controller in your main js entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n* set a custom language\n* create customs callbacks\n* perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `connect()` function.\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-black-fr.png)\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-formats.png)\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.currentMonthElementTarget`: The span holding the current month’s name.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n#### Properties\n\nComing ....\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpick instance\n  // ...\n}\n```\n\n## Overiding connect & disconnect\n\nif you need to overide the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  super.connect();\n  // ...\n  // Your connect code\n  // ...\n}\n```\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","readmeFilename":"readme.md","gitHead":"0281764c41d7bf2a16f774b87389f55c611f5bd2","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@1.0.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-zqSW6iwxyjYR8H697rdOjua1K1hdtt620NkTo2I6Oy1sd/JEz0Rj3zPtgGthTElePfYGVwKZ8QkOO62gPUkuqw==","shasum":"f797ab1a4fca86b711e436203238952d0609a942","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.0.0-beta.1.tgz","fileCount":27,"unpackedSize":400682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbj6KGCRA9TVsSAnZWagAAu/oQAIidDqzg1mfpl6VDt8pI\nuPxL0F6x7XzcEJfnxidKjOBPM4mD6+5HRnwALTNbBa6DY+jNnq1550Po3hHV\n5e0B7uXxogPHfb0oWYu7BQft/WEH5J9lmox2kofIWmT22YNYDCWG+ghTIA1P\ni/haZITIX37z2dcaoocqDO8Yb7nH5VX+LEqy3rsJS0Ghi0ygeF+bLf4bn8mZ\nqkwRirYZsPsMh4itHYA8zvYnPzNK5vuePJoxmKxZC79I24LaQOe8tgldvRqo\nliiNBLBrbWPwM8HJ1LUaigZNNonp+bBB3lR1QGYDH2/A+ItLPInA8lVrAyOh\nPz88zaplLW+lPTi/8ROeoTffHAFshcZY2mLGFlVeC037xqC1YxvelVK9wKuR\nhnJNf40Y/2Yx6kDv6wumX4I/Lv42dFxAmyb9QQkGwPX1AQsR1ogsP0/sh78I\npx0xEP4rODJNXlfpjkFzi86Ny74QRS9opBdHKK91tBbGxNhBi5HiwUNitsAc\nYa/G/Lkh7UCsLgG/4Sl+18MfenWYBNAX0UHM6iUcexwxndfaB+koMssFIzFs\n7DrI/2RB5Fn9UdCjPm1u2ARqsHSDrQAJpSpod8ADOkuuGEk0buPkIEzb9x4u\nWn0g6nHuHvQ26bsb+VQZ9/iK92DJlkHqzCqCroxUjEb+kgsxGwl2yzrG/jv2\nBdu9\r\n=MNXb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQI/ykaPgtv374m0DUzLIeCubw5tqlVQher0qb1vD5VgIhALeMNnmPVU5JVt6GUPzHBwaohuY+JvIG5O+lU8OIKc39"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.0.0-beta.1_1536139909462_0.24387715083046801"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"stimulus-flatpickr","version":"1.0.0-beta.2","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","umd:main":"dist/stimulus-flatpickr.umd.js","module":"dist/stimulus-flatpickr.m.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"karma start","test:watch":"yarn test --auto-watch --no-single-run","test:browser":"yarn test:watch --browsers Chrome","codecov":"codecov"},"dependencies":{"flatpickr":"^4.4.6","stimulus":"^1.0.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-istanbul":"^5.0.1","babel-plugin-syntax-async-functions":"^6.13.0","babel-plugin-transform-async-functions":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-dom":"^1.8.0","codecov":"^3.1.0","css-loader":"^1.0.0","karma":"^3.0.0","karma-babel-preprocessor":"6","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^6.0.1","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0","mocha":"^5.2.0","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.2","rollup-plugin-filesize":"^4.0.1","rollup-plugin-node-resolve":"^3.3.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.5.0","webpack-cli":"^2.0.14","webpack-dev-middleware":"^3.1.2"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"readme":"[![npm version](https://badge.fury.io/js/stimulus-flatpickr.svg)](https://www.npmjs.com/package/stimulus-flatpickr)\n[![CircleCI](https://circleci.com/gh/adrienpoly/stimulus-flatpickr.svg?style=svg)](https://circleci.com/gh/adrienpoly/stimulus-flatpickr)\n[![codecov](https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg)](https://codecov.io/gh/adrienpoly/stimulus-flatpickr)\n\n# Stimulus Flatpickr\n\n## A modest wrapper of Flatpickr for Stimulus\n\nThis is a wrapper of [Flatpickr](http://flatpickr.js.org/) for Stimulus.js. All configurations for the DateTime picker can be set directly from the `data-attributes` of the HTML. This makes it very handy to pass information from the backend to the datepicker.\n\nhere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_enable_time: true,\n      flatpickr_max_date: Time.zone.now + 3.days\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\nAn example of a Rails app showcasing a localized date picker with availabilities is available here :\n[Rails Stimulus Flatpickr]()\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project add the `stimulus-flatpickr` and `flatpickr` module.\n\n```bash\n$ yarn add stimulus-flatpickr flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new stimulus controller in your main js entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker.png)\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n* set a custom language\n* create customs callbacks\n* perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `connect()` function.\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-black-fr.png)\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n👇👇👇👇👇👇\n\n![datetime picker result](./images/datetime-picker-formats.png)\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.currentMonthElementTarget`: The span holding the current month’s name.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n#### Properties\n\nComing ....\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpick instance\n  // ...\n}\n```\n\n## Overiding connect & disconnect\n\nif you need to overide the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  super.connect();\n  // ...\n  // Your connect code\n  // ...\n}\n```\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","readmeFilename":"readme.md","gitHead":"c1e941832c0cc83d777e09b88aaf1e89f04932ae","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@1.0.0-beta.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-YBj6AKXlkKVXM2CrIzNwY6epucPKvoJl3SURC6ImM11k/zFoXPcEoy/IbOy9sMBBr3bqAXiB7cjsjM6gVvxPwQ==","shasum":"d8e7c9d463867d4c89945e9773f710412fbe364d","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.0.0-beta.2.tgz","fileCount":62,"unpackedSize":612655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbltZmCRA9TVsSAnZWagAABbEP/RNBjAt/YCN8G/WfIS4f\njTeV2bSBxpBTSyNxZ+Oz93XgO4GcRskcgvFvQaD7HOXdZShH4ruLUOdvkhyC\n9rV/9ET+1hUC1GUVLhaQ29hEbmM2pFFSfbjXiIMEw0o+4Ghuy+P9Vh1/FzDZ\nyJdivy8WTjiLejm84pmKDsm22utUhng/T+eYOW6q71plskOVULDbm3wIImVA\nv7kb0ObQGeM/8HdwX7y957QszLjxoCJluwSSnJ9ZMFZ4Wtx0Bt+JeI4AVSkR\nBk8nEkmuZ5DdECpQarPaimrF6TIMPvEUauYezTJFxHCmtoxM7oa6JEB0TruP\nGvduIT0J2WrsyoPqEaH95SZ4bFKnzUyX07FlPCkYaPNP16tZj1lIMXXNu8u2\naKkU9Z3Ebqx+hn6mwQ6ZgP5gqItWA5o4bNydAc3A31paQLvTCqFi1JTNKVHq\nR6hn/oP3r+PJBrjv38wNNPD9UGkBVgqEj3En6dQzJnD8oUGLp9CDs0jvQA6H\nGq6o1F49R7IcGrTQZxn3Rx0l942iMlgdpLec7najjftE4ZH8TF6KCILJcs4a\nf1lzMCavk9TeRA1lHJzbrD8+zmOI0ZCsZNUMNl2m2meZs4obq+daMihtcwl0\nA7oGlbQbcq9re/obLZy7O5wv+DdToYbidHA0zQy8mBR6F+Cuphz60nZoCt5O\n7kzk\r\n=1UMs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDp+r8wm8Sm9uBOH2FykEWyFj4CAfCOhr4+Q0SRipI/tgIgUuAiiRffe5cvwWiLetGfSoWECnOfbki1ujQW1NtLT1Q="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.0.0-beta.2_1536611941911_0.19726147885974976"},"_hasShrinkwrap":false},"1.0.0-beta.3":{"name":"stimulus-flatpickr","version":"1.0.0-beta.3","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","umd:main":"dist/stimulus-flatpickr.umd.js","module":"dist/stimulus-flatpickr.m.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"karma start","test:watch":"yarn test --auto-watch --no-single-run","test:browser":"yarn test:watch --browsers Chrome","codecov":"codecov"},"dependencies":{"flatpickr":"^4.4.6","stimulus":"^1.0.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-istanbul":"^5.0.1","babel-plugin-syntax-async-functions":"^6.13.0","babel-plugin-transform-async-functions":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-dom":"^1.8.0","codecov":"^3.1.0","css-loader":"^1.0.0","karma":"^3.0.0","karma-babel-preprocessor":"6","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^6.0.1","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0","mocha":"^5.2.0","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.2","rollup-plugin-filesize":"^4.0.1","rollup-plugin-node-resolve":"^3.3.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.5.0","webpack-cli":"^2.0.14","webpack-dev-middleware":"^3.1.2"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\n  <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr.svg?style=svg\" alt=\"CircleCi build status\">\n  </a>\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElem`: the selected date element.\n\n`todayDateElem`: today element.\n\n`weekdayContainer`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","readmeFilename":"readme.md","gitHead":"60f85a4e390d50577378c4f5e7b63df9136116f6","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@1.0.0-beta.3","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-aqZKTl09EGAlV5iWqDTPF3Tfw9GZpzWLrNPmqMOr4GF/eXQGr/26NOCb/U7pH+Uc6pX1faPdy4YJGP3F4qhNwg==","shasum":"050c382717e75b679fa4ad5dabcc50bcac99939e","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.0.0-beta.3.tgz","fileCount":63,"unpackedSize":617133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmPngCRA9TVsSAnZWagAA5goP/2Wja8uSjclhTKzjHrgZ\nMkX/ci4MKvvAbOoXnwpL55Lx12ICin5t9r+p+CKpMyJ9MoAe+8cxY2NkKuOj\nZ7Mhi6bZyb9mGKJBk5G+UrenLjed++bFpBFlM4iK4lNCC9Zf7INrkaz4XYuV\npqjPcNZ594PDTnbWngfhRqAeZ1medzS5/EPoB3s0XffYYTZzDsze3Enh/Vng\nQCYjxCcu0pNhFjuvCiRg84ip3kMu+i4z5UqqC2+tFz7mPOjCC7dj4xch2SoY\nW+ISEVcN/twHvBpnYeueeNRfwM0jT4qF/6PezHZFQNQQuJyZo6h65DP1FqE0\n9FAKbI/sE3n1LCGhc+QJruXZDXSFYEL38nwRYA38G3GRVWpsRBtcD0UYSIv9\nDrQTz7z09mHYYiFRpzsiFk+t1YTdxI48FJDSmZwhQou2aQj2dHBCYkGrSkaY\nIT/UViJYVCP8UA7fyWOpB8i2HsUUwDtjAAuVCgv4sbTociC/3bsjDqVqwb0H\nG0dAfkCtMjdIN+nOQlsOp9j1cCxHaTDgQOgcL1g670gKAhEUi0EU8vjrosee\nArNucbTUiDtzlDSJ6kAZOdpOo2SIBb+ykmaeP+EIOylqHdvlx5tEI0tewIYD\nlAIm/rjaUxTdN1hkIF1xPyfUPQA0Kvkhix/jFJ53Dhi0CBW2+YvK6X8WIkHz\nxW0n\r\n=+A7K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC59oYfG0JX+V1+eICJZGgozNVSa1K11cYQT3mxUoCymAiBE1foHQsYlTBm0h3QPXxpekN5aa/VPagtzsWPkASuiKA=="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.0.0-beta.3_1536752095855_0.6032518188865963"},"_hasShrinkwrap":false},"1.0.0":{"name":"stimulus-flatpickr","version":"1.0.0","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","umd:main":"dist/stimulus-flatpickr.umd.js","module":"dist/stimulus-flatpickr.m.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"karma start","test:watch":"yarn test --auto-watch --no-single-run","test:browser":"yarn test:watch --browsers Chrome","codecov":"codecov"},"dependencies":{"flatpickr":"^4.4.6","stimulus":"^1.0.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-istanbul":"^5.0.1","babel-plugin-syntax-async-functions":"^6.13.0","babel-plugin-transform-async-functions":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-dom":"^1.8.0","codecov":"^3.1.0","css-loader":"^1.0.0","karma":"^3.0.0","karma-babel-preprocessor":"6","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^6.0.1","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0","mocha":"^5.2.0","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.2","rollup-plugin-filesize":"^4.0.1","rollup-plugin-node-resolve":"^3.3.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.5.0","webpack-cli":"^2.0.14","webpack-dev-middleware":"^3.1.2"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"gitHead":"17083ad23c862fb6195a2d5510be66c5a4145c1e","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-w5jxwZKll9P6nmSnW0t3cvnr5wcwmOU2q5jR+Q7HOkHKyqKX1eQu9pwRUxO5Pbdh6aceVj/amGt3/XPxDJyW1g==","shasum":"609f490d885e6fa9f4619101c0971f0b282e0db7","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.0.0.tgz","fileCount":63,"unpackedSize":617126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmP38CRA9TVsSAnZWagAALp0P/1adsoZPD3o4ru5mxVTW\nvCkYRTEhgxyno8muP8eTKN9xseKhl5cunEmdICXi1wDTx/y8xo8PpE1XFSG/\nBCF94HwxOcoD2BzMRulmPGgpLSqmWVnM4zeN7Cits7QXn1r3cQ47VR9ZzAFM\nHqYYUJUC9K8Aa2FNw999d1SQoD5eIT63aO8Q5pigr4NZD9xTdYFWsn5vk8P7\nByF653ueJc5zNqS+CznRTYhJPZ82KysditdJkLrMnmBS69eYun/+W6d6G2IU\nqj9FiefUV/C0kGyRsEdtsey3vovR08+BLvL4Yqnug5sdShcAYjj+WD9+wugu\nmGwvJtfDJRUzWv5yFmZQHmOyFXG1IrGTJDWYF+XIgpdxmFAcmDOXRIGK6QIQ\n3Ttb0E78QdZWw3D/+Z60yMInRxhoExpUCPyd6GXtbBbe7jUbzJhFCFaKzyua\noqA4yU17PfPh3XeyoqsgfCiT1QAVqWMnY6rz28BpcDE0rIA2Rof55/WXABXc\nUQ9/ZbtEbB/JRgdLRYUoMvyydAJHRGPT+ahDSzrnA0vwMT8szzyouwx1xzfV\nHGywlWi8lu+/UnhCzjJleakSOV/P11adVrf/xvRGask2znFLoY08OPLYsVhF\nPeXbHngp8R2GsEeFV0WscumM3w851Nx3fnkdKBYj+pcP+xtlKE3V7siMi0xk\n5XXj\r\n=EwVX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBITs/ZpwrPjjSjfMfebIlJQonrDVSGUG7sgnvrrVBbAiAuknHqfzpvHrMBuP+POcqb+v2iXydt/0pSjcnZXjX0PA=="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.0.0_1536753147419_0.6254078180658598"},"_hasShrinkwrap":false},"1.1.0-beta1":{"name":"stimulus-flatpickr","version":"1.1.0-beta1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","umd:main":"dist/stimulus-flatpickr.umd.js","module":"dist/stimulus-flatpickr.m.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov"},"dependencies":{"flatpickr":"^4.4.6","stimulus":"^1.0.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-istanbul":"^5.0.1","babel-plugin-syntax-async-functions":"^6.13.0","babel-plugin-transform-async-functions":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-dom":"^1.8.0","codecov":"^3.1.0","css-loader":"^1.0.0","karma":"^3.0.0","karma-babel-preprocessor":"6","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^6.0.1","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0","mocha":"^5.2.0","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.2","rollup-plugin-filesize":"^4.0.1","rollup-plugin-node-resolve":"^3.3.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.5.0","webpack-cli":"^2.0.14","webpack-dev-middleware":"^3.1.2"},"repository":{"type":"git","url":"git+https://github.com/adrienpoly/stimulus-flatpickr.git"},"readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\n  <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr.svg?style=svg\" alt=\"CircleCi build status\">\n  </a>\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElem`: the selected date element.\n\n`todayDateElem`: today element.\n\n`weekdayContainer`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","readmeFilename":"readme.md","gitHead":"c275dacc0667c6790ea4b61936e8db4b4b59ed49","bugs":{"url":"https://github.com/adrienpoly/stimulus-flatpickr/issues"},"homepage":"https://github.com/adrienpoly/stimulus-flatpickr#readme","_id":"stimulus-flatpickr@1.1.0-beta1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"dist":{"integrity":"sha512-XWRbZ3jA9i3WU2/UQ9E5AUmzitZ86GiWOLMRT7iA1ybIQA36R8VfUAFHLV7P2oTXi71eseJyBS9PTpO7HkwT1g==","shasum":"5648625783ce1142e0af1695254d9eb93b21d4f7","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.1.0-beta1.tgz","fileCount":46,"unpackedSize":544335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq6ebCRA9TVsSAnZWagAAfCwQAIMLwnK87QhQLD5JIUgx\nwUC9hYr69pdjh583/YpIXkfJcKUyy9hIdPMgRLoTFeUK5ZCNThESZMN5gOQR\n8FMPBckLulHusGgsCkY742Znpz6qLqT5RHaRwsP2NcuGYgK6z/z4hd65ghkh\nisnS6kiyDPsx0H/qDlQVBnbpCTN6ELyd5kJZH53cm1V5vjon/8rKWXGaBi4A\nuIoLsKsto3oIIgWwNEgsGW0OItuy4uXScIW/1jJrDFZnjttJ8fIMhahhpIUH\nCWL9Kr7LiRN7CLZnNMf7vd+S6EHLIQI2HSVutE0vOHj7Vdeh2+xMG2Tw1E3W\nb9335bpc0NwEhQsNleqZxFcCvoCwN1M+jMVcs68odt62jqYbhpyWCfaQVZH8\nO8BuCCjXOxteN9JT/OyPNCX9/eLVrHb5n9Gz9fZLg6BxM9rW3EjhcOkHl38x\nSRPiIzQLdaincaQKurvSjMxPxUEYLClE+ub6svSldjdC2N7JFE22tCapwmBK\n3qT2XnhRA3rPMKjGVkduacVGEZcW+F8VywXe8HoLjAvk6CIWBdk/WXDMt3Lb\nJCd7RJ+jgCWABewBSmXXiaYnbtzVmBzX9O3mftCissWz6noS5XNAk+LegCkp\nzevyhUpSkV76h9X+4Lo+/YjczzqRjWF/+Af2mGz/tO86/fGOKopswv9+GAvH\nR3K1\r\n=U+N+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEqpYTRiyY/NovTMneCdUz5OorQXiGxDj1lIGHgpx7MTAiEAz+wDXtLYXs1UBt9O8/18O2EBZizVK/nXJTkcFPhCqeY="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.1.0-beta1_1537976218526_0.3123020561961163"},"_hasShrinkwrap":false},"1.1.0":{"name":"stimulus-flatpickr","version":"1.1.0","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/stimulus-flatpickr.js","umd:main":"dist/stimulus-flatpickr.umd.js","module":"dist/stimulus-flatpickr.m.js","source":"src/stimulus-flatpickr.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","publish":"np"},"dependencies":{"flatpickr":"^4.6.2","stimulus":"^1.1.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-istanbul":"^5.2.0","babel-plugin-syntax-async-functions":"^6.13.0","babel-plugin-transform-async-functions":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-dom":"^1.8.0","codecov":"^3.5.0","css-loader":"^1.0.0","karma":"^3.1.4","karma-babel-preprocessor":"6","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^6.1.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0","mocha":"^5.2.0","np":"^5.0.3","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.8","rollup-plugin-filesize":"^4.0.1","rollup-plugin-node-resolve":"^3.3.0","sinon":"^6.1.4","sinon-chai":"^3.3.0","size-plugin":"^1.2.0","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^2.0.14","webpack-dev-middleware":"^3.7.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.1.0","dist":{"shasum":"c65d5efd837c5ee5fff4036b6e5e9aca4d07de6e","integrity":"sha512-qpuYbl9Z7wZsEhbBUMzUW8g7OfQH4EmhjCi2QQ64WNZ1T928fSvuhAgulwvI6G56sztQ8OR2roPam/Sc8ZsJZA==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.1.0.tgz","fileCount":58,"unpackedSize":313004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddPO4CRA9TVsSAnZWagAAyK8P/i+sXVMCQ6vjxRaIFJl0\nRzcuAef7+qbf+QkemyP2r5OBQ2NHgDZ0CdqjKIhpvkfElGdlR9Etu5cyLTSc\nK0XlPRnN8Sq1IGDqTj6Bve9RN4KvB5e4uzecjpOkjA4/wehzyYm0CAYDeCJ8\nqOlIFR3XbvwRIIgOVLXPGIjSjh5WjL+J6mgwR44rBeqq/NbOW3C5M8QYAW4j\nRCszmRAKfUjdK11odx25zryquHIe1yd5NIu5QX1Sc5sRA5J5g1E/YS13iVXq\nRatEDILtPFziD9fyNkluY9hfgQYyIUQGUI3R6OoEipcKbE31GRdLu9acjQlj\nYMRgwBU9vHWclbAgOAs2B2xT07Jzo9AqL/u+QKItedTLhi4r1bH8Z+NJJEb8\n3jjRLZ3v3YN6zy7xBtkQFFM8TrX5RT9aHfwCBskzvLUFXJu+Jkg2HIBSr99j\nzb5EZVE6Kzzc4kowzp87vWQK9Gpcp42kA6VC+wSgxyhJsV3OEVR84GP3ShX8\n+E7uRGJrIQodBsNY7GpVHhBGltK0mfS9CH21bI6sMcz9hRMlLm0ksdGS57W4\nKgM+hFq1VLAngSXz1DffmrCf0WXBI4z55EvTvhDIUefrUPXohUXZzvVXfijw\nXzTIbbxfVB83UjnvnmOSMkAMVjtY6DRq1dy/ZCmqSGADaYfb1zRmKaU6JbST\nuC6Z\r\n=scNk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwrFsVh2wrVttGgtoAOYD6vZPD1DvVq/Y5A1ybAS8twQIhALKHcuXs5xZ9ULHMuKkThtWIjn0//MUxRcHxjxZzzlJi"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.1.0_1567945656209_0.23002177001373303"},"_hasShrinkwrap":false},"1.1.0-beta.2":{"name":"stimulus-flatpickr","version":"1.1.0-beta.2","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-transform-classes":"^7.3.4","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"readmeFilename":"readme.md","readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\t\n    <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr/tree/master.svg?style=svg\" alt=\"CircleCi build status\">\t\n  </a>\t\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\t\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\t\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElemTarget`: the selected date element.\n\n`this.todayDateElemTarget`: today element.\n\n`this.weekdayContainerTarget`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.1.0-beta.2","dist":{"shasum":"8685e309560a384c424e65a371915395645fd894","integrity":"sha512-T/DzPM5tx+WIxIaxPM6Ec9rLsKcWyqTyLW8NvLHYFeFRqYkYB9YzHj2Kq9kDWORmeBUkE0W0cfQA+tHxN2wO2g==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.1.0-beta.2.tgz","fileCount":61,"unpackedSize":319116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddPieCRA9TVsSAnZWagAAEXcP/RshlN8l9TmMpdtFp9q7\nwWwMNTCeuVJP8oKAd4D+1LuPCuNOzvFL3hE6WyWH14sQ4FJjePTy9N4M43oj\nlZJ9hRh930uVDsPP1C9osXYdMzMEbR0jpP9pIDU8+78Kcnx0gHHsOSjhyaNC\n8XWZEiq0GAOGIdXM7TG9EbwokB+1ALx+xWtgQ81jMOsUDJzeJXcdyyMMl7Zg\nUXq8eiK1eet2p0FifDAdLtBO+vSs4Zb3TMifc+EpYwhnAJirUQISJLpDuMne\nU9mhHgBgMzsAIDjo9jr31rvfvS0GN5LUtF+2pyzCCXy8XAqLkaCnJX5Ircxe\nmBn5i230bVgaa9l5yVal6uHNfd8Vd9pPhPSCmE1iVs+3i8M5yCqi4v0qFaWl\nD2avTw3D5rwSQ47Zidy2oGB6qHxzLu7YDKVDhLig867BRqJ3JbFZB9jSK58S\nv7QNg5sSnuQiXtCbXQuOoVPS8w00/M9wOvjYBZxLHNLFAN+PDzc7Wk6FPQq/\nZZltbybhCYmjUC2Ge5nG71eDxSpVLjPnA8RdkcozTBlsSJPjD4xeGdPJHhQn\nwH0XyCToU1+Pl8x1TFRa/rbEy1AhYog/DknscY+tcWlXipwkcHA0Bd7w1PLm\nF8nI22YUMrPTI8Rz/Tr2iw5TRIwgGQ0Msywsa0klsEK3ccvpC/z1mmrc1h7c\nruBm\r\n=eIB/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkUWjdQ+36aLuaquJSGguhnIFXnVC7s8sjKVPXjKR97QIhAO01hOrwIIpJcLyj2mQbpyn5/txvINjixunomap9fT4K"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.1.0-beta.2_1567946909754_0.5291838362108432"},"_hasShrinkwrap":false},"1.1.1":{"name":"stimulus-flatpickr","version":"1.1.1","description":"A Stimulus Wrapper for Flatpickr library","main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-transform-classes":"^7.3.4","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.1.1","dist":{"shasum":"e3f09e24f80c69b906f1b8e63baed6a6ffbb6776","integrity":"sha512-vvRBEyQrbUWH5dth4Er7I+PdALWvhYOhNfa1aTJ9KMhPh0aPbHehLEb/wcBsLQ5IFxOlVFO66QqfVftt/NoomQ==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.1.1.tgz","fileCount":61,"unpackedSize":320210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddQNbCRA9TVsSAnZWagAA0UYP/0fGuA5pa0JYmVTzuqfx\ndkxwelIBcXKciqglQBUdxDDsZlNRkAK2CEk2KarULxSzDfLosw49VFmzZUos\nIlE+7htmt96+/ptPWzK1ZJxauthAyN+4X/UI7XPtBXdKXAj6yx390j0176MJ\nuUs+lOUJRtfh5iPRBE2qqG1qA8AA/qSYoOhjp2uo+ubXY4/s0/SLCBHveZm6\neXvIVoFhcu81msoONTb4aAOdN+eQZofL5GxGzGcvqXaK8+tCMK1CKnQnlFRD\nnyWBnaxetZWEMK+xKEYb/3oRxV+BVqabpuEq2b3Ojb0PUuQSI0aUCgeiDd+V\nY7DtaByg8Orc/he7qyBy9c30bvR+jkBc07Hitr2y3jFyl56vk50CZyuEc8Zk\nce84ICV2aeJVDTZxnNOj+6cwCJRhH/5Hbm3tLTC0to104ytLw+zKF9TilHf1\nJ+3VL6zehQsXsMe7CBCiWpcRjnVOQT2UQery/wuJCVrdIz4pPCnV5CE+JH1Z\neFFNw8PjJjH7LBtRmlHGk8elH9Z6tOJ/75uW7CWY9yh1AKLGBaiF51gWTsrG\n+Oe2yfzTfrzfjd11LTKlGdafUg+igyH5A0kyZxh+/etzmWh8ezaKSVy6RtVh\n3XLuzAyhkbVaNSX0lebRiBjncgaRIrm5tiKuN2WDtQrzuwpfrwJ1ARV1Xg66\n/LQW\r\n=oT2S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZjdN51SfJBWNtltXPSZZWeqsdw+5DxPhIf8DyIFH3JAIgewQH25tBnPMlEWcwTMh6FR+zYq2NLiqsdZ4Q7FCzGNg="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.1.1_1567949658427_0.15580394256953745"},"_hasShrinkwrap":false},"1.1.2":{"name":"stimulus-flatpickr","version":"1.1.2","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.1.2","dist":{"shasum":"54afe71bb8883b7ea5ad8dc5e9eb68813b2d117f","integrity":"sha512-4jZIuwhdi+vPWbMxopRNP4SIyy6EaDeVOWWhcoouSCrYiJ/hh531Swq6MgkO4++/s9Vbf+mUQ9YVrhxkoAz6Cg==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.1.2.tgz","fileCount":61,"unpackedSize":324669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddaSvCRA9TVsSAnZWagAAL1MP+QGSZJbllvvNKX4rD+Dp\nl4YfoRHl9SNp83V7g4HGxatvSj52YlYX8vc4CDj+NQCkkOpxN6a7OPBdmRCn\nGZYr4pWI1nnhd1+H+/6DA+QapGfKagTC9AzI/GPz1+j6u1sSzYlhxmOtJRnH\nQUBgurNc3xQwW7qD8n0p5q/Jfnn3y3f5DfPvhNujYOktBJZqfL8L7iSZ2bEh\n9gdXT8aN2BRmu+BsbJCZabn2V97Z3/9y0Dxd0c3CuqXVqZRCxA+xRly66/s5\nHM5rLZM4CkPh6IKxgcrPT4Ppjmb0Tn/AaT3jrzq3Pro8K/WneAMIjgESXxDg\nv8KjEiG5yFzlcUoMOHOsNgU9ehN9qIzEZPk01otn2PvlQn7sR//MTEoMDwqs\nnE5/D8Lbgsa7u41KWasXQj+rEKKnnDRdH0qS/iK9oZ4dY8EQnVdyYGStumHv\naTBZZ0sV3FwxB1HI+gcvTjmRTFXQATEv9pHUw5yNepdF1yLm0T6B4VivteoJ\njyCljR+ZYiyzhrBKwHi1hjMwUjX+fB8uL5UJLF9j3f7J74Mdd9IksitMRN4A\n65/Nr4Pz4rMnynKdn5XRRxSfLZsbFTiufVuualbNEX1BWpq+hH/3cUtahw0Y\n6qgQp14SA7PZiTsV/V2/mBQ16teaqhiEehb76nDQsc+fYI+hEKA5yMZytar4\nj7ww\r\n=liX9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGPYA4GULSkFYgP/STo+R/DNukUs0qAbKTOPLY+vo8LTAiEAzC6fj4mBxZ6Z9Q106Ka+BHO1Vpuf7s6MrQNtFq/2I14="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.1.2_1567990958940_0.1020227905643416"},"_hasShrinkwrap":false},"1.2.0-0":{"name":"stimulus-flatpickr","version":"1.2.0-0","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"readmeFilename":"readme.md","readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\t\n    <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr/tree/master.svg?style=svg\" alt=\"CircleCi build status\">\t\n  </a>\t\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\t\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\t\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElemTarget`: the selected date element.\n\n`this.todayDateElemTarget`: today element.\n\n`this.weekdayContainerTarget`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.0-0","dist":{"shasum":"0740fa3ccffb9f86aa5c6f785dd8c6fc0b127bc4","integrity":"sha512-s/ffV++NKiFiywlwou+59FAdLgbb3+oFyNmsg5ubDPnZb3eYCo43CNQXLQvMxVyyd8Q8x1rUK4Oc4tCVJ2LIpA==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.0-0.tgz","fileCount":95,"unpackedSize":491377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzKmrCRA9TVsSAnZWagAAHBgP/iQXezGygF7P2aSgJb1p\nLAlCiRjjtbQk6lGzkscf7SWyO5L749pR5NNorEf3xjuTYkpOyE3IXan8lMt4\nlVp6ITpzLqanOb0DulMiEvgvwVxXrPEBLhB4L6wB9Z/uD/S2PJGbOtMWGF3J\nihMvkLn+D81UKaU9yPzPD1+gdgFb8aGREpxLvEh5BJN9YOD5ckZeMpQxOGdS\n/EsbQuNx2IUD97vsSeJShLMXtXRFWPXaQOCbAd8o0zYDJQhcy8R2uo+35phH\nyNsX+cUZiwLFaLmBNN5JZtKBj6AnMR2c8Trxkgf7/dALUVE4xst/b76PPuey\n4oqoKlKtMujMibGHLxDV4V0c2kcvA7iPFo+LwuiScV6nV06UTBZfxFuW6k0Q\nBnRX4QBPg4nKwC5mEUQSeeryhOokn9W49yOuNexby9LPxnd++sr/0JgJE51q\np8txTMGIZdLFvKypKyWyiwnR9NdbOq9ibDLnMOBRBToDhajbrF83XVI8K/CF\n8Y0mXaKLBk3J5+Tm54Fp0NsKPy7+sto2gFKU/a7n5SYZ2nOMzo3ryQXknz3G\n4l+qruSnOajG6UEDxRaGS5aQu5QqEAwfJ0DvXonwekXojUNUfUp6W8rOq4lW\nEyeCmvd5XeiwRDbJl6WO3JcTxx77vpCpdrQXb+Q269kNLXTkfftQ600eODnc\nWoc/\r\n=otHr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0s2mDgTZcGLZRDyKJLUEXwXaAnFRhE0cgBZv1OpuAPAiACSditeued56jfC6wCVrZjsFxSsW5xboXhji2qsXxyXw=="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.0-0_1573693866367_0.6989822042197886"},"_hasShrinkwrap":false},"1.2.0-1":{"name":"stimulus-flatpickr","version":"1.2.0-1","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"readmeFilename":"readme.md","readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\t\n    <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr/tree/master.svg?style=svg\" alt=\"CircleCi build status\">\t\n  </a>\t\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\t\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\t\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElemTarget`: the selected date element.\n\n`this.todayDateElemTarget`: today element.\n\n`this.weekdayContainerTarget`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.0-1","dist":{"shasum":"6a322fc7dd062d9fd221f27818936479945333da","integrity":"sha512-hNkBVlRtxXe88YGbMrzHfMun5OvydCAlEXheVmHISBQ6BNlSq9PTrlXtzWacL/4BOVXEVyWxUfc5LWqSQZX6uw==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.0-1.tgz","fileCount":95,"unpackedSize":493293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzkYBCRA9TVsSAnZWagAAt6QP/0uj2thqddi2PsfNixAh\nfO8bB3gPkYkPVRZGueHAMP4BSRpe6Dg0HwAS/2BG9eUFNXvK+Q8frfc6na08\nLBABop/D1ns4mXY4xYlMozOQRKLoRsV99Y6WyRRczUsWyumEHjnQ7SFvBhfO\nmMJkQkkmrLPTkrLsJddjpRa0adcEtXqH6FfF2BWPOpgeFO7EsorxTr0635fb\niEJ3CrUvKGB2KGQF2FJAU2qG2WIhf6iGixslkimWKv8JNpkAEf9Ecv1nXSrp\n6No7nG5ArLpEyKL7gGarbVJ1GxaVtUtTz7nLCOV2v5OKnrq2O55YCb4Fmo7W\npB+lBunquapTXMmhXsfcZZb4mODUcdQmaaaX1AT8SfJBD4Nv0YOpLNVZ+c+s\nkd4zsCXT+gKFv0xPZxAlLrdrIVqESg1gNRURfMheLyf1QFZQr01driQjysDZ\nSUeGfbe92koHlH7/Kym8KwlPbg08sZrGcDQJBhHEew2OSSfIFpw7hgw3NKIV\nZx5dGrLTUEhIxVdNaImrQB/+f+ZrvGuc35SfbU6W+kCyognNZS9xZgUEKNG0\nEgoOjKn+Rruw0G1dHoDzqmin902glG0t/uDffAhAOEP+REHGFxKprjfHfj+H\nBjm+zweb+UC8qTYtxfaiyPgiLfwhDjR8A3nWlhtIwlzVC4XY+D2XQA57ov3x\nnE5W\r\n=/SSY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDdEfnjH11UeORownLwTw9Rw+HRAKZ8V0Yt5XR/UHJ+AIhAOW+5itFvDkc4EdE6ZepXnyN2A7JI7ffX7j1s92OaWLA"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.0-1_1573799424690_0.8023787894351064"},"_hasShrinkwrap":false},"1.2.0-2":{"name":"stimulus-flatpickr","version":"1.2.0-2","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"readmeFilename":"readme.md","readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\t\n    <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr/tree/master.svg?style=svg\" alt=\"CircleCi build status\">\t\n  </a>\t\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\t\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\t\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElemTarget`: the selected date element.\n\n`this.todayDateElemTarget`: today element.\n\n`this.weekdayContainerTarget`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.0-2","dist":{"shasum":"8d7aa06ce1e2b65ff261ac6d360c49e8575ff544","integrity":"sha512-2b1w98Eyh8J5YfKY9m7xBaz6fe7jleOq4EBGN6P1P6KsJdxS8QoDOs8wbw3Wunu4VTvbMc/fk3sxPUaXzrW9ig==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.0-2.tgz","fileCount":95,"unpackedSize":497186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0ADLCRA9TVsSAnZWagAAufoQAKFmIymPIAEK1vB+CqJD\nTDq/WwTgO6JjVf/PONr97YPHsgKmvBhyQ1HjGP2acSYZKHhGXJxiiUSIX0bY\n58mK55lovQ8COTqZxBtTTUlJtSFtgZTkjidfXfCHwlpDXeU3New8iI4yXWtw\ndQYE6r4sIQOwuE5wpA/hJ/sqd3M6qTgR8Z/AhuvPU1bXCvwiyJJi4x8Z5AZ+\nSUzw6JbBLNYkSa2IlX7fekc18S11MdXjKH4n+c5UcDurBa+ggnpsnGVvRACz\nspekHsBylFZtObLplxuJEPYwIGWec7n0ccap9CDzEXVCQbZ4hVJid2Hez1XX\nfCZrTzzHHRfcJ0ssascuTRH+NX++N68fDoMkbrjpuzy7zb9DgmtrbcIsaikX\nr5bddR7V0oo+jZOm0fb5p9Xhr9NH0C+JKBcUU2h8YZR+fMM1403T6nlnwknm\nofTUW6qcliXS7vudbIx3hbFgAouNhqH1npr8h01TnhuxTZMJB65qQKvDLaBA\n8Lxm0SmaQ+nucQ1e2eDvNaIKsaibK+wa+kykpjvLax27dvRM+jT5mpjcuDgo\ni8OBvOr63TAmUY/jxf3cvLEVb1xptvNHXiqpGO8840YqajijZv2SbD2wCQq0\nXYHdvu8p3ODD1AHDGEgoDMxIJIZjvr9bWzijK8+T1uEpBb9K4HFdU5eczN6j\nS+gs\r\n=eAQi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAIBM17gmPyCLV2sbVdECeBuuhpvZf7E5G+RNqTLWu+gAiEAyKukKRNSuc9LW1KCEjgbkVP186aNQHI4ZoJ3tGucNDU="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.0-2_1573912778840_0.9665745400796835"},"_hasShrinkwrap":false},"1.2.0-3":{"name":"stimulus-flatpickr","version":"1.2.0-3","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":"^1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.0.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.2","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"readmeFilename":"readme.md","readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\t\n    <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr/tree/master.svg?style=svg\" alt=\"CircleCi build status\">\t\n  </a>\t\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\t\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\t\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed.\n\nIn your project just add the `stimulus-flatpickr` package.\n\n```bash\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i stimulus-flatpickr\n```\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from \"stimulus\";\n// import Flatpickr\nimport Flatpickr from \"stimulus-flatpickr\";\n\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nconst application = Application.start();\nconst context = require.context(\"../controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\n// Manually register Flatpickr as a stimulus controller\napplication.register(\"flatpickr\", Flatpickr);\n```\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" >\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create customs callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from \"stimulus-flatpickr\";\n\n// you can also import a translation file\nimport { French } from \"flatpickr/dist/l10n/fr.js\";\n\n// import a theme (could be in your main CSS entry too...)\nimport \"flatpickr/dist/themes/dark.css\";\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    };\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log(\"the callback returns the selected dates\", selectedDates);\n    console.log(\"but returns it also as a string\", dateStr);\n    console.log(\"and the flatpickr instance\", instance);\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```html+erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElemTarget`: the selected date element.\n\n`this.todayDateElemTarget`: today element.\n\n`this.weekdayContainerTarget`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground/readme.md)\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.0-3","dist":{"shasum":"0592340984f68626f4f1b9d8b7232dd6a14e8f22","integrity":"sha512-atuF28GYiCNMU+ezh3bZt0xdFfAiqWarvVjwJcD7YDhBeWJoTMIjAUGJV7zXWbRVjLYUgP0w4NlqawPryXNQwQ==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.0-3.tgz","fileCount":63,"unpackedSize":333757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0QyvCRA9TVsSAnZWagAAxNoP/jyKmqXBsIke1rvQ+6C6\nIDWV5C7/NZdRFVd8oKzgumAMqk/E22tlCMseVlAWD6l+TB0L+rUhxJj1cyhs\nL36LC5cTNkEgXTD+fpgsP8EvjxPCZV4S98ibmZU+mymGeXxNGcL/UaUGmX/t\nx6+oKcyRZOJSYtvZHUjEqUNAg8W24D2IWC6T1Y/36iaTBpf4o4HRoAzHcxYa\nbNhIV0MsRdOBRbQIupiXO3QhXyuxzLBK6/S+KBPxG4s1jq3qUn3W38vrhQk4\no01XZHWl1Jvy1/+FNyvkUrMD9Mjn84wR5ACZ1NKDhlgsLbVFby8i5AQcDGR+\nkN62jgmfYSKjDoJKOKSxht3+mSGQw37LWvQ4PQH2Fu7y/+qZ/TW5v3BtKEW5\nAQ4IRnz7LOmxeACLJuLNDkyRght7Y2AmWbF17GpNTxty7wR6MQkkSXdb7HTQ\n1T/M3TbLgCWtgKYzWi+bJ6H5M8BbuUbspruFPZ4R0keTINrVGf/5NnEMQDzn\nSBk3CZmSkJ4MIIWdNORWTCqpqjmFDlkYKcyY+R1yYp5iFMTt8qlj99qheEaR\nCc6QK9VjA/+5RjYJjS5htm3C/QXkdV7EDrps7PsAiGayLlUrRbzer+qf5DP2\nliPdTcR849HUtjzklOCTcKLL3vQRZ+LlnT6F4v+6P5tZ+f453X/AOKpfLG/q\nYOS/\r\n=vhdO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2Zxc0PmrwwhN29Y6rtI2LDP6L1JZgLcQ7vh8jvqbQQAIgR13REn9ooPW2qwSORyPOdL0F65gdGPJIFi2hyUcX2Cs="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.0-3_1573981358588_0.9533414984492143"},"_hasShrinkwrap":false},"1.2.0":{"name":"stimulus-flatpickr","version":"1.2.0","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.0","dist":{"shasum":"e45df43beab91142d8faea11dfa32679af4964be","integrity":"sha512-ZCds5U2JkXQqaBNXfM4Yj+xXwKpPCFqLRNiyBn2xbNmB9WtTae4AsvYltE+IFR/I/bqiZ8THGgGC6gZVeYi2Hg==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.0.tgz","fileCount":63,"unpackedSize":334713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1yL8CRA9TVsSAnZWagAAggcP/ioQMmqFiIZIme5JERAa\n2IpD9o27LpBm38LdkXhW384VrpOQwT1cYF1jZF3eaeHhuTN3Y0FcIB9geeZt\noYAhcHM3vxWyQMzPsf7507v/QvgkEV5MM0SgW1WdWOOSxBTqNWDOa/WtSQIv\nyyqODxtfn707vMx4fQEjWz2gbThkLCiArzFX2S0XGwLuJ1x5uRCZeubKpynn\nL0pNLuzf5dvT+Zif9VNmtXPDCnAaReGOZstVkYW7t+JXO91fPqw/llIufYlY\nVLe+yQBZepdwrUjwU2CDIBBuF6MRdmIXPSrkZybMDBfvZ9whXFlQt6MjkCDf\nKmUUZ0oIRx+jESAB8FbHtbF2MnhE3cncdVvn6+S15wmnddvUlkhtkeaDIINp\nazhnL+ahr0tKeFSF/raDrO9UIMySvOJ4C/aFy9dclmVIJe1wRhXIiugdsMzy\ntv8ZuV0pL9mtuECbLDfzDriqn/qh+XckElel/ajAOtBF/MbxhwpDHmd8EkWc\nhS9rirfgiEjmsvwF81+I4hKlH6J2tEelesgXnI6UkvxKk16N9lXkDgdEjBw3\nuACmpDxFI3Scm9xFxMIQb2wZ61uvaq9BEXv9CXNEULItjDVsFgdms2OVHPXG\naPA/0OLVoRyUISBz/UbiRrmatHEDV4Lt7IW3pjqHtKOG/4H1FO1PMGzWZs+T\ng2i3\r\n=Q2gB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICELamKgZYmkE11cOpVPSFukQQdN6byo5hjub5L4yYsDAiBi4Zu4r8v6ApfGWjpPNIB3DtkM5qPSu7mefyKSIPK7zg=="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.0_1574380284289_0.925301398972127"},"_hasShrinkwrap":false},"1.2.1":{"name":"stimulus-flatpickr","version":"1.2.1","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.1","dist":{"shasum":"a2e5f9f7979bd879a48bd0ce22eb83203445c6be","integrity":"sha512-AMW8qunsjudPKNWLSEXS3Dl+63svpgqQGMaGADV81OdSH8OMagUhmab7BMA1iWH/eozd+Kv7tcZ9GRBSsAEAqA==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.1.tgz","fileCount":23,"unpackedSize":90246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8Ky9CRA9TVsSAnZWagAA0pYP+QDMOfMT0KHlaNNh7Klr\nVKOMPklvuMynEW0SdH5iD3CMPMLPM74CR1aGZOlKDhf2/NMtLSBcRxY6kTHs\nuF47ZtqDqjiAubKS3R0DJ230L4kQdQkvUeU+ZWSYNf+E8xikPhM05GN/sg/l\nvlvqOqvXeAgrQwMOolST3UfRXi+WxDYmHdUUEbonSB9Ooj/a4Dq4nlqW8io5\ne9Q4occ8e9jEOkuU9y/R7jT8B+kVxSswgoUTYErEAgqEd3kfWq4MpHUDIDRi\n3FCLGnLCUOtA1M8CF6y/oLZxJ8xHZCSO2/WTVBzfzG/ynBVgN/SKJw7fmniq\nXkhfh19C2lzQoZUKSHWD2ZOYND5ojDZJh9fregoMj6t7bdi9b1dl95ureM9M\norJj/YFOdTQrY+HRZ+KV8n03sC65vMgHFmgF32h3b4HlEQZCRElOjmSzw7Q/\nH6F9tmqCnY3hJ5kBR21rzI5z9IyzX/Ak1xXRGsNIBtU8Mj+4VAcT8PKNw210\nivg0+S9eDKT/KMoBFavHc4s+9cXRuPqgpNW4qDFXnAvKYvbOmio1o+2ie84m\nTyDqEFqavnwNbktQ3fT8JaFjoFwBNomMrwuhu/heq+gn8/7Zb4K7TIlolyXD\nAcTS8FaBG/ONNhh4RT2GK7H4t5ua/mizQSeknanTvpi0q6pdPf4Zfr2c17kB\n4sUl\r\n=nq+I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFmTe/jDQxmDDILTahR/RnZkaM5pVL/VZVD/5fTNCHQQIhALir2JKCXfAtNiHO4Z6gvyCBq33JskWUnWj1EettCF+G"}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.1_1576053948619_0.2659850376074089"},"_hasShrinkwrap":false},"1.2.2":{"name":"stimulus-flatpickr","version":"1.2.2","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.2","dist":{"shasum":"aab3209cd6e22b3336ffb01b969a0379c168e278","integrity":"sha512-RGBlCzBdgfjiI4GOLc47T9PGKWbB63Dcocy9W4TizUYu2EG7F/KslH/+1zFDsscCWkv1LoAet2Yy5/eFWfVojQ==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.2.tgz","fileCount":18,"unpackedSize":88917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeisVxCRA9TVsSAnZWagAAmDsP/0KG3JgHPnB7ncIiWA54\n4dJULHZsUaaOjd0j/uklTMV4WUe1wGSuje6DnKfAsey3tma7EDGYkE7ryAs4\n83wiaetGxPYtILAlMJpLobDv2M8oNrfHHOxCyYnc9gRYAa+E8VlK8cLDFi55\nYslQg7iIPFfjNmf/XmFDw0fu1YTTr/zmLpDS3J/t48+pGUgqzQwcW2pX4W8I\nfw3NQp5WwQcwH5/4/IPX7tmMLpsVHZ4dEnzLWjvD2yeBYypw/Zn9fODMqLom\nzXYdIf9mfEuu9hmnzfU3F4uhdd27cokmQd/KKk18Azx76QJrabk3FC2fFPpk\nFSWVFj8Hikw7meWYaDKbwUA7PMRVuhdZTGbe/EcEWgwt4eybmcagmJEIVUgM\n3A0LISoyGZJwtyZIP/P0VZQNfJoOdH3aXyVPA5Nkne6NxrdAKLGcNhFcnLwo\nfakOTiaR3dJbQsHC2chivExElSA3U5JXXqwlmGCxLYhB+SSwM+iY6tUuD4Hl\nmQNjXb5KjRtsUQfUtctWMepJQfJW2iclGglVovLb1dBmHYYYfv/JI/OkOM1t\nplmV72H0qxI9LAG91N1fj5lF737UaPxYPsUJ7j82qwBn/9HD44mc/enEU/OC\nYoyDcdHyXyDamklOUkctt15dO+9vfmf84+eRKV+Hw6a/igvFAqOOx+mD4MVi\nN3l+\r\n=7hIa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGcyYitGgrFV+Es9KKB5yU90vuqEERnpIEMdSHbZctkgIgFhlXAMvOauOq8t/Oq1aJDouTrUk/anTpSlpUZhFf8HM="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.2_1586152816837_0.4406664132548219"},"_hasShrinkwrap":false},"1.2.3":{"name":"stimulus-flatpickr","version":"1.2.3","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.3","dist":{"shasum":"583847cd312da68482ad4d9c7f5e1f6e1ad0c9c6","integrity":"sha512-DAKhN8h4XWFb7Wa58LkY2y9ubAF3M1qbi77LnmaviFxVVMDhbvz2yWoN43jBKQE7QW01tewsO86oDgonqwYZSg==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.3.tgz","fileCount":18,"unpackedSize":88917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeisaPCRA9TVsSAnZWagAASlQP/i5aVMR/ZrSmfT27ygIu\nMfhO2UPn/xH3zSrp8ArNAh7XJkVFAQSvtodeKUTrSC0ax6DUNiJM5dbB93yQ\nAAc5vJqKptH/283ts4Nl8sjb3pH1/UauPlBnRoiZu2NFTvXePd6pn1juCZyU\nHk8THpXdL1JUh2/Y6+KvgPXUXAhq8gVd+rbCjQA8l2kYqbXfbjRijoT8yOl+\nfW4UdRdfEhqeo3TOU8d9CoSgDTRpY+wr0Kucby9GvM3QuSfLSvF6CbJuvllt\nLu/0jD+UYMC+wvluq2JSu+Mg79py4M9vQ593Qw/+a35R+HvzhvFRk/ZxYqLM\neVu4w0R6OSyg3DkA0MuGUM6UfOhc7ix85ekwwZA4CCsMgbiKLN2nOghNs2wZ\nXBc0e3/8Xzl1FSaZ2KiuED5tcWE85l0rMaqnj20aU2YoM3alKw04uJortts8\nqCFV9xU6riYbgFxXFDfvfkWHIHXbPTSHlAcuSnUKBKEMF0z/bknUsoAAkXB+\nFyhwxsr//Yzh3Us7BgkqDWNmSI7cZ7hURxr1vYFwFLWUJ6lCSblU19t5LxDc\nCwpqapl2sLbbQ8gEqJrrNXlAg2tBu6/Nu8aqEr0OBLBCC6yhXogihMtPqkxT\n7ju+QNUzfsFOJrsMjUoJKb9stWtMSr/UqS4znfoERTsVfsvc5skkLRKaH+/b\nYY2Z\r\n=NkSc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBR77BKKtJdaGeN9kqp0u0egcYmd2qtno+ZhzHz4U33AiA7qYMeEMU9XIoX6fc5v0nGk3CPhb0fajU5C5Iy8LoPdQ=="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.3_1586153103279_0.35870157208529396"},"_hasShrinkwrap":false},"1.2.4":{"name":"stimulus-flatpickr","version":"1.2.4","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"dependencies":{"flatpickr":">=4.6.0","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.2.4","dist":{"shasum":"86f2202e9610a83e693028326e6ab702007d8b2b","integrity":"sha512-4wS+PEhRAu32ZS3D3wGOSt8h9rB8dE4EZ/gb8wIxVMB9eWQxKCIF5lBMRZ1qdlUpjKplesybgSqqykQNk1qqrw==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.2.4.tgz","fileCount":18,"unpackedSize":88992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeisesCRA9TVsSAnZWagAAN1YP/RokitlzDdZyCh7HTeKd\nwfUP/DzE39cpkC2GzoxUMEabc7SjNF+BhD5xJdvp6x1FJMLDWpq4Ao5KSVww\nUE2E88GqWlTy2R/IMEq8mQWY1CPgaszFzkBEA0A8zxmLjKa7GOUrkeEtOalG\nDVtzTDeBg4ocw4/97fO31EZSXdg9WuSQtnSGwHsHXPyoHjS5rle1i6jP0D0t\neqSgTuZPV/MB7gfHz5An7hNBFfS4PdIMppZH9SZruxUn2B48+lYXyUDFedpo\nsAk/yVqM/ubXl3DMQ+FUNIDzEDiopfb8bPXG/TQbqi+wlkUQ+ucWlUovns+n\nirSM/SDz+rMP6UsYkQphZ/S1p7BmT9d75LAaqJ2Et3mwwW7tFfzAVKkMMqC0\norfe4RgSoPAAN1eKRymSzAuN2Y9KqjA9WTmzmqJeMewljFwO8lrbtSEJZmDw\nyp3BqXMZEN2jxys0W9Ac5ic3LPxcYG6WqLHjmsLsXhK+BP/AOid+TnGfpTMy\nH1dlz9nrBPeNN2kbxRQtCSCg3C3vY80tOmbL9I7HiOlt4L+RuU4howM13yZR\n9Us5q1Ssg5HbLGm63M84/JJ4rU1OXpxHgMfLLzlGCCDpyrkUCB/F91YcqfRz\nH3d+QftIF6br0DdJjSlqgM0i0c3KpX+dSK14Na5Mj1784b0Fi9WRjTPLshBr\nzwq8\r\n=1TLN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMronQ+zfSo5hCPVHbecQmuF3BD3vhZf9d/XjBFs3esAiEAiOEE57e6c6jNTdZpQD9Ly3/jYWG5uEnuj2DcU9PnwvY="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.2.4_1586153388266_0.9103272487438832"},"_hasShrinkwrap":false},"1.3.0":{"name":"stimulus-flatpickr","version":"1.3.0","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"peerDependencies":{"flatpickr":">=4.6.2","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","flatpickr":"^4.6.3","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","stimulus":"^1.1.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.3.0","dist":{"shasum":"7e540d308b1c366e9ed24bec7230069e2db32af9","integrity":"sha512-/1PQkrQ1FdZy9eQmBmhmkAj/6i8r/gKur0hhdF8vJakwoVSXhqsYRTOaeuRJD31Yx/TSkQPdoHf7l6aNTVuUug==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.3.0.tgz","fileCount":18,"unpackedSize":89086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4GXNCRA9TVsSAnZWagAAEC4P/0qUg4uPs9Fl5Xwy9mmo\nxRO0DJ/64Zl240AyNMJPsIo971yhP4POR1TUm1fENQ6oLQZ3/ZE2OeHmWMtS\nhgjsFvWtbhgAc2XiXpf0o3abeyz8k3V6UVL4F9NQtVQ3mtrecgTwxrBllbI9\n7YZA7USY9qxkh7Y6AzfeUBBEMFEEEU6ftxVa9yds1sOoIBcgfgSo8edeDWV7\n0jNIYdzqSqs4AnCzDwykdjX3tKnws3IKGm36BtB1eLRlEtP2bWhxPnqnYTdE\ndf55QPAeurlMgD3hAXnmI3IpwfVleiD3XVX9gDIpYTeqseUMxnNXvOpk6dH9\nEAGf+5fjXDrPGsBziTfpPaU4BKA2qygLa1OUcdpUdmNzDEEEPj23PXb9n5c3\nyTfgGUrT7yB+F0ZhobLYtu9KD6ZnL0Ewv2SIzcF1bMF+UkAIQkl34FKQhspg\nDC8pzlzvRjjOdbiEt4m3zbT14ba5ODT/feU9chKuI8vEMlKLJwf5Bd8bzql9\nqvbY6I9+rIFdj9XsihehtjzT3nOSHuoMhv0FzNZL2cuIZOUhosYFJaHGZWQQ\n+TatyJTKhl5nOOmF5hWoHxPhPWCfm+pen64xrXJe1t/ucqghbEW2qAK6fSmt\nU8T7eHoSaT59nDfmqT1C6kz51i65dZ1WIIZPXG5B982wPgpL5dMTUVND3ZM2\nzLK3\r\n=3s2L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5IDKfoXpNvcfy9ou1zlinX7qQ89jOz7d8+pWMkPg4UAiEAqcMQZrSJ07J746wNd2FBgSOSyMe9SPSN6/5i6OnVETU="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.3.0_1591764428583_0.4039563735743166"},"_hasShrinkwrap":false},"1.3.1":{"name":"stimulus-flatpickr","version":"1.3.1","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"peerDependencies":{"flatpickr":">=4.6.2","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","flatpickr":"^4.6.3","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","stimulus":"^1.1.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.3.1","dist":{"shasum":"4631e295e78710c50ff0d16d1be3435ca6499030","integrity":"sha512-LDtnne/9ExPHY6nEElKO6k8ja8eKBs+kUFBEx3bVaRDHMJ1QvvgS0IFGuy8huSwaR75pttOWpE5garIpD0uijQ==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.3.1.tgz","fileCount":18,"unpackedSize":90238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcZFRCRA9TVsSAnZWagAA/BwQAJ4be5uxXCN/7eLkkbCc\n3izNg3/AdvKcavVgoO4BCu0+y7gm5ZNv5MRRm2OsUUwJ8AVbiAuWR/PvJb44\nlSR14eTkAV8ofM1dp8b2c/gmRSqbOp6E9UVRDshJO8yapMgvVsnG9IpUyCSV\nNfHVoGyJL1f7iOoZ+0GBfLN/s/yAs2+pRrj6cJItnRmbxHcU7ue2n112zfRL\nVPimy10e/aY0PmnPVSwkGn6123aNz8tARilcyxdrKBSXMOHC6wfsIo9IVEs5\naW2lbnXPdTGpBDqq9H7L4XJBH2VltxiccxjJIHD9Ch/KScHdW6JT24ikHb0H\nfCbo7B+kSgkmf/bmsBGNB4Yu7LCV2RafLh8fqPeK/RGSbJz7KyzKgbUnUWb/\nNJsFda2eluY43PtV6CZ/1PvOwG2mHIQb/+Liz7iNKC9fuamVydSLzMmcedYY\numoqRX/gMbzA7qfHL2y/t8eYqt6XHXT7GBsGgiR7JakLDTsYGnOvgzgPG67V\nHOnEQMdD0rmom0tu/So5Iz4aFhR42UW8GZDFmzbBpD68qmCtm4d/kxDPFwPg\nhw/vQtchVveESVaD6XqGjQ93fhr9OJpwfWOImA49+3fd2I9sZcMB6W80VBv2\n0QZVW1SNwB6SouVYe4YJGQCkkENIYgGmFc5lM4V8W6NI5uAzd6IE8Tdtcc9/\njkhp\r\n=A00b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBF5mhtd1CbUi8AeZlkV9v10WQj/on5LQ9SbOynLuc2gIgM1U8wYlO7l9rOeV3FqnSczcx9BWbKsypiuIKPBpdye4="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.3.1_1601278288603_0.0205048428504524"},"_hasShrinkwrap":false},"1.3.2":{"name":"stimulus-flatpickr","version":"1.3.2","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"peerDependencies":{"flatpickr":">=4.6.2","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","flatpickr":"^4.6.3","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","stimulus":"^1.1.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.3.2","dist":{"shasum":"a79bd7b84a4bd112bd0905991233cb161febc099","integrity":"sha512-wbDZdyakClNd/5ob+ywl23L8QdzPXJy4aGf6giJT1mGOdu0i9CJPGeGIiEQRr9p5biwkVEwzIqBo57mY+ppRqg==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.3.2.tgz","fileCount":18,"unpackedSize":94085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcZMsCRA9TVsSAnZWagAArYcQAJ7OAfaWi8hk/D3r0ajc\nsJeOMwlrjSLn8zh31DAnNbxHL0B05bvGHo+vI+KiE62oCHMlqzRWaNCZ8jXX\nbxTAiByIxnXZARQZZsP1y/ZQ3mSdvXdQP90yMjUAKQ7janTRIiy+liaKmQ5c\nPcUXPNYFqFiGeRmCML59plfL2Ly/4qIRo0d5ni895uSAOqcV+xUeSCs6noyb\nfcCuiHU/qLrk3oHkqomd4V8MenT34TJrGcVHyU4+0xKGtXFKHdEPj4ViFjHH\n6ERL7M3GAYaeFPJWCEy8VPR1DpTK8Rl7uuUdGxt4z8b8+SeAEmCjKmVvG0FU\nIHYIw0JASmJwOb6LBxprf5ieKDaQ99cxbR3o6HpYYJ55dvX41YApjMOndapv\n8RZmDAi6NKsHOAESgvYNbBfRMOnvynQMPEA569oSFfx4PPpOxiHYtvAuC+yu\nm5GXocvDL9kiTNEgINcLVpt6vJ6F2XZlUPzV4H7lRgxMIMXT5MOPcwFroTVc\nTfsm2lTARXO0TGROZf9iwqoGfycjpKwB+TTf1Ot1bd5UWH8Jg95Fp0XjVMRI\n1W4fQD6+xK5V5/ALXJzAF7/YwlLQrPvGCRii4hjcy53wz8dR+sqrVA5XQ7Id\no31w1f6ZCikn2GtgPCT3T/dL6BovO1o7uzkykQRTxD6fqhJk2D9BUAEZq3M1\nR53W\r\n=TNNB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHWuv1Smen6jYSRx0/bPDJ/Zlug4ATOif65Bn/t1pmjAAiEAiFFnrB5q7WH4JoeTRBKOFs5GtSuTMSjyPoT+Uy5WIMo="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.3.2_1601278764415_0.4833948560835202"},"_hasShrinkwrap":false},"1.3.3":{"name":"stimulus-flatpickr","version":"1.3.3","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"peerDependencies":{"flatpickr":">=4.6.2","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","flatpickr":"^4.6.3","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","stimulus":"^1.1.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.3.3","dist":{"shasum":"ffe0b6e7ddde510b8e478dbf50abea1f4983e4ce","integrity":"sha512-uyT97uKzRamN7Udhfh35XxsoqgnLMn+h30Ianrc6UwUqWWnGqD4GhdBbXrA94+AZslB3dU+aDc+G3cmiQZVwqg==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.3.3.tgz","fileCount":18,"unpackedSize":94242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcj2cCRA9TVsSAnZWagAAC98P/0zvOYzVgCcBykLEyapb\nzfJEx7JQP5PcgAbgvxojVcoCL2u1k5SXWCWsur+ohV5LNIEFYzKnKxQ33SLE\n+M0NfdRJXxBFEdAEptlm19ePtDgtX6CAov2+1eamgU9SSCF4q9+U1ea1jvc0\nqPRrEbmUTB9whgBFAdxO8H09/3EogbOcivzJ1RfHIe/et+x9CFrLRT2xg8LM\nhBPVH94Wq2h+Ig6ndJjG5IwzSaqOEjGqRnnR6LKTLHl/N1x7Wfw1nVUCEKys\nST4a652EElLgGxkqKfwBhpTJoMZ209EMDd4+L53pR9QXXcr0tGjDqGVvR4et\nisYbdtUbSwot35W1bJX2WIuwRuDOcco7NnwzK/hFmG6AGs4As11uEGxKox9G\n4O6zSI9T8NqZ4aLXZ6Gogsqnr38k+78mf+LYUcngAcKjk1x+vityfwCWO2Gt\nxZxmTan0PTicBjVRKAtBJEbf3jN5B8tbUKIJNuSZuixwX7D6XBA20DFDwtCN\n83N7H523gXXJROLg6YfmlI6JuzDRYnvV0E3j29L0qxvfjt58OQMw535iqxpV\n6QhSKWyuM7+DQzye/Z+fXTwTJ9UXNEsxZZ6qy9BvARjjPiWHaYu/r6eG9sNX\nd7P1R+tuAgGscotAZWotTla3oStB227ny2jc0CdAL77QShRGpXTiX/btRieo\nRyac\r\n=KDRP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfJmfAE48ldEI+oQRp6IpLpojB9D/KfazGvxABXOY9bAiBsRP2IPv5iNfPQE6fWQVUYxQSiG0sgxryZrNFkOPDZDw=="}]},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.3.3_1601322395924_0.5754354237453565"},"_hasShrinkwrap":false},"1.4.0":{"name":"stimulus-flatpickr","version":"1.4.0","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","amdName":"StimulusFlatpickr","author":{"name":"@adrienpoly"},"license":"MIT","external":"stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"peerDependencies":{"flatpickr":">=4.6.2","stimulus":">=1.1.1"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","flatpickr":"^4.6.3","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^5.1.3","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","stimulus":"^1.1.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@1.4.0","dist":{"shasum":"a41071a3e69cfc50b7eaaacf356fc0ab1ab0543c","integrity":"sha512-rcC/c9+E+f5W2kOjaaLShtf3i+p95ACqt+oGzSAgeuZh2YeIN8gW4EWO7h0STBLzSVPl6BjIfPWP7upMPavIVQ==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-1.4.0.tgz","fileCount":18,"unpackedSize":94272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh28GDCRA9TVsSAnZWagAAIbAQAJqgpOdjH0M7q4K9GzdX\nyWLjcfgQ4OCYzqrgLE/BNH/LKFIE4qUrXQvkZw3YMxays6OHE+Vl+wjkYtEl\nlJW76frRqBTooWD7+UluUs1qjBFTOM2F6ocff+RaCvqZCjWsJVg7QPAsBrFJ\nOQrUgBwNBZXhr/Zdca14nHcFr0U7q7VzVdLrJEg39kdCgRf64jmDWZYXHYzE\nLPKJzMhxgkPCUkDeNImr2lBqdW8LDWnGF7EWUPr5OdiZxZIaM+n4A6uSuS7X\n6qwmEQ5DZmIWCQTP2tM+/N/DraVajxi2PdHX3+QjjRXpLxGxKlxdLMneEHoW\nN7eO9Tydlhz/SkafYlidI3pXcIMdP1dAFckhyBtR6R6SwIbDKZooopeuMyUB\nBEig4M/7xRV1Mc4hQDbXXB5FHwV1iDQYnHY1YQbgLmJ0x6N1CGahLhH725Oh\ntMWpcX59Sj6tSMO/5KWrrKsTShC3geZEBG3NDwbjeJXgLqowu/EhGpcYLi1Q\nlU/5jchVZTggtUAXL+dK82x9fpGStkOlBSD5LWNyz9Vdbc7o30hMJj4+FTFL\nqTwEceIi3/LXB7Xil2CA46VVAUNE5ocR+/jHUS8UDGa+Qce1saW47wFArW44\nw3GH034BAjK+Vgj6t3Vfob0+L1Ap7sF8yNOcYp3UJgw50dg21M9TKEM/Q6Fr\nhjSH\r\n=FDeg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF47FQpAE7gAwezIFgghxAB8z7nO3A8FHH4c8PPl8lnhAiEAtGScwzA1N5bMatMplnFz9Aqz+VToqrBH4rdHfTIyEBk="}]},"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_1.4.0_1606198900442_0.9439753494337904"},"_hasShrinkwrap":false},"3.0.0-0":{"name":"stimulus-flatpickr","version":"3.0.0-0","description":"A Stimulus Wrapper for Flatpickr library","keywords":["stimulus","stimulusjs","flatpickr"],"main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","source":"src/index.js","amdName":"StimulusFlatpickr","author":{"name":"@adrienpoly"},"license":"MIT","external":"@hotwired/stimulus, flatpickr","scripts":{"start:playground":"webpack-dev-server --mode development --open --config playground/webpack.config.js --hot","build":"rollup -c && yarn test","dev":"rollup -wc","test":"NODE_ENV=test karma start","test:watch":"yarn test --auto-watch --no-single-run","test:headless":"yarn test --auto-watch --no-single-run --browsers ChromeHeadless","codecov":"codecov","release":"np"},"peerDependencies":{"flatpickr":">=4.6.2"},"devDependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.3.4","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-spread":"^7.2.2","@babel/preset-env":"^7.6.0","babel-eslint":"^10.0.3","babel-loader":"^8.0.5","babel-plugin-istanbul":"^5.1.1","chai":"^4.2.0","chai-dom":"^1.8.1","codecov":"^3.1.0","css-loader":"^1.0.0","eslint":"^6.3.0","eslint-plugin-import":"^2.18.2","eslint-plugin-mocha":"^6.1.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","flatpickr":"^4.6.3","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^2.0.1","karma-fixture":"^0.2.6","karma-html2js-preprocessor":"^1.1.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-rollup-preprocessor":"^7.0.2","karma-sinon-chai":"^2.0.2","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","minimist":"^1.2.5","mocha":"^5.2.0","np":"^7.5.0","npm-run-all":"^4.1.3","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.0.1","rollup-plugin-node-resolve":"^5.2.0","sinon":"^6.1.4","sinon-chai":"^3.2.0","size-plugin":"^1.0.1","style-loader":"^0.23.0","webpack":"^4.39.3","webpack-cli":"^3.2.3","webpack-dev-middleware":"^3.6.1","webpack-dev-server":"^3.2.1"},"repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"resolutions":{"minimist":"^1.2.5"},"dependencies":{"@hotwired/stimulus":"^3.0.0"},"readmeFilename":"readme.md","readme":"<h1 align=\"center\">📆 Stimulus-Flatpickr Wrapper</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://badge.fury.io/js/stimulus-flatpickr.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr\" rel=\"nofollow\">\n    <img src=\"https://circleci.com/gh/adrienpoly/stimulus-flatpickr/tree/master.svg?style=svg\" alt=\"CircleCi build status\">\n  </a>\n  <a href=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr\">\n    <img src=\"https://codecov.io/gh/adrienpoly/stimulus-flatpickr/branch/master/graph/badge.svg\" alt=\"Coverage\"/>\n  </a>\n</p>\n\n<p align=\"center\">\n  <b>Modest yet powerful wrapper of Flatpickr for Stimulus</b></br>\n  <sub>Only ~1kb <sub>\n</p>\n\n<br />\n\n- **Simple**: create advanced datepickers with less code\n- **Backend Friendly**: easily pass backend information to the datepicker (locals, availabilities, date formats etc)\n- **strftime friendly**: [converts automatically strftime](#date-and-time-formats) formats to flatpickr formating tokens\n- **Disable days of week**: easily disable days of week (ie: all sundays)\n- **Turbolinks**: make all your datepickers compatible with Turbolinks by design\n- **Getters**: all Flatpickr elements are available as [targets](#elements)\n- **Events/hooks**: all flatpickr [events/hooks](#callbacks) are directly available in your Stimulus Controller.\n- **Example**: [detailed example](#example) for adavanced usage of flatpickr\n- **MIT Licensed**: free for personal and commercial use\n\n## A modest wrapper of Flatpickr for Stimulus\n\nBy using this wrapper of [Flatpickr](http://flatpickr.js.org/) for [Stimulus](https://stimulusjs.org/) you can make all configurations for the Datepicker directly with the `data-attributes` of the HTML. This makes it very handy to create datepicker with server generate html and pass information from the backend to the datepicker.\n\nHere is a simple example:\n\n```erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_min_date: Time.zone.now #disables past dates\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n## Example\n\nAn example of a Rails app showcasing\n\n- localization of the datepicker 🌍\n- localization of the date formats 🌍\n- availabilities in the date picker 📅\n- Fully boosted with Turbolinks 🚀\n\nis available here : [Rails Stimulus Flatpickr](https://github.com/adrienpoly/rails_stimulus_flatpickr)\n\n## Install\n\nThis assumes that you have [Stimulus](https://stimulusjs.org/handbook/installing) already installed. For Rails(5.1+) app please refer this doc (https://github.com/rails/webpacker/blob/master/docs/integrations.md#stimulus) to get started with Stimulus.\n\nIn your project just add the `flatpickr` and `stimulus-flatpickr` package.\n\n```bash\n$ yarn add flatpickr\n$ yarn add stimulus-flatpickr\n```\n\nor\n\n```bash\n$ npm i flatpickr\n$ npm i stimulus-flatpickr\n```\n\nNote: Do not use both `yarn` and `npm` to install packages, this might lead to an error: `...It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files`\n\n## Basic usage\n\nIf you only need to convert an input field in a DateTime picker, you just need to register a standard Stimulus controller and add some markup to your input field.\n\n### Register a Flatpickr Controller\n\nmanually register a new Stimulus controller in your main JS entry point.\n\n```js\n// ./packs/application.js\nimport { Application } from '@hotwired/stimulus'\nimport { definitionsFromContext } from '@hotwired/stimulus-webpack-helpers'\n\nconst application = Application.start()\nconst context = require.context('../controllers', true, /\\.js$/)\napplication.load(definitionsFromContext(context))\n\n// import Flatpickr\nimport Flatpickr from 'stimulus-flatpickr'\n\n// Import style for flatpickr\nrequire('flatpickr/dist/flatpickr.css')\n\n// Manually register Flatpickr as a stimulus controller\napplication.register('flatpickr', Flatpickr)\n```\n\nNote:\n\n- **Setup**: By Manually registering Flatpickr controller, you don't need to create a `flatpickr_controller.js` file. However, To add custom behavior you will have to create the `flatpickr_controller.js` file. Read more details about it below.\n- **Style**: You can always choose different theme for calender by requiring different `.css` file. You can find them inside your app's root directory `node_modules/flatpickr/dist/themes`\n- **Deployment**: In Production environment, include `<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>` in your `application.html.erb` file in order to load the calendar style.\n\n### Using it with Rails\n\nYou can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpickr-the-option`.\n\n```erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n    data: {\n      controller: \"flatpickr\",\n      flatpickr_date_format: \"Y-m-d\",\n      flatpickr_min_date: Time.zone.now\n    } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker.png\" alt=\"datetime picker result\">\n</p>\n\n### Options & conventions\n\nAll options for Flatpickr can be found [here](https://flatpickr.js.org/options/).\n\nAll options are in `camelCase` (JS) and must be converted to `lower_snake_case` in the `data-attribute`. `lower_snake_case` is automatically converted to `kebab-case` when rails render the HTML.\n\n```erb\n<%= f.text_field :start_time,\n  data: {\n    controller: \"flatpickr\",\n    flatpickr_enable_time: true\n  }\n} %>\n```\n\nwill output this HTML:\n\n```html\n<input data-controller=\"flatpickr\" data-flatpickr-enable-time=\"true\" type=\"text\" name=\"appointement[start_time]\" />\n```\n\n### HTML markup\n\nIf you are not using Rails or simply wants to markup your HTML directly, simply add a `html data-controller=\"flatpickr\"` to your input field and some options `html data-flatpickr-some-option=\"value\"` options must be converted from `camelCase` to `kebab-case`\n\n## Advanced Usage\n\nIf you need more than just displaying the standard DateTime picker, then you can extend the `stimulus-flatpickr` wrapper controller. This is necessary when you need to:\n\n- set a custom language\n- create custom callbacks\n- perform JS business logic\n\n**Skip basics installation steps from above!**\n\n### Extends the controller\n\ncreate a new Stimulus controller that will inherit from `stimulus-flatpickr`\n\n```js\n// ./controllers/flatpickr_controller.js\n// import stimulus-flatpickr wrapper controller to extend it\nimport Flatpickr from 'stimulus-flatpickr'\n\n// you can also import a translation file\nimport { French } from 'flatpickr/dist/l10n/fr.js'\n\n// import a theme (could be in your main CSS entry too...)\nimport 'flatpickr/dist/themes/dark.css'\n\n// create a new Stimulus controller by extending stimulus-flatpickr wrapper controller\nexport default class extends Flatpickr {\n  initialize() {\n    // sets your language (you can also set some global setting for all time pickers)\n    this.config = {\n      locale: French\n    }\n  }\n\n  // all flatpickr hooks are available as callbacks in your Stimulus controller\n  change(selectedDates, dateStr, instance) {\n    console.log('the callback returns the selected dates', selectedDates)\n    console.log('but returns it also as a string', dateStr)\n    console.log('and the flatpickr instance', instance)\n  }\n}\n```\n\n### Global settings for all datepickers\n\nAs we have seen just above you can easily from your rails `erb` code pass the flatpickr options. This is great for passing dynamic options that might change (ie enableDate, dateFormat etc).\n\nIf all your datepickers share some global settings you can define them in your `initialize()` or `connect()` function.\n\n```js\ninitialize() {\n   //global options\n    this.config = {\n      enableTime: true,\n      time_24hr: true\n    };\n  }\n```\n\nor with `connect()`\n\n```js\nconnect() {\n   //global options\n    this.config = {\n      ...this.config, //spread options in case some where defined in initialize\n      enableTime: true,\n      time_24hr: true\n    };\n\n    //always call super.connect()\n    super.connect();\n  }\n```\n\n### HTML markup\n\nThen in the same way as above you can now create forms and input fields easily by adding a `data-controller=\"flatpickr\"` attribute to the input fields and pass [options](https://flatpickr.js.org/options/) with the Stimulus Controller states : `data-flatpick-the-option`.\n\n```erb\n<%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n  <%= f.text_field :start_time,\n                    data: {\n                      controller: \"flatpickr\",\n                      flatpickr_date_format: \"Y-m-d\",\n                      flatpickr_min_date: Time.zone.now }\n  %>\n  <% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-black-fr.png\" alt=\"datetime picker result\">\n</p>\n\n### Date and Time formats\n\nFlatpickr has custom [formatting tokens](https://flatpickr.js.org/formatting/). in Rails (and other backends) formats are based on `strftime` standard.\n\nThis package automatically converts `strftime` datetime formats to the nearest Flatpickr format.\n\nWith this solution, it becomes handy to localize your date formats. `t(\"date.formats.long\")` outputs `\"%B %d, %Y\"`for the local `:en` and it outputs `\"%e %B %Y\"` for the locale `:fr`.\n\n```erb\n<%= form_with model: appointment do |f| %>\n  <%= f.text_field :start_at,\n      data: {\n        controller: \"flatpickr\",\n        flatpickr_alt_format: t(\"date.formats.long\"),\n        flatpickr_alt_input: true,\n        flatpickr_min_date: Time.zone.now,\n      } %>\n<% end %>\n```\n\n<p align=\"center\">\n  👇👇👇👇👇👇\n</p>\n<p align=\"center\">\n  <img src=\"./images/datetime-picker-formats.png\" alt=\"datetime picker result\">\n</p>\n\n### Enable/Disable days of week\n\nWith Flatpickr to disable certain days of the week, you need to use the disable js function. Obviously passing a function through data-attributes is not easy 😄.\n\nThe wrapper introduce two new configuration options:\n\n- `disableDaysOfWeek`: pass an array of days to disable (all others are enabled)\n- `enableDaysOfWeek`: pass an array of days to enable (all others are disabled)\n\n<table>\n<th>\nCode\n</th>\n<th>\nResult\n</th>\n<tr>\n<td>\n   <pre lang=\"erb\">\n   <%= form_with model: Appointement.new, authenticity_token: true do |f| %>\n     <%= f.text_field :start_time,\n       data: {\n         controller: \"flatpickr\",\n         flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays\n         flatpickr_disable: [\"2018-09-25\", \"2018-09-26\"] #disables individual dates\n       } %>\n   <% end %>\n   </pre>\n</td>\n<td>\n  <p align=\"center\">\n    <img src=\"./images/datetime-days-of-week.png\" alt=\"datetime picker result days of week\">\n  </p>\n</td>\n</tr>\n</table>\n\n### Callbacks\n\nAll Flatpickr [events/hooks](https://flatpickr.js.org/events/) are available as callbacks in the extended controller as demonstrated above for the `onChange` hook.\n\nJust add the function to your Stimulus Controller in `camelCase` without `on`.\n\n`onChange` -> `change(){}`\n\n### Instance and its methods\n\nYou can access the flatpickr instance from your Stimulus controller by calling `this.fp`. Also, the instance methods are available through this instance call.\n\n```javascript\nyourFunction () {\n  // ...\n  this.fp.clear()\n  this.fp.close()\n}\n```\n\n### Custom elements\n\nIf you want to display additional information on the calendar, you can wrap the Flatpickr controller arround custom elements. You can use the predefined target `instance` to attach the input element to the date picker.\n\nExample:\n\n```html\n<div data-controller=\"flatpickr\">\n  <!-- the flatpicker instance -->\n  <input type=\"text\" placeholder=\"Select Date..\" data-flatpickr-target=\"instance\" />\n  <!-- the custom element -->\n  <input type=\"text\" data-flatpickr-target=\"custom\" />\n</div>\n```\n\nIn the stimulus controller, add the target:\n\n```js\nstatic targets = ['custom']\n\nyourFunction () {\n  //...\n  this.customTarget\n}\n```\n\n### Getters\n\n#### Elements\n\nIn your controller you can access the Flapickr [elements](https://flatpickr.js.org/instance-methods-properties-elements/#elements) using some Stimulus like targets.\n\n`this.calendarContainerTarget` : Self-explanatory. This is the div.flatpickr-calendar element.\n\n`this.currentYearElementTarget`: The input holding the current year.\n\n`this.daysTarget` : The container for all the day elements.\n\n`this.daysContainerTarget` : The container for all the day elements.\n\n`this.inputTarget` : The text input element associated with flatpickr.\n\n`this.nextMonthNavTarget` : The “right arrow” element responsible for incrementing the current month.\n\n`this.monthNavTarget` : The container with the month navigation.\n\n`this.prevMonthNavTarget` : The “left arrow” element responsible for decrementing the current month.\n\n`this.selectedDateElemTarget`: the selected date element.\n\n`this.todayDateElemTarget`: today element.\n\n`this.weekdayContainerTarget`: the container we all the days of the week.\n\n## Overriding connect & disconnect\n\nif you need to override the connect function in the extended controller, you need to call `super`\n\n```js\nconnect(){\n  // ...\n  // define global settings as explained in the global settings section before super\n  // ...\n\n  // always call super.connect()\n  super.connect();\n\n  // ...\n  // Your code can access this.fp flatpickr instance\n  // ...\n}\n```\n\n## Internationalization\n\nTo handle multiple language to translate your datepicker and convert the date formats, you can have a look at the [example app](https://github.com/adrienpoly/rails_stimulus_flatpickr). `stimulus-flatpickr` makes it straight forward to handle locales.\n\n## CSS\n\nThis wrapper does not include any CSS. Flatpickr CSS should be loaded separately from the main Flatpickr package as you would normally do.\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n**To contribute:**\n\nFork the project.\n\nInstall dependencies\n\n`$ yarn install`\n\nStart the test watcher\n\n`$ yarn test:watch`\n\nRunning one-off test runs can be done with:\n\n`$ yarn test`\n\nYou can test locally also the results with the playground project [./playground](./playground)\n\n`$ yarn start:playground`\n\n**Then :**\n\n👍 Write some tests\n\n💪 Add your feature\n\n🚀 Send a PR\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Adrien POLY\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stimulus-flatpickr@3.0.0-0","dist":{"shasum":"af9bfa70bd1b74654312580101387c9d13ee32f2","integrity":"sha512-TLfxen1OS+3Jy594+VmYkJz/IRaH5wqxxdbVB1aalS1+3EJgy/shqB/Fd4ttKWC8EIOVd8Pzx22oVnjNep3mTA==","tarball":"https://registry.npmjs.org/stimulus-flatpickr/-/stimulus-flatpickr-3.0.0-0.tgz","fileCount":18,"unpackedSize":359009,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcOLdT/J7wbvzBT2OyzTotGeBzbim7r5oDGAcncezHyAIhAM8Sy/WHT37pAbDUp2K/lgMEOqRMnCCeNyWeI1DfpUkf"}]},"_npmUser":{"name":"adrienpoly","email":"adrienpoly@gmail.com"},"directories":{},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stimulus-flatpickr_3.0.0-0_1632488174666_0.30596324404391395"},"_hasShrinkwrap":false}},"time":{"created":"2018-05-05T19:48:31.341Z","0.1.0":"2018-05-05T19:48:31.469Z","modified":"2022-05-18T18:09:27.552Z","0.1.1":"2018-05-05T20:04:03.911Z","0.1.2":"2018-05-05T20:21:23.186Z","0.1.3":"2018-05-05T21:11:15.620Z","0.1.4":"2018-05-05T21:11:51.737Z","0.1.5":"2018-05-05T21:24:01.156Z","0.2.0":"2018-05-07T16:19:49.024Z","0.2.1":"2018-05-07T17:18:42.796Z","0.3.0":"2018-05-08T07:25:19.801Z","0.4.0":"2018-08-24T14:36:17.082Z","0.4.1-beta.1":"2018-08-27T20:06:12.832Z","0.4.1":"2018-09-02T13:00:33.371Z","1.0.0-beta.1":"2018-09-05T09:31:49.699Z","1.0.0-beta.2":"2018-09-10T20:39:02.102Z","1.0.0-beta.3":"2018-09-12T11:34:56.101Z","1.0.0":"2018-09-12T11:52:27.642Z","1.1.0-beta1":"2018-09-26T15:36:58.680Z","1.1.0":"2019-09-08T12:27:36.359Z","1.1.0-beta.2":"2019-09-08T12:48:29.914Z","1.1.1":"2019-09-08T13:34:18.669Z","1.1.2":"2019-09-09T01:02:39.165Z","1.2.0-0":"2019-11-14T01:11:06.764Z","1.2.0-1":"2019-11-15T06:30:24.911Z","1.2.0-2":"2019-11-16T13:59:38.985Z","1.2.0-3":"2019-11-17T09:02:38.734Z","1.2.0":"2019-11-21T23:51:24.506Z","1.2.1":"2019-12-11T08:45:48.759Z","1.2.2":"2020-04-06T06:00:16.953Z","1.2.3":"2020-04-06T06:05:03.391Z","1.2.4":"2020-04-06T06:09:48.471Z","1.3.0":"2020-06-10T04:47:08.756Z","1.3.1":"2020-09-28T07:31:28.727Z","1.3.2":"2020-09-28T07:39:24.527Z","1.3.3":"2020-09-28T19:46:36.079Z","1.4.0":"2020-11-24T06:21:40.592Z","3.0.0-0":"2021-09-24T12:56:14.810Z"},"maintainers":[{"name":"adrienpoly","email":"adrienpoly@gmail.com"}],"description":"A Stimulus Wrapper for Flatpickr library","author":{"name":"@adrienpoly"},"license":"MIT","readme":"","readmeFilename":"","repository":{"type":"git","url":"https://github.com/adrienpoly/stimulus-flatpickr.git"},"keywords":["stimulus","stimulusjs","flatpickr"]}