@mcwv/base
Advanced tools
Comparing version 0.14.0 to 0.15.0
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.base=e():(t.mcwv=t.mcwv||{},t.mcwv.base=e())}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=105)}({105:function(t,e,n){"use strict";function o(t){return{version:"__VERSION__",install:e=>{Object.entries(t).forEach(([t,n])=>{const o=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),[i,...s]=o.split("-"),r=["mdc",...s].join("-"),c=["mcw",...s].join("-"),u=e.extend(n);e.component(c,u),e.component(r,u)})},components:t}}n.r(e);const i={name:"custom-button",functional:!0,props:{link:Object},render(t,{children:e,data:n,props:{link:o,tag:i},parent:{$router:s,$root:r}}){let c;return o&&s?(c=r.$options.components.RouterLink,n.props={tag:i,...o},n.attrs.role="button",n.on.click&&(n.nativeOn={click:n.on.click})):n.attrs&&n.attrs.href?(c="a",n.attrs.role="button"):c="button",t(c,n,e)}},s={props:{href:String,disabled:Boolean,to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomButton:i}};function r(t,e,n,o=!1){let i;"function"==typeof CustomEvent?i=new CustomEvent(e,{detail:n,bubbles:o}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,o,!1,n)),t.dispatchEvent(i)}const c={name:"custom-link",functional:!0,props:{tag:{type:String,default:"a"},link:Object},render(t,{data:e,children:n,props:{link:o,tag:i},parent:{$router:s,$root:r}}){let c;return o&&s?(c=r.$options.components.RouterLink,e.props={tag:i,...o},e.on.click&&(e.nativeOn={click:e.on.click})):c=i,t(c,e,n)}},u={props:{to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomLink:c}},a={props:{event:String,"event-target":Object,"event-args":Array},methods:{dispatchEvent(t){if(t&&this.$emit(t.type,t),this.event){const t=this.eventTarget||this.$root,e=this.eventArgs||[];t.$emit(this.event,...e)}}},computed:{listeners(){return{...this.$listeners,click:t=>this.dispatchEvent(t)}}}},l={data:()=>({hasFocus:!1}),methods:{onMouseDown(){this._active=!0},onMouseUp(){this._active=!1},onFocusEvent(){setTimeout(()=>this.dispatchFocusEvent(),0)},onBlurEvent(){this._active||setTimeout(()=>this.dispatchFocusEvent(),0)},dispatchFocusEvent(){const t=this.$el===document.activeElement||this.$el.contains(document.activeElement);t!=this.hasFocus&&(this.$emit(t?"focus":"blur"),this.hasFocus=t)}},mounted(){this.$el.addEventListener("focusin",this.onFocusEvent),this.$el.addEventListener("focusout",this.onBlurEvent),this.$el.addEventListener("mousedown",this.onMouseDown),this.$el.addEventListener("mouseup",this.onMouseUp)},beforeDestroy(){this.$el.removeEventListener("focusin",this.onFocusEvent),this.$el.removeEventListener("focusout",this.onBlurEvent),this.$el.removeEventListener("mousedown",this.onMouseDown),this.$el.removeEventListener("mouseup",this.onMouseUp)}},p=Math.floor(Math.random()*Math.floor(268435456)).toString()+"-",d={beforeCreate(){this.vma_uid_=p+this._uid}};n.d(e,"BasePlugin",(function(){return o})),n.d(e,"CustomButton",(function(){return i})),n.d(e,"CustomButtonMixin",(function(){return s})),n.d(e,"emitCustomEvent",(function(){return r})),n.d(e,"CustomLink",(function(){return c})),n.d(e,"CustomLinkMixin",(function(){return u})),n.d(e,"DispatchEventMixin",(function(){return a})),n.d(e,"DispatchFocusMixin",(function(){return l})),n.d(e,"VMAUniqueIdMixin",(function(){return d}))}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.base=e():(t.mcwv=t.mcwv||{},t.mcwv.base=e())}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var o=n(2);n.d(e,"BasePlugin",(function(){return o.a}));var i=n(12);n.d(e,"CustomButton",(function(){return i.a})),n.d(e,"CustomButtonMixin",(function(){return i.b}));var s=n(5);n.d(e,"emitCustomEvent",(function(){return s.a}));var r=n(8);n.d(e,"CustomLink",(function(){return r.a})),n.d(e,"CustomLinkMixin",(function(){return r.b}));var c=n(6);n.d(e,"DispatchEventMixin",(function(){return c.a}));var u=n(9);n.d(e,"DispatchFocusMixin",(function(){return u.a}));var a=n(7);n.d(e,"VMAUniqueIdMixin",(function(){return a.a}))},,function(t,e,n){"use strict";function o(t){return{version:"__VERSION__",install:e=>{Object.entries(t).forEach(([t,n])=>{const o=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),[i,...s]=o.split("-"),r=["mdc",...s].join("-"),c=["mcw",...s].join("-"),u=e.extend(n);e.component(c,u),e.component(r,u)})},components:t}}n.d(e,"a",(function(){return o}))},,,function(t,e,n){"use strict";function o(t,e,n,o=!1){let i;"function"==typeof CustomEvent?i=new CustomEvent(e,{detail:n,bubbles:o}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,o,!1,n)),t.dispatchEvent(i)}n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o={props:{event:String,"event-target":Object,"event-args":Array},methods:{dispatchEvent(t){if(t&&this.$emit(t.type,t),this.event){const t=this.eventTarget||this.$root,e=this.eventArgs||[];t.$emit(this.event,...e)}}},computed:{listeners(){return{...this.$listeners,click:t=>this.dispatchEvent(t)}}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const o=Math.floor(Math.random()*Math.floor(268435456)).toString()+"-",i={beforeCreate(){this.vma_uid_=o+this._uid}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));const o={name:"custom-link",functional:!0,props:{tag:{type:String,default:"a"},link:Object},render(t,{data:e,children:n,props:{link:o,tag:i},parent:{$router:s,$root:r}}){let c;return o&&s?(c=r.$options.components.RouterLink,e.props={tag:i,...o},e.on.click&&(e.nativeOn={click:e.on.click})):c=i,t(c,e,n)}},i={props:{to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomLink:o}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o={data:()=>({hasFocus:!1}),methods:{onMouseDown(){this._active=!0},onMouseUp(){this._active=!1},onFocusEvent(){setTimeout(()=>this.dispatchFocusEvent(),0)},onBlurEvent(){this._active||setTimeout(()=>this.dispatchFocusEvent(),0)},dispatchFocusEvent(){const t=this.$el===document.activeElement||this.$el.contains(document.activeElement);t!=this.hasFocus&&(this.$emit(t?"focus":"blur"),this.hasFocus=t)}},mounted(){this.$el.addEventListener("focusin",this.onFocusEvent),this.$el.addEventListener("focusout",this.onBlurEvent),this.$el.addEventListener("mousedown",this.onMouseDown),this.$el.addEventListener("mouseup",this.onMouseUp)},beforeDestroy(){this.$el.removeEventListener("focusin",this.onFocusEvent),this.$el.removeEventListener("focusout",this.onBlurEvent),this.$el.removeEventListener("mousedown",this.onMouseDown),this.$el.removeEventListener("mouseup",this.onMouseUp)}}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));const o={name:"custom-button",functional:!0,props:{link:Object},render(t,{children:e,data:n,props:{link:o,tag:i},parent:{$router:s,$root:r}}){let c;return o&&s?(c=r.$options.components.RouterLink,n.props={tag:i,...o},n.attrs.role="button",n.on.click&&(n.nativeOn={click:n.on.click})):n.attrs&&n.attrs.href?(c="a",n.attrs.role="button"):c="button",t(c,n,e)}},i={props:{href:String,disabled:Boolean,to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomButton:o}}}])})); | ||
//# sourceMappingURL=mcwv.base.min.js.map |
{ | ||
"name": "@mcwv/base", | ||
"description": "The set of base classes for Vue material componnents", | ||
"version": "0.14.0", | ||
"version": "0.15.0", | ||
"license": "MIT", | ||
@@ -13,3 +13,3 @@ "main": "dist/mcwv.base.min.js", | ||
"sideEffects": false, | ||
"gitHead": "78fd659b77df5ddf640cacf3c86edd798f679972" | ||
"gitHead": "b22bec8a9ecd8b859f8435c2fd5ef3865ba22f64" | ||
} |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
29380
258
1