omim - update top-app-bar

This commit is contained in:
ZainChen 2019-06-26 16:59:47 +08:00
parent 0f5f0b5039
commit 1257797641
7 changed files with 441 additions and 459 deletions

File diff suppressed because one or more lines are too long

View File

@ -136,10 +136,9 @@ define('my-app', class extends WeElement {
<m-top-app-bar
adjust
fixed
heading={'Fixed' + this.titleOmi}
navigations={['menu', {text: 'Omim'}, 'favorite']}
onNavigation={this.onMenu}
onAction={this.onMenu}>
heading='Fixed'
navigations={['menu']}
onNavigation={this.onMenu}>
<div>
<m-text-field
outlined

File diff suppressed because one or more lines are too long

View File

@ -96,18 +96,18 @@ return /******/ (function(modules) { // webpackBootstrap
/************************************************************************/
/******/ ({
/***/ "./node_modules/_@material_base@1.0.0@@material/base/component.js":
/*!************************************************************************!*\
!*** ./node_modules/_@material_base@1.0.0@@material/base/component.js ***!
\************************************************************************/
/***/ "./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@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation */ "./node_modules/_@material_base@1.0.0@@material/base/foundation.js");
/* 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.
@ -213,10 +213,10 @@ var MDCComponent = /** @class */ (function () {
/***/ }),
/***/ "./node_modules/_@material_base@1.0.0@@material/base/foundation.js":
/*!*************************************************************************!*\
!*** ./node_modules/_@material_base@1.0.0@@material/base/foundation.js ***!
\*************************************************************************/
/***/ "./node_modules/@material/base/foundation.js":
/*!***************************************************!*\
!*** ./node_modules/@material/base/foundation.js ***!
\***************************************************/
/*! exports provided: MDCFoundation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -302,10 +302,10 @@ var MDCFoundation = /** @class */ (function () {
/***/ }),
/***/ "./node_modules/_@material_dom@1.1.0@@material/dom/ponyfill.js":
/*!*********************************************************************!*\
!*** ./node_modules/_@material_dom@1.1.0@@material/dom/ponyfill.js ***!
\*********************************************************************/
/***/ "./node_modules/@material/dom/ponyfill.js":
/*!************************************************!*\
!*** ./node_modules/@material/dom/ponyfill.js ***!
\************************************************/
/*! exports provided: closest, matches */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -362,21 +362,21 @@ function matches(element, selector) {
/***/ }),
/***/ "./node_modules/_@material_ripple@2.3.0@@material/ripple/component.js":
/*!****************************************************************************!*\
!*** ./node_modules/_@material_ripple@2.3.0@@material/ripple/component.js ***!
\****************************************************************************/
/***/ "./node_modules/@material/ripple/component.js":
/*!****************************************************!*\
!*** ./node_modules/@material/ripple/component.js ***!
\****************************************************/
/*! exports provided: MDCRipple */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCRipple", function() { return MDCRipple; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/component */ "./node_modules/_@material_base@1.0.0@@material/base/component.js");
/* harmony import */ var _material_dom_ponyfill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material/dom/ponyfill */ "./node_modules/_@material_dom@1.1.0@@material/dom/ponyfill.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation */ "./node_modules/_@material_ripple@2.3.0@@material/ripple/foundation.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./node_modules/_@material_ripple@2.3.0@@material/ripple/util.js");
/* 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 _material_dom_ponyfill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material/dom/ponyfill */ "./node_modules/@material/dom/ponyfill.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/ripple/foundation.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./node_modules/@material/ripple/util.js");
/**
* @license
* Copyright 2016 Google Inc.
@ -491,10 +491,10 @@ var MDCRipple = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_@material_ripple@2.3.0@@material/ripple/constants.js":
/*!****************************************************************************!*\
!*** ./node_modules/_@material_ripple@2.3.0@@material/ripple/constants.js ***!
\****************************************************************************/
/***/ "./node_modules/@material/ripple/constants.js":
/*!****************************************************!*\
!*** ./node_modules/@material/ripple/constants.js ***!
\****************************************************/
/*! exports provided: cssClasses, strings, numbers */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -554,20 +554,20 @@ var numbers = {
/***/ }),
/***/ "./node_modules/_@material_ripple@2.3.0@@material/ripple/foundation.js":
/*!*****************************************************************************!*\
!*** ./node_modules/_@material_ripple@2.3.0@@material/ripple/foundation.js ***!
\*****************************************************************************/
/***/ "./node_modules/@material/ripple/foundation.js":
/*!*****************************************************!*\
!*** ./node_modules/@material/ripple/foundation.js ***!
\*****************************************************/
/*! exports provided: MDCRippleFoundation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCRippleFoundation", function() { return MDCRippleFoundation; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _material_base_foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/foundation */ "./node_modules/_@material_base@1.0.0@@material/base/foundation.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./node_modules/_@material_ripple@2.3.0@@material/ripple/constants.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./node_modules/_@material_ripple@2.3.0@@material/ripple/util.js");
/* 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/ripple/constants.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./node_modules/@material/ripple/util.js");
/**
* @license
* Copyright 2016 Google Inc.
@ -1032,10 +1032,10 @@ var MDCRippleFoundation = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_@material_ripple@2.3.0@@material/ripple/util.js":
/*!***********************************************************************!*\
!*** ./node_modules/_@material_ripple@2.3.0@@material/ripple/util.js ***!
\***********************************************************************/
/***/ "./node_modules/@material/ripple/util.js":
/*!***********************************************!*\
!*** ./node_modules/@material/ripple/util.js ***!
\***********************************************/
/*! exports provided: supportsCssVariables, applyPassive, getNormalizedEventCoords */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -1148,23 +1148,23 @@ function getNormalizedEventCoords(evt, pageOffset, clientRect) {
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/component.js":
/*!**************************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/component.js ***!
\**************************************************************************************/
/***/ "./node_modules/@material/top-app-bar/component.js":
/*!*********************************************************!*\
!*** ./node_modules/@material/top-app-bar/component.js ***!
\*********************************************************/
/*! exports provided: MDCTopAppBar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBar", function() { return MDCTopAppBar; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/component */ "./node_modules/_@material_base@1.0.0@@material/base/component.js");
/* harmony import */ var _material_ripple_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material/ripple/component */ "./node_modules/_@material_ripple@2.3.0@@material/ripple/component.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js");
/* harmony import */ var _fixed_foundation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fixed/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/fixed/foundation.js");
/* harmony import */ var _short_foundation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./short/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/short/foundation.js");
/* harmony import */ var _standard_foundation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./standard/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/standard/foundation.js");
/* 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 _material_ripple_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material/ripple/component */ "./node_modules/@material/ripple/component.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./node_modules/@material/top-app-bar/constants.js");
/* harmony import */ var _fixed_foundation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fixed/foundation */ "./node_modules/@material/top-app-bar/fixed/foundation.js");
/* harmony import */ var _short_foundation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./short/foundation */ "./node_modules/@material/top-app-bar/short/foundation.js");
/* harmony import */ var _standard_foundation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./standard/foundation */ "./node_modules/@material/top-app-bar/standard/foundation.js");
/**
* @license
* Copyright 2018 Google Inc.
@ -1281,10 +1281,10 @@ var MDCTopAppBar = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js":
/*!**************************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js ***!
\**************************************************************************************/
/***/ "./node_modules/@material/top-app-bar/constants.js":
/*!*********************************************************!*\
!*** ./node_modules/@material/top-app-bar/constants.js ***!
\*********************************************************/
/*! exports provided: cssClasses, numbers, strings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -1338,19 +1338,19 @@ var strings = {
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/fixed/foundation.js":
/*!*********************************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/fixed/foundation.js ***!
\*********************************************************************************************/
/***/ "./node_modules/@material/top-app-bar/fixed/foundation.js":
/*!****************************************************************!*\
!*** ./node_modules/@material/top-app-bar/fixed/foundation.js ***!
\****************************************************************/
/*! exports provided: MDCFixedTopAppBarFoundation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFixedTopAppBarFoundation", function() { return MDCFixedTopAppBarFoundation; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js");
/* harmony import */ var _standard_foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../standard/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/standard/foundation.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./node_modules/@material/top-app-bar/constants.js");
/* harmony import */ var _standard_foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../standard/foundation */ "./node_modules/@material/top-app-bar/standard/foundation.js");
/**
* @license
* Copyright 2018 Google Inc.
@ -1415,19 +1415,19 @@ var MDCFixedTopAppBarFoundation = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/foundation.js":
/*!***************************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/foundation.js ***!
\***************************************************************************************/
/***/ "./node_modules/@material/top-app-bar/foundation.js":
/*!**********************************************************!*\
!*** ./node_modules/@material/top-app-bar/foundation.js ***!
\**********************************************************/
/*! exports provided: MDCTopAppBarBaseFoundation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBarBaseFoundation", function() { return MDCTopAppBarBaseFoundation; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _material_base_foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/foundation */ "./node_modules/_@material_base@1.0.0@@material/base/foundation.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js");
/* 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/top-app-bar/constants.js");
/**
* @license
* Copyright 2018 Google Inc.
@ -1548,36 +1548,29 @@ var MDCTopAppBarBaseFoundation = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/index.js":
/*!**********************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/index.js ***!
\**********************************************************************************/
/*! exports provided: MDCTopAppBar, cssClasses, numbers, strings, MDCTopAppBarBaseFoundation, MDCFixedTopAppBarFoundation, MDCShortTopAppBarFoundation, MDCTopAppBarFoundation */
/***/ "./node_modules/@material/top-app-bar/index.js":
/*!*****************************************************!*\
!*** ./node_modules/@material/top-app-bar/index.js ***!
\*****************************************************/
/*! exports provided: MDCTopAppBar, MDCTopAppBarBaseFoundation, MDCFixedTopAppBarFoundation, MDCShortTopAppBarFoundation, MDCTopAppBarFoundation */
/***/ (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_top-app-bar@2.3.0@@material/top-app-bar/component.js");
/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component */ "./node_modules/@material/top-app-bar/component.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBar", function() { return _component__WEBPACK_IMPORTED_MODULE_0__["MDCTopAppBar"]; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssClasses", function() { return _constants__WEBPACK_IMPORTED_MODULE_1__["cssClasses"]; });
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/top-app-bar/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBarBaseFoundation", function() { return _foundation__WEBPACK_IMPORTED_MODULE_1__["MDCTopAppBarBaseFoundation"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "numbers", function() { return _constants__WEBPACK_IMPORTED_MODULE_1__["numbers"]; });
/* harmony import */ var _fixed_foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fixed/foundation */ "./node_modules/@material/top-app-bar/fixed/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCFixedTopAppBarFoundation", function() { return _fixed_foundation__WEBPACK_IMPORTED_MODULE_2__["MDCFixedTopAppBarFoundation"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "strings", function() { return _constants__WEBPACK_IMPORTED_MODULE_1__["strings"]; });
/* harmony import */ var _short_foundation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./short/foundation */ "./node_modules/@material/top-app-bar/short/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCShortTopAppBarFoundation", function() { return _short_foundation__WEBPACK_IMPORTED_MODULE_3__["MDCShortTopAppBarFoundation"]; });
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBarBaseFoundation", function() { return _foundation__WEBPACK_IMPORTED_MODULE_2__["MDCTopAppBarBaseFoundation"]; });
/* harmony import */ var _fixed_foundation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fixed/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/fixed/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCFixedTopAppBarFoundation", function() { return _fixed_foundation__WEBPACK_IMPORTED_MODULE_3__["MDCFixedTopAppBarFoundation"]; });
/* harmony import */ var _short_foundation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./short/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/short/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCShortTopAppBarFoundation", function() { return _short_foundation__WEBPACK_IMPORTED_MODULE_4__["MDCShortTopAppBarFoundation"]; });
/* harmony import */ var _standard_foundation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./standard/foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/standard/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBarFoundation", function() { return _standard_foundation__WEBPACK_IMPORTED_MODULE_5__["MDCTopAppBarFoundation"]; });
/* harmony import */ var _standard_foundation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./standard/foundation */ "./node_modules/@material/top-app-bar/standard/foundation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBarFoundation", function() { return _standard_foundation__WEBPACK_IMPORTED_MODULE_4__["MDCTopAppBarFoundation"]; });
/**
* @license
@ -1606,24 +1599,23 @@ __webpack_require__.r(__webpack_exports__);
//# sourceMappingURL=index.js.map
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/short/foundation.js":
/*!*********************************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/short/foundation.js ***!
\*********************************************************************************************/
/***/ "./node_modules/@material/top-app-bar/short/foundation.js":
/*!****************************************************************!*\
!*** ./node_modules/@material/top-app-bar/short/foundation.js ***!
\****************************************************************/
/*! exports provided: MDCShortTopAppBarFoundation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCShortTopAppBarFoundation", function() { return MDCShortTopAppBarFoundation; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/foundation.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./node_modules/@material/top-app-bar/constants.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../foundation */ "./node_modules/@material/top-app-bar/foundation.js");
/**
* @license
* Copyright 2018 Google Inc.
@ -1707,19 +1699,19 @@ var MDCShortTopAppBarFoundation = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/standard/foundation.js":
/*!************************************************************************************************!*\
!*** ./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/standard/foundation.js ***!
\************************************************************************************************/
/***/ "./node_modules/@material/top-app-bar/standard/foundation.js":
/*!*******************************************************************!*\
!*** ./node_modules/@material/top-app-bar/standard/foundation.js ***!
\*******************************************************************/
/*! exports provided: MDCTopAppBarFoundation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTopAppBarFoundation", function() { return MDCTopAppBarFoundation; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/constants.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../foundation */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/foundation.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./node_modules/@material/top-app-bar/constants.js");
/* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../foundation */ "./node_modules/@material/top-app-bar/foundation.js");
/**
* @license
* Copyright 2018 Google Inc.
@ -1891,14 +1883,14 @@ var MDCTopAppBarFoundation = /** @class */ (function (_super) {
/***/ }),
/***/ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.0@resolve-url-loader/index.js!./node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js?!./src/top-app-bar/index.scss":
/*!******************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/_css-loader@1.0.1@css-loader!./node_modules/_resolve-url-loader@3.1.0@resolve-url-loader!./node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--4-3!./src/top-app-bar/index.scss ***!
\******************************************************************************************************************************************************************************************************************/
/***/ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/lib/loader.js?!./src/top-app-bar/index.scss":
/*!***************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js??ref--4-3!./src/top-app-bar/index.scss ***!
\***************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js */ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js")(false);
exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports
@ -1910,10 +1902,10 @@ exports.push([module.i, ".mdc-top-app-bar {\n background-color: #0072d9;\n /*
/***/ }),
/***/ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js":
/*!*******************************************************************!*\
!*** ./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js ***!
\*******************************************************************/
/***/ "./node_modules/css-loader/lib/css-base.js":
/*!*************************************************!*\
!*** ./node_modules/css-loader/lib/css-base.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
@ -1997,11 +1989,11 @@ function toComment(sourceMap) {
/***/ }),
/***/ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js":
/*!*******************************************************!*\
!*** ./node_modules/_tslib@1.10.0@tslib/tslib.es6.js ***!
\*******************************************************/
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
/***/ "./node_modules/tslib/tslib.es6.js":
/*!*****************************************!*\
!*** ./node_modules/tslib/tslib.es6.js ***!
\*****************************************/
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -2018,7 +2010,6 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
@ -2071,10 +2062,8 @@ function __rest(s, e) {
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 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
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;
}
@ -2168,14 +2157,6 @@ function __spread() {
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
@ -2233,27 +2214,27 @@ function __importDefault(mod) {
/*! no static exports found */
/***/ (function(module, exports) {
theme();
document.addEventListener('DOMContentLoaded', function () {
theme();
});
function theme() {
if (document.body && !document.body.style.getPropertyValue('--mdc-theme-primary')) {
document.body.style.setProperty('--mdc-theme-primary', '#0072d9');
document.body.style.setProperty('--mdc-theme-secondary', '#2170b8');
document.body.style.setProperty('--mdc-theme-error', '#f5222d');
document.body.style.setProperty('--mdc-theme-surface', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-primary', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-secondary', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-error', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-surface', '#000000');
document.body.style.setProperty('--mdc-theme-background', '#ffffff');
document.body.style.setProperty('--mdc-shape-small-component-radius', '4px');
document.body.style.setProperty('--mdc-shape-medium-component-radius', '4px');
document.body.style.setProperty('--mdc-shape-large-component-radius', '0px');
document.body.style.setProperty('--mdc-typography--font-family', 'Roboto, sans-serif');
}
}
theme();
document.addEventListener('DOMContentLoaded', function () {
theme();
});
function theme() {
if (document.body && !document.body.style.getPropertyValue('--mdc-theme-primary')) {
document.body.style.setProperty('--mdc-theme-primary', '#0072d9');
document.body.style.setProperty('--mdc-theme-secondary', '#2170b8');
document.body.style.setProperty('--mdc-theme-error', '#f5222d');
document.body.style.setProperty('--mdc-theme-surface', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-primary', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-secondary', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-error', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-surface', '#000000');
document.body.style.setProperty('--mdc-theme-background', '#ffffff');
document.body.style.setProperty('--mdc-shape-small-component-radius', '4px');
document.body.style.setProperty('--mdc-shape-medium-component-radius', '4px');
document.body.style.setProperty('--mdc-shape-large-component-radius', '0px');
document.body.style.setProperty('--mdc-typography--font-family', 'Roboto, sans-serif');
}
}
/***/ }),
@ -2266,7 +2247,7 @@ function theme() {
/***/ (function(module, exports, __webpack_require__) {
var result = __webpack_require__(/*! !../../node_modules/_css-loader@1.0.1@css-loader!../../node_modules/_resolve-url-loader@3.1.0@resolve-url-loader!../../node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--4-3!./index.scss */ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.0@resolve-url-loader/index.js!./node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js?!./src/top-app-bar/index.scss");
var result = __webpack_require__(/*! !../../node_modules/css-loader!../../node_modules/resolve-url-loader!../../node_modules/sass-loader/lib/loader.js??ref--4-3!./index.scss */ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/lib/loader.js?!./src/top-app-bar/index.scss");
if (typeof result === "string") {
module.exports = result;
@ -2285,169 +2266,169 @@ function theme() {
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
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);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(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);
};
var __decorate = (this && this.__decorate) || function (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;
};
Object.defineProperty(exports, "__esModule", { value: true });
var omi_1 = __webpack_require__(/*! omi */ "omi");
var css = __webpack_require__(/*! ./index.scss */ "./src/top-app-bar/index.scss");
var top_app_bar_1 = __webpack_require__(/*! @material/top-app-bar */ "./node_modules/_@material_top-app-bar@2.3.0@@material/top-app-bar/index.js");
var element_children_1 = __webpack_require__(/*! ../util/element-children */ "./src/util/element-children.js");
var dom_ready_1 = __webpack_require__(/*! ../util/dom-ready */ "./src/util/dom-ready.js");
//@ts-ignore
__webpack_require__(/*! ../theme.ts */ "./src/theme.ts");
var topAppBar = /** @class */ (function (_super) {
__extends(topAppBar, _super);
function topAppBar() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.tagNum = new Object();
_this.other = false;
_this.onNavigation = function (evt) {
evt && _this.fire('navigation', { nav: 'navigation', index: _this._findPathAccessKey(evt) });
};
_this.onAction = function (evt) {
evt && _this.fire('action', { act: 'action', index: _this._findPathAccessKey(evt) });
};
return _this;
}
topAppBar.prototype.beforeUpdate = function () {
this._setChildrenAttribute();
};
topAppBar.prototype.updated = function () {
// update this.topAppBar, more flexible operation (更新 this.topAppBar 变量,操作更灵活)
this.topAppBar.destroy();
this.topAppBar = new top_app_bar_1.MDCTopAppBar(this.shadowRoot.querySelector('.mdc-top-app-bar'));
// Get the target scrollbar of 'm-top-app-bar' and trigger the animation based on this scrollbar (JSX use) (获取 'm-top-app-bar' 的目标滚动条,根据此滚动条触发动画)
if (this.props.scrollTarget) { //(JSX 使用)
this.topAppBar.setScrollTarget(this.props.scrollTarget);
}
else { // (原生 js 使用)
if (this.props.scrollTargetId) {
var findTarge = document.querySelector('#' + this.props.scrollTargetId);
findTarge ? this.topAppBar.setScrollTarget(findTarge) : this.topAppBar.setScrollTarget(window);
}
else {
this.topAppBar.setScrollTarget(window);
}
}
};
topAppBar.prototype.installed = function () {
var _this = this;
this.topAppBar = new top_app_bar_1.MDCTopAppBar(this.shadowRoot.querySelector('.mdc-top-app-bar'));
dom_ready_1.domReady(function () {
_this._setChildrenAttribute();
_this.update();
});
};
topAppBar.prototype._setChildrenAttribute = function () {
var _this = this;
this.tagNum = new Object();
this.other = false;
var children = element_children_1.elementChildren(this);
children.forEach(function (child) {
if (child.tagName === 'NAVIGATION' || child.tagName === 'ACTIONITEM') {
if (typeof _this.tagNum[child.tagName] === 'undefined') {
_this.tagNum[child.tagName] = new Array();
}
var tagLength = _this.tagNum[child.tagName].length;
child.setAttribute('slot', child.tagName + tagLength + '');
_this.tagNum[child.tagName].push(tagLength);
}
else {
child.setAttribute('slot', 'OTHER');
_this.other = true;
}
});
};
topAppBar.prototype._findPathAccessKey = function (evt) {
for (var i = 0; i < evt.path.length; i++)
if ((evt.path[i].tagName === 'SLOT' || evt.path[i].tagName === 'OMIM') && evt.path[i].accessKey)
return evt.path[i].accessKey;
return -1;
};
topAppBar.prototype.render = function (props) {
var _this = this;
return [
omi_1.h("header", __assign({}, omi_1.extractClass(props, 'mdc-top-app-bar', {
'mdc-top-app-bar--fixed': props.fixed || props.bottom,
'mdc-top-app-bar--dense': props.dense,
'mdc-top-app-bar--short': props.short || props.shortCollapsed,
'mdc-top-app-bar--short-collapsed': props.shortCollapsed,
'mdc-top-app-bar--prominent': props.prominent,
'm-top-app-bar-bottom': props.bottom
})),
omi_1.h("div", { class: 'mdc-top-app-bar__row' },
(props.navigations || this.tagNum['NAVIGATION'] || props.heading) &&
omi_1.h("section", { class: 'mdc-top-app-bar__section mdc-top-app-bar__section--align-start' },
props.navigations ? props.navigations.map(function (item, index) {
return omi_1.h("omim", { accessKey: index + '', class: omi_1.classNames('mdc-top-app-bar__navigation-icon', { 'material-icons': !item.text }), onClick: _this.onNavigation }, typeof item.text === 'string' ? item.text : item);
}) : (this.tagNum['NAVIGATION'] && this.tagNum['NAVIGATION'].map(function (_, index) {
return omi_1.h("slot", { accessKey: index + '', class: 'mdc-top-app-bar__navigation-icon', name: 'NAVIGATION' + index, onClick: _this.onNavigation });
})),
props.heading && omi_1.h("span", { class: 'mdc-top-app-bar__title' }, props.heading)),
(props.actionItems || this.tagNum['ACTIONITEM']) &&
omi_1.h("section", { class: 'mdc-top-app-bar__section mdc-top-app-bar__section--align-end' }, props.actionItems ?
props.actionItems.map(function (item, index) {
return omi_1.h("omim", { accessKey: index + '', class: omi_1.classNames('mdc-top-app-bar__action-item', { 'material-icons': !item.text }), onClick: _this.onAction }, typeof item.text === 'string' ? item.text : item);
}) : (this.tagNum['ACTIONITEM'] && this.tagNum['ACTIONITEM'].map(function (_, index) {
return omi_1.h("slot", { accessKey: index + '', class: 'mdc-top-app-bar__action-item', name: 'ACTIONITEM' + index, onClick: _this.onAction });
}))),
this.other === true && omi_1.h("slot", { name: 'OTHER' }))),
(props.adjust && omi_1.h("div", __assign({}, omi_1.extractClass(props, (props.short || props.shortCollapsed) ? 'mdc-top-app-bar--short-fixed-adjust' :
(props.dense && props.prominent) ? 'mdc-top-app-bar--dense-prominent-fixed-adjust' :
props.dense ? 'mdc-top-app-bar--dense-fixed-adjust' :
props.prominent ? 'mdc-top-app-bar--prominent-fixed-adjust' : 'mdc-top-app-bar--fixed-adjust'))))
];
};
topAppBar.css = css;
topAppBar.propTypes = {
heading: String,
short: Boolean,
shortCollapsed: Boolean,
prominent: Boolean,
dense: Boolean,
fixed: Boolean,
adjust: Boolean,
bottom: Boolean,
navigations: Object,
actionItems: Object,
scrollTarget: EventTarget,
scrollTargetId: String
};
topAppBar = __decorate([
omi_1.tag('m-top-app-bar')
], topAppBar);
return topAppBar;
}(omi_1.WeElement));
exports.default = topAppBar;
var __extends = (this && this.__extends) || (function () {
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);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(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);
};
var __decorate = (this && this.__decorate) || function (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;
};
Object.defineProperty(exports, "__esModule", { value: true });
var omi_1 = __webpack_require__(/*! omi */ "omi");
var css = __webpack_require__(/*! ./index.scss */ "./src/top-app-bar/index.scss");
var top_app_bar_1 = __webpack_require__(/*! @material/top-app-bar */ "./node_modules/@material/top-app-bar/index.js");
var element_children_1 = __webpack_require__(/*! ../util/element-children */ "./src/util/element-children.js");
var dom_ready_1 = __webpack_require__(/*! ../util/dom-ready */ "./src/util/dom-ready.js");
//@ts-ignore
__webpack_require__(/*! ../theme.ts */ "./src/theme.ts");
var topAppBar = /** @class */ (function (_super) {
__extends(topAppBar, _super);
function topAppBar() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.tagNum = new Object();
_this.other = false;
_this.onNavigation = function (evt) {
evt && _this.fire('navigation', { nav: 'navigation', index: _this._findPathAccessKey(evt) });
};
_this.onAction = function (evt) {
evt && _this.fire('action', { act: 'action', index: _this._findPathAccessKey(evt) });
};
return _this;
}
topAppBar.prototype.beforeUpdate = function () {
this._setChildrenAttribute();
};
topAppBar.prototype.updated = function () {
this.topAppBar.destroy();
this.topAppBar = new top_app_bar_1.MDCTopAppBar(this.shadowRoot.querySelector('.mdc-top-app-bar'));
// Get the target scrollbar of 'm-top-app-bar' and trigger the animation based on this scrollbar (JSX use) (获取 'm-top-app-bar' 的目标滚动条,根据此滚动条触发动画)
if (this.props.scrollTarget) { //(JSX 使用)
this.topAppBar.setScrollTarget(this.props.scrollTarget);
}
else { // (原生 js 使用)
if (this.props.scrollTargetId) {
var findTarge = document.querySelector('#' + this.props.scrollTargetId);
findTarge ? this.topAppBar.setScrollTarget(findTarge) : this.topAppBar.setScrollTarget(window);
}
else {
this.topAppBar.setScrollTarget(window);
}
}
};
topAppBar.prototype.installed = function () {
var _this = this;
this.topAppBar = new top_app_bar_1.MDCTopAppBar(this.shadowRoot.querySelector('.mdc-top-app-bar'));
dom_ready_1.domReady(function () {
_this._setChildrenAttribute();
_this.update();
});
};
topAppBar.prototype._setChildrenAttribute = function () {
var _this = this;
this.tagNum = new Object();
this.other = false;
var children = element_children_1.elementChildren(this);
children.forEach(function (child) {
if (child.tagName === 'NAVIGATION' || child.tagName === 'ACTIONITEM') {
if (typeof _this.tagNum[child.tagName] === 'undefined') {
_this.tagNum[child.tagName] = new Array();
}
var tagLength = _this.tagNum[child.tagName].length;
child.setAttribute('slot', child.tagName + tagLength + '');
_this.tagNum[child.tagName].push(tagLength);
}
else {
child.setAttribute('slot', 'OTHER');
_this.other = true;
}
});
};
topAppBar.prototype._findPathAccessKey = function (evt) {
for (var i = 0; i < evt.path.length; i++)
if ((evt.path[i].tagName === 'SLOT' || evt.path[i].tagName === 'OMIM') && evt.path[i].accessKey)
return evt.path[i].accessKey;
return -1;
};
topAppBar.prototype.render = function (props) {
var _this = this;
var node = [omi_1.h("header", __assign({}, omi_1.extractClass(props, 'mdc-top-app-bar', {
'mdc-top-app-bar--fixed': props.fixed || props.bottom,
'mdc-top-app-bar--dense': props.dense,
'mdc-top-app-bar--short': props.short || props.shortCollapsed,
'mdc-top-app-bar--short-collapsed': props.shortCollapsed,
'mdc-top-app-bar--prominent': props.prominent,
'm-top-app-bar-bottom': props.bottom
})),
omi_1.h("div", { class: 'mdc-top-app-bar__row' },
(props.navigations || this.tagNum['NAVIGATION'] || props.heading) &&
omi_1.h("section", { class: 'mdc-top-app-bar__section mdc-top-app-bar__section--align-start' },
props.navigations ? props.navigations.map(function (item, index) {
return omi_1.h("omim", { accessKey: index + '', class: omi_1.classNames('mdc-top-app-bar__navigation-icon', { 'material-icons': !item.text }), onClick: _this.onNavigation }, typeof item.text === 'string' ? item.text : item);
}) : (this.tagNum['NAVIGATION'] && this.tagNum['NAVIGATION'].map(function (_, index) {
return omi_1.h("slot", { accessKey: index + '', class: 'mdc-top-app-bar__navigation-icon', name: 'NAVIGATION' + index, onClick: _this.onNavigation });
})),
props.heading && omi_1.h("span", { class: 'mdc-top-app-bar__title' }, props.heading)),
(props.actionItems || this.tagNum['ACTIONITEM']) &&
omi_1.h("section", { class: 'mdc-top-app-bar__section mdc-top-app-bar__section--align-end' }, props.actionItems ?
props.actionItems.map(function (item, index) {
return omi_1.h("omim", { accessKey: index + '', class: omi_1.classNames('mdc-top-app-bar__action-item', { 'material-icons': !item.text }), onClick: _this.onAction }, typeof item.text === 'string' ? item.text : item);
}) : (this.tagNum['ACTIONITEM'] && this.tagNum['ACTIONITEM'].map(function (_, index) {
return omi_1.h("slot", { accessKey: index + '', class: 'mdc-top-app-bar__action-item', name: 'ACTIONITEM' + index, onClick: _this.onAction });
}))),
this.other === true && omi_1.h("slot", { name: 'OTHER' })))];
if (props.adjust) {
node.push(omi_1.h("div", __assign({}, omi_1.extractClass(props, (props.short || props.shortCollapsed) ? 'mdc-top-app-bar--short-fixed-adjust' :
(props.dense && props.prominent) ? 'mdc-top-app-bar--dense-prominent-fixed-adjust' :
props.dense ? 'mdc-top-app-bar--dense-fixed-adjust' :
props.prominent ? 'mdc-top-app-bar--prominent-fixed-adjust' : 'mdc-top-app-bar--fixed-adjust'))));
}
return node;
};
topAppBar.css = css;
topAppBar.propTypes = {
heading: String,
short: Boolean,
shortCollapsed: Boolean,
prominent: Boolean,
dense: Boolean,
fixed: Boolean,
adjust: Boolean,
bottom: Boolean,
navigations: Object,
actionItems: Object,
scrollTarget: EventTarget,
scrollTargetId: String
};
topAppBar = __decorate([
omi_1.tag('m-top-app-bar')
], topAppBar);
return topAppBar;
}(omi_1.WeElement));
exports.default = topAppBar;
/***/ }),
@ -2460,24 +2441,24 @@ exports.default = topAppBar;
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var readyCallbacks = [];
document.addEventListener('DOMContentLoaded', function () {
domReady.done = true;
readyCallbacks.forEach(function (callback) {
callback();
});
});
function domReady(callback) {
if (domReady.done) {
callback();
return;
}
readyCallbacks.push(callback);
}
exports.domReady = domReady;
domReady.done = false;
Object.defineProperty(exports, "__esModule", { value: true });
var readyCallbacks = [];
document.addEventListener('DOMContentLoaded', function () {
domReady.done = true;
readyCallbacks.forEach(function (callback) {
callback();
});
});
function domReady(callback) {
if (domReady.done) {
callback();
return;
}
readyCallbacks.push(callback);
}
exports.domReady = domReady;
domReady.done = false;
/***/ }),
@ -2490,18 +2471,18 @@ domReady.done = false;
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function elementChildren(element) {
var childNodes = element.childNodes, children = [], i = childNodes.length;
while (i--) {
if (childNodes[i].nodeType == 1) {
children.unshift(childNodes[i]);
}
}
return children;
}
exports.elementChildren = elementChildren;
Object.defineProperty(exports, "__esModule", { value: true });
function elementChildren(element) {
var childNodes = element.childNodes, children = [], i = childNodes.length;
while (i--) {
if (childNodes[i].nodeType == 1) {
children.unshift(childNodes[i]);
}
}
return children;
}
exports.elementChildren = elementChildren;
/***/ }),

