Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@material/auto-init

Package Overview
Dependencies
Maintainers
11
Versions
1664
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/auto-init - npm Package Compare versions

Comparing version 0.25.0 to 0.29.0

10

dist/mdc.autoInit.js
/*!
Material Components for the web
Copyright (c) 2017 Google Inc.
Copyright (c) 2018 Google Inc.
License: Apache-2.0

@@ -78,3 +78,3 @@ */

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 25);
/******/ return __webpack_require__(__webpack_require__.s = 38);
/******/ })

@@ -84,6 +84,6 @@ /************************************************************************/

/***/ 25:
/***/ 38:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(26);
module.exports = __webpack_require__(39);

@@ -93,3 +93,3 @@

/***/ 26:
/***/ 39:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -96,0 +96,0 @@

/*!
Material Components for the web
Copyright (c) 2017 Google Inc.
Copyright (c) 2018 Google Inc.
License: Apache-2.0
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.autoInit=e():(t.mdc=t.mdc||{},t.mdc.autoInit=e())}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=25)}({25:function(t,e,n){t.exports=n(26)},26:function(t,e,n){"use strict";function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0;"function"==typeof CustomEvent?o=new CustomEvent(t,{detail:e,bubbles:n}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,n,!1,e)),document.dispatchEvent(o)}function r(){for(var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,r=e.querySelectorAll("[data-mdc-auto-init]"),c=0;t=r[c];c++){var a=t.dataset.mdcAutoInit;if(!a)throw new Error("(mdc-auto-init) Constructor name must be given.");var d=i[a];if("function"!=typeof d)throw new Error("(mdc-auto-init) Could not find constructor in registry for "+a);if(t[a])n("(mdc-auto-init) Component already initialized for "+t+". Skipping...");else{var f=d.attachTo(t);Object.defineProperty(t,a,{value:f,writable:!1,enumerable:!1,configurable:!0})}}o("MDCAutoInit:End",{})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=Object.create(null),u=console.warn.bind(console);r.register=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;if("function"!=typeof e)throw new Error("(mdc-auto-init) Invalid Ctor value "+e+". Expected function");i[t]&&n("(mdc-auto-init) Overriding registration for "+t+" with "+e+". Was: "+i[t]),i[t]=e},r.deregister=function(t){delete i[t]},r.deregisterAll=function(){Object.keys(i).forEach(this.deregister,this)}}})});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.autoInit=e():(t.mdc=t.mdc||{},t.mdc.autoInit=e())}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=38)}({38:function(t,e,n){t.exports=n(39)},39:function(t,e,n){"use strict";function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0;"function"==typeof CustomEvent?o=new CustomEvent(t,{detail:e,bubbles:n}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,n,!1,e)),document.dispatchEvent(o)}function r(){for(var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,r=e.querySelectorAll("[data-mdc-auto-init]"),c=0;t=r[c];c++){var a=t.dataset.mdcAutoInit;if(!a)throw new Error("(mdc-auto-init) Constructor name must be given.");var d=i[a];if("function"!=typeof d)throw new Error("(mdc-auto-init) Could not find constructor in registry for "+a);if(t[a])n("(mdc-auto-init) Component already initialized for "+t+". Skipping...");else{var f=d.attachTo(t);Object.defineProperty(t,a,{value:f,writable:!1,enumerable:!1,configurable:!0})}}o("MDCAutoInit:End",{})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=Object.create(null),u=console.warn.bind(console);r.register=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;if("function"!=typeof e)throw new Error("(mdc-auto-init) Invalid Ctor value "+e+". Expected function");i[t]&&n("(mdc-auto-init) Overriding registration for "+t+" with "+e+". Was: "+i[t]),i[t]=e},r.deregister=function(t){delete i[t]},r.deregisterAll=function(){Object.keys(i).forEach(this.deregister,this)}}})});
{
"name": "@material/auto-init",
"description": "Declarative, easy-to-use auto-initialization for Material Components for the web",
"version": "0.25.0",
"version": "0.29.0",
"main": "index.js",

@@ -6,0 +6,0 @@ "license": "Apache-2.0",

@@ -12,3 +12,3 @@ <!--docs:

`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization
for MDC-Web components on simple web sites. Note that for more advanced use-cases and complex sites,
for MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,
manual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great

@@ -144,3 +144,3 @@ for static websites, prototypes, and other use-cases where simplicity and convenience is most

<div id="mdc-section">
<!-- MDC-Web Components, etc. -->
<!-- MDC Web Components, etc. -->
</div>

@@ -157,3 +157,3 @@ <script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>

times, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post
elements containing MDC-Web components. `mdcAutoInit()` takes an optional second argument which is the
elements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the
function used to warn users when a component is initialized multiple times. By default, this is just

@@ -160,0 +160,0 @@ `console.warn()`. However, to skip over already-initialized components without logging a

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc