🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

vue-announcer

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-announcer - npm Package Compare versions

Comparing version

to
1.0.5

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

<a name="1.0.5"></a>
## [1.0.5](https://github.com/vue-a11y/vue-announcer/compare/v1.0.4...v1.0.5) (2019-12-17)
<a name="1.0.4"></a>

@@ -7,0 +12,0 @@ ## [1.0.4](https://github.com/vue-a11y/vue-announcer/compare/v1.0.3...v1.0.4) (2019-01-25)

2

dist/vue-announcer.amd.js

@@ -1,1 +0,1 @@

define(function(){'use strict';var a={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},b=a,c=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},d=[],e=typeof c!=='undefined'?{render:c,staticRenderFns:d}:{},f=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},g="data-v-d2ab3a3c",i=undefined,j=!1;function k(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function l(){var a=document.head||document.getElementsByTagName('head')[0],b=l.styles||(l.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var m=k(e,f,typeof b==='undefined'?{}:b,g,j,i,typeof l!=='undefined'?l:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),n={complementRoute:'has loaded'};function o(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},n,b);a.component('VueAnnouncer',m);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(o);return o})
define(function(){'use strict';var a={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},b=a,c=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},d=[],e=typeof c!=='undefined'?{render:c,staticRenderFns:d}:{},f=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},g="data-v-d2ab3a3c",i=undefined,j=!1;function k(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function l(){var a=document.head||document.getElementsByTagName('head')[0],b=l.styles||(l.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var m=k(e,f,typeof b==='undefined'?{}:b,g,j,i,typeof l!=='undefined'?l:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),n={complementRoute:'has loaded'};function o(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},n,b);a.component('VueAnnouncer',m);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},setComplementRoute:function c(a){if(typeof a!=='string'){return}b.complementRoute=a},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(o);return o})

@@ -1,1 +0,1 @@

'use strict';var script={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},__vue_script__=script,__vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},__vue_staticRenderFns__=[],__vue_template__=typeof __vue_render__!=='undefined'?{render:__vue_render__,staticRenderFns:__vue_staticRenderFns__}:{},__vue_inject_styles__=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},__vue_scope_id__="data-v-d2ab3a3c",__vue_module_identifier__=undefined,__vue_is_functional_template__=!1;function __vue_normalize__(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function __vue_create_injector__(){var a=document.head||document.getElementsByTagName('head')[0],b=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var VueAnnouncer=__vue_normalize__(__vue_template__,__vue_inject_styles__,typeof __vue_script__==='undefined'?{}:__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,typeof __vue_create_injector__!=='undefined'?__vue_create_injector__:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),OPTIONS={complementRoute:'has loaded'};function install(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},OPTIONS,b);a.component('VueAnnouncer',VueAnnouncer);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(install);module.exports=install
'use strict';var script={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},__vue_script__=script,__vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},__vue_staticRenderFns__=[],__vue_template__=typeof __vue_render__!=='undefined'?{render:__vue_render__,staticRenderFns:__vue_staticRenderFns__}:{},__vue_inject_styles__=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},__vue_scope_id__="data-v-d2ab3a3c",__vue_module_identifier__=undefined,__vue_is_functional_template__=!1;function __vue_normalize__(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function __vue_create_injector__(){var a=document.head||document.getElementsByTagName('head')[0],b=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var VueAnnouncer=__vue_normalize__(__vue_template__,__vue_inject_styles__,typeof __vue_script__==='undefined'?{}:__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,typeof __vue_create_injector__!=='undefined'?__vue_create_injector__:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),OPTIONS={complementRoute:'has loaded'};function install(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},OPTIONS,b);a.component('VueAnnouncer',VueAnnouncer);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},setComplementRoute:function c(a){if(typeof a!=='string'){return}b.complementRoute=a},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(install);module.exports=install

@@ -1,1 +0,1 @@

