├── .gitignore ├── index.js ├── src ├── get-uniq-id.js ├── generate-ids.js ├── create-directive.js └── create-mixin.js ├── vue-uniq-ids.js ├── webpack.config.js ├── bower.json ├── LICENSE ├── package.json ├── dist ├── vue-uniq-ids.min.js └── vue-uniq-ids.min.js.map └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | 4 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import { UniqIdsPlugin, createUniqIdsMixin } from './vue-uniq-ids.js' 2 | 3 | export { UniqIdsPlugin, createUniqIdsMixin } 4 | export default UniqIdsPlugin 5 | -------------------------------------------------------------------------------- /src/get-uniq-id.js: -------------------------------------------------------------------------------- 1 | import qinu from 'qinu' 2 | 3 | const getUniqId = (scope, id, options = {}) => { 4 | if (!scope[id]) { 5 | scope[id] = qinu(options, id) 6 | } 7 | return scope[id] 8 | } 9 | 10 | export default getUniqId 11 | -------------------------------------------------------------------------------- /vue-uniq-ids.js: -------------------------------------------------------------------------------- 1 | import createUniqIdsMixin from './src/create-mixin' 2 | 3 | const UniqIdsPlugin = { 4 | install: function(Vue, options) { 5 | Vue.mixin(createUniqIdsMixin(options)) 6 | } 7 | } 8 | 9 | export { 10 | createUniqIdsMixin, 11 | UniqIdsPlugin 12 | } 13 | -------------------------------------------------------------------------------- /src/generate-ids.js: -------------------------------------------------------------------------------- 1 | import getUniqId from './get-uniq-id.js' 2 | 3 | const generateIds = (value, scope, options) => { 4 | var list = value instanceof Array ? value : (value || '').split(/\s+/) 5 | return list.map(id => getUniqId(scope, id, options)).join(' ') 6 | } 7 | 8 | export default generateIds 9 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const path = require('path'); 3 | 4 | module.exports = { 5 | entry: './vue-uniq-ids.js', 6 | output: { 7 | path: path.resolve(__dirname, 'dist'), 8 | filename: 'vue-uniq-ids.min.js', 9 | library: 'VueUniqIds', 10 | libraryTarget: 'umd' 11 | }, 12 | module: { 13 | rules: [ 14 | { test: /\.js$/, use: 'babel-loader' } 15 | ] 16 | }, 17 | plugins: [ 18 | new webpack.optimize.UglifyJsPlugin({ sourceMap: true }) 19 | ], 20 | devtool: 'source-map' 21 | }; 22 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-uniq-ids", 3 | "description": "A generator of unique id-related attributes", 4 | "main": "dist/vue-uniq-ids.js", 5 | "authors": [ 6 | "Stanislav Termosa " 7 | ], 8 | "license": "MIT", 9 | "keywords": [ 10 | "vuejs", 11 | "vue", 12 | "directive", 13 | "unique", 14 | "uniq", 15 | "id", 16 | "for", 17 | "aria", 18 | "form" 19 | ], 20 | "homepage": "https://github.com/termosa/vue-uniq-ids", 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "package.json", 25 | "webpack.config.js" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /src/create-directive.js: -------------------------------------------------------------------------------- 1 | import generateIds from './generate-ids.js' 2 | 3 | const doesNeedNewScope = opts => ( 4 | typeof opts.scope !== 'object' 5 | && typeof opts.scope !== 'undefined' 6 | && opts.scope 7 | ) 8 | 9 | function createDirective(attr, options = {}) { 10 | return (el, binding, vnode) => { 11 | if (!vnode.context.$options.uniqIdsConfig) { 12 | vnode.context.$options.uniqIdsConfig = { scope: {} } 13 | } 14 | const localOpts = vnode.context.$options.uniqIdsConfig 15 | if (doesNeedNewScope(localOpts)) { 16 | localOpts.scope = {} 17 | } 18 | const opts = Object.assign({}, options, localOpts) 19 | const scope = typeof localOpts.scope === 'object' 20 | ? localOpts.scope 21 | : localOpts.scope && {} || options.scope || {} 22 | const value = binding.value 23 | const ids = generateIds(value, scope, opts); 24 | if (ids) { 25 | el.setAttribute(attr, ids) 26 | } else { 27 | el.removeAttribute(attr) 28 | } 29 | } 30 | } 31 | 32 | export default createDirective 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Stanislav Termosa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/create-mixin.js: -------------------------------------------------------------------------------- 1 | import createDirective from './create-directive' 2 | import getUniqId from './get-uniq-id' 3 | 4 | const prefix = 'uni-' 5 | 6 | const defaultAttributes = [ 7 | 'aria-activedescendant', 8 | 'aria-controls', 9 | 'aria-describedby', 10 | 'aria-flowto', 11 | 'aria-labelledby', 12 | 'aria-labelledby', 13 | 'aria-owns', 14 | 'for', 15 | 'form', 16 | 'id', 17 | ] 18 | 19 | const defaultQinuTemplate = '%arg[0]%-%qinu%' 20 | 21 | const createDirectives = opts => ( 22 | opts.attrs.reduce((dirs, attr) => { 23 | dirs[`${opts.prefix}${attr}`] = createDirective(attr, opts) 24 | return dirs 25 | }, {}) 26 | ) 27 | 28 | const createMixin = (options) => { 29 | const opts = Object.assign( 30 | { prefix, scope: {}, attrs: defaultAttributes, template: defaultQinuTemplate }, 31 | options 32 | ) 33 | return { 34 | directives: createDirectives(opts), 35 | methods: { 36 | uniId: function (idAlias) { 37 | if (!this.$options.uniqIdsConfig) { 38 | this.$options.uniqIdsConfig = { scope: {} }; 39 | } 40 | const localOpts = this.$options.uniqIdsConfig; 41 | const settledOpts = Object.assign({}, opts, localOpts); 42 | return getUniqId(settledOpts.scope, idAlias, settledOpts); 43 | } 44 | } 45 | } 46 | } 47 | 48 | export default createMixin 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-uniq-ids", 3 | "version": "1.1.2", 4 | "description": "A Vue.js plugin that helps to use id-related attributes with no side-effect", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "npm run clean && webpack", 9 | "clean": "rimraf dist" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/termosa/vue-uniq-ids.git" 14 | }, 15 | "keywords": [ 16 | "vuejs", 17 | "vue", 18 | "directive", 19 | "unique", 20 | "uniq", 21 | "id", 22 | "for", 23 | "aria", 24 | "form" 25 | ], 26 | "author": "Stanislav Termosa ", 27 | "license": "MIT", 28 | "bugs": { 29 | "url": "https://github.com/termosa/vue-uniq-ids/issues" 30 | }, 31 | "homepage": "https://github.com/termosa/vue-uniq-ids#readme", 32 | "devDependencies": { 33 | "babel-core": "6.22.1", 34 | "babel-loader": "6.2.10", 35 | "babel-plugin-add-module-exports": "0.2.1", 36 | "babel-plugin-transform-object-assign": "6.22.0", 37 | "babel-preset-es2015": "6.22.0", 38 | "rimraf": "^2.5.4", 39 | "webpack": "^2.2.1" 40 | }, 41 | "babel": { 42 | "presets": [ 43 | "es2015" 44 | ], 45 | "plugins": [ 46 | "add-module-exports", 47 | "transform-object-assign" 48 | ] 49 | }, 50 | "dependencies": { 51 | "qinu": "^1.1.2" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /dist/vue-uniq-ids.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueUniqIds=t():e.VueUniqIds=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=n)return r;var o=Math.floor(Math.random()*t.length),u=t[o];return e(t,n,r+u)}function t(t,n){for(var r=e(t.chars,t.length),o=t.template.replace(/%qinu%/g,r),u=n.length;u--;)o=o.replace(new RegExp("%arg\\["+u+"\\]%","g"),n[u]);return o}function n(e,n){e=e||{};var i={length:"number"==typeof e.length?e.length:r,template:e.template||o,chars:(e.chars||u).slice()};return n instanceof Array||(n=Array.prototype.slice.call(arguments,1)),e.args&&(n=e.args.concat(n)),t(i,n)}var r=8,o="%qinu%",u="1234567890abcdefghijklmnopqrstuvwxyz";return n.create=function(e){return n.bind(null,e)},n})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n,r,o){o.context.$options.uniqIdsConfig||(o.context.$options.uniqIdsConfig={scope:{}});var f=o.context.$options.uniqIdsConfig;c(f)&&(f.scope={});var l=u({},t,f),s="object"===i(f.scope)?f.scope:f.scope&&{}||t.scope||{},p=r.value,d=(0,a.default)(p,s,l);d?n.setAttribute(e,d):n.removeAttribute(e)}}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};return e[t]||(e[t]=(0,u.default)(n,t)),e[t]};t.default=i,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.UniqIdsPlugin=t.createUniqIdsMixin=void 0;var o=n(0),u=r(o),i={install:function(e,t){e.mixin((0,u.default)(t))}};t.createUniqIdsMixin=u.default,t.UniqIdsPlugin=i}])}); 2 | //# sourceMappingURL=vue-uniq-ids.min.js.map -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VueUniqIds 2 | 3 | A [Vue.js](https://vuejs.org/) plugin that helps to use id-related attributes with no side-effect 4 | 5 | [![NPM version](https://img.shields.io/npm/v/vue-uniq-ids.svg?style=flat-square)](https://www.npmjs.com/package/vue-uniq-ids) 6 | ![Bower version](https://img.shields.io/bower/v/vue-uniq-ids.svg?style=flat-square) 7 | 8 | It is a trend to use components. Components are cool, they are small, obvious, easy to use and modular. Untill it comes to the `id` property. 9 | 10 | Some HTML tag attributes requires using an `id` property, like `label[for]`, `input[form]` and many of `aria-*` attributes. And the problem with the `id` is that it is not modular. If several `id` properties on the page have the same value they can affect each other. 11 | 12 | **VueUniqIds** helps you to get rid of this problem. It provides the set of id-related directives which value is automatically modified by adding [unique string](https://www.npmjs.com/package/qinu) while keeping the attrbitue easy to read. 13 | 14 | ## Installation 15 | 16 | ### Via NPM 17 | 18 | Install the package 19 | 20 | ```bash 21 | $ npm install vue-uniq-ids 22 | ``` 23 | 24 | ### Via Bower 25 | 26 | Install the package 27 | 28 | ```bash 29 | $ bower install vue-uniq-ids 30 | ``` 31 | 32 | add script on page 33 | 34 | ```html 35 | 36 | ``` 37 | 38 | or you can do it with [RequireJS](http://requirejs.org/) or any similar tool. 39 | 40 | ## Setup 41 | 42 | There are three ways to setup **VueUniqIds**: 43 | 44 | ### 1. As a plugin 45 | 46 | ```js 47 | // Import the plugin 48 | import VueUniqIds from 'vue-uniq-ids' 49 | // or 50 | import { UniqIdsPlugin } from 'vue-uniq-ids' 51 | 52 | // Install it with Vue.use() 53 | import Vue from 'vue' 54 | Vue.use(VueUniqIds, /* options */) 55 | ``` 56 | 57 | ### 2. As a global mixin 58 | 59 | ```js 60 | import Vue from 'vue' 61 | 62 | // Import the mixin generator 63 | import { createUniqIdsMixin } from 'vue-uniq-ids' 64 | 65 | // Create the mixin 66 | const uniqIdsMixin = createUniqIdsMixin(/* options */) 67 | 68 | // Install it with Vue.mixin() 69 | Vue.mixin(uniqIdsMixin) 70 | ``` 71 | 72 | ### 3. As a local mixin 73 | 74 | ```js 75 | import Vue from 'vue' 76 | 77 | // Import the mixin generator 78 | import { createUniqIdsMixin } from 'vue-uniq-ids' 79 | 80 | // Create the mixin 81 | const uniqIdsMixin = createUniqIdsMixin(/* options */) 82 | 83 | // Add it to the instance 84 | new Vue({ 85 | mixins: [uniqIdsMixin], 86 | // … 87 | }) 88 | // … or to the component 89 | Vue.component('name', { 90 | mixins: [uniqIdsMixin], 91 | // … 92 | }) 93 | ``` 94 | 95 | ## Usage 96 | 97 | You can use those directives at any template if you add this extension by `Vue.use()` or `Vue.mixin()`, and in the template of the component where you specify the extension by `mixin: []` property. 98 | 99 | Here is an example of using directives in `*.vue` file: 100 | 101 | ```html 102 | 113 | ``` 114 | 115 | This will generate something like an example below: 116 | 117 | ```html 118 |
119 | 120 | 122 |