File diff suppressed because one or more lines are too long

View File

@ -55,7 +55,6 @@ export default class topAppBar extends WeElement<Props, Data>{
}
updated() {
// update this.topAppBar, more flexible operation (更新 this.topAppBar 变量,操作更灵活)
this.topAppBar.destroy()
this.topAppBar = new MDCTopAppBar(this.shadowRoot.querySelector('.mdc-top-app-bar'))
@ -116,43 +115,44 @@ export default class topAppBar extends WeElement<Props, Data>{
}
render(props) {
return [
<header {...extractClass(props, 'mdc-top-app-bar', {
'mdc-top-app-bar--fixed': props.fixed || props.bottom,
'mdc-top-app-bar--dense': props.dense,
'mdc-top-app-bar--short': props.short || props.shortCollapsed,
'mdc-top-app-bar--short-collapsed': props.shortCollapsed,
'mdc-top-app-bar--prominent': props.prominent,
'm-top-app-bar-bottom': props.bottom
})}>
<div class='mdc-top-app-bar__row'>
{(props.navigations || this.tagNum['NAVIGATION'] || props.heading) &&
<section class='mdc-top-app-bar__section mdc-top-app-bar__section--align-start'>
{props.navigations ? props.navigations.map((item, index) => {
return <omim accessKey={index + ''} class={classNames('mdc-top-app-bar__navigation-icon', {'material-icons': !item.text})} onClick={this.onNavigation}>{typeof item.text === 'string' ? item.text : item}</omim>
}) : (this.tagNum['NAVIGATION'] && this.tagNum['NAVIGATION'].map((_, index) => {
return <slot accessKey={index + ''} class='mdc-top-app-bar__navigation-icon' name={'NAVIGATION' + index} onClick={this.onNavigation}></slot>
}))}
{props.heading && <span class='mdc-top-app-bar__title'>{props.heading}</span>}
</section>}
{(props.actionItems || this.tagNum['ACTIONITEM']) &&
<section class='mdc-top-app-bar__section mdc-top-app-bar__section--align-end'>
{props.actionItems ?
props.actionItems.map((item, index) => {
return <omim accessKey={index + ''} class={classNames('mdc-top-app-bar__action-item', {'material-icons': !item.text})} onClick={this.onAction}>{typeof item.text === 'string' ? item.text : item}</omim>
}) : (this.tagNum['ACTIONITEM'] && this.tagNum['ACTIONITEM'].map((_, index) => {
return <slot accessKey={index + ''} class='mdc-top-app-bar__action-item' name={'ACTIONITEM' + index} onClick={this.onAction}></slot>
}))}
</section>}
{this.other === true && <slot name='OTHER'></slot>}
</div>
</header>,
(props.adjust && <div {...extractClass(props,
let node = [<header {...extractClass(props, 'mdc-top-app-bar', {
'mdc-top-app-bar--fixed': props.fixed || props.bottom,
'mdc-top-app-bar--dense': props.dense,
'mdc-top-app-bar--short': props.short || props.shortCollapsed,
'mdc-top-app-bar--short-collapsed': props.shortCollapsed,
'mdc-top-app-bar--prominent': props.prominent,
'm-top-app-bar-bottom': props.bottom
})}>
<div class='mdc-top-app-bar__row'>
{(props.navigations || this.tagNum['NAVIGATION'] || props.heading) &&
<section class='mdc-top-app-bar__section mdc-top-app-bar__section--align-start'>
{props.navigations ? props.navigations.map((item, index) => {
return <omim accessKey={index + ''} class={classNames('mdc-top-app-bar__navigation-icon', {'material-icons': !item.text})} onClick={this.onNavigation}>{typeof item.text === 'string' ? item.text : item}</omim>
}) : (this.tagNum['NAVIGATION'] && this.tagNum['NAVIGATION'].map((_, index) => {
return <slot accessKey={index + ''} class='mdc-top-app-bar__navigation-icon' name={'NAVIGATION' + index} onClick={this.onNavigation}></slot>
}))}
{props.heading && <span class='mdc-top-app-bar__title'>{props.heading}</span>}
</section>}
{(props.actionItems || this.tagNum['ACTIONITEM']) &&
<section class='mdc-top-app-bar__section mdc-top-app-bar__section--align-end'>
{props.actionItems ?
props.actionItems.map((item, index) => {
return <omim accessKey={index + ''} class={classNames('mdc-top-app-bar__action-item', {'material-icons': !item.text})} onClick={this.onAction}>{typeof item.text === 'string' ? item.text : item}</omim>
}) : (this.tagNum['ACTIONITEM'] && this.tagNum['ACTIONITEM'].map((_, index) => {
return <slot accessKey={index + ''} class='mdc-top-app-bar__action-item' name={'ACTIONITEM' + index} onClick={this.onAction}></slot>
}))}
</section>}
{this.other === true && <slot name='OTHER'></slot>}
</div>
</header>]
if(props.adjust) {
node.push(<div {...extractClass(props,
(props.short || props.shortCollapsed) ? 'mdc-top-app-bar--short-fixed-adjust' :
(props.dense && props.prominent) ? 'mdc-top-app-bar--dense-prominent-fixed-adjust' :
props.dense ? 'mdc-top-app-bar--dense-fixed-adjust' :
props.prominent ? 'mdc-top-app-bar--prominent-fixed-adjust' : 'mdc-top-app-bar--fixed-adjust'
)}></div>)
]
}
return node
}
}

View File

@ -19,7 +19,7 @@ export default class Tree extends WeElement<Props, Data> {
onNodeClick: (node: any) => void;
getNodeById(id: any, node: any): any;
renderNode(node: any): JSX.Element;
_isChecked(node: any, obj: any, tag: any): "indeterminate" | "checked" | "unchecked";
_isChecked(node: any, obj: any, tag: any): "checked" | "indeterminate" | "unchecked";
_getChildCount(node: any): number;
render(props: any): JSX.Element;
}