UNPKG

omim

Version:

Material Design for Omi.

1,012 lines (962 loc) 149 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("omi")); else if(typeof define === 'function' && define.amd) define(["omi"], factory); else if(typeof exports === 'object') exports["MTable"] = factory(require("omi")); else root["MTable"] = factory(root["Omi"]); })(window, function(__WEBPACK_EXTERNAL_MODULE_omi__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/table/index.tsx"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@material/animation/util.js": /*!**************************************************!*\ !*** ./node_modules/@material/animation/util.js ***! \**************************************************/ /*! exports provided: getCorrectPropertyName, getCorrectEventName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCorrectPropertyName", function() { return getCorrectPropertyName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCorrectEventName", function() { return getCorrectEventName; }); /** * @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. */ var cssPropertyNameMap = { animation: { prefixed: '-webkit-animation', standard: 'animation', }, transform: { prefixed: '-webkit-transform', standard: 'transform', }, transition: { prefixed: '-webkit-transition', standard: 'transition', }, }; var jsEventTypeMap = { animationend: { cssProperty: 'animation', prefixed: 'webkitAnimationEnd', standard: 'animationend', }, animationiteration: { cssProperty: 'animation', prefixed: 'webkitAnimationIteration', standard: 'animationiteration', }, animationstart: { cssProperty: 'animation', prefixed: 'webkitAnimationStart', standard: 'animationstart', }, transitionend: { cssProperty: 'transition', prefixed: 'webkitTransitionEnd', standard: 'transitionend', }, }; function isWindow(windowObj) { return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function'; } function getCorrectPropertyName(windowObj, cssProperty) { if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) { var el = windowObj.document.createElement('div'); var _a = cssPropertyNameMap[cssProperty], standard = _a.standard, prefixed = _a.prefixed; var isStandard = standard in el.style; return isStandard ? standard : prefixed; } return cssProperty; } function getCorrectEventName(windowObj, eventType) { if (isWindow(windowObj) && eventType in jsEventTypeMap) { var el = windowObj.document.createElement('div'); var _a = jsEventTypeMap[eventType], standard = _a.standard, prefixed = _a.prefixed, cssProperty = _a.cssProperty; var isStandard = cssProperty in el.style; return isStandard ? standard : prefixed; } return eventType; } //# sourceMappingURL=util.js.map /***/ }), /***/ "./node_modules/@material/base/component.js": /*!**************************************************!*\ !*** ./node_modules/@material/base/component.js ***! \**************************************************/ /*! exports provided: MDCComponent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCComponent", function() { return MDCComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/base/foundation.js"); /** * @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. */ 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__WEBPACK_IMPORTED_MODULE_0__["__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__WEBPACK_IMPORTED_MODULE_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; }()); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCComponent); //# sourceMappingURL=component.js.map /***/ }), /***/ "./node_modules/@material/base/foundation.js": /*!***************************************************!*\ !*** ./node_modules/@material/base/foundation.js ***! \***************************************************/ /*! exports provided: MDCFoundation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFoundation", function() { return MDCFoundation; }); /** * @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. */ var MDCFoundation = /** @class */ (function () { function MDCFoundation(adapter) { if (adapter === void 0) { adapter = {}; } this.adapter_ = adapter; } Object.defineProperty(MDCFoundation, "cssClasses", { get: function () { // 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 () { // 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 () { // 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 () { // 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; }()); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCFoundation); //# sourceMappingURL=foundation.js.map /***/ }), /***/ "./node_modules/@material/checkbox/component.js": /*!******************************************************!*\ !*** ./node_modules/@material/checkbox/component.js ***! \******************************************************/ /*! exports provided: MDCCheckbox */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCCheckbox", function() { return MDCCheckbox; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_animation_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/animation/util */ "./node_modules/@material/animation/util.js"); /* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material/base/component */ "./node_modules/@material/base/component.js"); /* harmony import */ var _material_dom_ponyfill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @material/dom/ponyfill */ "./node_modules/@material/dom/ponyfill.js"); /* harmony import */ var _material_ripple_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material/ripple/component */ "./node_modules/@material/ripple/component.js"); /* harmony import */ var _material_ripple_foundation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material/ripple/foundation */ "./node_modules/@material/ripple/foundation.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/checkbox/foundation.js"); /** * @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. */ var CB_PROTO_PROPS = ['checked', 'indeterminate']; var MDCCheckbox = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCCheckbox, _super); function MDCCheckbox() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.ripple_ = _this.createRipple_(); return _this; } MDCCheckbox.attachTo = function (root) { return new MDCCheckbox(root); }; Object.defineProperty(MDCCheckbox.prototype, "ripple", { get: function () { return this.ripple_; }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckbox.prototype, "checked", { get: function () { return this.nativeControl_.checked; }, set: function (checked) { this.nativeControl_.checked = checked; }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckbox.prototype, "indeterminate", { get: function () { return this.nativeControl_.indeterminate; }, set: function (indeterminate) { this.nativeControl_.indeterminate = indeterminate; }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckbox.prototype, "disabled", { get: function () { return this.nativeControl_.disabled; }, set: function (disabled) { this.foundation_.setDisabled(disabled); }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckbox.prototype, "value", { get: function () { return this.nativeControl_.value; }, set: function (value) { this.nativeControl_.value = value; }, enumerable: true, configurable: true }); MDCCheckbox.prototype.initialSyncWithDOM = function () { var _this = this; this.handleChange_ = function () { return _this.foundation_.handleChange(); }; this.handleAnimationEnd_ = function () { return _this.foundation_.handleAnimationEnd(); }; this.nativeControl_.addEventListener('change', this.handleChange_); this.listen(Object(_material_animation_util__WEBPACK_IMPORTED_MODULE_1__["getCorrectEventName"])(window, 'animationend'), this.handleAnimationEnd_); this.installPropertyChangeHooks_(); }; MDCCheckbox.prototype.destroy = function () { this.ripple_.destroy(); this.nativeControl_.removeEventListener('change', this.handleChange_); this.unlisten(Object(_material_animation_util__WEBPACK_IMPORTED_MODULE_1__["getCorrectEventName"])(window, 'animationend'), this.handleAnimationEnd_); this.uninstallPropertyChangeHooks_(); _super.prototype.destroy.call(this); }; MDCCheckbox.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. var adapter = { addClass: function (className) { return _this.root_.classList.add(className); }, forceLayout: function () { return _this.root_.offsetWidth; }, hasNativeControl: function () { return !!_this.nativeControl_; }, isAttachedToDOM: function () { return Boolean(_this.root_.parentNode); }, isChecked: function () { return _this.checked; }, isIndeterminate: function () { return _this.indeterminate; }, removeClass: function (className) { return _this.root_.classList.remove(className); }, removeNativeControlAttr: function (attr) { return _this.nativeControl_.removeAttribute(attr); }, setNativeControlAttr: function (attr, value) { return _this.nativeControl_.setAttribute(attr, value); }, setNativeControlDisabled: function (disabled) { return _this.nativeControl_.disabled = disabled; }, }; return new _foundation__WEBPACK_IMPORTED_MODULE_6__["MDCCheckboxFoundation"](adapter); }; MDCCheckbox.prototype.createRipple_ = 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. var adapter = tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, _material_ripple_component__WEBPACK_IMPORTED_MODULE_4__["MDCRipple"].createAdapter(this), { deregisterInteractionHandler: function (evtType, handler) { return _this.nativeControl_.removeEventListener(evtType, handler); }, isSurfaceActive: function () { return Object(_material_dom_ponyfill__WEBPACK_IMPORTED_MODULE_3__["matches"])(_this.nativeControl_, ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (evtType, handler) { return _this.nativeControl_.addEventListener(evtType, handler); } }); return new _material_ripple_component__WEBPACK_IMPORTED_MODULE_4__["MDCRipple"](this.root_, new _material_ripple_foundation__WEBPACK_IMPORTED_MODULE_5__["MDCRippleFoundation"](adapter)); }; MDCCheckbox.prototype.installPropertyChangeHooks_ = function () { var _this = this; var nativeCb = this.nativeControl_; var cbProto = Object.getPrototypeOf(nativeCb); CB_PROTO_PROPS.forEach(function (controlState) { var desc = Object.getOwnPropertyDescriptor(cbProto, controlState); // We have to check for this descriptor, since some browsers (Safari) don't support its return. // See: https://bugs.webkit.org/show_bug.cgi?id=49739 if (!validDescriptor(desc)) { return; } // Type cast is needed for compatibility with Closure Compiler. var nativeGetter = desc.get; var nativeCbDesc = { configurable: desc.configurable, enumerable: desc.enumerable, get: nativeGetter, set: function (state) { desc.set.call(nativeCb, state); _this.foundation_.handleChange(); }, }; Object.defineProperty(nativeCb, controlState, nativeCbDesc); }); }; MDCCheckbox.prototype.uninstallPropertyChangeHooks_ = function () { var nativeCb = this.nativeControl_; var cbProto = Object.getPrototypeOf(nativeCb); CB_PROTO_PROPS.forEach(function (controlState) { var desc = Object.getOwnPropertyDescriptor(cbProto, controlState); if (!validDescriptor(desc)) { return; } Object.defineProperty(nativeCb, controlState, desc); }); }; Object.defineProperty(MDCCheckbox.prototype, "nativeControl_", { get: function () { var NATIVE_CONTROL_SELECTOR = _foundation__WEBPACK_IMPORTED_MODULE_6__["MDCCheckboxFoundation"].strings.NATIVE_CONTROL_SELECTOR; var el = this.root_.querySelector(NATIVE_CONTROL_SELECTOR); if (!el) { throw new Error("Checkbox component requires a " + NATIVE_CONTROL_SELECTOR + " element"); } return el; }, enumerable: true, configurable: true }); return MDCCheckbox; }(_material_base_component__WEBPACK_IMPORTED_MODULE_2__["MDCComponent"])); function validDescriptor(inputPropDesc) { return !!inputPropDesc && typeof inputPropDesc.set === 'function'; } //# sourceMappingURL=component.js.map /***/ }), /***/ "./node_modules/@material/checkbox/constants.js": /*!******************************************************!*\ !*** ./node_modules/@material/checkbox/constants.js ***! \******************************************************/ /*! exports provided: cssClasses, strings, numbers */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssClasses", function() { return cssClasses; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "strings", function() { return strings; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "numbers", function() { return numbers; }); /** * @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. */ var cssClasses = { ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate', ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked', ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked', ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked', ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked', ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate', BACKGROUND: 'mdc-checkbox__background', CHECKED: 'mdc-checkbox--checked', CHECKMARK: 'mdc-checkbox__checkmark', CHECKMARK_PATH: 'mdc-checkbox__checkmark-path', DISABLED: 'mdc-checkbox--disabled', INDETERMINATE: 'mdc-checkbox--indeterminate', MIXEDMARK: 'mdc-checkbox__mixedmark', NATIVE_CONTROL: 'mdc-checkbox__native-control', ROOT: 'mdc-checkbox', SELECTED: 'mdc-checkbox--selected', UPGRADED: 'mdc-checkbox--upgraded', }; var strings = { ARIA_CHECKED_ATTR: 'aria-checked', ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed', NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control', TRANSITION_STATE_CHECKED: 'checked', TRANSITION_STATE_INDETERMINATE: 'indeterminate', TRANSITION_STATE_INIT: 'init', TRANSITION_STATE_UNCHECKED: 'unchecked', }; var numbers = { ANIM_END_LATCH_MS: 250, }; //# sourceMappingURL=constants.js.map /***/ }), /***/ "./node_modules/@material/checkbox/foundation.js": /*!*******************************************************!*\ !*** ./node_modules/@material/checkbox/foundation.js ***! \*******************************************************/ /*! exports provided: MDCCheckboxFoundation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCCheckboxFoundation", function() { return MDCCheckboxFoundation; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/foundation */ "./node_modules/@material/base/foundation.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./node_modules/@material/checkbox/constants.js"); /** * @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. */ var MDCCheckboxFoundation = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCCheckboxFoundation, _super); function MDCCheckboxFoundation(adapter) { var _this = _super.call(this, tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, MDCCheckboxFoundation.defaultAdapter, adapter)) || this; _this.currentCheckState_ = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_INIT; _this.currentAnimationClass_ = ''; _this.animEndLatchTimer_ = 0; _this.enableAnimationEndHandler_ = false; return _this; } Object.defineProperty(MDCCheckboxFoundation, "cssClasses", { get: function () { return _constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"]; }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckboxFoundation, "strings", { get: function () { return _constants__WEBPACK_IMPORTED_MODULE_2__["strings"]; }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckboxFoundation, "numbers", { get: function () { return _constants__WEBPACK_IMPORTED_MODULE_2__["numbers"]; }, enumerable: true, configurable: true }); Object.defineProperty(MDCCheckboxFoundation, "defaultAdapter", { get: function () { return { addClass: function () { return undefined; }, forceLayout: function () { return undefined; }, hasNativeControl: function () { return false; }, isAttachedToDOM: function () { return false; }, isChecked: function () { return false; }, isIndeterminate: function () { return false; }, removeClass: function () { return undefined; }, removeNativeControlAttr: function () { return undefined; }, setNativeControlAttr: function () { return undefined; }, setNativeControlDisabled: function () { return undefined; }, }; }, enumerable: true, configurable: true }); MDCCheckboxFoundation.prototype.init = function () { this.currentCheckState_ = this.determineCheckState_(); this.updateAriaChecked_(); this.adapter_.addClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].UPGRADED); }; MDCCheckboxFoundation.prototype.destroy = function () { clearTimeout(this.animEndLatchTimer_); }; MDCCheckboxFoundation.prototype.setDisabled = function (disabled) { this.adapter_.setNativeControlDisabled(disabled); if (disabled) { this.adapter_.addClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].DISABLED); } else { this.adapter_.removeClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].DISABLED); } }; /** * Handles the animationend event for the checkbox */ MDCCheckboxFoundation.prototype.handleAnimationEnd = function () { var _this = this; if (!this.enableAnimationEndHandler_) { return; } clearTimeout(this.animEndLatchTimer_); this.animEndLatchTimer_ = setTimeout(function () { _this.adapter_.removeClass(_this.currentAnimationClass_); _this.enableAnimationEndHandler_ = false; }, _constants__WEBPACK_IMPORTED_MODULE_2__["numbers"].ANIM_END_LATCH_MS); }; /** * Handles the change event for the checkbox */ MDCCheckboxFoundation.prototype.handleChange = function () { this.transitionCheckState_(); }; MDCCheckboxFoundation.prototype.transitionCheckState_ = function () { if (!this.adapter_.hasNativeControl()) { return; } var oldState = this.currentCheckState_; var newState = this.determineCheckState_(); if (oldState === newState) { return; } this.updateAriaChecked_(); var TRANSITION_STATE_UNCHECKED = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_UNCHECKED; var SELECTED = _constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].SELECTED; if (newState === TRANSITION_STATE_UNCHECKED) { this.adapter_.removeClass(SELECTED); } else { this.adapter_.addClass(SELECTED); } // Check to ensure that there isn't a previously existing animation class, in case for example // the user interacted with the checkbox before the animation was finished. if (this.currentAnimationClass_.length > 0) { clearTimeout(this.animEndLatchTimer_); this.adapter_.forceLayout(); this.adapter_.removeClass(this.currentAnimationClass_); } this.currentAnimationClass_ = this.getTransitionAnimationClass_(oldState, newState); this.currentCheckState_ = newState; // Check for parentNode so that animations are only run when the element is attached // to the DOM. if (this.adapter_.isAttachedToDOM() && this.currentAnimationClass_.length > 0) { this.adapter_.addClass(this.currentAnimationClass_); this.enableAnimationEndHandler_ = true; } }; MDCCheckboxFoundation.prototype.determineCheckState_ = function () { var TRANSITION_STATE_INDETERMINATE = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_INDETERMINATE, TRANSITION_STATE_CHECKED = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_UNCHECKED; if (this.adapter_.isIndeterminate()) { return TRANSITION_STATE_INDETERMINATE; } return this.adapter_.isChecked() ? TRANSITION_STATE_CHECKED : TRANSITION_STATE_UNCHECKED; }; MDCCheckboxFoundation.prototype.getTransitionAnimationClass_ = function (oldState, newState) { var TRANSITION_STATE_INIT = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_INIT, TRANSITION_STATE_CHECKED = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].TRANSITION_STATE_UNCHECKED; var _a = MDCCheckboxFoundation.cssClasses, ANIM_UNCHECKED_CHECKED = _a.ANIM_UNCHECKED_CHECKED, ANIM_UNCHECKED_INDETERMINATE = _a.ANIM_UNCHECKED_INDETERMINATE, ANIM_CHECKED_UNCHECKED = _a.ANIM_CHECKED_UNCHECKED, ANIM_CHECKED_INDETERMINATE = _a.ANIM_CHECKED_INDETERMINATE, ANIM_INDETERMINATE_CHECKED = _a.ANIM_INDETERMINATE_CHECKED, ANIM_INDETERMINATE_UNCHECKED = _a.ANIM_INDETERMINATE_UNCHECKED; switch (oldState) { case TRANSITION_STATE_INIT: if (newState === TRANSITION_STATE_UNCHECKED) { return ''; } return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED; case TRANSITION_STATE_UNCHECKED: return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE; case TRANSITION_STATE_CHECKED: return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE; default: // TRANSITION_STATE_INDETERMINATE return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED; } }; MDCCheckboxFoundation.prototype.updateAriaChecked_ = function () { // Ensure aria-checked is set to mixed if checkbox is in indeterminate state. if (this.adapter_.isIndeterminate()) { this.adapter_.setNativeControlAttr(_constants__WEBPACK_IMPORTED_MODULE_2__["strings"].ARIA_CHECKED_ATTR, _constants__WEBPACK_IMPORTED_MODULE_2__["strings"].ARIA_CHECKED_INDETERMINATE_VALUE); } else { // The on/off state does not need to keep track of aria-checked, since // the screenreader uses the checked property on the checkbox element. this.adapter_.removeNativeControlAttr(_constants__WEBPACK_IMPORTED_MODULE_2__["strings"].ARIA_CHECKED_ATTR); } }; return MDCCheckboxFoundation; }(_material_base_foundation__WEBPACK_IMPORTED_MODULE_1__["MDCFoundation"])); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCCheckboxFoundation); //# sourceMappingURL=foundation.js.map /***/ }), /***/ "./node_modules/@material/checkbox/index.js": /*!**************************************************!*\ !*** ./node_modules/@material/checkbox/index.js ***! \**************************************************/ /*! exports provided: MDCCheckbox, cssClasses, strings, numbers, MDCCheckboxFoundation */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component */ "./node_modules/@material/checkbox/component.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCCheckbox", function() { return _component__WEBPACK_IMPORTED_MODULE_0__["MDCCheckbox"]; }); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./node_modules/@material/checkbox/constants.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssClasses", function() { return _constants__WEBPACK_IMPORTED_MODULE_1__["cssClasses"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "strings", function() { return _constants__WEBPACK_IMPORTED_MODULE_1__["strings"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "numbers", function() { return _constants__WEBPACK_IMPORTED_MODULE_1__["numbers"]; }); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/checkbox/foundation.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCCheckboxFoundation", function() { return _foundation__WEBPACK_IMPORTED_MODULE_2__["MDCCheckboxFoundation"]; }); /** * @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. */ //# sourceMappingURL=index.js.map /***/ }), /***/ "./node_modules/@material/dom/ponyfill.js": /*!************************************************!*\ !*** ./node_modules/@material/dom/ponyfill.js ***! \************************************************/ /*! exports provided: closest, matches */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closest", function() { return closest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matches", function() { return matches; }); /** * @license * Copyright 2018 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. */ /** * @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain. * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC. */ function closest(element, selector) { if (element.closest) { return element.closest(selector); } var el = element; while (el) { if (matches(el, selector)) { return el; } el = el.parentElement; } return null; } function matches(element, selector) { var nativeMatches = element.matches || element.webkitMatchesSelector || element.msMatchesSelector; return nativeMatches.call(element, selector); } //# sourceMappingURL=ponyfill.js.map /***/ }), /***/ "./node_modules/@material/form-field/component.js": /*!********************************************************!*\ !*** ./node_modules/@material/form-field/component.js ***! \********************************************************/ /*! exports provided: MDCFormField */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFormField", function() { return MDCFormField; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/component */ "./node_modules/@material/base/component.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/form-field/foundation.js"); /** * @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