var script={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},__vue_script__=script,__vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},__vue_staticRenderFns__=[],__vue_template__=typeof __vue_render__!=='undefined'?{render:__vue_render__,staticRenderFns:__vue_staticRenderFns__}:{},__vue_inject_styles__=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},__vue_scope_id__="data-v-d2ab3a3c",__vue_module_identifier__=undefined,__vue_is_functional_template__=!1;function __vue_normalize__(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function __vue_create_injector__(){var a=document.head||document.getElementsByTagName('head')[0],b=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var VueAnnouncer=__vue_normalize__(__vue_template__,__vue_inject_styles__,typeof __vue_script__==='undefined'?{}:__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,typeof __vue_create_injector__!=='undefined'?__vue_create_injector__:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),OPTIONS={complementRoute:'has loaded'};function install(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},OPTIONS,b);a.component('VueAnnouncer',VueAnnouncer);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(install);export default install
var script={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},__vue_script__=script,__vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},__vue_staticRenderFns__=[],__vue_template__=typeof __vue_render__!=='undefined'?{render:__vue_render__,staticRenderFns:__vue_staticRenderFns__}:{},__vue_inject_styles__=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},__vue_scope_id__="data-v-d2ab3a3c",__vue_module_identifier__=undefined,__vue_is_functional_template__=!1;function __vue_normalize__(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function __vue_create_injector__(){var a=document.head||document.getElementsByTagName('head')[0],b=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var VueAnnouncer=__vue_normalize__(__vue_template__,__vue_inject_styles__,typeof __vue_script__==='undefined'?{}:__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,typeof __vue_create_injector__!=='undefined'?__vue_create_injector__:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),OPTIONS={complementRoute:'has loaded'};function install(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},OPTIONS,b);a.component('VueAnnouncer',VueAnnouncer);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},setComplementRoute:function c(a){if(typeof a!=='string'){return}b.complementRoute=a},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(install);export default install

@@ -1,1 +0,1 @@

!function(a,b){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define(b):(a.VueAnnouncer=b())}(this,(function(){'use strict';var a={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},b=a,c=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},d=[],e=typeof c!=='undefined'?{render:c,staticRenderFns:d}:{},f=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},g="data-v-d2ab3a3c",i=undefined,j=!1;function k(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function l(){var a=document.head||document.getElementsByTagName('head')[0],b=l.styles||(l.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var m=k(e,f,typeof b==='undefined'?{}:b,g,j,i,typeof l!=='undefined'?l:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),n={complementRoute:'has loaded'};function o(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},n,b);a.component('VueAnnouncer',m);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(o);return o}))
!function(a,b){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define(b):(a.VueAnnouncer=b())}(this,(function(){'use strict';var a={name:'VueAnnouncer',data:function a(){return{content:''}},created:function a(){this.$announcer.data=this.$data}},b=a,c=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{staticClass:"announcer",attrs:{"id":"announcer","aria-live":"polite","aria-atomic":"true"},domProps:{"textContent":a._s(a.content)}})},d=[],e=typeof c!=='undefined'?{render:c,staticRenderFns:d}:{},f=function(a){if(!a){return}a("data-v-d2ab3a3c_0",{source:"\n.announcer[data-v-d2ab3a3c]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden\n}",map:undefined,media:undefined})},g="data-v-d2ab3a3c",i=undefined,j=!1;function k(a,b,c,d,e,f,g,i){var j=c||{};j.render||(j.render=a.render,j.staticRenderFns=a.staticRenderFns,j._compiled=!0,e&&(j.functional=!0));j._scopeId=d;{var k;b&&(k=function(a){b.call(this,g(a))});if(k!==undefined){if(j.functional){var l=j.render;j.render=function c(a,b){k.call(b);return l(a,b)}}else{var m=j.beforeCreate;j.beforeCreate=m?[].concat(m,k):[k]}}};return j}function l(){var a=document.head||document.getElementsByTagName('head')[0],b=l.styles||(l.styles={}),c=typeof navigator!=='undefined'&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function f(d,e){if(document.querySelector('style[data-vue-ssr-id~="'+d+'"]')){return}var g=c?e.media||'default':d,h=b[g]||(b[g]={ids:[],parts:[],element:undefined});if(!h.ids.includes(d)){var i=e.source,j=h.ids.length;h.ids.push(d);e.map&&(i+='\n/*# sourceURL='+e.map.sources[0]+' */',i+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+' */');c&&(h.element=h.element||document.querySelector('style[data-group='+g+']'));if(!h.element){var k=h.element=document.createElement('style');k.type='text/css';e.media&&k.setAttribute('media',e.media);c&&(k.setAttribute('data-group',g),k.setAttribute('data-next-index','0'));a.appendChild(k)}c&&(j=parseInt(h.element.getAttribute('data-next-index')),h.element.setAttribute('data-next-index',j+1));if(h.element.styleSheet)h.parts.push(i),h.element.styleSheet.cssText=h.parts.filter(Boolean).join('\n');else{var l=document.createTextNode(i),m=h.element.childNodes;m[j]&&h.element.removeChild(m[j]);m.length?h.element.insertBefore(l,m[j]):h.element.appendChild(l)}}}}var m=k(e,f,typeof b==='undefined'?{}:b,g,j,i,typeof l!=='undefined'?l:function(){},typeof __vue_create_injector_ssr__!=='undefined'?__vue_create_injector_ssr__:function(){}),n={complementRoute:'has loaded'};function o(a,b,c){b===void 0&&(b={});c===void 0&&(c=null);b=Object.assign({},n,b);a.component('VueAnnouncer',m);a.prototype.$announcer={set:function c(b){var d=this;this.data&&(this.data.content='',a.nextTick().then(function(){d.data.content=b}))},setComplementRoute:function c(a){if(typeof a!=='string'){return}b.complementRoute=a},data:null};c&&c.afterEach(function(c){a.prototype.$announcer.set(((c.meta.announcer||document.title.trim())+" "+b.complementRoute))})}typeof window!=='undefined'&&typeof window.Vue!=='undefined'&&window.Vue.use(o);return o}))

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ # example-vue-a11y-announcer

