move files around
This commit is contained in:
parent
dd37703417
commit
1a190117f3
830
dist/main-bundle.js
vendored
830
dist/main-bundle.js
vendored
@ -25638,7 +25638,7 @@ if (false) {} else {
|
||||
!*** ./node_modules/react-measure/dist/index.esm.js ***!
|
||||
\******************************************************/
|
||||
/*! exports provided: default, withContentRect */
|
||||
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/ts/app/components/LeagueStatsList.tsx (referenced with cjs require), ./src/ts/app/components/MovesDropdown.tsx (referenced with cjs require), ./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx (referenced with cjs require) */
|
||||
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx (referenced with cjs require), ./src/ts/app/components/PokemonExplorer/MovesDropdown.tsx (referenced with cjs require), ./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx (referenced with cjs require) */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
@ -37357,10 +37357,10 @@ exports.Header = Header;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/IvForm.tsx":
|
||||
/*!******************************************!*\
|
||||
!*** ./src/ts/app/components/IvForm.tsx ***!
|
||||
\******************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/IvForm.tsx":
|
||||
/*!**********************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/IvForm.tsx ***!
|
||||
\**********************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -37575,10 +37575,10 @@ exports.IvForm = IvForm;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/LeagueIvExplorer.tsx":
|
||||
/*!****************************************************!*\
|
||||
!*** ./src/ts/app/components/LeagueIvExplorer.tsx ***!
|
||||
\****************************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx":
|
||||
/*!********************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx ***!
|
||||
\********************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -37636,13 +37636,13 @@ var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/mode
|
||||
|
||||
var calculator_1 = __webpack_require__(/*! app/utils/calculator */ "./src/ts/app/utils/calculator.ts");
|
||||
|
||||
var IvForm_1 = __webpack_require__(/*! ./IvForm */ "./src/ts/app/components/IvForm.tsx");
|
||||
var IvForm_1 = __webpack_require__(/*! ./IvForm */ "./src/ts/app/components/PokemonExplorer/IvForm.tsx");
|
||||
|
||||
var LeagueSelector_1 = __webpack_require__(/*! ./LeagueSelector */ "./src/ts/app/components/LeagueSelector.tsx");
|
||||
var LeagueSelector_1 = __webpack_require__(/*! ./LeagueSelector */ "./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx");
|
||||
|
||||
var LeagueStatsList_1 = __webpack_require__(/*! ./LeagueStatsList */ "./src/ts/app/components/LeagueStatsList.tsx");
|
||||
var LeagueStatsList_1 = __webpack_require__(/*! ./LeagueStatsList */ "./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx");
|
||||
|
||||
var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/StatDisplay.tsx");
|
||||
var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/PokemonExplorer/StatDisplay.tsx");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/LeagueIvExplorer.scss */ "./src/ts/app/styles/LeagueIvExplorer.scss"));
|
||||
|
||||
@ -37847,10 +37847,10 @@ exports.LeagueIvExplorer = LeagueIvExplorer;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/LeagueSelector.tsx":
|
||||
/*!**************************************************!*\
|
||||
!*** ./src/ts/app/components/LeagueSelector.tsx ***!
|
||||
\**************************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -37984,10 +37984,10 @@ exports.LeagueSelector = LeagueSelector;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/LeagueStatsList.tsx":
|
||||
/*!***************************************************!*\
|
||||
!*** ./src/ts/app/components/LeagueStatsList.tsx ***!
|
||||
\***************************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx":
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx ***!
|
||||
\*******************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -38208,10 +38208,10 @@ exports.LeagueStatsList = LeagueStatsList;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/MovesDropdown.tsx":
|
||||
/*!*************************************************!*\
|
||||
!*** ./src/ts/app/components/MovesDropdown.tsx ***!
|
||||
\*************************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/MovesDropdown.tsx":
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/MovesDropdown.tsx ***!
|
||||
\*****************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -38267,7 +38267,7 @@ var react_window_1 = __webpack_require__(/*! react-window */ "./node_modules/rea
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/TypeIndicator.tsx");
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/MovesDropdown.scss */ "./src/ts/app/styles/MovesDropdown.scss"));
|
||||
|
||||
@ -38417,10 +38417,10 @@ exports.MovesDropdown = MovesDropdown;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/MovesExplorer.tsx":
|
||||
/*!*************************************************!*\
|
||||
!*** ./src/ts/app/components/MovesExplorer.tsx ***!
|
||||
\*************************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/MovesExplorer.tsx":
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/MovesExplorer.tsx ***!
|
||||
\*****************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -38472,9 +38472,9 @@ var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/r
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var MovesDropdown_1 = __webpack_require__(/*! app/components/MovesDropdown */ "./src/ts/app/components/MovesDropdown.tsx");
|
||||
var MovesDropdown_1 = __webpack_require__(/*! app/components/PokemonExplorer/MovesDropdown */ "./src/ts/app/components/PokemonExplorer/MovesDropdown.tsx");
|
||||
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/TypeIndicator.tsx");
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/MovesExplorer.scss */ "./src/ts/app/styles/MovesExplorer.scss"));
|
||||
|
||||
@ -38602,10 +38602,10 @@ exports.MovesExplorer = MovesExplorer;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/PokemonDisplay.tsx":
|
||||
/*!**************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonDisplay.tsx ***!
|
||||
\**************************************************/
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx":
|
||||
/*!******************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx ***!
|
||||
\******************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
@ -38661,9 +38661,9 @@ var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node
|
||||
|
||||
var formatter_1 = __webpack_require__(/*! app/utils/formatter */ "./src/ts/app/utils/formatter.ts");
|
||||
|
||||
var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/StatDisplay.tsx");
|
||||
var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/PokemonExplorer/StatDisplay.tsx");
|
||||
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/TypeIndicator.tsx");
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/PokemonDisplay.scss */ "./src/ts/app/styles/PokemonDisplay.scss"));
|
||||
|
||||
@ -38844,13 +38844,13 @@ var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node
|
||||
|
||||
var ActionsPokemonExplorer = __importStar(__webpack_require__(/*! app/components/PokemonExplorer/actions */ "./src/ts/app/components/PokemonExplorer/actions.ts"));
|
||||
|
||||
var LeagueIvExplorer_1 = __webpack_require__(/*! app/components/LeagueIvExplorer */ "./src/ts/app/components/LeagueIvExplorer.tsx");
|
||||
var LeagueIvExplorer_1 = __webpack_require__(/*! app/components/PokemonExplorer/LeagueIvExplorer */ "./src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx");
|
||||
|
||||
var MovesExplorer_1 = __webpack_require__(/*! app/components/MovesExplorer */ "./src/ts/app/components/MovesExplorer.tsx");
|
||||
var MovesExplorer_1 = __webpack_require__(/*! app/components/PokemonExplorer/MovesExplorer */ "./src/ts/app/components/PokemonExplorer/MovesExplorer.tsx");
|
||||
|
||||
var PokemonDisplay_1 = __webpack_require__(/*! app/components/PokemonDisplay */ "./src/ts/app/components/PokemonDisplay.tsx");
|
||||
var PokemonDisplay_1 = __webpack_require__(/*! app/components/PokemonExplorer/PokemonDisplay */ "./src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx");
|
||||
|
||||
var TypeEffectiveDisplay_1 = __webpack_require__(/*! app/components/TypeEffectiveDisplay */ "./src/ts/app/components/TypeEffectiveDisplay.tsx");
|
||||
var TypeEffectiveDisplay_1 = __webpack_require__(/*! app/components/PokemonExplorer/TypeEffectiveDisplay */ "./src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx");
|
||||
|
||||
var navigation_1 = __webpack_require__(/*! app/utils/navigation */ "./src/ts/app/utils/navigation.ts");
|
||||
|
||||
@ -39080,6 +39080,379 @@ exports.ConnectedPokemonExplorer = react_redux_1.connect(mapStateToProps, mapDis
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/StatDisplay.tsx":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/StatDisplay.tsx ***!
|
||||
\***************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var __importDefault = this && this.__importDefault || function (mod) {
|
||||
return mod && mod.__esModule ? mod : {
|
||||
"default": mod
|
||||
};
|
||||
};
|
||||
|
||||
var __importStar = this && this.__importStar || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) {
|
||||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
}
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/StatDisplay.scss */ "./src/ts/app/styles/StatDisplay.scss"));
|
||||
|
||||
var StatDisplay =
|
||||
/*#__PURE__*/
|
||||
function (_react_1$default$Comp) {
|
||||
_inherits(StatDisplay, _react_1$default$Comp);
|
||||
|
||||
function StatDisplay() {
|
||||
_classCallCheck(this, StatDisplay);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(StatDisplay).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(StatDisplay, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
statLabel = _this$props.statLabel,
|
||||
statValue = _this$props.statValue,
|
||||
statRank = _this$props.statRank;
|
||||
var progressStatCss = classnames_1.default('nes-progress', {
|
||||
'is-success': statRank > 66,
|
||||
'is-warning': statRank >= 34 && statRank <= 66,
|
||||
'is-error': statRank < 34
|
||||
});
|
||||
var spacer = ' ';
|
||||
var displayValue = statValue;
|
||||
|
||||
if (statValue === null) {
|
||||
displayValue = '-';
|
||||
spacer += String.fromCharCode(160) + String.fromCharCode(160);
|
||||
} else if (statValue < 100) {
|
||||
spacer += String.fromCharCode(160);
|
||||
|
||||
if (statValue < 10) {
|
||||
spacer += String.fromCharCode(160);
|
||||
}
|
||||
}
|
||||
|
||||
return react_1.default.createElement("div", {
|
||||
className: styles.baseStatRow
|
||||
}, react_1.default.createElement("span", null, statLabel, spacer, displayValue), react_1.default.createElement("progress", {
|
||||
className: progressStatCss,
|
||||
max: 100,
|
||||
value: statRank,
|
||||
title: "".concat(statRank, "%")
|
||||
}, statRank, "%"));
|
||||
}
|
||||
}]);
|
||||
|
||||
return StatDisplay;
|
||||
}(react_1.default.Component);
|
||||
|
||||
exports.StatDisplay = StatDisplay;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx":
|
||||
/*!************************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx ***!
|
||||
\************************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var __importDefault = this && this.__importDefault || function (mod) {
|
||||
return mod && mod.__esModule ? mod : {
|
||||
"default": mod
|
||||
};
|
||||
};
|
||||
|
||||
var __importStar = this && this.__importStar || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) {
|
||||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
}
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/models/Pokemon.ts");
|
||||
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/TypeEffectiveDisplay.scss */ "./src/ts/app/styles/TypeEffectiveDisplay.scss"));
|
||||
|
||||
var TypeEffectiveDisplay =
|
||||
/*#__PURE__*/
|
||||
function (_react_1$default$Comp) {
|
||||
_inherits(TypeEffectiveDisplay, _react_1$default$Comp);
|
||||
|
||||
function TypeEffectiveDisplay() {
|
||||
_classCallCheck(this, TypeEffectiveDisplay);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(TypeEffectiveDisplay).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(TypeEffectiveDisplay, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
effectiveness = _this$props.effectiveness,
|
||||
pokemonName = _this$props.pokemonName;
|
||||
var wrapperCss = classnames_1.default('nes-container', styles.wrapper);
|
||||
var indicatorWrapperCss = classnames_1.default(styles.indicatorWrapper);
|
||||
var multiplierWrapperX2Css = classnames_1.default(styles.multiplierWrapper);
|
||||
var multiplierWrapperX3Css = classnames_1.default(styles.multiplierWrapper, styles.multiplierWrapperX3);
|
||||
var multiplierWrapperX4Css = classnames_1.default(styles.multiplierWrapper, styles.multiplierWrapperX4);
|
||||
var superEffectiveX2 = [];
|
||||
var superEffective = [];
|
||||
var notVeryEffective = [];
|
||||
var notVeryEffectiveX2 = [];
|
||||
var notVeryEffectiveX3 = [];
|
||||
var notVeryEffectiveX4 = [];
|
||||
effectiveness.forEach(function (value, key) {
|
||||
var typeIndicator;
|
||||
|
||||
if (value === Pokemon_1.TypeEffectiveness.SUPER_EFFECTIVE || value === Pokemon_1.TypeEffectiveness.NOT_VERY_EFFECTIVE) {
|
||||
// using `key` because these are later transformed into an array of duplicate elements
|
||||
typeIndicator = react_1.default.createElement(TypeIndicator_1.TypeIndicator, {
|
||||
key: key,
|
||||
type: key
|
||||
});
|
||||
} else {
|
||||
typeIndicator = react_1.default.createElement(TypeIndicator_1.TypeIndicator, {
|
||||
type: key
|
||||
});
|
||||
}
|
||||
|
||||
switch (value) {
|
||||
case Pokemon_1.TypeEffectiveness.SUPER_EFFECTIVE_X2:
|
||||
superEffectiveX2.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.SUPER_EFFECTIVE:
|
||||
superEffective.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.NOT_VERY_EFFECTIVE:
|
||||
notVeryEffective.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.IMMUNE:
|
||||
notVeryEffectiveX2.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.NOT_VERY_EFFECTIVE_X3:
|
||||
notVeryEffectiveX3.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.IMMUNE_X2:
|
||||
notVeryEffectiveX4.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.NEUTRAL:
|
||||
// do nothing
|
||||
break;
|
||||
|
||||
default:
|
||||
/* tslint:disable-next-line */
|
||||
console.error("Unexpected effectiveness ".concat(value));
|
||||
}
|
||||
});
|
||||
return react_1.default.createElement("div", {
|
||||
className: wrapperCss
|
||||
}, (notVeryEffective.length > 0 || notVeryEffectiveX2.length > 0 || notVeryEffectiveX3.length > 0 || notVeryEffectiveX4.length > 0) && react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("h4", null, pokemonName, "'s Resistances", react_1.default.createElement("p", null, "It's Not Very Effective...")), react_1.default.createElement("div", {
|
||||
className: indicatorWrapperCss
|
||||
}, notVeryEffectiveX4.length > 0 && notVeryEffectiveX4.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "-4x".concat(index),
|
||||
className: multiplierWrapperX4Css
|
||||
}, element, element, element, element);
|
||||
}), notVeryEffectiveX3.length > 0 && notVeryEffectiveX3.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "-3x".concat(index),
|
||||
className: multiplierWrapperX3Css
|
||||
}, element, element, element);
|
||||
}), notVeryEffectiveX2.length > 0 && notVeryEffectiveX2.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "-2x".concat(index),
|
||||
className: multiplierWrapperX2Css
|
||||
}, element, element);
|
||||
}), notVeryEffective.length > 0 && notVeryEffective)), (superEffective.length > 0 || superEffectiveX2.length > 0) && react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("h4", null, pokemonName, "'s Weaknesses", react_1.default.createElement("p", null, "It's Super Effective!")), react_1.default.createElement("div", {
|
||||
className: indicatorWrapperCss
|
||||
}, superEffectiveX2.length > 0 && superEffectiveX2.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "+2x".concat(index),
|
||||
className: multiplierWrapperX2Css
|
||||
}, element, element);
|
||||
}), superEffective.length > 0 && superEffective)));
|
||||
}
|
||||
}]);
|
||||
|
||||
return TypeEffectiveDisplay;
|
||||
}(react_1.default.Component);
|
||||
|
||||
exports.TypeEffectiveDisplay = TypeEffectiveDisplay;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx":
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx ***!
|
||||
\*****************************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var __importDefault = this && this.__importDefault || function (mod) {
|
||||
return mod && mod.__esModule ? mod : {
|
||||
"default": mod
|
||||
};
|
||||
};
|
||||
|
||||
var __importStar = this && this.__importStar || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) {
|
||||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
}
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var formatter_1 = __webpack_require__(/*! app/utils/formatter */ "./src/ts/app/utils/formatter.ts");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/TypeIndicator.scss */ "./src/ts/app/styles/TypeIndicator.scss"));
|
||||
|
||||
var TypeIndicator =
|
||||
/*#__PURE__*/
|
||||
function (_react_1$default$Comp) {
|
||||
_inherits(TypeIndicator, _react_1$default$Comp);
|
||||
|
||||
function TypeIndicator() {
|
||||
_classCallCheck(this, TypeIndicator);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(TypeIndicator).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(TypeIndicator, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
className = _this$props.className,
|
||||
type = _this$props.type;
|
||||
var containerCss = classnames_1.default('nes-container', 'with-title');
|
||||
var containerRoundCss = classnames_1.default(containerCss, 'is-rounded');
|
||||
var pokemonTypeCss = classnames_1.default(className, containerRoundCss, styles.pokemonType);
|
||||
return react_1.default.createElement("div", {
|
||||
className: "".concat(pokemonTypeCss, " ").concat(formatter_1.formatType(type))
|
||||
}, formatter_1.formatType(type));
|
||||
}
|
||||
}]);
|
||||
|
||||
return TypeIndicator;
|
||||
}(react_1.default.Component);
|
||||
|
||||
exports.TypeIndicator = TypeIndicator;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/PokemonExplorer/actions.ts":
|
||||
/*!**********************************************************!*\
|
||||
!*** ./src/ts/app/components/PokemonExplorer/actions.ts ***!
|
||||
@ -39985,379 +40358,6 @@ exports.PokemonSelectListActionTypes = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/StatDisplay.tsx":
|
||||
/*!***********************************************!*\
|
||||
!*** ./src/ts/app/components/StatDisplay.tsx ***!
|
||||
\***********************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var __importDefault = this && this.__importDefault || function (mod) {
|
||||
return mod && mod.__esModule ? mod : {
|
||||
"default": mod
|
||||
};
|
||||
};
|
||||
|
||||
var __importStar = this && this.__importStar || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) {
|
||||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
}
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/StatDisplay.scss */ "./src/ts/app/styles/StatDisplay.scss"));
|
||||
|
||||
var StatDisplay =
|
||||
/*#__PURE__*/
|
||||
function (_react_1$default$Comp) {
|
||||
_inherits(StatDisplay, _react_1$default$Comp);
|
||||
|
||||
function StatDisplay() {
|
||||
_classCallCheck(this, StatDisplay);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(StatDisplay).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(StatDisplay, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
statLabel = _this$props.statLabel,
|
||||
statValue = _this$props.statValue,
|
||||
statRank = _this$props.statRank;
|
||||
var progressStatCss = classnames_1.default('nes-progress', {
|
||||
'is-success': statRank > 66,
|
||||
'is-warning': statRank >= 34 && statRank <= 66,
|
||||
'is-error': statRank < 34
|
||||
});
|
||||
var spacer = ' ';
|
||||
var displayValue = statValue;
|
||||
|
||||
if (statValue === null) {
|
||||
displayValue = '-';
|
||||
spacer += String.fromCharCode(160) + String.fromCharCode(160);
|
||||
} else if (statValue < 100) {
|
||||
spacer += String.fromCharCode(160);
|
||||
|
||||
if (statValue < 10) {
|
||||
spacer += String.fromCharCode(160);
|
||||
}
|
||||
}
|
||||
|
||||
return react_1.default.createElement("div", {
|
||||
className: styles.baseStatRow
|
||||
}, react_1.default.createElement("span", null, statLabel, spacer, displayValue), react_1.default.createElement("progress", {
|
||||
className: progressStatCss,
|
||||
max: 100,
|
||||
value: statRank,
|
||||
title: "".concat(statRank, "%")
|
||||
}, statRank, "%"));
|
||||
}
|
||||
}]);
|
||||
|
||||
return StatDisplay;
|
||||
}(react_1.default.Component);
|
||||
|
||||
exports.StatDisplay = StatDisplay;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/TypeEffectiveDisplay.tsx":
|
||||
/*!********************************************************!*\
|
||||
!*** ./src/ts/app/components/TypeEffectiveDisplay.tsx ***!
|
||||
\********************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var __importDefault = this && this.__importDefault || function (mod) {
|
||||
return mod && mod.__esModule ? mod : {
|
||||
"default": mod
|
||||
};
|
||||
};
|
||||
|
||||
var __importStar = this && this.__importStar || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) {
|
||||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
}
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/models/Pokemon.ts");
|
||||
|
||||
var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/TypeIndicator.tsx");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/TypeEffectiveDisplay.scss */ "./src/ts/app/styles/TypeEffectiveDisplay.scss"));
|
||||
|
||||
var TypeEffectiveDisplay =
|
||||
/*#__PURE__*/
|
||||
function (_react_1$default$Comp) {
|
||||
_inherits(TypeEffectiveDisplay, _react_1$default$Comp);
|
||||
|
||||
function TypeEffectiveDisplay() {
|
||||
_classCallCheck(this, TypeEffectiveDisplay);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(TypeEffectiveDisplay).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(TypeEffectiveDisplay, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
effectiveness = _this$props.effectiveness,
|
||||
pokemonName = _this$props.pokemonName;
|
||||
var wrapperCss = classnames_1.default('nes-container', styles.wrapper);
|
||||
var indicatorWrapperCss = classnames_1.default(styles.indicatorWrapper);
|
||||
var multiplierWrapperX2Css = classnames_1.default(styles.multiplierWrapper);
|
||||
var multiplierWrapperX3Css = classnames_1.default(styles.multiplierWrapper, styles.multiplierWrapperX3);
|
||||
var multiplierWrapperX4Css = classnames_1.default(styles.multiplierWrapper, styles.multiplierWrapperX4);
|
||||
var superEffectiveX2 = [];
|
||||
var superEffective = [];
|
||||
var notVeryEffective = [];
|
||||
var notVeryEffectiveX2 = [];
|
||||
var notVeryEffectiveX3 = [];
|
||||
var notVeryEffectiveX4 = [];
|
||||
effectiveness.forEach(function (value, key) {
|
||||
var typeIndicator;
|
||||
|
||||
if (value === Pokemon_1.TypeEffectiveness.SUPER_EFFECTIVE || value === Pokemon_1.TypeEffectiveness.NOT_VERY_EFFECTIVE) {
|
||||
// using `key` because these are later transformed into an array of duplicate elements
|
||||
typeIndicator = react_1.default.createElement(TypeIndicator_1.TypeIndicator, {
|
||||
key: key,
|
||||
type: key
|
||||
});
|
||||
} else {
|
||||
typeIndicator = react_1.default.createElement(TypeIndicator_1.TypeIndicator, {
|
||||
type: key
|
||||
});
|
||||
}
|
||||
|
||||
switch (value) {
|
||||
case Pokemon_1.TypeEffectiveness.SUPER_EFFECTIVE_X2:
|
||||
superEffectiveX2.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.SUPER_EFFECTIVE:
|
||||
superEffective.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.NOT_VERY_EFFECTIVE:
|
||||
notVeryEffective.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.IMMUNE:
|
||||
notVeryEffectiveX2.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.NOT_VERY_EFFECTIVE_X3:
|
||||
notVeryEffectiveX3.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.IMMUNE_X2:
|
||||
notVeryEffectiveX4.push(typeIndicator);
|
||||
break;
|
||||
|
||||
case Pokemon_1.TypeEffectiveness.NEUTRAL:
|
||||
// do nothing
|
||||
break;
|
||||
|
||||
default:
|
||||
/* tslint:disable-next-line */
|
||||
console.error("Unexpected effectiveness ".concat(value));
|
||||
}
|
||||
});
|
||||
return react_1.default.createElement("div", {
|
||||
className: wrapperCss
|
||||
}, (notVeryEffective.length > 0 || notVeryEffectiveX2.length > 0 || notVeryEffectiveX3.length > 0 || notVeryEffectiveX4.length > 0) && react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("h4", null, pokemonName, "'s Resistances", react_1.default.createElement("p", null, "It's Not Very Effective...")), react_1.default.createElement("div", {
|
||||
className: indicatorWrapperCss
|
||||
}, notVeryEffectiveX4.length > 0 && notVeryEffectiveX4.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "-4x".concat(index),
|
||||
className: multiplierWrapperX4Css
|
||||
}, element, element, element, element);
|
||||
}), notVeryEffectiveX3.length > 0 && notVeryEffectiveX3.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "-3x".concat(index),
|
||||
className: multiplierWrapperX3Css
|
||||
}, element, element, element);
|
||||
}), notVeryEffectiveX2.length > 0 && notVeryEffectiveX2.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "-2x".concat(index),
|
||||
className: multiplierWrapperX2Css
|
||||
}, element, element);
|
||||
}), notVeryEffective.length > 0 && notVeryEffective)), (superEffective.length > 0 || superEffectiveX2.length > 0) && react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("h4", null, pokemonName, "'s Weaknesses", react_1.default.createElement("p", null, "It's Super Effective!")), react_1.default.createElement("div", {
|
||||
className: indicatorWrapperCss
|
||||
}, superEffectiveX2.length > 0 && superEffectiveX2.map(function (element, index) {
|
||||
return react_1.default.createElement("div", {
|
||||
key: "+2x".concat(index),
|
||||
className: multiplierWrapperX2Css
|
||||
}, element, element);
|
||||
}), superEffective.length > 0 && superEffective)));
|
||||
}
|
||||
}]);
|
||||
|
||||
return TypeEffectiveDisplay;
|
||||
}(react_1.default.Component);
|
||||
|
||||
exports.TypeEffectiveDisplay = TypeEffectiveDisplay;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/components/TypeIndicator.tsx":
|
||||
/*!*************************************************!*\
|
||||
!*** ./src/ts/app/components/TypeIndicator.tsx ***!
|
||||
\*************************************************/
|
||||
/*! no static exports found */
|
||||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var __importDefault = this && this.__importDefault || function (mod) {
|
||||
return mod && mod.__esModule ? mod : {
|
||||
"default": mod
|
||||
};
|
||||
};
|
||||
|
||||
var __importStar = this && this.__importStar || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) {
|
||||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
}
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||||
|
||||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||||
|
||||
var formatter_1 = __webpack_require__(/*! app/utils/formatter */ "./src/ts/app/utils/formatter.ts");
|
||||
|
||||
var styles = __importStar(__webpack_require__(/*! app/styles/TypeIndicator.scss */ "./src/ts/app/styles/TypeIndicator.scss"));
|
||||
|
||||
var TypeIndicator =
|
||||
/*#__PURE__*/
|
||||
function (_react_1$default$Comp) {
|
||||
_inherits(TypeIndicator, _react_1$default$Comp);
|
||||
|
||||
function TypeIndicator() {
|
||||
_classCallCheck(this, TypeIndicator);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(TypeIndicator).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(TypeIndicator, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
className = _this$props.className,
|
||||
type = _this$props.type;
|
||||
var containerCss = classnames_1.default('nes-container', 'with-title');
|
||||
var containerRoundCss = classnames_1.default(containerCss, 'is-rounded');
|
||||
var pokemonTypeCss = classnames_1.default(className, containerRoundCss, styles.pokemonType);
|
||||
return react_1.default.createElement("div", {
|
||||
className: "".concat(pokemonTypeCss, " ").concat(formatter_1.formatType(type))
|
||||
}, formatter_1.formatType(type));
|
||||
}
|
||||
}]);
|
||||
|
||||
return TypeIndicator;
|
||||
}(react_1.default.Component);
|
||||
|
||||
exports.TypeIndicator = TypeIndicator;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/ts/app/index.tsx":
|
||||
/*!******************************!*\
|
||||
!*** ./src/ts/app/index.tsx ***!
|
||||
|
||||
@ -7,7 +7,7 @@ import { CombatMoveStats, ICombatMoveStats, IPokemonMove } from 'app/models/Poke
|
||||
|
||||
import { CombatMoveSelectorsOpen, SelectedCombatMoves } from 'app/components/PokemonExplorer/types';
|
||||
|
||||
import { MovesDropdown } from 'app/components/MovesDropdown';
|
||||
import { MovesDropdown } from 'app/components/PokemonExplorer/MovesDropdown';
|
||||
import { TypeIndicator } from './TypeIndicator';
|
||||
|
||||
import * as styles from 'app/styles/MovesExplorer.scss';
|
||||
@ -18,10 +18,10 @@ import {
|
||||
} from 'app/components/PokemonExplorer/types';
|
||||
import { IRouterProps } from 'app/types';
|
||||
|
||||
import { LeagueIvExplorer } from 'app/components/LeagueIvExplorer';
|
||||
import { MovesExplorer } from 'app/components/MovesExplorer';
|
||||
import { PokemonDisplay } from 'app/components/PokemonDisplay';
|
||||
import { TypeEffectiveDisplay } from 'app/components/TypeEffectiveDisplay';
|
||||
import { LeagueIvExplorer } from 'app/components/PokemonExplorer/LeagueIvExplorer';
|
||||
import { MovesExplorer } from 'app/components/PokemonExplorer/MovesExplorer';
|
||||
import { PokemonDisplay } from 'app/components/PokemonExplorer/PokemonDisplay';
|
||||
import { TypeEffectiveDisplay } from 'app/components/PokemonExplorer/TypeEffectiveDisplay';
|
||||
|
||||
import { appendQueryString } from 'app/utils/navigation';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user