@material/notched-outline
Advanced tools
Comparing version 0.44.1 to 1.0.0-0
@@ -23,40 +23,2 @@ /** | ||
*/ | ||
/* eslint no-unused-vars: [2, {"args": "none"}] */ | ||
/** | ||
* Adapter for MDC Notched Outline. | ||
* | ||
* Defines the shape of the adapter expected by the foundation. Implement this | ||
* adapter to integrate the Notched Outline into your framework. See | ||
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md | ||
* for more information. | ||
* | ||
* @record | ||
*/ | ||
class MDCNotchedOutlineAdapter { | ||
/** | ||
* Adds a class to the root element. | ||
* @param {string} className | ||
*/ | ||
addClass(className) {} | ||
/** | ||
* Removes a class from the root element. | ||
* @param {string} className | ||
*/ | ||
removeClass(className) {} | ||
/** | ||
* Sets the width style property of the notch element. | ||
* @param {number} width | ||
*/ | ||
setNotchWidthProperty(width) {} | ||
/** | ||
* Removes the width style property from the notch element. | ||
*/ | ||
removeNotchWidthProperty() {} | ||
} | ||
export default MDCNotchedOutlineAdapter; | ||
//# sourceMappingURL=adapter.js.map |
@@ -23,21 +23,15 @@ /** | ||
*/ | ||
/** @enum {string} */ | ||
const strings = { | ||
NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch', | ||
var strings = { | ||
NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch', | ||
}; | ||
/** @enum {number} */ | ||
const numbers = { | ||
// This should stay in sync with $mdc-notched-outline-padding * 2. | ||
NOTCH_ELEMENT_PADDING: 8, | ||
var numbers = { | ||
// This should stay in sync with $mdc-notched-outline-padding * 2. | ||
NOTCH_ELEMENT_PADDING: 8, | ||
}; | ||
/** @enum {string} */ | ||
const cssClasses = { | ||
OUTLINE_NOTCHED: 'mdc-notched-outline--notched', | ||
OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded', | ||
NO_LABEL: 'mdc-notched-outline--no-label', | ||
var cssClasses = { | ||
NO_LABEL: 'mdc-notched-outline--no-label', | ||
OUTLINE_NOTCHED: 'mdc-notched-outline--notched', | ||
OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded', | ||
}; | ||
export {cssClasses, numbers, strings}; | ||
export { cssClasses, numbers, strings }; | ||
//# sourceMappingURL=constants.js.map |
@@ -78,14 +78,12 @@ /*! | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 35); | ||
/******/ return __webpack_require__(__webpack_require__.s = 51); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/******/ ({ | ||
/***/ 0: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
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; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
@@ -114,89 +112,66 @@ * @license | ||
/** | ||
* @template A | ||
*/ | ||
var MDCFoundation = function () { | ||
_createClass(MDCFoundation, null, [{ | ||
key: "cssClasses", | ||
/** @return enum{cssClasses} */ | ||
get: function get() { | ||
// Classes extending MDCFoundation should implement this method to return an object which exports every | ||
// CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'} | ||
return {}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var MDCFoundation = /** @class */function () { | ||
function MDCFoundation(adapter) { | ||
if (adapter === void 0) { | ||
adapter = {}; | ||
} | ||
this.adapter_ = adapter; | ||
} | ||
/** @return enum{strings} */ | ||
}, { | ||
key: "strings", | ||
get: function get() { | ||
// Classes extending MDCFoundation should implement this method to return an object which exports all | ||
// semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'} | ||
return {}; | ||
} | ||
/** @return enum{numbers} */ | ||
}, { | ||
key: "numbers", | ||
get: function get() { | ||
// Classes extending MDCFoundation should implement this method to return an object which exports all | ||
// of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350} | ||
return {}; | ||
} | ||
/** @return {!Object} */ | ||
}, { | ||
key: "defaultAdapter", | ||
get: function get() { | ||
// Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient | ||
// way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter | ||
// validation. | ||
return {}; | ||
} | ||
/** | ||
* @param {A=} adapter | ||
*/ | ||
}]); | ||
function MDCFoundation() { | ||
var adapter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
_classCallCheck(this, MDCFoundation); | ||
/** @protected {!A} */ | ||
this.adapter_ = adapter; | ||
} | ||
_createClass(MDCFoundation, [{ | ||
key: "init", | ||
value: function init() { | ||
// Subclasses should override this method to perform initialization routines (registering events, etc.) | ||
} | ||
}, { | ||
key: "destroy", | ||
value: function destroy() { | ||
// Subclasses should override this method to perform de-initialization routines (de-registering events, etc.) | ||
} | ||
}]); | ||
return MDCFoundation; | ||
Object.defineProperty(MDCFoundation, "cssClasses", { | ||
get: function get() { | ||
// Classes extending MDCFoundation should implement this method to return an object which exports every | ||
// CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'} | ||
return {}; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCFoundation, "strings", { | ||
get: function get() { | ||
// Classes extending MDCFoundation should implement this method to return an object which exports all | ||
// semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'} | ||
return {}; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCFoundation, "numbers", { | ||
get: function get() { | ||
// Classes extending MDCFoundation should implement this method to return an object which exports all | ||
// of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350} | ||
return {}; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCFoundation, "defaultAdapter", { | ||
get: function get() { | ||
// Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient | ||
// way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter | ||
// validation. | ||
return {}; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
MDCFoundation.prototype.init = function () { | ||
// Subclasses should override this method to perform initialization routines (registering events, etc.) | ||
}; | ||
MDCFoundation.prototype.destroy = function () { | ||
// Subclasses should override this method to perform de-initialization routines (de-registering events, etc.) | ||
}; | ||
return MDCFoundation; | ||
}(); | ||
exports.MDCFoundation = MDCFoundation; | ||
// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. | ||
exports.default = MDCFoundation; | ||
/* harmony default export */ __webpack_exports__["a"] = (MDCFoundation); | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/***/ 1: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation__ = __webpack_require__(0); | ||
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; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
@@ -225,169 +200,307 @@ * @license | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(2); | ||
var foundation_1 = __webpack_require__(0); | ||
var MDCComponent = /** @class */function () { | ||
function MDCComponent(root, foundation) { | ||
var args = []; | ||
for (var _i = 2; _i < arguments.length; _i++) { | ||
args[_i - 2] = arguments[_i]; | ||
} | ||
this.root_ = root; | ||
this.initialize.apply(this, tslib_1.__spread(args)); | ||
// Note that we initialize foundation here and not within the constructor's default param so that | ||
// this.root_ is defined and can be used within the foundation class. | ||
this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation; | ||
this.foundation_.init(); | ||
this.initialSyncWithDOM(); | ||
} | ||
MDCComponent.attachTo = function (root) { | ||
// Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and | ||
// returns an instantiated component with its root set to that element. Also note that in the cases of | ||
// subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized | ||
// from getDefaultFoundation(). | ||
return new MDCComponent(root, new foundation_1.MDCFoundation({})); | ||
}; | ||
/* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */ | ||
MDCComponent.prototype.initialize = function () { | ||
var _args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
_args[_i] = arguments[_i]; | ||
} | ||
// Subclasses can override this to do any additional setup work that would be considered part of a | ||
// "constructor". Essentially, it is a hook into the parent constructor before the foundation is | ||
// initialized. Any additional arguments besides root and foundation will be passed in here. | ||
}; | ||
MDCComponent.prototype.getDefaultFoundation = function () { | ||
// Subclasses must override this method to return a properly configured foundation class for the | ||
// component. | ||
throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' + 'foundation class'); | ||
}; | ||
MDCComponent.prototype.initialSyncWithDOM = function () { | ||
// Subclasses should override this method if they need to perform work to synchronize with a host DOM | ||
// object. An example of this would be a form control wrapper that needs to synchronize its internal state | ||
// to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM | ||
// reads/writes that would cause layout / paint, as this is called synchronously from within the constructor. | ||
}; | ||
MDCComponent.prototype.destroy = function () { | ||
// Subclasses may implement this method to release any resources / deregister any listeners they have | ||
// attached. An example of this might be deregistering a resize event from the window object. | ||
this.foundation_.destroy(); | ||
}; | ||
MDCComponent.prototype.listen = function (evtType, handler) { | ||
this.root_.addEventListener(evtType, handler); | ||
}; | ||
MDCComponent.prototype.unlisten = function (evtType, handler) { | ||
this.root_.removeEventListener(evtType, handler); | ||
}; | ||
/** | ||
* Fires a cross-browser-compatible custom event from the component root of the given type, with the given data. | ||
*/ | ||
MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) { | ||
if (shouldBubble === void 0) { | ||
shouldBubble = false; | ||
} | ||
var evt; | ||
if (typeof CustomEvent === 'function') { | ||
evt = new CustomEvent(evtType, { | ||
bubbles: shouldBubble, | ||
detail: evtData | ||
}); | ||
} else { | ||
evt = document.createEvent('CustomEvent'); | ||
evt.initCustomEvent(evtType, shouldBubble, false, evtData); | ||
} | ||
this.root_.dispatchEvent(evt); | ||
}; | ||
return MDCComponent; | ||
}(); | ||
exports.MDCComponent = MDCComponent; | ||
// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. | ||
exports.default = MDCComponent; | ||
/***/ }), | ||
/** | ||
* @template F | ||
*/ | ||
/***/ 16: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
var MDCComponent = function () { | ||
_createClass(MDCComponent, null, [{ | ||
key: 'attachTo', | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (immutable) */ __webpack_exports__["__extends"] = __extends; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); | ||
/* harmony export (immutable) */ __webpack_exports__["__rest"] = __rest; | ||
/* harmony export (immutable) */ __webpack_exports__["__decorate"] = __decorate; | ||
/* harmony export (immutable) */ __webpack_exports__["__param"] = __param; | ||
/* harmony export (immutable) */ __webpack_exports__["__metadata"] = __metadata; | ||
/* harmony export (immutable) */ __webpack_exports__["__awaiter"] = __awaiter; | ||
/* harmony export (immutable) */ __webpack_exports__["__generator"] = __generator; | ||
/* harmony export (immutable) */ __webpack_exports__["__exportStar"] = __exportStar; | ||
/* harmony export (immutable) */ __webpack_exports__["__values"] = __values; | ||
/* harmony export (immutable) */ __webpack_exports__["__read"] = __read; | ||
/* harmony export (immutable) */ __webpack_exports__["__spread"] = __spread; | ||
/* harmony export (immutable) */ __webpack_exports__["__await"] = __await; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncGenerator"] = __asyncGenerator; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncDelegator"] = __asyncDelegator; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncValues"] = __asyncValues; | ||
/* harmony export (immutable) */ __webpack_exports__["__makeTemplateObject"] = __makeTemplateObject; | ||
/* harmony export (immutable) */ __webpack_exports__["__importStar"] = __importStar; | ||
/* harmony export (immutable) */ __webpack_exports__["__importDefault"] = __importDefault; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. 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 | ||
/** | ||
* @param {!Element} root | ||
* @return {!MDCComponent} | ||
*/ | ||
value: function attachTo(root) { | ||
// Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and | ||
// returns an instantiated component with its root set to that element. Also note that in the cases of | ||
// subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized | ||
// from getDefaultFoundation(). | ||
return new MDCComponent(root, new __WEBPACK_IMPORTED_MODULE_0__foundation__["a" /* default */]()); | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = function(d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
var __assign = function() { | ||
__assign = Object.assign || function __assign(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||
} | ||
return t; | ||
} | ||
return __assign.apply(this, arguments); | ||
} | ||
/** | ||
* @param {!Element} root | ||
* @param {F=} foundation | ||
* @param {...?} args | ||
*/ | ||
function __rest(s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) | ||
t[p[i]] = s[p[i]]; | ||
return t; | ||
} | ||
}]); | ||
function __decorate(decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
} | ||
function MDCComponent(root) { | ||
var foundation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; | ||
function __param(paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
} | ||
_classCallCheck(this, MDCComponent); | ||
function __metadata(metadataKey, metadataValue) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||
} | ||
/** @protected {!Element} */ | ||
this.root_ = root; | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
} | ||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | ||
args[_key - 2] = arguments[_key]; | ||
function __generator(thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
} | ||
this.initialize.apply(this, args); | ||
// Note that we initialize foundation here and not within the constructor's default param so that | ||
// this.root_ is defined and can be used within the foundation class. | ||
/** @protected {!F} */ | ||
this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation; | ||
this.foundation_.init(); | ||
this.initialSyncWithDOM(); | ||
} | ||
function __exportStar(m, exports) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
_createClass(MDCComponent, [{ | ||
key: 'initialize', | ||
value: function initialize() /* ...args */{} | ||
// Subclasses can override this to do any additional setup work that would be considered part of a | ||
// "constructor". Essentially, it is a hook into the parent constructor before the foundation is | ||
// initialized. Any additional arguments besides root and foundation will be passed in here. | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
} | ||
/** | ||
* @return {!F} foundation | ||
*/ | ||
}, { | ||
key: 'getDefaultFoundation', | ||
value: function getDefaultFoundation() { | ||
// Subclasses must override this method to return a properly configured foundation class for the | ||
// component. | ||
throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' + 'foundation class'); | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
}, { | ||
key: 'initialSyncWithDOM', | ||
value: function initialSyncWithDOM() { | ||
// Subclasses should override this method if they need to perform work to synchronize with a host DOM | ||
// object. An example of this would be a form control wrapper that needs to synchronize its internal state | ||
// to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM | ||
// reads/writes that would cause layout / paint, as this is called synchronously from within the constructor. | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
}, { | ||
key: 'destroy', | ||
value: function destroy() { | ||
// Subclasses may implement this method to release any resources / deregister any listeners they have | ||
// attached. An example of this might be deregistering a resize event from the window object. | ||
this.foundation_.destroy(); | ||
} | ||
return ar; | ||
} | ||
/** | ||
* Wrapper method to add an event listener to the component's root element. This is most useful when | ||
* listening for custom events. | ||
* @param {string} evtType | ||
* @param {!Function} handler | ||
*/ | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
}, { | ||
key: 'listen', | ||
value: function listen(evtType, handler) { | ||
this.root_.addEventListener(evtType, handler); | ||
} | ||
function __await(v) { | ||
return this instanceof __await ? (this.v = v, this) : new __await(v); | ||
} | ||
/** | ||
* Wrapper method to remove an event listener to the component's root element. This is most useful when | ||
* unlistening for custom events. | ||
* @param {string} evtType | ||
* @param {!Function} handler | ||
*/ | ||
function __asyncGenerator(thisArg, _arguments, generator) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } | ||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function fulfill(value) { resume("next", value); } | ||
function reject(value) { resume("throw", value); } | ||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||
} | ||
}, { | ||
key: 'unlisten', | ||
value: function unlisten(evtType, handler) { | ||
this.root_.removeEventListener(evtType, handler); | ||
} | ||
function __asyncDelegator(o) { | ||
var i, p; | ||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; | ||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } | ||
} | ||
/** | ||
* Fires a cross-browser-compatible custom event from the component root of the given type, | ||
* with the given data. | ||
* @param {string} evtType | ||
* @param {!Object} evtData | ||
* @param {boolean=} shouldBubble | ||
*/ | ||
function __asyncValues(o) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[Symbol.asyncIterator], i; | ||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | ||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | ||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||
} | ||
}, { | ||
key: 'emit', | ||
value: function emit(evtType, evtData) { | ||
var shouldBubble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
function __makeTemplateObject(cooked, raw) { | ||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||
return cooked; | ||
}; | ||
var evt = void 0; | ||
if (typeof CustomEvent === 'function') { | ||
evt = new CustomEvent(evtType, { | ||
detail: evtData, | ||
bubbles: shouldBubble | ||
}); | ||
} else { | ||
evt = document.createEvent('CustomEvent'); | ||
evt.initCustomEvent(evtType, shouldBubble, false, evtData); | ||
} | ||
function __importStar(mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result.default = mod; | ||
return result; | ||
} | ||
this.root_.dispatchEvent(evt); | ||
} | ||
}]); | ||
function __importDefault(mod) { | ||
return (mod && mod.__esModule) ? mod : { default: mod }; | ||
} | ||
return MDCComponent; | ||
}(); | ||
/* harmony default export */ __webpack_exports__["a"] = (MDCComponent); | ||
/***/ }), | ||
/* 2 */, | ||
/* 3 */, | ||
/* 4 */, | ||
/* 5 */, | ||
/* 6 */, | ||
/* 7 */, | ||
/* 8 */, | ||
/* 9 */, | ||
/* 10 */, | ||
/* 11 */, | ||
/* 12 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/***/ 18: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
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; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. | ||
* Copyright 2016 Google Inc. | ||
* | ||
@@ -413,317 +526,534 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
/* eslint no-unused-vars: [2, {"args": "none"}] */ | ||
/** | ||
* Adapter for MDC Floating Label. | ||
* | ||
* Defines the shape of the adapter expected by the foundation. Implement this | ||
* adapter to integrate the floating label into your framework. See | ||
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md | ||
* for more information. | ||
* | ||
* @record | ||
*/ | ||
var MDCFloatingLabelAdapter = function () { | ||
function MDCFloatingLabelAdapter() { | ||
_classCallCheck(this, MDCFloatingLabelAdapter); | ||
} | ||
_createClass(MDCFloatingLabelAdapter, [{ | ||
key: "addClass", | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(16); | ||
var foundation_1 = __webpack_require__(0); | ||
var constants_1 = __webpack_require__(36); | ||
var MDCFloatingLabelFoundation = /** @class */function (_super) { | ||
tslib_1.__extends(MDCFloatingLabelFoundation, _super); | ||
function MDCFloatingLabelFoundation(adapter) { | ||
var _this = _super.call(this, tslib_1.__assign({}, MDCFloatingLabelFoundation.defaultAdapter, adapter)) || this; | ||
_this.shakeAnimationEndHandler_ = function () { | ||
return _this.handleShakeAnimationEnd_(); | ||
}; | ||
return _this; | ||
} | ||
Object.defineProperty(MDCFloatingLabelFoundation, "cssClasses", { | ||
get: function get() { | ||
return constants_1.cssClasses; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCFloatingLabelFoundation, "defaultAdapter", { | ||
/** | ||
* See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types. | ||
*/ | ||
get: function get() { | ||
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. | ||
return { | ||
addClass: function addClass() { | ||
return undefined; | ||
}, | ||
removeClass: function removeClass() { | ||
return undefined; | ||
}, | ||
getWidth: function getWidth() { | ||
return 0; | ||
}, | ||
registerInteractionHandler: function registerInteractionHandler() { | ||
return undefined; | ||
}, | ||
deregisterInteractionHandler: function deregisterInteractionHandler() { | ||
return undefined; | ||
} | ||
}; | ||
// tslint:enable:object-literal-sort-keys | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
MDCFloatingLabelFoundation.prototype.init = function () { | ||
this.adapter_.registerInteractionHandler('animationend', this.shakeAnimationEndHandler_); | ||
}; | ||
MDCFloatingLabelFoundation.prototype.destroy = function () { | ||
this.adapter_.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler_); | ||
}; | ||
/** | ||
* Adds a class to the label element. | ||
* @param {string} className | ||
* Returns the width of the label element. | ||
*/ | ||
value: function addClass(className) {} | ||
MDCFloatingLabelFoundation.prototype.getWidth = function () { | ||
return this.adapter_.getWidth(); | ||
}; | ||
/** | ||
* Removes a class from the label element. | ||
* @param {string} className | ||
* Styles the label to produce a shake animation to indicate an error. | ||
* @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class. | ||
*/ | ||
}, { | ||
key: "removeClass", | ||
value: function removeClass(className) {} | ||
MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) { | ||
var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE; | ||
if (shouldShake) { | ||
this.adapter_.addClass(LABEL_SHAKE); | ||
} else { | ||
this.adapter_.removeClass(LABEL_SHAKE); | ||
} | ||
}; | ||
/** | ||
* Returns the width of the label element. | ||
* @return {number} | ||
* Styles the label to float or dock. | ||
* @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label. | ||
*/ | ||
MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) { | ||
var _a = MDCFloatingLabelFoundation.cssClasses, | ||
LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, | ||
LABEL_SHAKE = _a.LABEL_SHAKE; | ||
if (shouldFloat) { | ||
this.adapter_.addClass(LABEL_FLOAT_ABOVE); | ||
} else { | ||
this.adapter_.removeClass(LABEL_FLOAT_ABOVE); | ||
this.adapter_.removeClass(LABEL_SHAKE); | ||
} | ||
}; | ||
MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd_ = function () { | ||
var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE; | ||
this.adapter_.removeClass(LABEL_SHAKE); | ||
}; | ||
return MDCFloatingLabelFoundation; | ||
}(foundation_1.MDCFoundation); | ||
exports.MDCFloatingLabelFoundation = MDCFloatingLabelFoundation; | ||
// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. | ||
exports.default = MDCFloatingLabelFoundation; | ||
}, { | ||
key: "getWidth", | ||
value: function getWidth() {} | ||
/***/ }), | ||
/** | ||
* Registers an event listener on the root element for a given event. | ||
* @param {string} evtType | ||
* @param {function(!Event): undefined} handler | ||
*/ | ||
/***/ 2: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
}, { | ||
key: "registerInteractionHandler", | ||
value: function registerInteractionHandler(evtType, handler) {} | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (immutable) */ __webpack_exports__["__extends"] = __extends; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); | ||
/* harmony export (immutable) */ __webpack_exports__["__rest"] = __rest; | ||
/* harmony export (immutable) */ __webpack_exports__["__decorate"] = __decorate; | ||
/* harmony export (immutable) */ __webpack_exports__["__param"] = __param; | ||
/* harmony export (immutable) */ __webpack_exports__["__metadata"] = __metadata; | ||
/* harmony export (immutable) */ __webpack_exports__["__awaiter"] = __awaiter; | ||
/* harmony export (immutable) */ __webpack_exports__["__generator"] = __generator; | ||
/* harmony export (immutable) */ __webpack_exports__["__exportStar"] = __exportStar; | ||
/* harmony export (immutable) */ __webpack_exports__["__values"] = __values; | ||
/* harmony export (immutable) */ __webpack_exports__["__read"] = __read; | ||
/* harmony export (immutable) */ __webpack_exports__["__spread"] = __spread; | ||
/* harmony export (immutable) */ __webpack_exports__["__await"] = __await; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncGenerator"] = __asyncGenerator; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncDelegator"] = __asyncDelegator; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncValues"] = __asyncValues; | ||
/* harmony export (immutable) */ __webpack_exports__["__makeTemplateObject"] = __makeTemplateObject; | ||
/* harmony export (immutable) */ __webpack_exports__["__importStar"] = __importStar; | ||
/* harmony export (immutable) */ __webpack_exports__["__importDefault"] = __importDefault; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. 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 | ||
/** | ||
* Deregisters an event listener on the root element for a given event. | ||
* @param {string} evtType | ||
* @param {function(!Event): undefined} handler | ||
*/ | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
}, { | ||
key: "deregisterInteractionHandler", | ||
value: function deregisterInteractionHandler(evtType, handler) {} | ||
}]); | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
return MDCFloatingLabelAdapter; | ||
}(); | ||
var extendStatics = function(d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
/* unused harmony default export */ var _unused_webpack_default_export = (MDCFloatingLabelAdapter); | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
/***/ }), | ||
/* 13 */, | ||
/* 14 */, | ||
/* 15 */, | ||
/* 16 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
var __assign = function() { | ||
__assign = Object.assign || function __assign(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||
} | ||
return t; | ||
} | ||
return __assign.apply(this, arguments); | ||
} | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFloatingLabel", function() { return MDCFloatingLabel; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base_component__ = __webpack_require__(1); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__adapter__ = __webpack_require__(12); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation__ = __webpack_require__(26); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFloatingLabelFoundation", function() { return __WEBPACK_IMPORTED_MODULE_2__foundation__["a"]; }); | ||
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; }; }(); | ||
function __rest(s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) | ||
t[p[i]] = s[p[i]]; | ||
return t; | ||
} | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function __decorate(decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
} | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function __param(paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
} | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function __metadata(metadataKey, metadataValue) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||
} | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
} | ||
function __generator(thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
} | ||
function __exportStar(m, exports) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
} | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
} | ||
/** | ||
* @extends {MDCComponent<!MDCFloatingLabelFoundation>} | ||
* @final | ||
*/ | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
var MDCFloatingLabel = function (_MDCComponent) { | ||
_inherits(MDCFloatingLabel, _MDCComponent); | ||
function __await(v) { | ||
return this instanceof __await ? (this.v = v, this) : new __await(v); | ||
} | ||
function MDCFloatingLabel() { | ||
_classCallCheck(this, MDCFloatingLabel); | ||
function __asyncGenerator(thisArg, _arguments, generator) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } | ||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function fulfill(value) { resume("next", value); } | ||
function reject(value) { resume("throw", value); } | ||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||
} | ||
return _possibleConstructorReturn(this, (MDCFloatingLabel.__proto__ || Object.getPrototypeOf(MDCFloatingLabel)).apply(this, arguments)); | ||
} | ||
function __asyncDelegator(o) { | ||
var i, p; | ||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; | ||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } | ||
} | ||
_createClass(MDCFloatingLabel, [{ | ||
key: 'shake', | ||
function __asyncValues(o) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[Symbol.asyncIterator], i; | ||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | ||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | ||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||
} | ||
function __makeTemplateObject(cooked, raw) { | ||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||
return cooked; | ||
}; | ||
/** | ||
* Styles the label to produce the label shake for errors. | ||
* @param {boolean} shouldShake styles the label to shake by adding shake class | ||
* if true, otherwise will stop shaking by removing shake class. | ||
*/ | ||
value: function shake(shouldShake) { | ||
this.foundation_.shake(shouldShake); | ||
} | ||
function __importStar(mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result.default = mod; | ||
return result; | ||
} | ||
/** | ||
* Styles label to float/dock. | ||
* @param {boolean} shouldFloat styles the label to float by adding float class | ||
* if true, otherwise docks the label by removing the float class. | ||
*/ | ||
function __importDefault(mod) { | ||
return (mod && mod.__esModule) ? mod : { default: mod }; | ||
} | ||
}, { | ||
key: 'float', | ||
value: function float(shouldFloat) { | ||
this.foundation_.float(shouldFloat); | ||
} | ||
/** | ||
* @return {number} | ||
*/ | ||
/***/ }), | ||
}, { | ||
key: 'getWidth', | ||
value: function getWidth() { | ||
return this.foundation_.getWidth(); | ||
} | ||
/***/ 25: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/** | ||
* @return {!MDCFloatingLabelFoundation} | ||
*/ | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (immutable) */ __webpack_exports__["__extends"] = __extends; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); | ||
/* harmony export (immutable) */ __webpack_exports__["__rest"] = __rest; | ||
/* harmony export (immutable) */ __webpack_exports__["__decorate"] = __decorate; | ||
/* harmony export (immutable) */ __webpack_exports__["__param"] = __param; | ||
/* harmony export (immutable) */ __webpack_exports__["__metadata"] = __metadata; | ||
/* harmony export (immutable) */ __webpack_exports__["__awaiter"] = __awaiter; | ||
/* harmony export (immutable) */ __webpack_exports__["__generator"] = __generator; | ||
/* harmony export (immutable) */ __webpack_exports__["__exportStar"] = __exportStar; | ||
/* harmony export (immutable) */ __webpack_exports__["__values"] = __values; | ||
/* harmony export (immutable) */ __webpack_exports__["__read"] = __read; | ||
/* harmony export (immutable) */ __webpack_exports__["__spread"] = __spread; | ||
/* harmony export (immutable) */ __webpack_exports__["__await"] = __await; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncGenerator"] = __asyncGenerator; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncDelegator"] = __asyncDelegator; | ||
/* harmony export (immutable) */ __webpack_exports__["__asyncValues"] = __asyncValues; | ||
/* harmony export (immutable) */ __webpack_exports__["__makeTemplateObject"] = __makeTemplateObject; | ||
/* harmony export (immutable) */ __webpack_exports__["__importStar"] = __importStar; | ||
/* harmony export (immutable) */ __webpack_exports__["__importDefault"] = __importDefault; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. 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 | ||
}, { | ||
key: 'getDefaultFoundation', | ||
value: function getDefaultFoundation() { | ||
var _this2 = this; | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
return new __WEBPACK_IMPORTED_MODULE_2__foundation__["a" /* default */]({ | ||
addClass: function addClass(className) { | ||
return _this2.root_.classList.add(className); | ||
}, | ||
removeClass: function removeClass(className) { | ||
return _this2.root_.classList.remove(className); | ||
}, | ||
getWidth: function getWidth() { | ||
return _this2.root_.scrollWidth; | ||
}, | ||
registerInteractionHandler: function registerInteractionHandler(evtType, handler) { | ||
return _this2.root_.addEventListener(evtType, handler); | ||
}, | ||
deregisterInteractionHandler: function deregisterInteractionHandler(evtType, handler) { | ||
return _this2.root_.removeEventListener(evtType, handler); | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = function(d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
var __assign = function() { | ||
__assign = Object.assign || function __assign(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||
} | ||
}); | ||
return t; | ||
} | ||
}], [{ | ||
key: 'attachTo', | ||
return __assign.apply(this, arguments); | ||
} | ||
/** | ||
* @param {!Element} root | ||
* @return {!MDCFloatingLabel} | ||
*/ | ||
value: function attachTo(root) { | ||
return new MDCFloatingLabel(root); | ||
} | ||
}]); | ||
function __rest(s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) | ||
t[p[i]] = s[p[i]]; | ||
return t; | ||
} | ||
return MDCFloatingLabel; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base_component__["a" /* default */]); | ||
function __decorate(decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
} | ||
function __param(paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
} | ||
function __metadata(metadataKey, metadataValue) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||
} | ||
/***/ }), | ||
/* 17 */, | ||
/* 18 */, | ||
/* 19 */, | ||
/* 20 */, | ||
/* 21 */, | ||
/* 22 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
} | ||
"use strict"; | ||
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; }; }(); | ||
function __generator(thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
} | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function __exportStar(m, exports) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
} | ||
/* eslint no-unused-vars: [2, {"args": "none"}] */ | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
} | ||
/** | ||
* Adapter for MDC Notched Outline. | ||
* | ||
* Defines the shape of the adapter expected by the foundation. Implement this | ||
* adapter to integrate the Notched Outline into your framework. See | ||
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md | ||
* for more information. | ||
* | ||
* @record | ||
*/ | ||
var MDCNotchedOutlineAdapter = function () { | ||
function MDCNotchedOutlineAdapter() { | ||
_classCallCheck(this, MDCNotchedOutlineAdapter); | ||
} | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
_createClass(MDCNotchedOutlineAdapter, [{ | ||
key: "addClass", | ||
function __await(v) { | ||
return this instanceof __await ? (this.v = v, this) : new __await(v); | ||
} | ||
/** | ||
* Adds a class to the root element. | ||
* @param {string} className | ||
*/ | ||
value: function addClass(className) {} | ||
function __asyncGenerator(thisArg, _arguments, generator) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } | ||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function fulfill(value) { resume("next", value); } | ||
function reject(value) { resume("throw", value); } | ||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||
} | ||
/** | ||
* Removes a class from the root element. | ||
* @param {string} className | ||
*/ | ||
function __asyncDelegator(o) { | ||
var i, p; | ||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; | ||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } | ||
} | ||
}, { | ||
key: "removeClass", | ||
value: function removeClass(className) {} | ||
function __asyncValues(o) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[Symbol.asyncIterator], i; | ||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | ||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | ||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||
} | ||
/** | ||
* Sets the width style property of the notch element. | ||
* @param {number} width | ||
*/ | ||
function __makeTemplateObject(cooked, raw) { | ||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||
return cooked; | ||
}; | ||
}, { | ||
key: "setNotchWidthProperty", | ||
value: function setNotchWidthProperty(width) {} | ||
function __importStar(mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result.default = mod; | ||
return result; | ||
} | ||
/** | ||
* Removes the width style property from the notch element. | ||
*/ | ||
function __importDefault(mod) { | ||
return (mod && mod.__esModule) ? mod : { default: mod }; | ||
} | ||
}, { | ||
key: "removeNotchWidthProperty", | ||
value: function removeNotchWidthProperty() {} | ||
}]); | ||
return MDCNotchedOutlineAdapter; | ||
}(); | ||
/***/ }), | ||
/* unused harmony default export */ var _unused_webpack_default_export = (MDCNotchedOutlineAdapter); | ||
/***/ 30: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ }), | ||
/* 23 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return numbers; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return strings; }); | ||
/** | ||
@@ -752,45 +1082,29 @@ * @license | ||
/** @enum {string} */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strings = { | ||
NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch' | ||
NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch' | ||
}; | ||
/** @enum {number} */ | ||
exports.strings = strings; | ||
var numbers = { | ||
// This should stay in sync with $mdc-notched-outline-padding * 2. | ||
NOTCH_ELEMENT_PADDING: 8 | ||
// This should stay in sync with $mdc-notched-outline-padding * 2. | ||
NOTCH_ELEMENT_PADDING: 8 | ||
}; | ||
/** @enum {string} */ | ||
exports.numbers = numbers; | ||
var cssClasses = { | ||
OUTLINE_NOTCHED: 'mdc-notched-outline--notched', | ||
OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded', | ||
NO_LABEL: 'mdc-notched-outline--no-label' | ||
NO_LABEL: 'mdc-notched-outline--no-label', | ||
OUTLINE_NOTCHED: 'mdc-notched-outline--notched', | ||
OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded' | ||
}; | ||
exports.cssClasses = cssClasses; | ||
/***/ }), | ||
/***/ 31: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ }), | ||
/* 24 */, | ||
/* 25 */, | ||
/* 26 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base_foundation__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__adapter__ = __webpack_require__(12); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(27); | ||
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; }; | ||
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; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* Copyright 2017 Google Inc. | ||
* | ||
@@ -816,144 +1130,89 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
/** | ||
* @extends {MDCFoundation<!MDCFloatingLabelAdapter>} | ||
* @final | ||
*/ | ||
var MDCFloatingLabelFoundation = function (_MDCFoundation) { | ||
_inherits(MDCFloatingLabelFoundation, _MDCFoundation); | ||
_createClass(MDCFloatingLabelFoundation, null, [{ | ||
key: 'cssClasses', | ||
/** @return enum {string} */ | ||
get: function get() { | ||
return __WEBPACK_IMPORTED_MODULE_2__constants__["a" /* cssClasses */]; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(25); | ||
var foundation_1 = __webpack_require__(0); | ||
var constants_1 = __webpack_require__(30); | ||
var MDCNotchedOutlineFoundation = /** @class */function (_super) { | ||
tslib_1.__extends(MDCNotchedOutlineFoundation, _super); | ||
function MDCNotchedOutlineFoundation(adapter) { | ||
return _super.call(this, tslib_1.__assign({}, MDCNotchedOutlineFoundation.defaultAdapter, adapter)) || this; | ||
} | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "strings", { | ||
get: function get() { | ||
return constants_1.strings; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "cssClasses", { | ||
get: function get() { | ||
return constants_1.cssClasses; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "numbers", { | ||
get: function get() { | ||
return constants_1.numbers; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "defaultAdapter", { | ||
/** | ||
* See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types. | ||
*/ | ||
get: function get() { | ||
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. | ||
return { | ||
addClass: function addClass() { | ||
return undefined; | ||
}, | ||
removeClass: function removeClass() { | ||
return undefined; | ||
}, | ||
setNotchWidthProperty: function setNotchWidthProperty() { | ||
return undefined; | ||
}, | ||
removeNotchWidthProperty: function removeNotchWidthProperty() { | ||
return undefined; | ||
} | ||
}; | ||
// tslint:enable:object-literal-sort-keys | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* {@see MDCFloatingLabelAdapter} for typing information on parameters and return | ||
* types. | ||
* @return {!MDCFloatingLabelAdapter} | ||
* Adds the outline notched selector and updates the notch width calculated based off of notchWidth. | ||
*/ | ||
}, { | ||
key: 'defaultAdapter', | ||
get: function get() { | ||
return (/** @type {!MDCFloatingLabelAdapter} */{ | ||
addClass: function addClass() {}, | ||
removeClass: function removeClass() {}, | ||
getWidth: function getWidth() {}, | ||
registerInteractionHandler: function registerInteractionHandler() {}, | ||
deregisterInteractionHandler: function deregisterInteractionHandler() {} | ||
MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) { | ||
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; | ||
if (notchWidth > 0) { | ||
notchWidth += constants_1.numbers.NOTCH_ELEMENT_PADDING; // Add padding from left/right. | ||
} | ||
); | ||
} | ||
this.adapter_.setNotchWidthProperty(notchWidth); | ||
this.adapter_.addClass(OUTLINE_NOTCHED); | ||
}; | ||
/** | ||
* @param {!MDCFloatingLabelAdapter} adapter | ||
* Removes notched outline selector to close the notch in the outline. | ||
*/ | ||
}]); | ||
function MDCFloatingLabelFoundation(adapter) { | ||
_classCallCheck(this, MDCFloatingLabelFoundation); | ||
/** @private {function(!Event): undefined} */ | ||
var _this = _possibleConstructorReturn(this, (MDCFloatingLabelFoundation.__proto__ || Object.getPrototypeOf(MDCFloatingLabelFoundation)).call(this, _extends(MDCFloatingLabelFoundation.defaultAdapter, adapter))); | ||
_this.shakeAnimationEndHandler_ = function () { | ||
return _this.handleShakeAnimationEnd_(); | ||
MDCNotchedOutlineFoundation.prototype.closeNotch = function () { | ||
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; | ||
this.adapter_.removeClass(OUTLINE_NOTCHED); | ||
this.adapter_.removeNotchWidthProperty(); | ||
}; | ||
return _this; | ||
} | ||
return MDCNotchedOutlineFoundation; | ||
}(foundation_1.MDCFoundation); | ||
exports.MDCNotchedOutlineFoundation = MDCNotchedOutlineFoundation; | ||
// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. | ||
exports.default = MDCNotchedOutlineFoundation; | ||
_createClass(MDCFloatingLabelFoundation, [{ | ||
key: 'init', | ||
value: function init() { | ||
this.adapter_.registerInteractionHandler('animationend', this.shakeAnimationEndHandler_); | ||
} | ||
}, { | ||
key: 'destroy', | ||
value: function destroy() { | ||
this.adapter_.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler_); | ||
} | ||
/***/ }), | ||
/** | ||
* Returns the width of the label element. | ||
* @return {number} | ||
*/ | ||
/***/ 36: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
}, { | ||
key: 'getWidth', | ||
value: function getWidth() { | ||
return this.adapter_.getWidth(); | ||
} | ||
"use strict"; | ||
/** | ||
* Styles the label to produce the label shake for errors. | ||
* @param {boolean} shouldShake adds shake class if true, | ||
* otherwise removes shake class. | ||
*/ | ||
}, { | ||
key: 'shake', | ||
value: function shake(shouldShake) { | ||
var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE; | ||
if (shouldShake) { | ||
this.adapter_.addClass(LABEL_SHAKE); | ||
} else { | ||
this.adapter_.removeClass(LABEL_SHAKE); | ||
} | ||
} | ||
/** | ||
* Styles the label to float or dock. | ||
* @param {boolean} shouldFloat adds float class if true, otherwise remove | ||
* float and shake class to dock label. | ||
*/ | ||
}, { | ||
key: 'float', | ||
value: function float(shouldFloat) { | ||
var _MDCFloatingLabelFoun = MDCFloatingLabelFoundation.cssClasses, | ||
LABEL_FLOAT_ABOVE = _MDCFloatingLabelFoun.LABEL_FLOAT_ABOVE, | ||
LABEL_SHAKE = _MDCFloatingLabelFoun.LABEL_SHAKE; | ||
if (shouldFloat) { | ||
this.adapter_.addClass(LABEL_FLOAT_ABOVE); | ||
} else { | ||
this.adapter_.removeClass(LABEL_FLOAT_ABOVE); | ||
this.adapter_.removeClass(LABEL_SHAKE); | ||
} | ||
} | ||
/** | ||
* Handles an interaction event on the root element. | ||
*/ | ||
}, { | ||
key: 'handleShakeAnimationEnd_', | ||
value: function handleShakeAnimationEnd_() { | ||
var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE; | ||
this.adapter_.removeClass(LABEL_SHAKE); | ||
} | ||
}]); | ||
return MDCFloatingLabelFoundation; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base_foundation__["a" /* default */]); | ||
/* harmony default export */ __webpack_exports__["a"] = (MDCFloatingLabelFoundation); | ||
/***/ }), | ||
/* 27 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
/** | ||
@@ -982,4 +1241,4 @@ * @license | ||
/** @enum {string} */ | ||
var cssClasses = { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cssClasses = { | ||
LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above', | ||
@@ -990,37 +1249,12 @@ LABEL_SHAKE: 'mdc-floating-label--shake', | ||
/***/ }), | ||
/***/ 51: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ }), | ||
/* 28 */, | ||
/* 29 */, | ||
/* 30 */, | ||
/* 31 */, | ||
/* 32 */, | ||
/* 33 */, | ||
/* 34 */, | ||
/* 35 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCNotchedOutline", function() { return MDCNotchedOutline; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base_component__ = __webpack_require__(1); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__adapter__ = __webpack_require__(22); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation__ = __webpack_require__(36); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__material_floating_label_index__ = __webpack_require__(16); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__(23); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCNotchedOutlineFoundation", function() { return __WEBPACK_IMPORTED_MODULE_2__foundation__["a"]; }); | ||
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; }; | ||
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; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. | ||
* Copyright 2019 Google Inc. | ||
* | ||
@@ -1046,135 +1280,14 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(25); | ||
tslib_1.__exportStar(__webpack_require__(52), exports); | ||
tslib_1.__exportStar(__webpack_require__(31), exports); | ||
/***/ }), | ||
/***/ 52: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/** | ||
* @extends {MDCComponent<!MDCNotchedOutlineFoundation>} | ||
* @final | ||
*/ | ||
var MDCNotchedOutline = function (_MDCComponent) { | ||
_inherits(MDCNotchedOutline, _MDCComponent); | ||
_createClass(MDCNotchedOutline, null, [{ | ||
key: 'attachTo', | ||
/** | ||
* @param {!Element} root | ||
* @return {!MDCNotchedOutline} | ||
*/ | ||
value: function attachTo(root) { | ||
return new MDCNotchedOutline(root); | ||
} | ||
/** @param {...?} args */ | ||
}]); | ||
function MDCNotchedOutline() { | ||
var _ref; | ||
_classCallCheck(this, MDCNotchedOutline); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
/** @private {Element} */ | ||
var _this = _possibleConstructorReturn(this, (_ref = MDCNotchedOutline.__proto__ || Object.getPrototypeOf(MDCNotchedOutline)).call.apply(_ref, [this].concat(args))); | ||
_this.notchElement_; | ||
return _this; | ||
} | ||
_createClass(MDCNotchedOutline, [{ | ||
key: 'initialSyncWithDOM', | ||
value: function initialSyncWithDOM() { | ||
var label = this.root_.querySelector('.' + __WEBPACK_IMPORTED_MODULE_3__material_floating_label_index__["MDCFloatingLabelFoundation"].cssClasses.ROOT); | ||
this.notchElement_ = this.root_.querySelector(__WEBPACK_IMPORTED_MODULE_4__constants__["c" /* strings */].NOTCH_ELEMENT_SELECTOR); | ||
if (label) { | ||
label.style.transitionDuration = '0s'; | ||
this.root_.classList.add(__WEBPACK_IMPORTED_MODULE_4__constants__["a" /* cssClasses */].OUTLINE_UPGRADED); | ||
requestAnimationFrame(function () { | ||
label.style.transitionDuration = ''; | ||
}); | ||
} else { | ||
this.root_.classList.add(__WEBPACK_IMPORTED_MODULE_4__constants__["a" /* cssClasses */].NO_LABEL); | ||
} | ||
} | ||
/** | ||
* Updates classes and styles to open the notch to the specified width. | ||
* @param {number} notchWidth The notch width in the outline. | ||
*/ | ||
}, { | ||
key: 'notch', | ||
value: function notch(notchWidth) { | ||
this.foundation_.notch(notchWidth); | ||
} | ||
/** | ||
* Updates classes and styles to close the notch. | ||
*/ | ||
}, { | ||
key: 'closeNotch', | ||
value: function closeNotch() { | ||
this.foundation_.closeNotch(); | ||
} | ||
/** | ||
* @return {!MDCNotchedOutlineFoundation} | ||
*/ | ||
}, { | ||
key: 'getDefaultFoundation', | ||
value: function getDefaultFoundation() { | ||
var _this2 = this; | ||
return new __WEBPACK_IMPORTED_MODULE_2__foundation__["a" /* default */]( | ||
/** @type {!MDCNotchedOutlineAdapter} */_extends({ | ||
addClass: function addClass(className) { | ||
return _this2.root_.classList.add(className); | ||
}, | ||
removeClass: function removeClass(className) { | ||
return _this2.root_.classList.remove(className); | ||
}, | ||
setNotchWidthProperty: function setNotchWidthProperty(width) { | ||
return _this2.notchElement_.style.setProperty('width', width + 'px'); | ||
}, | ||
removeNotchWidthProperty: function removeNotchWidthProperty() { | ||
return _this2.notchElement_.style.removeProperty('width'); | ||
} | ||
})); | ||
} | ||
}]); | ||
return MDCNotchedOutline; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base_component__["a" /* default */]); | ||
/***/ }), | ||
/* 36 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base_foundation__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__adapter__ = __webpack_require__(22); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(23); | ||
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; }; | ||
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; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
/** | ||
@@ -1203,111 +1316,72 @@ * @license | ||
/** | ||
* @extends {MDCFoundation<!MDCNotchedOutlineAdapter>} | ||
* @final | ||
*/ | ||
var MDCNotchedOutlineFoundation = function (_MDCFoundation) { | ||
_inherits(MDCNotchedOutlineFoundation, _MDCFoundation); | ||
_createClass(MDCNotchedOutlineFoundation, null, [{ | ||
key: 'strings', | ||
/** @return enum {string} */ | ||
get: function get() { | ||
return __WEBPACK_IMPORTED_MODULE_2__constants__["c" /* strings */]; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(25); | ||
var component_1 = __webpack_require__(1); | ||
var foundation_1 = __webpack_require__(18); | ||
var constants_1 = __webpack_require__(30); | ||
var foundation_2 = __webpack_require__(31); | ||
var MDCNotchedOutline = /** @class */function (_super) { | ||
tslib_1.__extends(MDCNotchedOutline, _super); | ||
function MDCNotchedOutline() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
/** @return enum {string} */ | ||
}, { | ||
key: 'cssClasses', | ||
get: function get() { | ||
return __WEBPACK_IMPORTED_MODULE_2__constants__["a" /* cssClasses */]; | ||
} | ||
/** @return enum {number} */ | ||
}, { | ||
key: 'numbers', | ||
get: function get() { | ||
return __WEBPACK_IMPORTED_MODULE_2__constants__["b" /* numbers */]; | ||
} | ||
/** | ||
* {@see MDCNotchedOutlineAdapter} for typing information on parameters and return | ||
* types. | ||
* @return {!MDCNotchedOutlineAdapter} | ||
*/ | ||
}, { | ||
key: 'defaultAdapter', | ||
get: function get() { | ||
return (/** @type {!MDCNotchedOutlineAdapter} */{ | ||
addClass: function addClass() {}, | ||
removeClass: function removeClass() {}, | ||
setNotchWidthProperty: function setNotchWidthProperty() {}, | ||
removeNotchWidthProperty: function removeNotchWidthProperty() {} | ||
MDCNotchedOutline.attachTo = function (root) { | ||
return new MDCNotchedOutline(root); | ||
}; | ||
MDCNotchedOutline.prototype.initialSyncWithDOM = function () { | ||
this.notchElement_ = this.root_.querySelector(constants_1.strings.NOTCH_ELEMENT_SELECTOR); | ||
var label = this.root_.querySelector('.' + foundation_1.MDCFloatingLabelFoundation.cssClasses.ROOT); | ||
if (label) { | ||
label.style.transitionDuration = '0s'; | ||
this.root_.classList.add(constants_1.cssClasses.OUTLINE_UPGRADED); | ||
requestAnimationFrame(function () { | ||
label.style.transitionDuration = ''; | ||
}); | ||
} else { | ||
this.root_.classList.add(constants_1.cssClasses.NO_LABEL); | ||
} | ||
); | ||
} | ||
}; | ||
/** | ||
* @param {!MDCNotchedOutlineAdapter} adapter | ||
* Updates classes and styles to open the notch to the specified width. | ||
* @param notchWidth The notch width in the outline. | ||
*/ | ||
}]); | ||
function MDCNotchedOutlineFoundation(adapter) { | ||
_classCallCheck(this, MDCNotchedOutlineFoundation); | ||
return _possibleConstructorReturn(this, (MDCNotchedOutlineFoundation.__proto__ || Object.getPrototypeOf(MDCNotchedOutlineFoundation)).call(this, _extends(MDCNotchedOutlineFoundation.defaultAdapter, adapter))); | ||
} | ||
/** | ||
* Adds the outline notched selector and updates the notch width | ||
* calculated based off of notchWidth. | ||
* @param {number} notchWidth | ||
*/ | ||
_createClass(MDCNotchedOutlineFoundation, [{ | ||
key: 'notch', | ||
value: function notch(notchWidth) { | ||
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; | ||
if (notchWidth > 0) { | ||
notchWidth += __WEBPACK_IMPORTED_MODULE_2__constants__["b" /* numbers */].NOTCH_ELEMENT_PADDING; // Add padding from left/right. | ||
} | ||
this.adapter_.setNotchWidthProperty(notchWidth); | ||
this.adapter_.addClass(OUTLINE_NOTCHED); | ||
} | ||
MDCNotchedOutline.prototype.notch = function (notchWidth) { | ||
this.foundation_.notch(notchWidth); | ||
}; | ||
/** | ||
* Removes notched outline selector to close the notch in the outline. | ||
* Updates classes and styles to close the notch. | ||
*/ | ||
MDCNotchedOutline.prototype.closeNotch = function () { | ||
this.foundation_.closeNotch(); | ||
}; | ||
MDCNotchedOutline.prototype.getDefaultFoundation = function () { | ||
var _this = this; | ||
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>. | ||
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable. | ||
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. | ||
var adapter = { | ||
addClass: function addClass(className) { | ||
return _this.root_.classList.add(className); | ||
}, | ||
removeClass: function removeClass(className) { | ||
return _this.root_.classList.remove(className); | ||
}, | ||
setNotchWidthProperty: function setNotchWidthProperty(width) { | ||
return _this.notchElement_.style.setProperty('width', width + 'px'); | ||
}, | ||
removeNotchWidthProperty: function removeNotchWidthProperty() { | ||
return _this.notchElement_.style.removeProperty('width'); | ||
} | ||
}; | ||
// tslint:enable:object-literal-sort-keys | ||
return new foundation_2.MDCNotchedOutlineFoundation(adapter); | ||
}; | ||
return MDCNotchedOutline; | ||
}(component_1.MDCComponent); | ||
exports.MDCNotchedOutline = MDCNotchedOutline; | ||
}, { | ||
key: 'closeNotch', | ||
value: function closeNotch() { | ||
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; | ||
/***/ }) | ||
this.adapter_.removeClass(OUTLINE_NOTCHED); | ||
this.adapter_.removeNotchWidthProperty(); | ||
} | ||
}]); | ||
return MDCNotchedOutlineFoundation; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base_foundation__["a" /* default */]); | ||
/* harmony default export */ __webpack_exports__["a"] = (MDCNotchedOutlineFoundation); | ||
/***/ }) | ||
/******/ ]); | ||
/******/ }); | ||
}); | ||
//# sourceMappingURL=mdc.notchedOutline.js.map |
@@ -6,4 +6,112 @@ /*! | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.notchedOutline=e():(t.mdc=t.mdc||{},t.mdc.notchedOutline=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},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="",e(e.s=35)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return o(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(0),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var o=arguments.length,i=Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.initialize.apply(this,i),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return i(t,null,[{key:"attachTo",value:function(e){return new t(e,new o.a)}}]),i(t,[{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(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=a},,,,,,,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}o(t,[{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"getWidth",value:function(){}},{key:"registerInteractionHandler",value:function(t,e){}},{key:"deregisterInteractionHandler",value:function(t,e){}}])}()},,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCFloatingLabel",function(){return s});var a=n(1),u=(n(12),n(26));n.d(e,"MDCFloatingLabelFoundation",function(){return u.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"shake",value:function(t){this.foundation_.shake(t)}},{key:"float",value:function(t){this.foundation_.float(t)}},{key:"getWidth",value:function(){return this.foundation_.getWidth()}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getWidth:function(){return t.root_.scrollWidth},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)}})}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}o(t,[{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"setNotchWidthProperty",value:function(t){}},{key:"removeNotchWidthProperty",value:function(){}}])}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o}),n.d(e,"c",function(){return r});/** | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.notchedOutline=e():(t.mdc=t.mdc||{},t.mdc.notchedOutline=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},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="",e(e.s=51)}({0:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}();e.MDCFoundation=r,e.default=r},1:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(0),i=function(){function t(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.root_=t,this.initialize.apply(this,r.__spread(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new o.MDCFoundation({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation_.destroy()},t.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},t.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},t.prototype.emit=function(t,e,n){void 0===n&&(n=!1);var r;"function"==typeof CustomEvent?r=new CustomEvent(t,{bubbles:n,detail:e}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)},t}();e.MDCComponent=i,e.default=i},16:function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n}function i(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function a(t,e){return function(n,r){e(n,r,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,u)}c((r=r.apply(t,e||[])).next())})}function f(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;c;)try{if(o=1,i&&(a=2&n[0]?i.return:n[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,i=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){c.label=n[1];break}if(6===n[0]&&c.label<a[1]){c.label=a[1],a=n;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(n);break}a[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,u,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u}function l(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}function d(t){return this instanceof d?(this.v=t,this):new d(t)}function _(t,e,n){function r(t){l[t]&&(f[t]=function(e){return new Promise(function(n,r){s.push([t,e,n,r])>1||o(t,e)})})}function o(t,e){try{i(l[t](e))}catch(t){c(s[0][3],t)}}function i(t){t.value instanceof d?Promise.resolve(t.value.v).then(a,u):c(s[0][2],t)}function a(t){o("next",t)}function u(t){o("throw",t)}function c(t,e){t(e),s.shift(),s.length&&o(s[0][0],s[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f,l=n.apply(t,e||[]),s=[];return f={},r("next"),r("throw"),r("return"),f[Symbol.asyncIterator]=function(){return this},f}function h(t){function e(e,o){n[e]=t[e]?function(n){return(r=!r)?{value:d(t[e](n)),done:"return"===e}:o?o(n):n}:o}var n,r;return n={},e("next"),e("throw",function(t){throw t}),e("return"),n[Symbol.iterator]=function(){return this},n}function b(t){function e(e){r[e]=t[e]&&function(r){return new Promise(function(o,i){r=t[e](r),n(o,i,r.done,r.value)})}}function n(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=t[Symbol.asyncIterator];return o?o.call(t):(t="function"==typeof s?s(t):t[Symbol.iterator](),r={},e("next"),e("throw"),e("return"),r[Symbol.asyncIterator]=function(){return this},r)}function v(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function m(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function O(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=r,n.d(e,"__assign",function(){return g}),e.__rest=o,e.__decorate=i,e.__param=a,e.__metadata=u,e.__awaiter=c,e.__generator=f,e.__exportStar=l,e.__values=s,e.__read=p,e.__spread=y,e.__await=d,e.__asyncGenerator=_,e.__asyncDelegator=h,e.__asyncValues=b,e.__makeTemplateObject=v,e.__importStar=m,e.__importDefault=O;/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. 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 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
var w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},g=function(){return g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},g.apply(this,arguments)}},18:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),o=n(0),i=n(36),a=function(t){function e(n){var o=t.call(this,r.__assign({},e.defaultAdapter,n))||this;return o.shakeAnimationEndHandler_=function(){return o.handleShakeAnimationEnd_()},o}return r.__extends(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return i.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.getWidth=function(){return this.adapter_.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,r=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;t?this.adapter_.addClass(r):(this.adapter_.removeClass(r),this.adapter_.removeClass(o))},e.prototype.handleShakeAnimationEnd_=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(t)},e}(o.MDCFoundation);e.MDCFloatingLabelFoundation=a,e.default=a},2:function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n}function i(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function a(t,e){return function(n,r){e(n,r,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,u)}c((r=r.apply(t,e||[])).next())})}function f(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;c;)try{if(o=1,i&&(a=2&n[0]?i.return:n[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,i=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){c.label=n[1];break}if(6===n[0]&&c.label<a[1]){c.label=a[1],a=n;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(n);break}a[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,u,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u}function l(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}function d(t){return this instanceof d?(this.v=t,this):new d(t)}function _(t,e,n){function r(t){l[t]&&(f[t]=function(e){return new Promise(function(n,r){s.push([t,e,n,r])>1||o(t,e)})})}function o(t,e){try{i(l[t](e))}catch(t){c(s[0][3],t)}}function i(t){t.value instanceof d?Promise.resolve(t.value.v).then(a,u):c(s[0][2],t)}function a(t){o("next",t)}function u(t){o("throw",t)}function c(t,e){t(e),s.shift(),s.length&&o(s[0][0],s[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f,l=n.apply(t,e||[]),s=[];return f={},r("next"),r("throw"),r("return"),f[Symbol.asyncIterator]=function(){return this},f}function h(t){function e(e,o){n[e]=t[e]?function(n){return(r=!r)?{value:d(t[e](n)),done:"return"===e}:o?o(n):n}:o}var n,r;return n={},e("next"),e("throw",function(t){throw t}),e("return"),n[Symbol.iterator]=function(){return this},n}function b(t){function e(e){r[e]=t[e]&&function(r){return new Promise(function(o,i){r=t[e](r),n(o,i,r.done,r.value)})}}function n(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=t[Symbol.asyncIterator];return o?o.call(t):(t="function"==typeof s?s(t):t[Symbol.iterator](),r={},e("next"),e("throw"),e("return"),r[Symbol.asyncIterator]=function(){return this},r)}function v(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function m(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function O(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=r,n.d(e,"__assign",function(){return g}),e.__rest=o,e.__decorate=i,e.__param=a,e.__metadata=u,e.__awaiter=c,e.__generator=f,e.__exportStar=l,e.__values=s,e.__read=p,e.__spread=y,e.__await=d,e.__asyncGenerator=_,e.__asyncDelegator=h,e.__asyncValues=b,e.__makeTemplateObject=v,e.__importStar=m,e.__importDefault=O;/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. 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 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
var w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},g=function(){return g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},g.apply(this,arguments)}},25:function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n}function i(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function a(t,e){return function(n,r){e(n,r,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,u)}c((r=r.apply(t,e||[])).next())})}function f(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;c;)try{if(o=1,i&&(a=2&n[0]?i.return:n[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,i=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){c.label=n[1];break}if(6===n[0]&&c.label<a[1]){c.label=a[1],a=n;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(n);break}a[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,u,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u}function l(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}function d(t){return this instanceof d?(this.v=t,this):new d(t)}function _(t,e,n){function r(t){l[t]&&(f[t]=function(e){return new Promise(function(n,r){s.push([t,e,n,r])>1||o(t,e)})})}function o(t,e){try{i(l[t](e))}catch(t){c(s[0][3],t)}}function i(t){t.value instanceof d?Promise.resolve(t.value.v).then(a,u):c(s[0][2],t)}function a(t){o("next",t)}function u(t){o("throw",t)}function c(t,e){t(e),s.shift(),s.length&&o(s[0][0],s[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f,l=n.apply(t,e||[]),s=[];return f={},r("next"),r("throw"),r("return"),f[Symbol.asyncIterator]=function(){return this},f}function h(t){function e(e,o){n[e]=t[e]?function(n){return(r=!r)?{value:d(t[e](n)),done:"return"===e}:o?o(n):n}:o}var n,r;return n={},e("next"),e("throw",function(t){throw t}),e("return"),n[Symbol.iterator]=function(){return this},n}function b(t){function e(e){r[e]=t[e]&&function(r){return new Promise(function(o,i){r=t[e](r),n(o,i,r.done,r.value)})}}function n(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=t[Symbol.asyncIterator];return o?o.call(t):(t="function"==typeof s?s(t):t[Symbol.iterator](),r={},e("next"),e("throw"),e("return"),r[Symbol.asyncIterator]=function(){return this},r)}function v(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function m(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function O(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=r,n.d(e,"__assign",function(){return g}),e.__rest=o,e.__decorate=i,e.__param=a,e.__metadata=u,e.__awaiter=c,e.__generator=f,e.__exportStar=l,e.__values=s,e.__read=p,e.__spread=y,e.__await=d,e.__asyncGenerator=_,e.__asyncDelegator=h,e.__asyncValues=b,e.__makeTemplateObject=v,e.__importStar=m,e.__importDefault=O;/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. 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 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
var w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},g=function(){return g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},g.apply(this,arguments)}},30:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2018 Google Inc. | ||
@@ -29,4 +137,26 @@ * | ||
*/ | ||
var r={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},o={NOTCH_ELEMENT_PADDING:8},i={OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded",NO_LABEL:"mdc-notched-outline--no-label"}},,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),u=(n(12),n(27)),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){r(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.shakeAnimationEndHandler_=function(){return n.handleShakeAnimationEnd_()},n}return i(e,t),s(e,null,[{key:"cssClasses",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}}}]),s(e,[{key:"init",value:function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)}},{key:"getWidth",value:function(){return this.adapter_.getWidth()}},{key:"shake",value:function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"float",value:function(t){var n=e.cssClasses,r=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;t?this.adapter_.addClass(r):(this.adapter_.removeClass(r),this.adapter_.removeClass(o))}},{key:"handleShakeAnimationEnd_",value:function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(t)}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";n.d(e,"a",function(){return r});/** | ||
Object.defineProperty(e,"__esModule",{value:!0});var r={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"};e.strings=r;var o={NOTCH_ELEMENT_PADDING:8};e.numbers=o;var i={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};e.cssClasses=i},31:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
Object.defineProperty(e,"__esModule",{value:!0});var r=n(25),o=n(0),i=n(30),a=function(t){function e(n){return t.call(this,r.__assign({},e.defaultAdapter,n))||this}return r.__extends(e,t),Object.defineProperty(e,"strings",{get:function(){return i.strings},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return i.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return i.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=i.numbers.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()},e}(o.MDCFoundation);e.MDCNotchedOutlineFoundation=a,e.default=a},36:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
@@ -52,3 +182,47 @@ * | ||
*/ | ||
var r={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"}},,,,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCNotchedOutline",function(){return d});var a=n(1),u=(n(22),n(36)),c=n(16),s=n(23);n.d(e,"MDCNotchedOutlineFoundation",function(){return u.a});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(){var t;r(this,e);for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];var u=o(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(i)));return u.notchElement_,u}return i(e,t),f(e,null,[{key:"attachTo",value:function(t){return new e(t)}}]),f(e,[{key:"initialSyncWithDOM",value:function(){var t=this.root_.querySelector("."+c.MDCFloatingLabelFoundation.cssClasses.ROOT);this.notchElement_=this.root_.querySelector(s.c.NOTCH_ELEMENT_SELECTOR),t?(t.style.transitionDuration="0s",this.root_.classList.add(s.a.OUTLINE_UPGRADED),requestAnimationFrame(function(){t.style.transitionDuration=""})):this.root_.classList.add(s.a.NO_LABEL)}},{key:"notch",value:function(t){this.foundation_.notch(t)}},{key:"closeNotch",value:function(){this.foundation_.closeNotch()}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a(l({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},setNotchWidthProperty:function(e){return t.notchElement_.style.setProperty("width",e+"px")},removeNotchWidthProperty:function(){return t.notchElement_.style.removeProperty("width")}}))}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),u=(n(22),n(23)),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)))}return i(e,t),s(e,null,[{key:"strings",get:function(){return u.c}},{key:"cssClasses",get:function(){return u.a}},{key:"numbers",get:function(){return u.b}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}}}]),s(e,[{key:"notch",value:function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=u.b.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)}},{key:"closeNotch",value:function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()}}]),e}(a.a);e.a=l}])}); | ||
Object.defineProperty(e,"__esModule",{value:!0}),e.cssClasses={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"}},51:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2019 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
Object.defineProperty(e,"__esModule",{value:!0});var r=n(25);r.__exportStar(n(52),e),r.__exportStar(n(31),e)},52:function(t,e,n){"use strict";/** | ||
* @license | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
Object.defineProperty(e,"__esModule",{value:!0});var r=n(25),o=n(1),i=n(18),a=n(30),u=n(31),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root_.querySelector(a.strings.NOTCH_ELEMENT_SELECTOR);var t=this.root_.querySelector("."+i.MDCFloatingLabelFoundation.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root_.classList.add(a.cssClasses.OUTLINE_UPGRADED),requestAnimationFrame(function(){t.style.transitionDuration=""})):this.root_.classList.add(a.cssClasses.NO_LABEL)},e.prototype.notch=function(t){this.foundation_.notch(t)},e.prototype.closeNotch=function(){this.foundation_.closeNotch()},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},setNotchWidthProperty:function(e){return t.notchElement_.style.setProperty("width",e+"px")},removeNotchWidthProperty:function(){return t.notchElement_.style.removeProperty("width")}};return new u.MDCNotchedOutlineFoundation(e)},e}(o.MDCComponent);e.MDCNotchedOutline=c}})}); | ||
//# sourceMappingURL=mdc.notchedOutline.min.js.map |
@@ -23,74 +23,72 @@ /** | ||
*/ | ||
import MDCFoundation from '@material/base/foundation'; | ||
import MDCNotchedOutlineAdapter from './adapter'; | ||
import {cssClasses, strings, numbers} from './constants'; | ||
/** | ||
* @extends {MDCFoundation<!MDCNotchedOutlineAdapter>} | ||
* @final | ||
*/ | ||
class MDCNotchedOutlineFoundation extends MDCFoundation { | ||
/** @return enum {string} */ | ||
static get strings() { | ||
return strings; | ||
} | ||
/** @return enum {string} */ | ||
static get cssClasses() { | ||
return cssClasses; | ||
} | ||
/** @return enum {number} */ | ||
static get numbers() { | ||
return numbers; | ||
} | ||
/** | ||
* {@see MDCNotchedOutlineAdapter} for typing information on parameters and return | ||
* types. | ||
* @return {!MDCNotchedOutlineAdapter} | ||
*/ | ||
static get defaultAdapter() { | ||
return /** @type {!MDCNotchedOutlineAdapter} */ ({ | ||
addClass: () => {}, | ||
removeClass: () => {}, | ||
setNotchWidthProperty: () => {}, | ||
removeNotchWidthProperty: () => {}, | ||
import * as tslib_1 from "tslib"; | ||
import { MDCFoundation } from '@material/base/foundation'; | ||
import { cssClasses, numbers, strings } from './constants'; | ||
var MDCNotchedOutlineFoundation = /** @class */ (function (_super) { | ||
tslib_1.__extends(MDCNotchedOutlineFoundation, _super); | ||
function MDCNotchedOutlineFoundation(adapter) { | ||
return _super.call(this, tslib_1.__assign({}, MDCNotchedOutlineFoundation.defaultAdapter, adapter)) || this; | ||
} | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "strings", { | ||
get: function () { | ||
return strings; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
} | ||
/** | ||
* @param {!MDCNotchedOutlineAdapter} adapter | ||
*/ | ||
constructor(adapter) { | ||
super(Object.assign(MDCNotchedOutlineFoundation.defaultAdapter, adapter)); | ||
} | ||
/** | ||
* Adds the outline notched selector and updates the notch width | ||
* calculated based off of notchWidth. | ||
* @param {number} notchWidth | ||
*/ | ||
notch(notchWidth) { | ||
const {OUTLINE_NOTCHED} = MDCNotchedOutlineFoundation.cssClasses; | ||
if (notchWidth > 0) { | ||
notchWidth += numbers.NOTCH_ELEMENT_PADDING; // Add padding from left/right. | ||
} | ||
this.adapter_.setNotchWidthProperty(notchWidth); | ||
this.adapter_.addClass(OUTLINE_NOTCHED); | ||
} | ||
/** | ||
* Removes notched outline selector to close the notch in the outline. | ||
*/ | ||
closeNotch() { | ||
const {OUTLINE_NOTCHED} = MDCNotchedOutlineFoundation.cssClasses; | ||
this.adapter_.removeClass(OUTLINE_NOTCHED); | ||
this.adapter_.removeNotchWidthProperty(); | ||
} | ||
} | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "cssClasses", { | ||
get: function () { | ||
return cssClasses; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "numbers", { | ||
get: function () { | ||
return numbers; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(MDCNotchedOutlineFoundation, "defaultAdapter", { | ||
/** | ||
* See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types. | ||
*/ | ||
get: function () { | ||
// tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. | ||
return { | ||
addClass: function () { return undefined; }, | ||
removeClass: function () { return undefined; }, | ||
setNotchWidthProperty: function () { return undefined; }, | ||
removeNotchWidthProperty: function () { return undefined; }, | ||
}; | ||
// tslint:enable:object-literal-sort-keys | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* Adds the outline notched selector and updates the notch width calculated based off of notchWidth. | ||
*/ | ||
MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) { | ||
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; | ||
if (notchWidth > 0) { | ||
notchWidth += numbers.NOTCH_ELEMENT_PADDING; // Add padding from left/right. | ||
} | ||
this.adapter_.setNotchWidthProperty(notchWidth); | ||
this.adapter_.addClass(OUTLINE_NOTCHED); | ||
}; | ||
/** | ||
* Removes notched outline selector to close the notch in the outline. | ||
*/ | ||
MDCNotchedOutlineFoundation.prototype.closeNotch = function () { | ||
var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED; | ||
this.adapter_.removeClass(OUTLINE_NOTCHED); | ||
this.adapter_.removeNotchWidthProperty(); | ||
}; | ||
return MDCNotchedOutlineFoundation; | ||
}(MDCFoundation)); | ||
export { MDCNotchedOutlineFoundation }; | ||
// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. | ||
export default MDCNotchedOutlineFoundation; | ||
//# sourceMappingURL=foundation.js.map |
77
index.js
/** | ||
* @license | ||
* Copyright 2017 Google Inc. | ||
* Copyright 2019 Google Inc. | ||
* | ||
@@ -23,73 +23,4 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
*/ | ||
import MDCComponent from '@material/base/component'; | ||
import MDCNotchedOutlineAdapter from './adapter'; | ||
import MDCNotchedOutlineFoundation from './foundation'; | ||
import {MDCFloatingLabelFoundation} from '@material/floating-label/index'; | ||
import {cssClasses, strings} from './constants'; | ||
/** | ||
* @extends {MDCComponent<!MDCNotchedOutlineFoundation>} | ||
* @final | ||
*/ | ||
class MDCNotchedOutline extends MDCComponent { | ||
/** | ||
* @param {!Element} root | ||
* @return {!MDCNotchedOutline} | ||
*/ | ||
static attachTo(root) { | ||
return new MDCNotchedOutline(root); | ||
} | ||
/** @param {...?} args */ | ||
constructor(...args) { | ||
super(...args); | ||
/** @private {Element} */ | ||
this.notchElement_; | ||
} | ||
initialSyncWithDOM() { | ||
const label = this.root_.querySelector('.' + MDCFloatingLabelFoundation.cssClasses.ROOT); | ||
this.notchElement_ = this.root_.querySelector(strings.NOTCH_ELEMENT_SELECTOR); | ||
if (label) { | ||
label.style.transitionDuration = '0s'; | ||
this.root_.classList.add(cssClasses.OUTLINE_UPGRADED); | ||
requestAnimationFrame(() => { | ||
label.style.transitionDuration = ''; | ||
}); | ||
} else { | ||
this.root_.classList.add(cssClasses.NO_LABEL); | ||
} | ||
} | ||
/** | ||
* Updates classes and styles to open the notch to the specified width. | ||
* @param {number} notchWidth The notch width in the outline. | ||
*/ | ||
notch(notchWidth) { | ||
this.foundation_.notch(notchWidth); | ||
} | ||
/** | ||
* Updates classes and styles to close the notch. | ||
*/ | ||
closeNotch() { | ||
this.foundation_.closeNotch(); | ||
} | ||
/** | ||
* @return {!MDCNotchedOutlineFoundation} | ||
*/ | ||
getDefaultFoundation() { | ||
return new MDCNotchedOutlineFoundation( | ||
/** @type {!MDCNotchedOutlineAdapter} */ (Object.assign({ | ||
addClass: (className) => this.root_.classList.add(className), | ||
removeClass: (className) => this.root_.classList.remove(className), | ||
setNotchWidthProperty: (width) => this.notchElement_.style.setProperty('width', width + 'px'), | ||
removeNotchWidthProperty: () => this.notchElement_.style.removeProperty('width'), | ||
}))); | ||
} | ||
} | ||
export {MDCNotchedOutline, MDCNotchedOutlineFoundation}; | ||
export * from './component'; | ||
export * from './foundation'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@material/notched-outline", | ||
"description": "The Material Components for the web notched-outline component", | ||
"version": "0.44.1", | ||
"version": "1.0.0-0", | ||
"license": "MIT", | ||
@@ -13,2 +13,5 @@ "keywords": [ | ||
"main": "dist/mdc.notchedOutline.js", | ||
"module": "index.js", | ||
"sideEffects": false, | ||
"types": "dist/mdc.notchedOutline.d.ts", | ||
"repository": { | ||
@@ -22,9 +25,10 @@ "type": "git", | ||
"dependencies": { | ||
"@material/animation": "^0.41.0", | ||
"@material/base": "^0.41.0", | ||
"@material/floating-label": "^0.44.1", | ||
"@material/animation": "^1.0.0-0", | ||
"@material/base": "^1.0.0-0", | ||
"@material/floating-label": "^1.0.0-0", | ||
"@material/rtl": "^0.42.0", | ||
"@material/shape": "^0.44.1", | ||
"@material/theme": "^0.43.0" | ||
"@material/shape": "^1.0.0-0", | ||
"@material/theme": "^1.0.0-0", | ||
"tslib": "^1.9.3" | ||
} | ||
} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
390294
29
2260
7
1
+ Addedtslib@^1.9.3
+ Added@material/animation@1.0.0(transitive)
+ Added@material/base@1.0.0(transitive)
+ Added@material/floating-label@1.1.0(transitive)
+ Added@material/shape@1.1.1(transitive)
+ Added@material/theme@1.1.0(transitive)
+ Added@material/typography@1.0.0(transitive)
+ Addedtslib@1.14.1(transitive)
- Removed@material/animation@0.41.0(transitive)
- Removed@material/base@0.41.0(transitive)
- Removed@material/floating-label@0.44.1(transitive)
- Removed@material/shape@0.44.1(transitive)
- Removed@material/theme@0.43.0(transitive)
- Removed@material/typography@0.44.1(transitive)
Updated@material/animation@^1.0.0-0
Updated@material/base@^1.0.0-0
Updated@material/shape@^1.0.0-0
Updated@material/theme@^1.0.0-0