{"_id":"@codedungeon/vue-taggable-select2","_rev":"2-d9cb804af0936bdc9b8691cf28ff29f7","name":"@codedungeon/vue-taggable-select2","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@codedungeon/vue-taggable-select2","version":"0.1.0","description":"multiple taggable select autocomplete dropdown for vue","main":"dist/index","unpkg":"dist/vue-taggable-select2.js","browser":{"./sfc":"dist/vue-taggable-select2.vue"},"contributors":[{"name":"Mike Erickson","email":"mike.erickson@codedungeon.io","url":"https://github.com/mikeerickson"}],"scripts":{"prepublish":"npm run build","serve":"vue-cli-service serve","vbuild":"vue-cli-service build","lint":"vue-cli-service lint","dev":"NODE_ENV=development webpack","build":"NODE_ENV=production webpack --progress --hide-modules"},"repository":{"type":"git","url":"git+https://github.com/mikeerickson/vue-taggable-select2.git"},"keywords":["tagging","tags","vue","js","dropdown","autocomplete","select","multi","multiple","multiselect","select","element","component"],"license":"MIT","bugs":{"url":"https://github.com/mikeerickson/vue-taggable-select2/issues"},"homepage":"https://github.com/mikeerickson/vue-taggable-select2/issues#readme","peerDependencies":{"vue":"2.x"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.0","babel-preset-stage-3":"^6.24.1","clean-webpack-plugin":"^0.1.19","copy-webpack-plugin":"^4.5.2","cross-env":"^5.0.5","css-loader":"^0.28.7","file-loader":"^1.1.4","vue":"^2.5.11","vue-loader":"14.2.2","vue-template-compiler":"^2.4.4","webpack":"^4.16.3","webpack-cleanup-plugin":"^0.5.1","webpack-cli":"^3.1.0","webpack-dev-server":"^2.9.1","webpack-merge":"^4.1.3"},"dependencies":{"uglifyjs-webpack-plugin":"2.2.0"},"gitHead":"b706505b32842481ed341d615a4348882083f58a","_id":"@codedungeon/vue-taggable-select2@0.1.0","_nodeVersion":"14.1.0","_npmVersion":"6.14.8","_npmUser":{"name":"codedungeon","email":"codedungeon@gmail.com"},"dist":{"integrity":"sha512-IHMdCyYjl1N3NiG6PGUQAPbJud+zOrIx2mz7eLDpaVJkkyV6lPbPttexPQRUdyX6+bVTapYz8l/lk0kFQKd4OA==","shasum":"1afad7a0e8cddf1dcd7b6160734888abf3e9bc23","tarball":"https://registry.npmjs.org/@codedungeon/vue-taggable-select2/-/vue-taggable-select2-0.1.0.tgz","fileCount":14,"unpackedSize":164544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUtaMCRA9TVsSAnZWagAAL9kP/28DTpGVr87mI7R4wzti\nx2DZXCKN3QApwiEnRqQ2GIaEdQE8xz8LZASyWpiVyyjOLNAsOAI6CopXxbsI\nVS5lPPTWHQpNBTm5F8PLMoY90wvov3kQy06jF96pe/dS8iSG4NznN9cCIB54\nNW2i5NFkgdVwF8ipNp3k/t5qP8mOR7MZQBcuH9S0r1h5lEWrFo9Ltu34ceYr\nOYB7Wzt5kz5JDhbR8EKw0j5/hd6WRPApjWbiu1Eo9lihca+QBEaMCFClixuQ\nsZeQjd18kpE3II1Of0pCgZ0BS2YXpnD0T8ai9Oepsal+vgS8UrciV1mSDPFF\nwKfEatpyWzN8Mo+pd/LHhfMTMzJ4OMpT9ggwXd3DamUwmo5BGPNaLOjQAixs\nJHj9dO6llwXlT5WlcXe7sEvgCzOnwFpULT5xpHL96JSS4pyzpF3TMeXoGd24\nnllE1xiCQVfLnE1jOHuM/UVOAE82s2al/B+rq1oCYcFLrkNDmLlV6M7OXGvS\nOObcdG1rwm0hYBJGcYPGJ5/N3jkcSbinSCQz3iioURH8Ff1MIFRIf2GdfSK3\naU4sNEJ88lcH7zjHkRkTzvi1lVUPwe6FNazmFLwLvh4fQwWpRah/CH5vMM+L\n5frktlbW46RVXE9mes/bAT2PO/eOj/Vx19UbO9hDLAVr9jv4qA1UY4NgBxbO\nujM4\r\n=nuLD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPL91B2m7jMDD08xmzWjytFf6bDXCOO40LIHug6Ax9YAIhAPC4N/aivQxZkck3eAGQ3i6ZBasFs6i5kilm++Rj75dF"}]},"maintainers":[{"name":"codedungeon","email":"codedungeon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-taggable-select2_0.1.0_1599264396209_0.5367249797263471"},"_hasShrinkwrap":false},"0.1.1":{"name":"@codedungeon/vue-taggable-select2","version":"0.1.1","description":"multiple taggable select autocomplete dropdown for vue","main":"dist/index","unpkg":"dist/vue-taggable-select2.js","browser":{"./sfc":"dist/vue-taggable-select2.vue"},"contributors":[{"name":"Mike Erickson","email":"mike.erickson@codedungeon.io","url":"https://github.com/mikeerickson"}],"scripts":{"prepublish":"npm run build","serve":"vue-cli-service serve","vbuild":"vue-cli-service build","lint":"vue-cli-service lint","dev":"NODE_ENV=development webpack","build":"NODE_ENV=production webpack --progress --hide-modules"},"repository":{"type":"git","url":"git+https://github.com/mikeerickson/vue-taggable-select2.git"},"keywords":["tagging","tags","vue","js","dropdown","autocomplete","select","multi","multiple","multiselect","select","element","component"],"license":"MIT","bugs":{"url":"https://github.com/mikeerickson/vue-taggable-select2/issues"},"homepage":"https://github.com/mikeerickson/vue-taggable-select2/issues#readme","peerDependencies":{"vue":"2.x"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.0","babel-preset-stage-3":"^6.24.1","clean-webpack-plugin":"^0.1.19","copy-webpack-plugin":"^4.5.2","cross-env":"^5.0.5","css-loader":"^0.28.7","file-loader":"^1.1.4","vue":"^2.5.11","vue-loader":"14.2.2","vue-template-compiler":"^2.4.4","webpack":"^4.16.3","webpack-cleanup-plugin":"^0.5.1","webpack-cli":"^3.1.0","webpack-dev-server":"^2.9.1","webpack-merge":"^4.1.3"},"dependencies":{"uglifyjs-webpack-plugin":"2.2.0"},"gitHead":"eb770c2e98e2c8f56eb034fb5813d75f03f48883","_id":"@codedungeon/vue-taggable-select2@0.1.1","_nodeVersion":"14.1.0","_npmVersion":"6.14.8","_npmUser":{"name":"codedungeon","email":"codedungeon@gmail.com"},"dist":{"integrity":"sha512-4qqROxBBhIgra2z/RJ9IedqAo63K/MwoErvs9AlXwvoaMSu9Z9GYH/Dj7+evzdttcfFVFl21KekGEjSkP+V3Kw==","shasum":"9b568f2ef0c58f626bb1962024315e65cf7eaf3c","tarball":"https://registry.npmjs.org/@codedungeon/vue-taggable-select2/-/vue-taggable-select2-0.1.1.tgz","fileCount":14,"unpackedSize":162898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUtpTCRA9TVsSAnZWagAAhe4P/3sUK4Ofd2IGmlKDXx/N\n55wDKXQHH9moNgtNWzRa2nZv3+jIHmLK6docKeA/WuKNcc+e01x7zLDItDFY\nwOjpAm0m3tW+JovtV5P1lmK/5SP8OtpTBccD9ZrtS/lAo54G/OY9RpynEW94\nV7d752bDgdwaUhW342nkykt47pDo/UMIWDMTBQ4+PWWav9e8dlTV8RfzAV0D\n05ZrmaP3oBoPM+W02t/kCF6kRTtLmLrgqEPw1R5h8vF06Y1J4H8olDPOLISN\nV/azNL6AS/6um7KcXUxOCoCDmIebu8vEkp8twKjsIeoLv3sG2zmvmZtC4Ttt\nlHvNt4rbN2sfwiDfRxshiFPqxWO87k82c16U6mIANHyTLXhpZamdOUgbz6Os\n+12uEtiOFkNRKq7SWLezHMX43UXott8EotRnV3zIIdAJsTGNoxBtB6H2w2UJ\n0kEFqUOr/xA/Pqf6R3OjJvIzB3QAQA6OAwSOpecwxLNx34+TA8mjt9JYW89d\ncFJQ1dpooC7HB9Z9uOayINQvALE1O2o1i8hTxIfAPcvnP6dofSNRzeoyWaSZ\n//v0RLh6CNrfuK1RODJ0pkLcU4kHcAlQA5fypZyv7e6BfiA2VS74U2g9sjPZ\nrOQS7pw7wOnxbhL8k7EtxLe6SlWOilRSNG/FQjVXKfWW2DoBtzSFTVS938zX\nKee7\r\n=R660\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEwQJ8d+FCHX0Urs2IgIEcyuPjlYBQctAIgOyG/fAHqAiApVedhQxsSZjBx2JiHLEyPOkKbpq1pRRtqV1yIPJ5ikQ=="}]},"maintainers":[{"name":"codedungeon","email":"codedungeon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-taggable-select2_0.1.1_1599265362777_0.25574222531946567"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-05T00:06:36.156Z","0.1.0":"2020-09-05T00:06:36.370Z","modified":"2022-04-05T00:02:17.699Z","0.1.1":"2020-09-05T00:22:42.914Z"},"maintainers":[{"name":"codedungeon","email":"codedungeon@gmail.com"}],"description":"multiple taggable select autocomplete dropdown for vue","homepage":"https://github.com/mikeerickson/vue-taggable-select2/issues#readme","keywords":["tagging","tags","vue","js","dropdown","autocomplete","select","multi","multiple","multiselect","select","element","component"],"repository":{"type":"git","url":"git+https://github.com/mikeerickson/vue-taggable-select2.git"},"contributors":[{"name":"Mike Erickson","email":"mike.erickson@codedungeon.io","url":"https://github.com/mikeerickson"}],"bugs":{"url":"https://github.com/mikeerickson/vue-taggable-select2/issues"},"license":"MIT","readme":"# vue-taggable-select2\n\nA Vue component that makes long, unwieldy select boxes user friendly.\n\n[Check out a demo here](https://codesandbox.io/s/18jz68zn77)\n\n## Note\n\nThis component has been forked from [vue-taggable-select](https://github.com/robrogers3/vue-taggable-select) as it has gone cold and I had some issues that needing fixing\n\n## What it Does\n\nvue-taggable-select2 provides an elegant, user-friendly component to replace long, unwieldy multi select elements. Great for users. Simple for developers.\n\n## Simple API\n\n```html\n<vue-taggable-select2 :taggable=\"true\" v-model=\"sport\" :options=\"['baseball','football','basketball','hocke']\"></vue-taggable-select2>\n```\n\n<img style=\"width: 400px\" src=\"https://raw.githubusercontent.com/mikeerickson/vue-taggable-select2/master/vue-taggable-select2.png\">\n\n## What It Does Not Do\n\nCurrently, does not provide a simple select component (but we are planning to implement). In the meantime, try out this component!\n\n[Vue Single Select](https://www.npmjs.com/package/vue-single-select)\n\nNo ajax loading.\n\n## Usage\n\n### Install and Use Via CDN\n\n```html\n<div id=\"app\">\n    <lable>Choose a sport!</lable>\n    <vue-taggable-select2 v-model=\"sport\" :options=\"sports\"></vue-taggable-select2>\n</div>\n```\n\n```html\n<script src=\"https://unpkg.com/vue@latest\"></script>\n<script src=\"https://unpkg.com/vue-taggable-select2@latest\"></script>\n<script>\n    new Vue({\n        el: \"#app\",\n        data: {\n            sport: [\"baseball\"],\n            sports: [\"baseball\", \"football\", \"basketball\", \"hockey\"],\n        },\n    })\n</script>\n```\n\n### Install Via NPM\n\n```bash\n> npm i @codedungeon/vue-taggable-select2\n```\n\n### Register it\n\nIn your component:\n\n```javascript\nimport VueTaggableSelect2 from \"vue-taggable-select2\"\nexport default {\n    components: {\n        VueTaggableSelect2,\n    },\n    //...\n}\n```\n\nGlobally:\n\n```javascript\nimport VueTaggableSelect2 from \"vue-taggable-select2\"\nVue.component(\"vue-taggable-select2\", VueTaggableSelect2)\n```\n\n### Use It\n\n```html\n<vue-taggable-select2 make-it-taggable=\"good!\" :taggable=\"true\" v-model=\"sport\" :options=\"['baseball','football','basketball','hockey']\" :required=\"true\"></vue-taggable-select2>\n```\n\n### Use It Again\n\n```html\n<vue-taggable-select2\n    name=\"maybe\"\n    placeholder=\"pick a post\"\n    you-want-to-select-a-post=\"ok\"\n    v-model=\"post\"\n    out-of-all-these-posts=\"makes sense\"\n    :options=\"posts\"\n    a-post-has-an-id=\"good for search and display\"\n    option-key=\"id\"\n    the-post-has-a-title=\"make sure to show these\"\n    option-label=\"title\"\n></vue-taggable-select2>\n```\n\n### Use It Again\n\n```html\n<vue-taggable-select2\n    you-want-to-select-a-reply=\"yes\"\n    v-model=\"reply\"\n    out-of-all-these-replies=\"yep\"\n    :options=\"replies\"\n    a-reply-only-has-a-reply=\"sounds about right\"\n    option-label=\"reply\"\n    seed-an-initial-value=\"what's seed mean?\"\n    initial=\"seed me\"\n    you-only-want-20-options-to-show=\"is 20 enough?\"\n    :max-results=\"20\"\n></vue-taggable-select2>\n```\n\n### Dont like the Styling?\n\nYou can override some of it. Like so:\n\n```html\n<vue-taggable-select2\n    id=\"selected-reply\"\n    name=\"a_reply\"\n    option-label=\"reply\"\n    v-model=\"reply\"\n    :options=\"replies\"\n    you-like-huge-dropdowns=\"1000px is long!\"\n    max-height=\"1000px\"\n    :classes='{\n            icons: \"icons\"\n            active: \"active\",\n            wrapper: \"multi-select-wrapper\",\n            searchWrapper: \"search-wrapper\",\n            searchInput: \"search-input\",\n            pill: \"pill\",\n            required: \"required\",\n            dropdown: \"dropdown\"\n        }'\n></vue-taggable-select2>\n```\n\nThen all you need to do is provide some class definitions like so:\n\n```css\n.active {\n    background-color: pink;\n}\n.multi-select-wrapper {\n    display: block;\n    font-size: 16px;\n}\n.search-input {\n    color: black;\n}\n.pill {\n    padding: 0.5em;\n}\n```\n\n... and so on.\n\n**Note: Bootstrap 3 Users May want to increase the size of the icons.**\n\nIf so do this:\n\n```css\n.icons svg {\n    height: 1em;\n    width: 1em;\n}\n```\n\n## Why vue-taggable-select2 is better\n\n1.  It handles custom label/value props for displaying options.\n\n    Other select components require you to conform to their format. Which often means data wrangling.\n\n2.  It's easier on the DOM.\n\n    Other components will load up all the options available in the select element. This can be heavy. vue-taggable-select2 makes an executive decision that you probably will not want to scroll more than N options before you want to narrow things down a bit. You can change this, but the default is 30.\n\n3.  Snappy Event Handling\n\n    -   up and down arrows for selecting options\n    -   enter to select first match\n    -   remembers selection on change\n    -   hit the escape key to, well, escape\n    -   hit delete to remove the last selection\n\n4.  Lightweight\n\n    -   Why are the other packages so big and actually have dependencies?\n\n5.  It works for regular 'POST backs' to the server.\n\n    If you are doing a regular post or just gathering the form data you don't need to do anything extra to provide a name and value for the selected option.\n\n## Available Props\n\n```javascript\nprops: {\n    // This corresponds to v-model\n    value: {\n        type: [String, Array],\n        required: true\n    },\n    taggable: {\n        type: Boolean,\n        default: () => false\n    },\n    // Use classes to override the look and feel\n    // Provide these EIGHT classes.\n    classes: {\n        type: Object,\n        default: () => {\n            return {\n                icons: 'icons',\n                active: 'active',\n                wrapper: \"multi-select-wrapper\",\n                searchWrapper: \"search-wrapper\",\n                searchInput: \"search-input\",\n                pill: \"pill\",\n                required: \"required\",\n                dropdown: \"dropdown\"\n            };\n        }\n    },\n    // Give your input a name\n    // Good for posting forms\n    name: {\n        type: String,\n        default: () => \"\"\n    },\n    // Your list of things for the select\n    options: {\n        type: Array,\n        default: () => []\n    },\n    // Tells vue-taggable-select2 what key to use\n    // for generating option labels\n    optionLabel: {\n        type: String,\n        default: () => null\n    },\n    // Tells vue-taggable-select2 the value\n    // you want populated in the select for the\n    // input\n    optionKey: {\n        type: String,\n        default: () => null\n    },\n    // Give your input an html element id\n    placeholder: {\n        type: String,\n        default: () => \"Search Here\"\n    },\n    maxHeight: {\n        type: String,\n        default: () => \"220px\",\n    },\n    //Give the input an id\n    inputId: {\n        type: String,\n        default: () => \"multi-select\",\n    },\n    // Seed search text with initial value\n    initial: {\n        type: String,\n        default: () => null\n    },\n    // Make it required\n    required: {\n        type: Boolean,\n        default: () => false\n    },\n    // Max number of results to show.\n    maxResults: {\n        type: Number,\n        default: () => 30\n    },\n    //Meh\n    tabindex: {\n        type: String,\n        default: () => {\n            return \"\";\n        }\n    },\n    // Remove previously selected options\n    // via the delete key\n    keyboardDelete: {\n        type: Boolean,\n        default: () => {\n            return true;\n        }\n    },\n    // Tell vue-taggable-select2 how to display\n    // selected options\n    getOptionDescription: {\n        type: Function,\n        default(option) {\n            if (this.optionKey && this.optionLabel) {\n                return option[this.optionKey] + \" \" + option[this.optionLabel];\n            }\n            if (this.optionLabel) {\n                return option[this.optionLabel];\n            }\n            if (this.optionKey) {\n                return option[this.optionKey];\n            }\n            return option;\n        }\n    },\n    // Use this to tell vue-taggable-select2\n    // the values are for doing a submit\n    getOptionValue: {\n        type: Function,\n        default(option) {\n            if (this.optionKey) {\n                return option[this.optionKey];\n            }\n\n            if (this.optionLabel) {\n                return option[this.optionLabel];\n            }\n\n            return option;\n        }\n    }\n},\n```\n","readmeFilename":"README.md"}