@material/linear-progress
Advanced tools
Comparing version 0.29.0 to 0.30.0
@@ -78,3 +78,3 @@ /*! | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 77); | ||
/******/ return __webpack_require__(__webpack_require__.s = 89); | ||
/******/ }) | ||
@@ -361,3 +361,3 @@ /************************************************************************/ | ||
/***/ 4: | ||
/***/ 5: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -395,6 +395,158 @@ | ||
/***/ 77: | ||
/***/ 8: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformStyleProperties", function() { return transformStyleProperties; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCorrectEventName", function() { return getCorrectEventName; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCorrectPropertyName", function() { return getCorrectPropertyName; }); | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* @typedef {{ | ||
* noPrefix: string, | ||
* webkitPrefix: string, | ||
* styleProperty: string | ||
* }} | ||
*/ | ||
var VendorPropertyMapType = void 0; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var eventTypeMap = { | ||
'animationstart': { | ||
noPrefix: 'animationstart', | ||
webkitPrefix: 'webkitAnimationStart', | ||
styleProperty: 'animation' | ||
}, | ||
'animationend': { | ||
noPrefix: 'animationend', | ||
webkitPrefix: 'webkitAnimationEnd', | ||
styleProperty: 'animation' | ||
}, | ||
'animationiteration': { | ||
noPrefix: 'animationiteration', | ||
webkitPrefix: 'webkitAnimationIteration', | ||
styleProperty: 'animation' | ||
}, | ||
'transitionend': { | ||
noPrefix: 'transitionend', | ||
webkitPrefix: 'webkitTransitionEnd', | ||
styleProperty: 'transition' | ||
} | ||
}; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var cssPropertyMap = { | ||
'animation': { | ||
noPrefix: 'animation', | ||
webkitPrefix: '-webkit-animation' | ||
}, | ||
'transform': { | ||
noPrefix: 'transform', | ||
webkitPrefix: '-webkit-transform' | ||
}, | ||
'transition': { | ||
noPrefix: 'transition', | ||
webkitPrefix: '-webkit-transition' | ||
} | ||
}; | ||
/** | ||
* @param {!Object} windowObj | ||
* @return {boolean} | ||
*/ | ||
function hasProperShape(windowObj) { | ||
return windowObj['document'] !== undefined && typeof windowObj['document']['createElement'] === 'function'; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @return {boolean} | ||
*/ | ||
function eventFoundInMaps(eventType) { | ||
return eventType in eventTypeMap || eventType in cssPropertyMap; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @param {!Object<string, !VendorPropertyMapType>} map | ||
* @param {!Element} el | ||
* @return {string} | ||
*/ | ||
function getJavaScriptEventName(eventType, map, el) { | ||
return map[eventType].styleProperty in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
/** | ||
* Helper function to determine browser prefix for CSS3 animation events | ||
* and property names. | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getAnimationName(windowObj, eventType) { | ||
if (!hasProperShape(windowObj) || !eventFoundInMaps(eventType)) { | ||
return eventType; | ||
} | ||
var map = /** @type {!Object<string, !VendorPropertyMapType>} */eventType in eventTypeMap ? eventTypeMap : cssPropertyMap; | ||
var el = windowObj['document']['createElement']('div'); | ||
var eventName = ''; | ||
if (map === eventTypeMap) { | ||
eventName = getJavaScriptEventName(eventType, map, el); | ||
} else { | ||
eventName = map[eventType].noPrefix in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
return eventName; | ||
} | ||
// Public functions to access getAnimationName() for JavaScript events or CSS | ||
// property names. | ||
var transformStyleProperties = ['transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'MSTransform']; | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectEventName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectPropertyName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/***/ }), | ||
/***/ 89: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(78); | ||
module.exports = __webpack_require__(90); | ||
@@ -404,3 +556,3 @@ | ||
/***/ 78: | ||
/***/ 90: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -411,4 +563,4 @@ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCLinearProgress", function() { return MDCLinearProgress; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(4); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(79); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base_index__ = __webpack_require__(5); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(91); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCLinearProgressFoundation", function() { return __WEBPACK_IMPORTED_MODULE_1__foundation__["a"]; }); | ||
@@ -517,13 +669,13 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
return MDCLinearProgress; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base__["MDCComponent"]); | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base_index__["MDCComponent"]); | ||
/***/ }), | ||
/***/ 79: | ||
/***/ 91: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(4); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation__ = __webpack_require__(8); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(80); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base_index__ = __webpack_require__(5); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation_index__ = __webpack_require__(8); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(92); | ||
var _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; }; | ||
@@ -657,3 +809,3 @@ | ||
var value = 'scaleX(' + scaleValue + ')'; | ||
__WEBPACK_IMPORTED_MODULE_1__material_animation__["transformStyleProperties"].forEach(function (transformStyleProperty) { | ||
__WEBPACK_IMPORTED_MODULE_1__material_animation_index__["transformStyleProperties"].forEach(function (transformStyleProperty) { | ||
_this2.adapter_.setStyle(el, transformStyleProperty, value); | ||
@@ -665,3 +817,3 @@ }); | ||
return MDCLinearProgressFoundation; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base__["MDCFoundation"]); | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base_index__["MDCFoundation"]); | ||
@@ -672,158 +824,6 @@ /* harmony default export */ __webpack_exports__["a"] = (MDCLinearProgressFoundation); | ||
/***/ 8: | ||
/***/ 92: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformStyleProperties", function() { return transformStyleProperties; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCorrectEventName", function() { return getCorrectEventName; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCorrectPropertyName", function() { return getCorrectPropertyName; }); | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* @typedef {{ | ||
* noPrefix: string, | ||
* webkitPrefix: string, | ||
* styleProperty: string | ||
* }} | ||
*/ | ||
var VendorPropertyMapType = void 0; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var eventTypeMap = { | ||
'animationstart': { | ||
noPrefix: 'animationstart', | ||
webkitPrefix: 'webkitAnimationStart', | ||
styleProperty: 'animation' | ||
}, | ||
'animationend': { | ||
noPrefix: 'animationend', | ||
webkitPrefix: 'webkitAnimationEnd', | ||
styleProperty: 'animation' | ||
}, | ||
'animationiteration': { | ||
noPrefix: 'animationiteration', | ||
webkitPrefix: 'webkitAnimationIteration', | ||
styleProperty: 'animation' | ||
}, | ||
'transitionend': { | ||
noPrefix: 'transitionend', | ||
webkitPrefix: 'webkitTransitionEnd', | ||
styleProperty: 'transition' | ||
} | ||
}; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var cssPropertyMap = { | ||
'animation': { | ||
noPrefix: 'animation', | ||
webkitPrefix: '-webkit-animation' | ||
}, | ||
'transform': { | ||
noPrefix: 'transform', | ||
webkitPrefix: '-webkit-transform' | ||
}, | ||
'transition': { | ||
noPrefix: 'transition', | ||
webkitPrefix: '-webkit-transition' | ||
} | ||
}; | ||
/** | ||
* @param {!Object} windowObj | ||
* @return {boolean} | ||
*/ | ||
function hasProperShape(windowObj) { | ||
return windowObj['document'] !== undefined && typeof windowObj['document']['createElement'] === 'function'; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @return {boolean} | ||
*/ | ||
function eventFoundInMaps(eventType) { | ||
return eventType in eventTypeMap || eventType in cssPropertyMap; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @param {!Object<string, !VendorPropertyMapType>} map | ||
* @param {!Element} el | ||
* @return {string} | ||
*/ | ||
function getJavaScriptEventName(eventType, map, el) { | ||
return map[eventType].styleProperty in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
/** | ||
* Helper function to determine browser prefix for CSS3 animation events | ||
* and property names. | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getAnimationName(windowObj, eventType) { | ||
if (!hasProperShape(windowObj) || !eventFoundInMaps(eventType)) { | ||
return eventType; | ||
} | ||
var map = /** @type {!Object<string, !VendorPropertyMapType>} */eventType in eventTypeMap ? eventTypeMap : cssPropertyMap; | ||
var el = windowObj['document']['createElement']('div'); | ||
var eventName = ''; | ||
if (map === eventTypeMap) { | ||
eventName = getJavaScriptEventName(eventType, map, el); | ||
} else { | ||
eventName = map[eventType].noPrefix in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
return eventName; | ||
} | ||
// Public functions to access getAnimationName() for JavaScript events or CSS | ||
// property names. | ||
var transformStyleProperties = ['transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'MSTransform']; | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectEventName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectPropertyName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/***/ }), | ||
/***/ 80: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
@@ -861,2 +861,3 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return strings; }); | ||
/******/ }); | ||
}); | ||
}); | ||
//# sourceMappingURL=mdc.linearProgress.js.map |
@@ -6,3 +6,3 @@ /*! | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.linearProgress=t():(e.mdc=e.mdc||{},e.mdc.linearProgress=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,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="/assets/",t(t.s=77)}({0:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.adapter_=t}return i(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=o},1:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,e),this.root_=t;for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];this.initialize.apply(this,o),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return o(e,null,[{key:"attachTo",value:function(t){return new e(t,new i.a)}}]),o(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(e,{detail:t,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(r)}}]),e}();t.a=a},4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1);n.d(t,"MDCFoundation",function(){return r.a}),n.d(t,"MDCComponent",function(){return i.a})},77:function(e,t,n){e.exports=n(78)},78:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCLinearProgress",function(){return f});var a=n(4),u=n(79);n.d(t,"MDCLinearProgressFoundation",function(){return u.a});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"open",value:function(){this.foundation_.open()}},{key:"close",value:function(){this.foundation_.close()}},{key:"getDefaultFoundation",value:function(){var e=this;return new u.a({addClass:function(t){return e.root_.classList.add(t)},getPrimaryBar:function(){return e.root_.querySelector(u.a.strings.PRIMARY_BAR_SELECTOR)},getBuffer:function(){return e.root_.querySelector(u.a.strings.BUFFER_SELECTOR)},hasClass:function(t){return e.root_.classList.contains(t)},removeClass:function(t){return e.root_.classList.remove(t)},setStyle:function(e,t,n){return e.style[t]=n}})}},{key:"determinate",set:function(e){this.foundation_.setDeterminate(e)}},{key:"progress",set:function(e){this.foundation_.setProgress(e)}},{key:"buffer",set:function(e){this.foundation_.setBuffer(e)}},{key:"reverse",set:function(e){this.foundation_.setReverse(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(a.MDCComponent)},79:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(4),u=n(8),s=n(80),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f(t.defaultAdapter,e)))}return o(t,e),c(t,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return{addClass:function(){},getPrimaryBar:function(){},getBuffer:function(){},hasClass:function(){return!1},removeClass:function(){},setStyle:function(){}}}}]),c(t,[{key:"init",value:function(){this.determinate_=!this.adapter_.hasClass(s.a.INDETERMINATE_CLASS),this.reverse_=this.adapter_.hasClass(s.a.REVERSED_CLASS),this.progress_=0}},{key:"setDeterminate",value:function(e){this.determinate_=e,this.determinate_?(this.adapter_.removeClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),this.progress_)):(this.adapter_.addClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),1),this.setScale_(this.adapter_.getBuffer(),1))}},{key:"setProgress",value:function(e){this.progress_=e,this.determinate_&&this.setScale_(this.adapter_.getPrimaryBar(),e)}},{key:"setBuffer",value:function(e){this.determinate_&&this.setScale_(this.adapter_.getBuffer(),e)}},{key:"setReverse",value:function(e){this.reverse_=e,this.reverse_?this.adapter_.addClass(s.a.REVERSED_CLASS):this.adapter_.removeClass(s.a.REVERSED_CLASS)}},{key:"open",value:function(){this.adapter_.removeClass(s.a.CLOSED_CLASS)}},{key:"close",value:function(){this.adapter_.addClass(s.a.CLOSED_CLASS)}},{key:"setScale_",value:function(e,t){var n=this,r="scaleX("+t+")";u.transformStyleProperties.forEach(function(t){n.adapter_.setStyle(e,t,r)})}}]),t}(a.MDCFoundation);t.a=l},8:function(e,t,n){"use strict";function r(e){return void 0!==e.document&&"function"==typeof e.document.createElement}function i(e){return e in f||e in c}function o(e,t,n){return t[e].styleProperty in n.style?t[e].noPrefix:t[e].webkitPrefix}function a(e,t){if(!r(e)||!i(t))return t;var n=t in f?f:c,a=e.document.createElement("div");return n===f?o(t,n,a):n[t].noPrefix in a.style?n[t].noPrefix:n[t].webkitPrefix}function u(e,t){return a(e,t)}function s(e,t){return a(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"transformStyleProperties",function(){return l}),n.d(t,"getCorrectEventName",function(){return u}),n.d(t,"getCorrectPropertyName",function(){return s});/** | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.linearProgress=t():(e.mdc=e.mdc||{},e.mdc.linearProgress=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,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="/assets/",t(t.s=89)}({0:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.adapter_=t}return i(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=o},1:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,e),this.root_=t;for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];this.initialize.apply(this,o),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return o(e,null,[{key:"attachTo",value:function(t){return new e(t,new i.a)}}]),o(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(e,{detail:t,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(r)}}]),e}();t.a=a},5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1);n.d(t,"MDCFoundation",function(){return r.a}),n.d(t,"MDCComponent",function(){return i.a})},8:function(e,t,n){"use strict";function r(e){return void 0!==e.document&&"function"==typeof e.document.createElement}function i(e){return e in f||e in c}function o(e,t,n){return t[e].styleProperty in n.style?t[e].noPrefix:t[e].webkitPrefix}function a(e,t){if(!r(e)||!i(t))return t;var n=t in f?f:c,a=e.document.createElement("div");return n===f?o(t,n,a):n[t].noPrefix in a.style?n[t].noPrefix:n[t].webkitPrefix}function u(e,t){return a(e,t)}function s(e,t){return a(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"transformStyleProperties",function(){return l}),n.d(t,"getCorrectEventName",function(){return u}),n.d(t,"getCorrectPropertyName",function(){return s});/** | ||
* @license | ||
@@ -23,2 +23,3 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
*/ | ||
var f={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart",styleProperty:"animation"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd",styleProperty:"animation"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration",styleProperty:"animation"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd",styleProperty:"transition"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}},l=["transform","WebkitTransform","MozTransform","OTransform","MSTransform"]},80:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i});var r={CLOSED_CLASS:"mdc-linear-progress--closed",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed"},i={PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar",BUFFER_SELECTOR:".mdc-linear-progress__buffer"}}})}); | ||
var f={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart",styleProperty:"animation"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd",styleProperty:"animation"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration",styleProperty:"animation"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd",styleProperty:"transition"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}},l=["transform","WebkitTransform","MozTransform","OTransform","MSTransform"]},89:function(e,t,n){e.exports=n(90)},90:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCLinearProgress",function(){return f});var a=n(5),u=n(91);n.d(t,"MDCLinearProgressFoundation",function(){return u.a});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"open",value:function(){this.foundation_.open()}},{key:"close",value:function(){this.foundation_.close()}},{key:"getDefaultFoundation",value:function(){var e=this;return new u.a({addClass:function(t){return e.root_.classList.add(t)},getPrimaryBar:function(){return e.root_.querySelector(u.a.strings.PRIMARY_BAR_SELECTOR)},getBuffer:function(){return e.root_.querySelector(u.a.strings.BUFFER_SELECTOR)},hasClass:function(t){return e.root_.classList.contains(t)},removeClass:function(t){return e.root_.classList.remove(t)},setStyle:function(e,t,n){return e.style[t]=n}})}},{key:"determinate",set:function(e){this.foundation_.setDeterminate(e)}},{key:"progress",set:function(e){this.foundation_.setProgress(e)}},{key:"buffer",set:function(e){this.foundation_.setBuffer(e)}},{key:"reverse",set:function(e){this.foundation_.setReverse(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(a.MDCComponent)},91:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(5),u=n(8),s=n(92),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f(t.defaultAdapter,e)))}return o(t,e),c(t,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return{addClass:function(){},getPrimaryBar:function(){},getBuffer:function(){},hasClass:function(){return!1},removeClass:function(){},setStyle:function(){}}}}]),c(t,[{key:"init",value:function(){this.determinate_=!this.adapter_.hasClass(s.a.INDETERMINATE_CLASS),this.reverse_=this.adapter_.hasClass(s.a.REVERSED_CLASS),this.progress_=0}},{key:"setDeterminate",value:function(e){this.determinate_=e,this.determinate_?(this.adapter_.removeClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),this.progress_)):(this.adapter_.addClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),1),this.setScale_(this.adapter_.getBuffer(),1))}},{key:"setProgress",value:function(e){this.progress_=e,this.determinate_&&this.setScale_(this.adapter_.getPrimaryBar(),e)}},{key:"setBuffer",value:function(e){this.determinate_&&this.setScale_(this.adapter_.getBuffer(),e)}},{key:"setReverse",value:function(e){this.reverse_=e,this.reverse_?this.adapter_.addClass(s.a.REVERSED_CLASS):this.adapter_.removeClass(s.a.REVERSED_CLASS)}},{key:"open",value:function(){this.adapter_.removeClass(s.a.CLOSED_CLASS)}},{key:"close",value:function(){this.adapter_.addClass(s.a.CLOSED_CLASS)}},{key:"setScale_",value:function(e,t){var n=this,r="scaleX("+t+")";u.transformStyleProperties.forEach(function(t){n.adapter_.setStyle(e,t,r)})}}]),t}(a.MDCFoundation);t.a=l},92:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i});var r={CLOSED_CLASS:"mdc-linear-progress--closed",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed"},i={PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar",BUFFER_SELECTOR:".mdc-linear-progress__buffer"}}})}); | ||
//# sourceMappingURL=mdc.linearProgress.min.js.map |
@@ -17,4 +17,4 @@ /** | ||
import {MDCFoundation} from '@material/base'; | ||
import {transformStyleProperties} from '@material/animation'; | ||
import {MDCFoundation} from '@material/base/index'; | ||
import {transformStyleProperties} from '@material/animation/index'; | ||
@@ -21,0 +21,0 @@ import {cssClasses, strings} from './constants'; |
@@ -17,3 +17,3 @@ /** | ||
import {MDCComponent} from '@material/base'; | ||
import {MDCComponent} from '@material/base/index'; | ||
import MDCLinearProgressFoundation from './foundation'; | ||
@@ -20,0 +20,0 @@ |
{ | ||
"name": "@material/linear-progress", | ||
"description": "The Material Components for the web linear progress indicator component", | ||
"version": "0.29.0", | ||
"version": "0.30.0", | ||
"license": "Apache-2.0", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
"@material/base": "^0.29.0", | ||
"@material/theme": "^0.29.0" | ||
"@material/theme": "^0.30.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "publishConfig": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
90890
1291
0
+ Added@material/theme@0.30.0(transitive)
- Removed@material/theme@0.29.0(transitive)
Updated@material/theme@^0.30.0