@@ -0,0 +0,0 @@ import Vue from 'vue'

@@ -14,2 +14,7 @@ import Vue from 'vue'

{
beforeEnter (to, from, next) {
router.app.$announcer.setComplementRoute('has loaded')
next()
},
name: 'home',

@@ -23,2 +28,7 @@ path: '/',

{
beforeEnter (to, from, next) {
router.app.$announcer.setComplementRoute('has loaded')
next()
},
name: 'about',

@@ -32,2 +42,7 @@ path: '/about',

{
beforeEnter (to, from, next) {
router.app.$announcer.setComplementRoute('has fully loaded')
next()
},
name: 'contact',

@@ -34,0 +49,0 @@ path: '/contact',

@@ -0,0 +0,0 @@ var path = require('path')

@@ -8,2 +8,4 @@ import {PluginFunction} from 'vue';

set(message: string): void;
setComplementRoute(complementRoute: string): void;
}

@@ -10,0 +12,0 @@

{
"name": "vue-announcer",
"version": "1.0.4",
"version": "1.0.5",
"description": "A simple way with Vue to announce any information to the screen readers.",

@@ -5,0 +5,0 @@ "main": "dist/vue-announcer.js",

@@ -86,2 +86,18 @@ # vue-announcer

### Methods
**Note: These methods are registered on the `$announcer` property injected into the Vue instance**
#### `$announcer.setComplementRoute(complementRoute)`
If you need to set the `complementRoute` option dynamically without reloading the application, for example if you're
dynamically loading translations, you can use this method to update it.
```javascript
export default {
onTranslationsUpdated (translations) {
this.$announcer.setComplementRoute(translations.complementRouteKey /* = 'ha cargado' */)
}
}
```
### Custom message to each page (optional)

@@ -88,0 +104,0 @@ You can set a property on the meta object, which will serve as information to get the message that will be announced to the screen reader on each page. e.g.:

@@ -18,2 +18,10 @@ import VueAnnouncer from './vue-announcer.vue'

},
setComplementRoute (complementRoute) {
if (typeof (complementRoute) !== 'string') {
return
}
options.complementRoute = complementRoute
},
data: null

@@ -20,0 +28,0 @@ }

@@ -15,2 +15,15 @@ describe('Announcer test', () => {

it('Should contain the custom complement when the route changes', () => {
cy.get('a[href="/contact"]').click()
cy.get('[data-va="announcer"]').should('contain', 'has fully loaded')
})
it('Should handle setting the custom complement multiple times', () => {
cy.get('a[href="/contact"]').click()
cy.get('[data-va="announcer"]').should('contain', 'has fully loaded')
cy.get('a[href="/about"]').click()
cy.get('[data-va="announcer"]').should('contain', 'has loaded')
})
it('Should be equal toasted message with the announced', () => {

@@ -21,11 +34,11 @@ cy.get('a[href="/about"]').click()

cy.get('.toasted-container')
.find('.toasted')
.invoke('text')
.then(text1 => {
cy.get('[data-va="announcer"]').invoke('text').should(text2 => {
console.log(text1, text2)
expect(text1).to.eq(text2)
.find('.toasted')
.invoke('text')
.then(text1 => {
cy.get('[data-va="announcer"]').invoke('text').should(text2 => {
console.log(text1, text2)
expect(text1).to.eq(text2)
})
})
})
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet