{"_id":"@dariovinci/bs-multiselect","_rev":"7-c069cbf6f02cd82a56030675250836b2","name":"@dariovinci/bs-multiselect","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@dariovinci/bs-multiselect","version":"1.0.0","keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","_id":"@dariovinci/bs-multiselect@1.0.0","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"homepage":"https://github.com/dariovinci/bs-multiselect#readme","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"dist":{"shasum":"53a57a66103b3798066f4ef2cf32ddf3c8287f7d","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.0.0.tgz","fileCount":4,"integrity":"sha512-QO5YRgeQUudAOJdaKVDhAn/UrBfqKbNXNYr4Nm8vdX9x9QCi7eFR+gBpN+rtPoDRQgV2pL6cshIObiXDiohtyg==","signatures":[{"sig":"MEUCIQDTsS5QYiNLT8KwLN94OMr2w2iDNjdonWvsVoomx9kC0wIgceezp5Mjnic7ocW36b+Yrgg/VCsgKMnL7c/iShdoorY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14198},"main":"src/index.js","gitHead":"daadc9d9cb9c4cd1d4ecadf461f180e501c2159c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dariovinci","email":"vinci.dario@gmail.com"},"repository":{"url":"git+https://github.com/dariovinci/bs-multiselect.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple and light multiselect for bootstrap written in JS","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bs-multiselect_1.0.0_1717879903335_0.017884470234768024","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@dariovinci/bs-multiselect","version":"1.0.1","keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","_id":"@dariovinci/bs-multiselect@1.0.1","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"homepage":"https://github.com/dariovinci/bs-multiselect#readme","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"dist":{"shasum":"519bc992c0d35b9b882dfb72b297a1a11e846e58","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.0.1.tgz","fileCount":4,"integrity":"sha512-SeLBUYwDLXmVt3TDG0zaA0rzJLHq7wl1zynHEfbCst35BhNtdjD3nk0peRO3nCIbrFevSjryHS9CogHR930xsg==","signatures":[{"sig":"MEYCIQDxe+1qFk05dqwVfW1g6PN0iUW8tNZwFob+ooXZWiDVCgIhAKeV3Ftb2eFFQXBZ1zflteGxjb5Mh1XAsz0aQfc1Ue7h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17395},"main":"src/npm publish --access publicindex.js","gitHead":"63b07ac23f2eadda9b4a8244fbb056b4c5747068","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dariovinci","email":"vinci.dario@gmail.com"},"repository":{"url":"git+https://github.com/dariovinci/bs-multiselect.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple and light multiselect for bootstrap written in JS","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bs-multiselect_1.0.1_1717885576523_0.5728539387236251","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@dariovinci/bs-multiselect","version":"1.0.2","keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","_id":"@dariovinci/bs-multiselect@1.0.2","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"homepage":"https://github.com/dariovinci/bs-multiselect#readme","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"dist":{"shasum":"2c79a8622578409d0c80e62f654ec687d805e6c4","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.0.2.tgz","fileCount":4,"integrity":"sha512-vEuIEDRhnEy1sy8MccHb2q3pp/ULa97oOXTetlMTBBm7Mi8cG8KUBlroQy8zdyAQH2q2B3/uhKTQ2nLLlM8thQ==","signatures":[{"sig":"MEYCIQChcxPrjwzHH6ZHvUjGoAzbeXy5GtexkMz5M4slV5xRAQIhANYd40CejQNz8jCzR4hTmCzaRR6IPsokrr102jYPQ11T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17368},"main":"src/index.js","gitHead":"44a5daf4aeedb6b3f813f72b712b079e7ea8c59a","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dariovinci","email":"vinci.dario@gmail.com"},"repository":{"url":"git+https://github.com/dariovinci/bs-multiselect.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple and light multiselect for bootstrap written in JS","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bs-multiselect_1.0.2_1717886374111_0.9387532299630565","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@dariovinci/bs-multiselect","version":"1.0.3","keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","_id":"@dariovinci/bs-multiselect@1.0.3","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"homepage":"https://github.com/dariovinci/bs-multiselect#readme","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"dist":{"shasum":"79347370a427c5845b172e3784eeaf15d12d01cd","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.0.3.tgz","fileCount":4,"integrity":"sha512-JGJwpX5tEp8n5XyVvhs2PFcEfenTfwRbGrMLB1vYEwjDhqLW8b5Pi9xCLIHwjjo3f1AGHA+pEWDprOVIUEWn8A==","signatures":[{"sig":"MEQCIAmiZRli2LEw/1DqOiF0wrc7uEKFUWUwZcOqVR7WJIfpAiBZLMq+BUcVCOeHyXGpp5dqEGSxQp66p5x6cSHI3dUNSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18475},"main":"src/index.js","gitHead":"b6081702bf846173ed7a17a41e2e7314159fe422","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dariovinci","email":"vinci.dario@gmail.com"},"repository":{"url":"git+https://github.com/dariovinci/bs-multiselect.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple and light multiselect for bootstrap written in JS","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bs-multiselect_1.0.3_1717898240633_0.4723055084943515","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@dariovinci/bs-multiselect","version":"1.0.4","keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","_id":"@dariovinci/bs-multiselect@1.0.4","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"homepage":"https://github.com/dariovinci/bs-multiselect#readme","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"dist":{"shasum":"ea6ee1ee89d27a36763b11b02e36901709e949d4","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.0.4.tgz","fileCount":4,"integrity":"sha512-ORJOP6S+aulI1ZIbdftQM8cZu0IP/VIeQ0X4DRYF8saM5zugr0RKJ9xYMAF5FAREYnJk3MFaPCXIch6v6fsJCw==","signatures":[{"sig":"MEQCIGd6S+hl+pda9vZYjdFg9pRsphO187wEZ5Hs4dQJWrOQAiBhq+qafsZSqo5rAOWPKQfd5Fm35WDFjUy/loS11bHs+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18481},"main":"src/index.js","gitHead":"1e9ea782048645e0a60124128ccf70bd7216823f","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dariovinci","email":"vinci.dario@gmail.com"},"repository":{"url":"git+https://github.com/dariovinci/bs-multiselect.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple and light multiselect for bootstrap written in JS","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bs-multiselect_1.0.4_1717929057246_0.8694940431815807","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@dariovinci/bs-multiselect","version":"1.0.5","keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","_id":"@dariovinci/bs-multiselect@1.0.5","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"homepage":"https://github.com/dariovinci/bs-multiselect#readme","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"dist":{"shasum":"a58475cf9de3cfbd2b1c72ba3c528c5f3003c499","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.0.5.tgz","fileCount":4,"integrity":"sha512-7urdV4NckCLk1ifmqpq0uuDITR8LPMvaBEagNR5bqLY+6DhPGVPDYkvB/10+gu5O888UDInPfX4VUIw0v6fPXg==","signatures":[{"sig":"MEYCIQDeqfwp85yo0/PLY3DSzn+H3T20VQ1X6S5TjK3y+yBdYwIhALV7R+JcgKFFLfNxYBKwJHZUrjZ5QXduFilEH+3C3T7Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18613},"main":"src/index.js","gitHead":"8b42615df1a2d09c7d966aed19f7d8fbcb690377","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"dariovinci","email":"vinci.dario@gmail.com"},"repository":{"url":"git+https://github.com/dariovinci/bs-multiselect.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple and light multiselect for bootstrap written in JS","directories":{},"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bs-multiselect_1.0.5_1718136594387_0.03119142660850227","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@dariovinci/bs-multiselect","version":"1.1.1","description":"A simple and light multiselect for bootstrap written in JS","main":"src/index.js","scripts":{"test":"echo \"No tests specified\""},"repository":{"type":"git","url":"git+https://github.com/dariovinci/bs-multiselect.git"},"keywords":["bootstrap","select","multiselect"],"author":{"name":"Dario Vinci"},"license":"MIT","bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"homepage":"https://github.com/dariovinci/bs-multiselect#readme","gitHead":"0aea595dc67c01ab9c3fd7186bd8f68af0cbf2e4","_id":"@dariovinci/bs-multiselect@1.1.1","_nodeVersion":"20.19.6","_npmVersion":"11.6.4","dist":{"integrity":"sha512-Wed1TThvMC+DidKP9yR1DGVGPH6csPkX38vziWrlWk52NAlDOPq2+v4OrgKs+YwYyGOqgTAtqJtHhio9+KSiTg==","shasum":"f65afc57404b27b24fba85f2e1aeb4e45106c3ee","tarball":"https://registry.npmjs.org/@dariovinci/bs-multiselect/-/bs-multiselect-1.1.1.tgz","fileCount":5,"unpackedSize":19928,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dariovinci%2fbs-multiselect@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEOccL9mNyqXSFPfvLgIDr6q/JmjaJOMYMGQJ3SL9MKYAiEApvHb5VEECN/ys5QRkKgRpL/wFFR0NfxRW4PzzgMzWGU="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8e20e717-f209-45e7-9973-1c7b7d1a73ee"}},"directories":{},"maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bs-multiselect_1.1.1_1765288714112_0.5022286041657598"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-08T20:51:43.250Z","modified":"2025-12-09T13:58:34.584Z","1.0.0":"2024-06-08T20:51:43.479Z","1.0.1":"2024-06-08T22:26:16.666Z","1.0.2":"2024-06-08T22:39:34.243Z","1.0.3":"2024-06-09T01:57:20.766Z","1.0.4":"2024-06-09T10:30:57.401Z","1.0.5":"2024-06-11T20:09:54.539Z","1.1.1":"2025-12-09T13:58:34.247Z"},"bugs":{"url":"https://github.com/dariovinci/bs-multiselect/issues"},"author":{"name":"Dario Vinci"},"license":"MIT","homepage":"https://github.com/dariovinci/bs-multiselect#readme","keywords":["bootstrap","select","multiselect"],"repository":{"type":"git","url":"git+https://github.com/dariovinci/bs-multiselect.git"},"description":"A simple and light multiselect for bootstrap written in JS","maintainers":[{"name":"dariovinci","email":"vinci.dario@gmail.com"}],"readme":"<h1>BS MULTISELECT</h1>\nA light and simple multi select for bootstrap 5. If you like it you can support my work buying me a cofee: https://buymeacoffee.com/dariovinci\n\n\n<h3>HOW TO USE IT</h3>\n\nWrap an input (an optionally a label) field in a div and choose an id. Example: multiselect-test\n\n```html\n<div id=\"multiselect-users-wrapper\">\n    <input type=\"text\" class=\"form-control\">\n    <label for=\"multiselect-users\">Utenti</label>\n</div>\n```\n\nYou can also use bs-multiselect with form floating. Example:\n                \n```html\n<div id=\"multiselect-test\">\n    <div class=\"form-floating\">\n        <input type=\"text\" class=\"form-control\">\n        <label for=\"multiselect-users\">Utenti</label>\n    </div>\n</div>\n```\n\nThen in your js file add:\n\n```js\nconst multiselect_test = new BsMultiselect({\n  inputId: '#multiselect-test',\n  dataArray: [],\n  selectAll: true,\n  showCompactSelection: true,\n  maxHeight: 200px,\n  showSearchBox: true,\n});\n```\n\n<h3>OPTIONS</h3>\n<table style=\"width:100%;\">\n  <thead>\n    <tr>\n      <td>OPTION</td>\n      <td>VALUE</td>\n      <td></td>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>inputId</td>\n      <td></td>\n      <td>Id of the dig wrapping the input field</td>\n    </tr>\n    <tr>\n      <td>dataArray</td>\n      <td>[{\n\t\t\t'value': '1',\n\t\t\t'text': 'Option 1'\n\t\t}, {\n\t\t\t'value': '2',\n\t\t\t'text': 'Option 2'\n\t\t}</td>\n      <td>dataArray is an array of obcjects where the first key pair is the checkbox value and the second key pair is the text you want to display</td>\n    </tr>\n    <tr>\n      <td>selectAll</td>\n      <td>(boolean) true/false</td>\n      <td>Set true if you want to select all the option on init</td>\n    </tr>\n    <tr>\n      <td>showCompactSelection</td>\n      <td>(boolean) true/false</td>\n      <td>Set true to display a compact view when there are 2+ selected options</td>\n    </tr>\n    <tr>\n      <td>maxHeight</td>\n      <td>(text)200px</td>\n      <td>Set the max height of the dropdown menu</td>\n    </tr>\n    <tr>\n      <td>showSearchBox</td>\n      <td>(boolean) true/false</td>\n      <td>Set true to display a search box to easily filter your select options</td>\n    </tr>\n    <tr>\n      <td>ajaxSourceUrl</td>\n      <td>url</td>\n      <td>Url that will be used to fetch your options. Use only if dataArray is not defined and make sure that the response has the correct structure (like dataArray)</td>\n    </tr>\n    <tr>\n      <td>ajaxCreateDataArray</td>\n      <td>function</td>\n      <td>You can manipulate the data fetched by the ajax call and return them. Check the below example</td>\n    </tr>\n  </tbody>\n</table>\n\n<h3>ajaxCreateDataArray Example:</h3>\n\n```js\nconst multiselect_test = new BsMultiselect({\n  inputId: '#multiselect-test',\n  dataArray: [],\n  selectAll: true,\n  showCompactSelection: true,\n  maxHeight: 200px,\n  showSearchBox: true,\n  ajaxCreateDataArray: (resp) => {\n    let dataArray = [];\n    for (let i = 0; i < resp.length; i++) {\n\tconst element = resp[i];\n\tdataArray.push({\n\t    value: element.id,\n\t    text: element.name\n\t})\n\n    }\n    return dataArray;\n}\n});\n```\n\n<h3>METHODS</h3>\n\n<table style=\"width:100%;\">\n  <thead>\n    <tr>\n      <td>METHOD</td>\n      <td></td>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>getselectedItems()</td>\n      <td>Returns an array of object with the same structure of dataArray defined at config</td>\n    </tr>\n    <tr>\n      <td>getselectedItemsValues()</td>\n      <td>Returns an array ot the selected values</td>\n    </tr>\n    <tr>\n      <td>setSelectedElements(valuesArray, checked)</td>\n      <td>valuesArray: array of value to select/deselect. checked: (boolean) true/false </td>\n    </tr>\n    <tr>\n      <td>updateOptionsList(dataArray)</td>\n      <td>Replace options with new ones</td>\n    </tr>\n    <tr>\n      <td>reset()</td>\n      <td>Reset the multiselect to the deafault state.</td>\n    </tr>\n    </tbody>\n</table>\n\n","readmeFilename":"README.md"}