Your public name

123 |

Use only latin characters

124 |
125 | ``` 126 | 127 | The list of available attributes: 128 | * id 129 | * for 130 | * form 131 | * aria-activedescendant 132 | * aria-controls 133 | * aria-describedby 134 | * aria-flowto 135 | * aria-labelledby 136 | * aria-owns 137 | 138 | ## Options and customization 139 | 140 | There are several options to customize the behavior of directives. You can pass them in several ways: 141 | 142 | 0. With the plugin 143 | ```js 144 | import VueUniqIds from 'vue-uniq-ids' 145 | Vue.use(VueUniqIds, options) 146 | ``` 147 | 0. With the mixin 148 | ```js 149 | import { createUniqIdsMixin } from 'vue-uniq-ids' 150 | Vue.mixin(createUniqIdsMixin(options)) 151 | // or 152 | new Vue({ 153 | mixins: [createUniqIdsMixin(options)], 154 | // … 155 | }) 156 | ``` 157 | 0. By uniqIdsConfig property 158 | ```js 159 | new Vue({ 160 | uniqIdsConfig: options 161 | }) 162 | ``` 163 | 164 | The options is an object, that can contain several properties from the example below: 165 | ```js 166 | const options = { 167 | 168 | /* 169 | * scope {object|boolean} — is an object to store a list of generated ids 170 | * 171 | * If object is passed it will be used to store generated ids, so you can 172 | * share the same scope between several components 173 | * If the value is not object, but it is equivalent to true, the scope 174 | * object will be created automatically for current instance 175 | * Otherwise, plugin will use the global scope if the plugin was 176 | * initialized by Vue.use or Vue.mixin or it will create a new scope. 177 | * 178 | * By default it is using the global scope 179 | */ 180 | scope: true, 181 | 182 | /* 183 | * prefix {string} — a prefix for directive names 184 | * By default it is 'uni-' 185 | */ 186 | prefix: 'uni-', 187 | 188 | /* 189 | * attrs: {array} — a list of attributes for which directives will be created 190 | * By default it is ['id', 'for', 'form', 'aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-flowto', 'aria-labelledby', 'aria-owns'] 191 | */ 192 | attrs: ['id', 'for'], 193 | 194 | /* 195 | * The rest are options for qinu — a unique string generator 196 | * Check the link for more details https://www.npmjs.com/package/qinu 197 | */ 198 | 199 | /* 200 | * template {string} — the template for unique identifiers 201 | * 202 | * The %qinu% will be replaced with generated uniq code, and %args[N]%'s are 203 | * replaced by args and directive value 204 | * 205 | * By default it is '%arg[0]%-%qinu%' 206 | */ 207 | template: '%arg[0]%-%arg[1]%-%qinu%', 208 | 209 | /* 210 | * args {array} — predefined args for template string 211 | * 212 | * This are values for template string, can be useful when you want to scope 213 | * ids with an additional name, or to avoid using value for directives in 214 | * the components with one id only. 215 | * 216 | * By default it is empty 217 | */ 218 | args: [], 219 | 220 | /* 221 | * chars {string|array} — a list of characters to generate the unique string 222 | */ 223 | chars: '1234567890abcdef', 224 | 225 | /* 226 | * length {integer} — a length of unique string 227 | */ 228 | length: 8 229 | } 230 | ``` 231 | 232 | ### An example of usage without specifying the value in template 233 | 234 | ```js 235 | Vue.use(VueUniqIds) 236 | Vue.component('input-section', { 237 | props: ['label'], 238 | template: '\n\ 239 |
\n\ 240 | \n\ 241 | \n\ 242 |
', 243 | uniqIdsConfig: { 244 | args: ['input-section'], 245 | scope: true 246 | } 247 | }) 248 | ``` 249 | 250 | This component will be rendered to code similar to the example below: 251 | 252 | ```html 253 |
254 | 255 | 256 |
257 | ``` 258 | 259 | ### Accessing and generating ids via JS 260 | 261 | Ids generated in template and those that will be generated via `this.uniId()` method have the same scope inside of the same component 262 | 263 | ```js 264 | Vue.use(VueUniqIds) 265 | Vue.component('input-section', { 266 | props: ['label'], 267 | template: '\n\ 268 |
\n\ 269 | \n\ 270 | \n\ 271 |
', 272 | computed: { 273 | textId: function () { 274 | return this.uniId('text') 275 | } 276 | } 277 | }) 278 | ``` 279 | 280 | This component will be rendered to code similar to the example below: 281 | 282 | ```html 283 |
284 | 285 | 286 |
287 | ``` 288 | 289 | ## License 290 | 291 | MIT © [Stanislav Termosa](https://github.com/termosa) 292 | 293 | -------------------------------------------------------------------------------- /dist/vue-uniq-ids.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///vue-uniq-ids.min.js","webpack:///webpack/bootstrap 4ce8a3c3867da1631568","webpack:///./src/create-mixin.js","webpack:///./~/qinu/qinu.js","webpack:///./src/create-directive.js","webpack:///./src/generate-ids.js","webpack:///./src/get-uniq-id.js","webpack:///./vue-uniq-ids.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_interopRequireDefault","obj","default","_extends","assign","target","arguments","length","source","key","_createDirective","_createDirective2","prefix","defaultAttributes","defaultQinuTemplate","createDirectives","opts","attrs","reduce","dirs","attr","createMixin","options","scope","template","directives","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","Symbol","iterator","constructor","apply","undefined","generateString","chars","string","randomIndex","Math","floor","random","newChar","generate","args","randomString","qinuString","replace","RegExp","qinu","defaultLength","defaultTemplate","defaultChars","slice","Array","concat","create","bind","createDirective","el","binding","vnode","context","$options","uniqIdsConfig","localOpts","doesNeedNewScope","_typeof","ids","_generateIds2","setAttribute","removeAttribute","_generateIds","_getUniqId","_getUniqId2","generateIds","list","split","map","id","join","_qinu","_qinu2","getUniqId","UniqIdsPlugin","createUniqIdsMixin","_createMixin","_createMixin2","install","Vue","mixin"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,WAAAD,IAEAD,EAAA,WAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAV,WAUA,OANAK,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,GAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KA+DA,OAnCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAG,EAAA,SAAAK,GAA2C,MAAAA,IAG3CR,EAAAS,EAAA,SAAAf,EAAAgB,EAAAC,GACAX,EAAAY,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAX,EAAAkB,EAAA,SAAAvB,GACA,GAAAgB,GAAAhB,KAAAwB,WACA,WAA2B,MAAAxB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OAD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oH,mBAAqBnD,MOnTrD,IAAAoD,GAAA/G,EAAA,GPuTIgH,EAAgBtF,EAAuBqF,GOrTrCF,GACJI,QAAS,SAASC,EAAKlE,GACrBkE,EAAIC,OAAM,EAAAH,EAAApF,SAAmBoB,KP6TjCtD,GOxTEoH,mBPwT2BE,EAAcpF,QAC3ClC,EOxTEmH","file":"vue-uniq-ids.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueUniqIds\"] = factory();\n\telse\n\t\troot[\"VueUniqIds\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueUniqIds\"] = factory();\n\telse\n\t\troot[\"VueUniqIds\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createDirective = __webpack_require__(2);\n\nvar _createDirective2 = _interopRequireDefault(_createDirective);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar prefix = 'uni-';\n\nvar defaultAttributes = ['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-flowto', 'aria-labelledby', 'aria-labelledby', 'aria-owns', 'for', 'form', 'id'];\n\nvar defaultQinuTemplate = '%arg[0]%-%qinu%';\n\nvar createDirectives = function createDirectives(opts) {\n return opts.attrs.reduce(function (dirs, attr) {\n dirs['' + opts.prefix + attr] = (0, _createDirective2.default)(attr, opts);\n return dirs;\n }, {});\n};\n\nvar createMixin = function createMixin(options) {\n var opts = _extends({ prefix: prefix, scope: {}, attrs: defaultAttributes, template: defaultQinuTemplate }, options);\n return {\n directives: createDirectives(opts)\n };\n};\n\nexports.default = createMixin;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n(function (root, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports) {\n module.exports = factory();\n } else {\n root.qinu = factory();\n }\n})(undefined, function () {\n\n var defaultLength = 8;\n var defaultTemplate = '%qinu%';\n var defaultChars = '1234567890abcdefghijklmnopqrstuvwxyz';\n\n function generateString(chars, length, string) {\n if (typeof string === 'undefined') {\n return generateString(chars, length, '');\n }\n if (string.length >= length) {\n return string;\n }\n var randomIndex = Math.floor(Math.random() * chars.length);\n var newChar = chars[randomIndex];\n return generateString(chars, length, string + newChar);\n }\n\n function generate(opts, args) {\n var randomString = generateString(opts.chars, opts.length);\n var qinuString = opts.template.replace(/%qinu%/g, randomString);\n for (var i = args.length; i--;) {\n qinuString = qinuString.replace(new RegExp('%arg\\\\[' + i + '\\\\]%', 'g'), args[i]);\n }\n return qinuString;\n }\n\n function qinu(options, args) {\n options = options || {};\n var opts = {\n length: typeof options.length === 'number' ? options.length : defaultLength,\n template: options.template || defaultTemplate,\n chars: (options.chars || defaultChars).slice()\n };\n if (!(args instanceof Array)) {\n args = Array.prototype.slice.call(arguments, 1);\n }\n if (options.args) {\n args = options.args.concat(args);\n }\n return generate(opts, args);\n }\n\n qinu.create = function (opts) {\n return qinu.bind(null, opts);\n };\n\n return qinu;\n});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _generateIds = __webpack_require__(3);\n\nvar _generateIds2 = _interopRequireDefault(_generateIds);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar doesNeedNewScope = function doesNeedNewScope(opts) {\n return _typeof(opts.scope) !== 'object' && typeof opts.scope !== 'undefined' && opts.scope;\n};\n\nfunction createDirective(attr) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return function (el, binding, vnode) {\n if (!vnode.context.$options.uniqIdsConfig) {\n vnode.context.$options.uniqIdsConfig = { scope: {} };\n }\n var localOpts = vnode.context.$options.uniqIdsConfig;\n if (doesNeedNewScope(localOpts)) {\n localOpts.scope = {};\n }\n var opts = _extends({}, options, localOpts);\n var scope = _typeof(localOpts.scope) === 'object' ? localOpts.scope : localOpts.scope && {} || options.scope || {};\n var value = binding.value;\n var ids = (0, _generateIds2.default)(value, scope, opts);\n if (ids) {\n el.setAttribute(attr, ids);\n } else {\n el.removeAttribute(attr);\n }\n };\n}\n\nexports.default = createDirective;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getUniqId = __webpack_require__(4);\n\nvar _getUniqId2 = _interopRequireDefault(_getUniqId);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar generateIds = function generateIds(value, scope, options) {\n var list = value instanceof Array ? value : (value || '').split(/\\s+/);\n return list.map(function (id) {\n return (0, _getUniqId2.default)(scope, id, options);\n }).join(' ');\n};\n\nexports.default = generateIds;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _qinu = __webpack_require__(1);\n\nvar _qinu2 = _interopRequireDefault(_qinu);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar getUniqId = function getUniqId(scope, id) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!scope[id]) {\n scope[id] = (0, _qinu2.default)(options, id);\n }\n return scope[id];\n};\n\nexports.default = getUniqId;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.UniqIdsPlugin = exports.createUniqIdsMixin = undefined;\n\nvar _createMixin = __webpack_require__(0);\n\nvar _createMixin2 = _interopRequireDefault(_createMixin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar UniqIdsPlugin = {\n install: function install(Vue, options) {\n Vue.mixin((0, _createMixin2.default)(options));\n }\n};\n\nexports.createUniqIdsMixin = _createMixin2.default;\nexports.UniqIdsPlugin = UniqIdsPlugin;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// vue-uniq-ids.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4ce8a3c3867da1631568","import createDirective from './create-directive'\n\nconst prefix = 'uni-'\n\nconst defaultAttributes = [\n 'aria-activedescendant',\n 'aria-controls',\n 'aria-describedby',\n 'aria-flowto',\n 'aria-labelledby',\n 'aria-labelledby',\n 'aria-owns',\n 'for',\n 'form',\n 'id',\n]\n\nconst defaultQinuTemplate = '%arg[0]%-%qinu%'\n\nconst createDirectives = opts => (\n opts.attrs.reduce((dirs, attr) => {\n dirs[`${opts.prefix}${attr}`] = createDirective(attr, opts)\n return dirs\n }, {})\n)\n\nconst createMixin = (options) => {\n const opts = Object.assign(\n { prefix, scope: {}, attrs: defaultAttributes, template: defaultQinuTemplate },\n options\n )\n return {\n directives: createDirectives(opts)\n }\n}\n\nexport default createMixin\n\n\n\n// WEBPACK FOOTER //\n// ./src/create-mixin.js","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n root.qinu = factory();\n }\n}(this, function () {\n\n var defaultLength = 8;\n var defaultTemplate = '%qinu%';\n var defaultChars = '1234567890abcdefghijklmnopqrstuvwxyz';\n\n function generateString(chars, length, string) {\n if (typeof string === 'undefined') {\n return generateString(chars, length, '');\n }\n if (string.length >= length) {\n return string;\n }\n var randomIndex = Math.floor(Math.random() * chars.length);\n var newChar = chars[randomIndex];\n return generateString(chars, length, string + newChar);\n }\n\n function generate(opts, args) {\n var randomString = generateString(opts.chars, opts.length);\n var qinuString = opts.template.replace(/%qinu%/g, randomString);\n for (var i = args.length; i--; ) {\n qinuString = qinuString\n .replace(new RegExp('%arg\\\\['+i+'\\\\]%', 'g'), args[i]);\n }\n return qinuString;\n }\n\n function qinu(options, args) {\n options = options || {};\n var opts = {\n length: typeof options.length === 'number'\n ? options.length : defaultLength,\n template: options.template || defaultTemplate,\n chars: (options.chars || defaultChars).slice()\n };\n if (!(args instanceof Array)) {\n args = Array.prototype.slice.call(arguments, 1);\n }\n if (options.args) {\n args = options.args.concat(args);\n }\n return generate(opts, args);\n }\n\n qinu.create = function(opts) {\n return qinu.bind(null, opts);\n };\n\n return qinu;\n}));\n\n\n\n// WEBPACK FOOTER //\n// ./~/qinu/qinu.js","import generateIds from './generate-ids.js'\n\nconst doesNeedNewScope = opts => (\n typeof opts.scope !== 'object'\n && typeof opts.scope !== 'undefined'\n && opts.scope\n)\n\nfunction createDirective(attr, options = {}) {\n return (el, binding, vnode) => {\n if (!vnode.context.$options.uniqIdsConfig) {\n vnode.context.$options.uniqIdsConfig = { scope: {} }\n }\n const localOpts = vnode.context.$options.uniqIdsConfig\n if (doesNeedNewScope(localOpts)) {\n localOpts.scope = {}\n }\n const opts = Object.assign({}, options, localOpts)\n const scope = typeof localOpts.scope === 'object'\n ? localOpts.scope\n : localOpts.scope && {} || options.scope || {}\n const value = binding.value\n const ids = generateIds(value, scope, opts);\n if (ids) {\n el.setAttribute(attr, ids)\n } else {\n el.removeAttribute(attr)\n }\n }\n}\n\nexport default createDirective\n\n\n\n// WEBPACK FOOTER //\n// ./src/create-directive.js","import getUniqId from './get-uniq-id.js'\n\nconst generateIds = (value, scope, options) => {\n var list = value instanceof Array ? value : (value || '').split(/\\s+/)\n return list.map(id => getUniqId(scope, id, options)).join(' ')\n}\n\nexport default generateIds\n\n\n\n// WEBPACK FOOTER //\n// ./src/generate-ids.js","import qinu from 'qinu'\n\nconst getUniqId = (scope, id, options = {}) => {\n if (!scope[id]) {\n scope[id] = qinu(options, id)\n }\n return scope[id]\n}\n\nexport default getUniqId\n\n\n\n// WEBPACK FOOTER //\n// ./src/get-uniq-id.js","import createUniqIdsMixin from './src/create-mixin'\n\nconst UniqIdsPlugin = {\n install: function(Vue, options) {\n Vue.mixin(createUniqIdsMixin(options))\n }\n}\n\nexport {\n createUniqIdsMixin,\n UniqIdsPlugin\n}\n\n\n\n// WEBPACK FOOTER //\n// ./vue-uniq-ids.js"],"sourceRoot":""} --------------------------------------------------------------------------------