diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d5bc7..b78c248 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.2.1] ### Changed - A clearer errors management for user-provided data (Vue inst. / options) diff --git a/README.md b/README.md index 5f23a2b..a0d6796 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ import VueCtxInjector from 'vue-ctx-injector' #### Standalone package ```html - + ``` You just need to instantiate a new VCI object to start the parsing process. @@ -207,7 +207,7 @@ These methods are callable directly on the VCI instance. .parse() ``` -> Starts a new DOM parsing. Useful to instantiate newly added +> Triggers a new DOM parsing. Useful to instantiate newly added > HTML customized elements ("standalone components") after VCI instance > creation. diff --git a/dist/vue-ctx-injector.js b/dist/vue-ctx-injector.js index 059eaef..ed29c5a 100644 --- a/dist/vue-ctx-injector.js +++ b/dist/vue-ctx-injector.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueCtxInjector=e():t.VueCtxInjector=e()}(self,(function(){return function(){var t={560:function(t,e,n){"use strict";n.d(e,{default:function(){return _}});n(5395),n(3292);function r(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null;this.name=t}},{key:"setPropsData",value:function(t){this.propsData=this._castProps(t)}},{key:"isValidName",value:function(){return!!this.name}},{key:"isValidComponent",value:function(){return!!this.vComp}},{key:"mount",value:function(){if(this.rootElement){this._vCompConstructor=this._vue.extend(this.vComp),this._vCompInstance=new this._vCompConstructor({propsData:this.propsData}),this._vCompInstance._props=this._vue.observable(this.propsData);var t=this._vCompInstance.$mount();this.replaceRoot?this._mergeComponentWithRootElement(t.$el):this.rootElement.appendChild(t.$el)}}},{key:"watch",value:function(){var t=this;new MutationObserver((function(e){e.forEach((function(e){if("attributes"===e.type){var n=s.getVCIElementProps(t._propPrefix,t.rootElement);t._vCompInstance=new t._vCompConstructor({propsData:n});var r=t._vCompInstance.$mount();t.setPropsData(n),t.replaceRoot?t.rootElement.innerHTML=r.$el.innerHTML:(t.rootElement.innerHTML="",t.rootElement.appendChild(r.$el))}}))})).observe(this.rootElement,{attributes:!0})}},{key:"_castProps",value:function(t){var e={};for(var n in t)if(this.vComp&&this.vComp.props.hasOwnProperty(n)){var r=this.vComp.props[n].type,o=null;o=[Object,Array].includes(r)?JSON.parse(t[n]):r(t[n]),e[n]=o}return e}},{key:"_mergeComponentWithRootElement",value:function(t){var e,n=t.getAttribute("id"),r=t.classList,o=this.rootElement.getAttribute(this._componentPrefix),i=this.rootElement.getAttribute("id"),a=this.rootElement.classList,u=[],c=l(this.rootElement.attributes);try{for(c.s();!(e=c.n()).done;){var f=e.value;f.name.includes(this._propPrefix)&&(u[f.name]=f.value)}}catch(t){c.e(t)}finally{c.f()}n?t.setAttribute("id",n):i&&t.setAttribute("id",i),r.length&&(t.classList=r);var s,p=l(a);try{for(p.s();!(s=p.n()).done;){var v=s.value;t.classList.contains(v)||t.classList.add(v)}}catch(t){p.e(t)}finally{p.f()}for(var y in t.setAttribute(this._componentPrefix,o),u)t.setAttribute(y,u[y]);var h=document.createComment("[vci-comp] ".concat(this.name));this.rootElement.before(h),this.rootElement.remove(),this.rootElement=t,h.after(t),h.remove()}}])&&v(e.prototype,n),r&&v(e,r),t}();function m(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?arguments[1]:void 0)}},452:function(t,e,n){var r=n(4721),o=n(6674),i=n(9625),a=function(t){return function(e,n,a){var u,c=r(e),f=o(c.length),s=i(a,f);if(t&&n!=n){for(;f>s;)if((u=c[s++])!=u)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},7265:function(t,e,n){var r=n(9910),o=n(4015),i=n(7706),a=n(6674),u=n(9400),c=[].push,f=function(t){var e=1==t,n=2==t,f=3==t,s=4==t,l=6==t,p=7==t,v=5==t||l;return function(y,h,m,b){for(var d,g,x=i(y),S=o(x),w=r(h,m,3),_=a(S.length),C=0,P=b||u,E=e?P(y,_):n||p?P(y,0):void 0;_>C;C++)if((v||C in S)&&(g=w(d=S[C],C,x),t))if(e)E[C]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return C;case 2:c.call(E,d)}else switch(t){case 4:return!1;case 7:c.call(E,d)}return l?-1:f||s?s:E}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},9904:function(t,e,n){"use strict";var r=n(3894);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},2114:function(t,e,n){var r=n(4244),o=n(3894),i=n(4361),a=Object.defineProperty,u={},c=function(t){throw t};t.exports=function(t,e){if(i(u,t))return u[t];e||(e={});var n=[][t],f=!!i(e,"ACCESSORS")&&e.ACCESSORS,s=i(e,0)?e[0]:c,l=i(e,1)?e[1]:void 0;return u[t]=!!n&&!o((function(){if(f&&!r)return!0;var t={length:-1};f?a(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,s,l)}))}},9400:function(t,e,n){var r=n(3196),o=n(5588),i=n(1398)("species");t.exports=function(t,e){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},1030:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9129:function(t,e,n){var r=n(4361),o=n(6660),i=n(7872),a=n(6337);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,f=0;f"+t+""},y=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;y=r?function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=f("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete y.prototype[a[n]];return y()};u[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=o(t),n=new p,p.prototype=null,n[l]=t):n=y(),void 0===e?n:i(n,e)}},8068:function(t,e,n){var r=n(4244),o=n(6337),i=n(6302),a=n(8201);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),u=r.length,c=0;u>c;)o.f(t,n=r[c++],e[n]);return t}},6337:function(t,e,n){var r=n(4244),o=n(7320),i=n(6302),a=n(9155),u=Object.defineProperty;e.f=r?u:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7872:function(t,e,n){var r=n(4244),o=n(2028),i=n(654),a=n(4721),u=n(9155),c=n(4361),f=n(7320),s=Object.getOwnPropertyDescriptor;e.f=r?s:function(t,e){if(t=a(t),e=u(e,!0),f)try{return s(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},1019:function(t,e,n){var r=n(6406),o=n(2507).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},8586:function(t,e){e.f=Object.getOwnPropertySymbols},6406:function(t,e,n){var r=n(4361),o=n(4721),i=n(452).indexOf,a=n(2570);t.exports=function(t,e){var n,u=o(t),c=0,f=[];for(n in u)!r(a,n)&&r(u,n)&&f.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(f,n)||f.push(n));return f}},8201:function(t,e,n){var r=n(6406),o=n(2507);t.exports=Object.keys||function(t){return r(t,o)}},2028:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},6660:function(t,e,n){var r=n(2546),o=n(1019),i=n(8586),a=n(6302);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},1612:function(t,e,n){var r=n(4516);t.exports=r},8875:function(t,e,n){var r=n(4516),o=n(1831),i=n(4361),a=n(8870),u=n(1683),c=n(3023),f=c.get,s=c.enforce,l=String(String).split("String");(t.exports=function(t,e,n,u){var c,f=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,v=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),(c=s(n)).source||(c.source=l.join("string"==typeof e?e:""))),t!==r?(f?!v&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||u(this)}))},2191:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},8870:function(t,e,n){var r=n(4516),o=n(1831);t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},6894:function(t,e,n){var r=n(8365),o=n(7025),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4111:function(t,e,n){var r=n(4516),o=n(8870),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},8365:function(t,e,n){var r=n(3310),o=n(4111);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},9625:function(t,e,n){var r=n(4001),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4721:function(t,e,n){var r=n(4015),o=n(2191);t.exports=function(t){return r(o(t))}},4001:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},6674:function(t,e,n){var r=n(4001),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7706:function(t,e,n){var r=n(2191);t.exports=function(t){return Object(r(t))}},9155:function(t,e,n){var r=n(3196);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},7025:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},8477:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(7449);t.exports=o&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},1398:function(t,e,n){var r=n(4516),o=n(8365),i=n(4361),a=n(7025),u=n(7449),c=n(8477),f=o("wks"),s=r.Symbol,l=c?s:s&&s.withoutSetter||a;t.exports=function(t){return i(f,t)||(u&&i(s,t)?f[t]=s[t]:f[t]=l("Symbol."+t)),f[t]}},3949:function(t,e,n){"use strict";var r=n(7330),o=n(452).includes,i=n(6278);r({target:"Array",proto:!0,forced:!n(2114)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},3923:function(t,e,n){var r=n(4516),o=n(3464),i=n(9682),a=n(1831);for(var u in o){var c=r[u],f=c&&c.prototype;if(f&&f.forEach!==i)try{a(f,"forEach",i)}catch(t){f.forEach=i}}},1326:function(t,e,n){n(3923);var r=n(9682);t.exports=r}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n(560)}().default})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueCtxInjector=e():t.VueCtxInjector=e()}(self,(function(){return function(){var t={2560:function(t,e,n){"use strict";n.d(e,{default:function(){return _}});n(5395),n(3292);function r(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:null;this.name=t}},{key:"setPropsData",value:function(t){this.propsData=this._castProps(t)}},{key:"isValidName",value:function(){return!!this.name}},{key:"isValidComponent",value:function(){return!!this.vComp}},{key:"mount",value:function(){if(this.rootElement){this._vCompConstructor=this._vue.extend(this.vComp),this._vCompInstance=new this._vCompConstructor({propsData:this.propsData}),this._vCompInstance._props=this._vue.observable(this.propsData);var t=this._vCompInstance.$mount();this.replaceRoot?this._mergeComponentWithRootElement(t.$el):this.rootElement.appendChild(t.$el)}}},{key:"watch",value:function(){var t=this;new MutationObserver((function(e){e.forEach((function(e){if("attributes"===e.type){var n=s.getVCIElementProps(t._propPrefix,t.rootElement);t._vCompInstance=new t._vCompConstructor({propsData:n});var r=t._vCompInstance.$mount();t.setPropsData(n),t.replaceRoot?t.rootElement.innerHTML=r.$el.innerHTML:(t.rootElement.innerHTML="",t.rootElement.appendChild(r.$el))}}))})).observe(this.rootElement,{attributes:!0})}},{key:"_castProps",value:function(t){var e={};for(var n in t)if(this.vComp&&this.vComp.props.hasOwnProperty(n)){var r=this.vComp.props[n].type,o=null;o=[Object,Array].includes(r)?JSON.parse(t[n]):r(t[n]),e[n]=o}return e}},{key:"_mergeComponentWithRootElement",value:function(t){var e,n=t.getAttribute("id"),r=t.classList,o=this.rootElement.getAttribute(this._componentPrefix),i=this.rootElement.getAttribute("id"),a=this.rootElement.classList,u=[],c=l(this.rootElement.attributes);try{for(c.s();!(e=c.n()).done;){var f=e.value;f.name.includes(this._propPrefix)&&(u[f.name]=f.value)}}catch(t){c.e(t)}finally{c.f()}n?t.setAttribute("id",n):i&&t.setAttribute("id",i),r.length&&(t.classList=r);var s,p=l(a);try{for(p.s();!(s=p.n()).done;){var v=s.value;t.classList.contains(v)||t.classList.add(v)}}catch(t){p.e(t)}finally{p.f()}for(var y in t.setAttribute(this._componentPrefix,o),u)t.setAttribute(y,u[y]);var h=document.createComment("[vci-comp] ".concat(this.name));this.rootElement.before(h),this.rootElement.remove(),this.rootElement=t,h.after(t),h.remove()}}])&&v(e.prototype,n),r&&v(e,r),t}();function m(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?arguments[1]:void 0)}},452:function(t,e,n){var r=n(4721),o=n(6674),i=n(9625),a=function(t){return function(e,n,a){var u,c=r(e),f=o(c.length),s=i(a,f);if(t&&n!=n){for(;f>s;)if((u=c[s++])!=u)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},7265:function(t,e,n){var r=n(9910),o=n(4015),i=n(7706),a=n(6674),u=n(9400),c=[].push,f=function(t){var e=1==t,n=2==t,f=3==t,s=4==t,l=6==t,p=7==t,v=5==t||l;return function(y,h,m,b){for(var d,g,x=i(y),S=o(x),w=r(h,m,3),_=a(S.length),C=0,P=b||u,E=e?P(y,_):n||p?P(y,0):void 0;_>C;C++)if((v||C in S)&&(g=w(d=S[C],C,x),t))if(e)E[C]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return C;case 2:c.call(E,d)}else switch(t){case 4:return!1;case 7:c.call(E,d)}return l?-1:f||s?s:E}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},9904:function(t,e,n){"use strict";var r=n(3894);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},2114:function(t,e,n){var r=n(4244),o=n(3894),i=n(4361),a=Object.defineProperty,u={},c=function(t){throw t};t.exports=function(t,e){if(i(u,t))return u[t];e||(e={});var n=[][t],f=!!i(e,"ACCESSORS")&&e.ACCESSORS,s=i(e,0)?e[0]:c,l=i(e,1)?e[1]:void 0;return u[t]=!!n&&!o((function(){if(f&&!r)return!0;var t={length:-1};f?a(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,s,l)}))}},9400:function(t,e,n){var r=n(3196),o=n(5588),i=n(1398)("species");t.exports=function(t,e){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},1030:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9129:function(t,e,n){var r=n(4361),o=n(6660),i=n(7872),a=n(6337);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,f=0;f"+t+""},y=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;y=r?function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=f("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete y.prototype[a[n]];return y()};u[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=o(t),n=new p,p.prototype=null,n[l]=t):n=y(),void 0===e?n:i(n,e)}},8068:function(t,e,n){var r=n(4244),o=n(6337),i=n(6302),a=n(8201);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),u=r.length,c=0;u>c;)o.f(t,n=r[c++],e[n]);return t}},6337:function(t,e,n){var r=n(4244),o=n(7320),i=n(6302),a=n(9155),u=Object.defineProperty;e.f=r?u:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7872:function(t,e,n){var r=n(4244),o=n(2028),i=n(654),a=n(4721),u=n(9155),c=n(4361),f=n(7320),s=Object.getOwnPropertyDescriptor;e.f=r?s:function(t,e){if(t=a(t),e=u(e,!0),f)try{return s(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},1019:function(t,e,n){var r=n(6406),o=n(2507).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},8586:function(t,e){e.f=Object.getOwnPropertySymbols},6406:function(t,e,n){var r=n(4361),o=n(4721),i=n(452).indexOf,a=n(2570);t.exports=function(t,e){var n,u=o(t),c=0,f=[];for(n in u)!r(a,n)&&r(u,n)&&f.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(f,n)||f.push(n));return f}},8201:function(t,e,n){var r=n(6406),o=n(2507);t.exports=Object.keys||function(t){return r(t,o)}},2028:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},6660:function(t,e,n){var r=n(2546),o=n(1019),i=n(8586),a=n(6302);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},1612:function(t,e,n){var r=n(4516);t.exports=r},8875:function(t,e,n){var r=n(4516),o=n(1831),i=n(4361),a=n(8870),u=n(1683),c=n(3023),f=c.get,s=c.enforce,l=String(String).split("String");(t.exports=function(t,e,n,u){var c,f=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,v=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),(c=s(n)).source||(c.source=l.join("string"==typeof e?e:""))),t!==r?(f?!v&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||u(this)}))},2191:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},8870:function(t,e,n){var r=n(4516),o=n(1831);t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},6894:function(t,e,n){var r=n(8365),o=n(7025),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4111:function(t,e,n){var r=n(4516),o=n(8870),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},8365:function(t,e,n){var r=n(3310),o=n(4111);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},9625:function(t,e,n){var r=n(4001),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4721:function(t,e,n){var r=n(4015),o=n(2191);t.exports=function(t){return r(o(t))}},4001:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},6674:function(t,e,n){var r=n(4001),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7706:function(t,e,n){var r=n(2191);t.exports=function(t){return Object(r(t))}},9155:function(t,e,n){var r=n(3196);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},7025:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},8477:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(7449);t.exports=o&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},1398:function(t,e,n){var r=n(4516),o=n(8365),i=n(4361),a=n(7025),u=n(7449),c=n(8477),f=o("wks"),s=r.Symbol,l=c?s:s&&s.withoutSetter||a;t.exports=function(t){return i(f,t)||(u&&i(s,t)?f[t]=s[t]:f[t]=l("Symbol."+t)),f[t]}},3949:function(t,e,n){"use strict";var r=n(7330),o=n(452).includes,i=n(6278);r({target:"Array",proto:!0,forced:!n(2114)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},3923:function(t,e,n){var r=n(4516),o=n(3464),i=n(9682),a=n(1831);for(var u in o){var c=r[u],f=c&&c.prototype;if(f&&f.forEach!==i)try{a(f,"forEach",i)}catch(t){f.forEach=i}}},1326:function(t,e,n){n(3923);var r=n(9682);t.exports=r}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n(2560)}().default})); \ No newline at end of file diff --git a/index.js b/index.js index eb8d9a1..12cb672 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /*! - * VueCtxInjector v1.2.0 + * VueCtxInjector v1.2.1 * (c) 2021 Paul Guzda-Rivière (@mekkanix) * Released under the Apache-2.0 License. */ diff --git a/package.json b/package.json index 0802cc9..27891b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-ctx-injector", - "version": "1.2.0", + "version": "1.2.1", "description": "A tool for injecting standalone Vue.js components into HTML contexts.", "main": "./dist/vue-ctx-injector.js", "scripts": { @@ -13,10 +13,17 @@ "url": "git+https://github.com/mekkanix/vue-ctx-injector.git" }, "keywords": [ + "js", + "javascript", + "vue", "vuejs", + "vue.js", "HTML", + "ctx", "context", - "injector" + "inject", + "injector", + "template" ], "author": "Mekkanix (paulguzdariviere@gmail.com)", "license": "MIT",