diff --git a/dist/app.css b/dist/app.css index 9b981e2..62ca780 100644 --- a/dist/app.css +++ b/dist/app.css @@ -50,57 +50,78 @@ background-color: #000; opacity: 0.7; } -.nes-field.is-inline .IvForm__ivInput__xR5IU { +.PokemonApp__displayWrapper__2PiN5 { + margin: 0 auto; + width: 30rem; + display: flex; + flex-flow: column nowrap; } + +.PokemonApp__container__MsUHy { + display: flex; + justify-content: space-evenly; } + .PokemonApp__container__MsUHy .PokemonApp__leftColumn__3Lv_L, + .PokemonApp__container__MsUHy .PokemonApp__rightColumn__1xE25 { + display: flex; + flex-flow: column nowrap; + flex-basis: 45%; + align-items: center; } + .PokemonApp__container__MsUHy .PokemonApp__leftColumn__3Lv_L { + text-align: center; } + .PokemonApp__container__MsUHy .PokemonApp__rightColumn__1xE25 { + flex-grow: 1; + align-items: start; } + +.nes-field.is-inline .IvForm__ivInput__1KM34 { width: 4.25em; padding-left: 0.45em; padding-right: 0.25em; } - .nes-field.is-inline .IvForm__ivInput__xR5IU.IvForm__levelInput__1n6We { + .nes-field.is-inline .IvForm__ivInput__1KM34.IvForm__levelInput__1cOcl { width: 6.5em; } -.nes-field.is-inline.IvForm__fieldRow__3HcBN { +.nes-field.is-inline.IvForm__fieldRow__2b-ft { justify-content: space-between; } - .nes-field.is-inline.IvForm__fieldRow__3HcBN label { + .nes-field.is-inline.IvForm__fieldRow__2b-ft label { flex-grow: 0; margin-left: 1em; } - .nes-field.is-inline.IvForm__fieldRow__3HcBN label:first-child { + .nes-field.is-inline.IvForm__fieldRow__2b-ft label:first-child { margin-left: 0; } -.LeagueSelector__wrapper__fxmRz { +.LeagueSelector__wrapper__3k27A { font-size: 0.8em; display: flex; justify-content: space-between; margin: -0.5rem 0 0.5rem 0; } -.LeagueSelector__leagueRadioLabel__3aPV9 { +.LeagueSelector__leagueRadioLabel__23hqE { display: flex; align-items: center; } -.LeagueSelector__leagueRadio__3hY7B { +.LeagueSelector__leagueRadio__26fWw { display: none; } -.LeagueStatsList__selectList__1FBIL { +.LeagueStatsList__selectList__S5RTA { flex-grow: 1; /* for Firefox */ display: flex; overflow: hidden; } - .LeagueStatsList__selectList__1FBIL > * { + .LeagueStatsList__selectList__S5RTA > * { flex: 1; overflow: auto; } -.LeagueStatsList__listItem__oCOvr { +.LeagueStatsList__listItem__1pPhh { position: relative; display: flex; justify-content: space-evenly; } - .LeagueStatsList__listItem__oCOvr.list-item.active::before, .LeagueStatsList__listItem__oCOvr.list-item:hover::before { + .LeagueStatsList__listItem__1pPhh.list-item.active::before, .LeagueStatsList__listItem__1pPhh.list-item:hover::before { top: 8px; left: 10px; } -.StatDisplay__baseStatRow__1B60A { +.StatDisplay__baseStatRow__3_Kiv { display: flex; align-items: center; } - .StatDisplay__baseStatRow__1B60A > * { + .StatDisplay__baseStatRow__3_Kiv > * { flex-shrink: 0; } - .StatDisplay__baseStatRow__1B60A > progress { + .StatDisplay__baseStatRow__3_Kiv > progress { flex-shrink: 1; margin: 0 0 0 1em; width: 5em; @@ -108,170 +129,6 @@ border-image-outset: 1; padding: 2px; } -.PokemonExplorer__wrapper__3U9Pu { - margin: 0 auto; - width: 30rem; - display: flex; - flex-flow: column nowrap; } - -.PokemonExplorer__container__3LR-_ { - display: flex; - justify-content: space-evenly; } - .PokemonExplorer__container__3LR-_ .PokemonExplorer__leftColumn__1qHS1, - .PokemonExplorer__container__3LR-_ .PokemonExplorer__rightColumn__KvY23 { - display: flex; - flex-flow: column nowrap; - flex-basis: 45%; - align-items: center; } - .PokemonExplorer__container__3LR-_ .PokemonExplorer__leftColumn__1qHS1 { - text-align: center; } - .PokemonExplorer__container__3LR-_ .PokemonExplorer__rightColumn__KvY23 { - flex-grow: 1; - align-items: start; } - -.LeagueIvExplorer__container__3GKct { - margin-bottom: 1rem; } - -.LeagueIvExplorer__leftColumn__3au0L { } - -.LeagueIvExplorer__rightColumn__1eyvh { } - -.LeagueIvExplorer__leaguePokemonRank__3bjyU { - justify-content: flex-start; - flex-wrap: wrap; } - .LeagueIvExplorer__leaguePokemonRank__3bjyU .LeagueIvExplorer__pokemonInfoWrapper__3WVsh { - flex: 1 0 100%; - display: flex; } - .LeagueIvExplorer__leaguePokemonRank__3bjyU .LeagueIvExplorer__leftColumn__3au0L { - align-items: flex-start; } - .LeagueIvExplorer__leaguePokemonRank__3bjyU .LeagueIvExplorer__pokemonRankValue__3k3ih { - display: inline; } - -.LeagueIvExplorer__ivsContainer__31sfb { - flex: 0 999 auto; - display: flex; - flex-flow: column nowrap; - /* for Firefox */ } - .LeagueIvExplorer__ivsContainer__31sfb .title.LeagueIvExplorer__ivContainerTitle__3Z3eX { - display: flex; - justify-content: flex-end; - background-color: transparent; - padding: 0; } - .LeagueIvExplorer__ivsContainer__31sfb .title.LeagueIvExplorer__ivContainerTitle__3Z3eX > * { - background-color: #fff; } - .LeagueIvExplorer__ivsContainer__31sfb .title.LeagueIvExplorer__ivContainerTitle__3Z3eX > *:first-child { - margin-right: auto; - padding: 0 0.5em; } - .LeagueIvExplorer__ivsContainer__31sfb .title.LeagueIvExplorer__ivContainerTitle__3Z3eX > *:last-child { - padding-right: 0.5em; } - .LeagueIvExplorer__ivsContainer__31sfb.LeagueIvExplorer__diplayingIvList__1Q5r8 { - padding: 1.5rem 0 0; } - .LeagueIvExplorer__ivsContainer__31sfb.LeagueIvExplorer__diplayingIvList__1Q5r8 .title.LeagueIvExplorer__ivContainerTitle__3Z3eX { - margin-bottom: 0; - margin-right: -8px; - margin-left: -8px; - padding: 0 2.5rem; } - -.TypeIndicator__pokemonType__3MOQI { - text-transform: uppercase; } - .TypeIndicator__pokemonType__3MOQI.nes-container { - text-align: center; - padding: 0; - font-size: 0.7em; - line-height: 0.9; - flex-basis: 50%; - margin: 0.5rem 7px 11px; } - .TypeIndicator__pokemonType__3MOQI.normal { - color: #fff; - background-color: #a8a878; } - .TypeIndicator__pokemonType__3MOQI.normal::after { - box-shadow: 0 -4px #a8a878, 0 -8px, 4px 0 #a8a878, 4px -4px, 8px 0, 0 4px #a8a878, 0 8px, -4px 0 #a8a878, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.fighting { - color: #fff; - background-color: #c03028; } - .TypeIndicator__pokemonType__3MOQI.fighting::after { - box-shadow: 0 -4px #c03028, 0 -8px, 4px 0 #c03028, 4px -4px, 8px 0, 0 4px #c03028, 0 8px, -4px 0 #c03028, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.flying { - color: #fff; - background-color: #a890f0; } - .TypeIndicator__pokemonType__3MOQI.flying::after { - box-shadow: 0 -4px #a890f0, 0 -8px, 4px 0 #a890f0, 4px -4px, 8px 0, 0 4px #a890f0, 0 8px, -4px 0 #a890f0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.poison { - color: #fff; - background-color: #a040a0; } - .TypeIndicator__pokemonType__3MOQI.poison::after { - box-shadow: 0 -4px #a040a0, 0 -8px, 4px 0 #a040a0, 4px -4px, 8px 0, 0 4px #a040a0, 0 8px, -4px 0 #a040a0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.ground { - color: #fff; - background-color: #e0c068; } - .TypeIndicator__pokemonType__3MOQI.ground::after { - box-shadow: 0 -4px #e0c068, 0 -8px, 4px 0 #e0c068, 4px -4px, 8px 0, 0 4px #e0c068, 0 8px, -4px 0 #e0c068, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.rock { - color: #fff; - background-color: #b8a038; } - .TypeIndicator__pokemonType__3MOQI.rock::after { - box-shadow: 0 -4px #b8a038, 0 -8px, 4px 0 #b8a038, 4px -4px, 8px 0, 0 4px #b8a038, 0 8px, -4px 0 #b8a038, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.bug { - color: #fff; - background-color: #a8b820; } - .TypeIndicator__pokemonType__3MOQI.bug::after { - box-shadow: 0 -4px #a8b820, 0 -8px, 4px 0 #a8b820, 4px -4px, 8px 0, 0 4px #a8b820, 0 8px, -4px 0 #a8b820, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.ghost { - color: #fff; - background-color: #705898; } - .TypeIndicator__pokemonType__3MOQI.ghost::after { - box-shadow: 0 -4px #705898, 0 -8px, 4px 0 #705898, 4px -4px, 8px 0, 0 4px #705898, 0 8px, -4px 0 #705898, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.steel { - color: #fff; - background-color: #b8b8d0; } - .TypeIndicator__pokemonType__3MOQI.steel::after { - box-shadow: 0 -4px #b8b8d0, 0 -8px, 4px 0 #b8b8d0, 4px -4px, 8px 0, 0 4px #b8b8d0, 0 8px, -4px 0 #b8b8d0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.fire { - color: #fff; - background-color: #f08030; } - .TypeIndicator__pokemonType__3MOQI.fire::after { - box-shadow: 0 -4px #f08030, 0 -8px, 4px 0 #f08030, 4px -4px, 8px 0, 0 4px #f08030, 0 8px, -4px 0 #f08030, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.water { - color: #fff; - background-color: #6890f0; } - .TypeIndicator__pokemonType__3MOQI.water::after { - box-shadow: 0 -4px #6890f0, 0 -8px, 4px 0 #6890f0, 4px -4px, 8px 0, 0 4px #6890f0, 0 8px, -4px 0 #6890f0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.grass { - color: #fff; - background-color: #78c850; } - .TypeIndicator__pokemonType__3MOQI.grass::after { - box-shadow: 0 -4px #78c850, 0 -8px, 4px 0 #78c850, 4px -4px, 8px 0, 0 4px #78c850, 0 8px, -4px 0 #78c850, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.electric { - color: #fff; - background-color: #f8d030; } - .TypeIndicator__pokemonType__3MOQI.electric::after { - box-shadow: 0 -4px #f8d030, 0 -8px, 4px 0 #f8d030, 4px -4px, 8px 0, 0 4px #f8d030, 0 8px, -4px 0 #f8d030, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.psychic { - color: #fff; - background-color: #f85888; } - .TypeIndicator__pokemonType__3MOQI.psychic::after { - box-shadow: 0 -4px #f85888, 0 -8px, 4px 0 #f85888, 4px -4px, 8px 0, 0 4px #f85888, 0 8px, -4px 0 #f85888, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.ice { - color: #fff; - background-color: #98d8d8; } - .TypeIndicator__pokemonType__3MOQI.ice::after { - box-shadow: 0 -4px #98d8d8, 0 -8px, 4px 0 #98d8d8, 4px -4px, 8px 0, 0 4px #98d8d8, 0 8px, -4px 0 #98d8d8, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.dragon { - color: #fff; - background-color: #6f35fc; } - .TypeIndicator__pokemonType__3MOQI.dragon::after { - box-shadow: 0 -4px #6f35fc, 0 -8px, 4px 0 #6f35fc, 4px -4px, 8px 0, 0 4px #6f35fc, 0 8px, -4px 0 #6f35fc, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.dark { - color: #fff; - background-color: #705848; } - .TypeIndicator__pokemonType__3MOQI.dark::after { - box-shadow: 0 -4px #705848, 0 -8px, 4px 0 #705848, 4px -4px, 8px 0, 0 4px #705848, 0 8px, -4px 0 #705848, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .TypeIndicator__pokemonType__3MOQI.fairy { - color: #fff; - background-color: #ee99ac; } - .TypeIndicator__pokemonType__3MOQI.fairy::after { - box-shadow: 0 -4px #ee99ac, 0 -8px, 4px 0 #ee99ac, 4px -4px, 8px 0, 0 4px #ee99ac, 0 8px, -4px 0 #ee99ac, -4px 4px, -8px 0, -4px -4px, 4px 4px; } - .PokemonApp__wrapper__3ZEoC { display: flex; flex-flow: column nowrap; @@ -322,121 +179,201 @@ background-color: #000; opacity: 0.7; } -.PokemonDisplay__highlight__h50BA { - color: #fff; - pointer-events: none; } - -.PokemonDisplay__pokemonInfoWrapper__3AW3e { - margin-bottom: 1rem; } - -.PokemonDisplay__pokemonInfoLeftColumn__1vugM { } - -.PokemonDisplay__pokemonInfoRightColumn__27Q49 { } - -.PokemonDisplay__pokemonName__WBKbk { - margin-bottom: 0; } - -.PokemonDisplay__dexHeader__2HVfr { - margin-bottom: 0.25rem; } - -.PokemonDisplay__pokemonTypeWrapper__1rJIA { - display: flex; - justify-content: center; - align-self: stretch; } - -.PokemonDisplay__formHeader__1pr6M { - text-transform: uppercase; - margin-bottom: 0; } - -.PokemonDisplay__pokemonBaseStats__3UJvn { - display: flex; - flex-flow: column nowrap; - align-items: start; - align-self: stretch; } - -.PokemonExplorer__wrapper__3U9Pu { +.PokemonApp__displayWrapper__2PiN5 { margin: 0 auto; width: 30rem; display: flex; flex-flow: column nowrap; } -.PokemonExplorer__container__3LR-_ { +.PokemonApp__container__MsUHy { display: flex; justify-content: space-evenly; } - .PokemonExplorer__container__3LR-_ .PokemonExplorer__leftColumn__1qHS1, - .PokemonExplorer__container__3LR-_ .PokemonExplorer__rightColumn__KvY23 { + .PokemonApp__container__MsUHy .PokemonApp__leftColumn__3Lv_L, + .PokemonApp__container__MsUHy .PokemonApp__rightColumn__1xE25 { display: flex; flex-flow: column nowrap; flex-basis: 45%; align-items: center; } - .PokemonExplorer__container__3LR-_ .PokemonExplorer__leftColumn__1qHS1 { + .PokemonApp__container__MsUHy .PokemonApp__leftColumn__3Lv_L { text-align: center; } - .PokemonExplorer__container__3LR-_ .PokemonExplorer__rightColumn__KvY23 { + .PokemonApp__container__MsUHy .PokemonApp__rightColumn__1xE25 { flex-grow: 1; align-items: start; } -.TypeEffectiveDisplay__multiplierWrapper__14os7 { - position: relative; - padding-top: 6px; - padding-right: 6px; } - .TypeEffectiveDisplay__multiplierWrapper__14os7 > * { - position: absolute; } - .TypeEffectiveDisplay__multiplierWrapper__14os7 :nth-child(1) { - position: inherit; - z-index: 3; } - .TypeEffectiveDisplay__multiplierWrapper__14os7 :nth-child(2) { - top: 0; - left: 6px; - z-index: 2; } - .TypeEffectiveDisplay__multiplierWrapper__14os7 :nth-child(3) { - left: 12px; - z-index: 1; } - .TypeEffectiveDisplay__multiplierWrapper__14os7 :nth-child(4) { - left: 18px; - z-index: 0; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX3__1SBG1 { - padding-top: 12px; - padding-right: 12px; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX3__1SBG1 :nth-child(3) { - top: 0; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX3__1SBG1 :nth-child(2) { - top: 6px; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX4__2KqYa { - padding-top: 18px; - padding-right: 18px; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX4__2KqYa :nth-child(4) { - top: 0; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX4__2KqYa :nth-child(3) { - top: 6px; } - .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX4__2KqYa :nth-child(2) { - top: 12px; } +.LeagueIvExplorer__container__23wLQ { + margin-bottom: 1rem; } -.TypeEffectiveDisplay__wrapper__1FFIj { - margin: 0 1em; } - .TypeEffectiveDisplay__wrapper__1FFIj * + h4 { - margin-top: 1em; } - .TypeEffectiveDisplay__wrapper__1FFIj h4 p { - font-size: 0.7em; - color: #b6b6b6; - margin: 0; } - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY { +.LeagueIvExplorer__leftColumn__1HzQ- { } + +.LeagueIvExplorer__rightColumn__rwhPb { } + +.LeagueIvExplorer__leaguePokemonRank__25epF { + justify-content: flex-start; + flex-wrap: wrap; } + .LeagueIvExplorer__leaguePokemonRank__25epF .LeagueIvExplorer__pokemonInfoWrapper__3Zqjc { + flex: 1 0 100%; + display: flex; } + .LeagueIvExplorer__leaguePokemonRank__25epF .LeagueIvExplorer__leftColumn__1HzQ- { + align-items: flex-start; } + .LeagueIvExplorer__leaguePokemonRank__25epF .LeagueIvExplorer__pokemonRankValue__2bxg3 { + display: inline; } + +.LeagueIvExplorer__ivsContainer__7fSaL { + flex: 0 999 auto; + display: flex; + flex-flow: column nowrap; + /* for Firefox */ } + .LeagueIvExplorer__ivsContainer__7fSaL .title.LeagueIvExplorer__ivContainerTitle__3P9q4 { display: flex; - flex-flow: row wrap; - align-items: end; } - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY > * { - margin-right: 14px; - height: 0%; } - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY .TypeEffectiveDisplay__multiplierWrapper__14os7 { - width: auto; - margin-right: 2px; } - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX3__1SBG1 { - margin-right: -4px; } - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY .TypeEffectiveDisplay__multiplierWrapper__14os7.TypeEffectiveDisplay__multiplierWrapperX4__2KqYa { - margin-right: -10px; } - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY > *, - .TypeEffectiveDisplay__wrapper__1FFIj .TypeEffectiveDisplay__indicatorWrapper__2F3AY .TypeEffectiveDisplay__multiplierWrapper__14os7 > * { - flex-basis: unset; - width: 6.75rem; } + justify-content: flex-end; + background-color: transparent; + padding: 0; } + .LeagueIvExplorer__ivsContainer__7fSaL .title.LeagueIvExplorer__ivContainerTitle__3P9q4 > * { + background-color: #fff; } + .LeagueIvExplorer__ivsContainer__7fSaL .title.LeagueIvExplorer__ivContainerTitle__3P9q4 > *:first-child { + margin-right: auto; + padding: 0 0.5em; } + .LeagueIvExplorer__ivsContainer__7fSaL .title.LeagueIvExplorer__ivContainerTitle__3P9q4 > *:last-child { + padding-right: 0.5em; } + .LeagueIvExplorer__ivsContainer__7fSaL.LeagueIvExplorer__diplayingIvList__3vrin { + padding: 1.5rem 0 0; } + .LeagueIvExplorer__ivsContainer__7fSaL.LeagueIvExplorer__diplayingIvList__3vrin .title.LeagueIvExplorer__ivContainerTitle__3P9q4 { + margin-bottom: 0; + margin-right: -8px; + margin-left: -8px; + padding: 0 2.5rem; } + +.TypeIndicator__pokemonType__1rrg9 { + text-transform: uppercase; } + .TypeIndicator__pokemonType__1rrg9.nes-container { + text-align: center; + padding: 0; + font-size: 0.7em; + line-height: 0.9; + flex-basis: 50%; + margin: 0.5rem 7px 11px; } + .TypeIndicator__pokemonType__1rrg9.normal { + color: #fff; + background-color: #a8a878; } + .TypeIndicator__pokemonType__1rrg9.normal::after { + box-shadow: 0 -4px #a8a878, 0 -8px, 4px 0 #a8a878, 4px -4px, 8px 0, 0 4px #a8a878, 0 8px, -4px 0 #a8a878, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.fighting { + color: #fff; + background-color: #c03028; } + .TypeIndicator__pokemonType__1rrg9.fighting::after { + box-shadow: 0 -4px #c03028, 0 -8px, 4px 0 #c03028, 4px -4px, 8px 0, 0 4px #c03028, 0 8px, -4px 0 #c03028, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.flying { + color: #fff; + background-color: #a890f0; } + .TypeIndicator__pokemonType__1rrg9.flying::after { + box-shadow: 0 -4px #a890f0, 0 -8px, 4px 0 #a890f0, 4px -4px, 8px 0, 0 4px #a890f0, 0 8px, -4px 0 #a890f0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.poison { + color: #fff; + background-color: #a040a0; } + .TypeIndicator__pokemonType__1rrg9.poison::after { + box-shadow: 0 -4px #a040a0, 0 -8px, 4px 0 #a040a0, 4px -4px, 8px 0, 0 4px #a040a0, 0 8px, -4px 0 #a040a0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.ground { + color: #fff; + background-color: #e0c068; } + .TypeIndicator__pokemonType__1rrg9.ground::after { + box-shadow: 0 -4px #e0c068, 0 -8px, 4px 0 #e0c068, 4px -4px, 8px 0, 0 4px #e0c068, 0 8px, -4px 0 #e0c068, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.rock { + color: #fff; + background-color: #b8a038; } + .TypeIndicator__pokemonType__1rrg9.rock::after { + box-shadow: 0 -4px #b8a038, 0 -8px, 4px 0 #b8a038, 4px -4px, 8px 0, 0 4px #b8a038, 0 8px, -4px 0 #b8a038, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.bug { + color: #fff; + background-color: #a8b820; } + .TypeIndicator__pokemonType__1rrg9.bug::after { + box-shadow: 0 -4px #a8b820, 0 -8px, 4px 0 #a8b820, 4px -4px, 8px 0, 0 4px #a8b820, 0 8px, -4px 0 #a8b820, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.ghost { + color: #fff; + background-color: #705898; } + .TypeIndicator__pokemonType__1rrg9.ghost::after { + box-shadow: 0 -4px #705898, 0 -8px, 4px 0 #705898, 4px -4px, 8px 0, 0 4px #705898, 0 8px, -4px 0 #705898, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.steel { + color: #fff; + background-color: #b8b8d0; } + .TypeIndicator__pokemonType__1rrg9.steel::after { + box-shadow: 0 -4px #b8b8d0, 0 -8px, 4px 0 #b8b8d0, 4px -4px, 8px 0, 0 4px #b8b8d0, 0 8px, -4px 0 #b8b8d0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.fire { + color: #fff; + background-color: #f08030; } + .TypeIndicator__pokemonType__1rrg9.fire::after { + box-shadow: 0 -4px #f08030, 0 -8px, 4px 0 #f08030, 4px -4px, 8px 0, 0 4px #f08030, 0 8px, -4px 0 #f08030, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.water { + color: #fff; + background-color: #6890f0; } + .TypeIndicator__pokemonType__1rrg9.water::after { + box-shadow: 0 -4px #6890f0, 0 -8px, 4px 0 #6890f0, 4px -4px, 8px 0, 0 4px #6890f0, 0 8px, -4px 0 #6890f0, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.grass { + color: #fff; + background-color: #78c850; } + .TypeIndicator__pokemonType__1rrg9.grass::after { + box-shadow: 0 -4px #78c850, 0 -8px, 4px 0 #78c850, 4px -4px, 8px 0, 0 4px #78c850, 0 8px, -4px 0 #78c850, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.electric { + color: #fff; + background-color: #f8d030; } + .TypeIndicator__pokemonType__1rrg9.electric::after { + box-shadow: 0 -4px #f8d030, 0 -8px, 4px 0 #f8d030, 4px -4px, 8px 0, 0 4px #f8d030, 0 8px, -4px 0 #f8d030, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.psychic { + color: #fff; + background-color: #f85888; } + .TypeIndicator__pokemonType__1rrg9.psychic::after { + box-shadow: 0 -4px #f85888, 0 -8px, 4px 0 #f85888, 4px -4px, 8px 0, 0 4px #f85888, 0 8px, -4px 0 #f85888, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.ice { + color: #fff; + background-color: #98d8d8; } + .TypeIndicator__pokemonType__1rrg9.ice::after { + box-shadow: 0 -4px #98d8d8, 0 -8px, 4px 0 #98d8d8, 4px -4px, 8px 0, 0 4px #98d8d8, 0 8px, -4px 0 #98d8d8, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.dragon { + color: #fff; + background-color: #6f35fc; } + .TypeIndicator__pokemonType__1rrg9.dragon::after { + box-shadow: 0 -4px #6f35fc, 0 -8px, 4px 0 #6f35fc, 4px -4px, 8px 0, 0 4px #6f35fc, 0 8px, -4px 0 #6f35fc, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.dark { + color: #fff; + background-color: #705848; } + .TypeIndicator__pokemonType__1rrg9.dark::after { + box-shadow: 0 -4px #705848, 0 -8px, 4px 0 #705848, 4px -4px, 8px 0, 0 4px #705848, 0 8px, -4px 0 #705848, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + .TypeIndicator__pokemonType__1rrg9.fairy { + color: #fff; + background-color: #ee99ac; } + .TypeIndicator__pokemonType__1rrg9.fairy::after { + box-shadow: 0 -4px #ee99ac, 0 -8px, 4px 0 #ee99ac, 4px -4px, 8px 0, 0 4px #ee99ac, 0 8px, -4px 0 #ee99ac, -4px 4px, -8px 0, -4px -4px, 4px 4px; } + +.PokemonDisplay__highlight__2zbxz { + color: #fff; + pointer-events: none; } + +.PokemonDisplay__pokemonInfoWrapper__1gaDq { + margin-bottom: 1rem; } + +.PokemonDisplay__pokemonInfoLeftColumn__22kLA { } + +.PokemonDisplay__pokemonInfoRightColumn__3TFUR { } + +.PokemonDisplay__pokemonName__2XDXE { + margin-bottom: 0; } + +.PokemonDisplay__dexHeader___Uki8 { + margin-bottom: 0.25rem; } + +.PokemonDisplay__pokemonTypeWrapper__2GdkI { + display: flex; + justify-content: center; + align-self: stretch; } + +.PokemonDisplay__formHeader__2EgEf { + text-transform: uppercase; + margin-bottom: 0; } + +.PokemonDisplay__pokemonBaseStats__e699B { + display: flex; + flex-flow: column nowrap; + align-items: start; + align-self: stretch; } .PokemonSelectList__leftPanel__2ktnA { font-size: 0.8rem; @@ -498,5 +435,69 @@ .PokemonSelectList__form__VIw8Q { flex: 0 1 100%; } +.TypeEffectiveDisplay__multiplierWrapper__1E9zx { + position: relative; + z-index: 0; + padding-top: 6px; + padding-right: 6px; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx > * { + position: absolute; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx :nth-child(1) { + position: inherit; + z-index: 3; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx :nth-child(2) { + top: 0; + left: 6px; + z-index: 2; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx :nth-child(3) { + left: 12px; + z-index: 1; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx :nth-child(4) { + left: 18px; + z-index: 0; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX3__3LBbd { + padding-top: 12px; + padding-right: 12px; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX3__3LBbd :nth-child(3) { + top: 0; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX3__3LBbd :nth-child(2) { + top: 6px; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX4__iKCza { + padding-top: 18px; + padding-right: 18px; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX4__iKCza :nth-child(4) { + top: 0; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX4__iKCza :nth-child(3) { + top: 6px; } + .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX4__iKCza :nth-child(2) { + top: 12px; } + +.TypeEffectiveDisplay__wrapper__1DgN_ { + margin: 0 1em; } + .TypeEffectiveDisplay__wrapper__1DgN_ * + h4 { + margin-top: 1em; } + .TypeEffectiveDisplay__wrapper__1DgN_ h4 p { + font-size: 0.7em; + color: #b6b6b6; + margin: 0; } + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n { + display: flex; + flex-flow: row wrap; + align-items: end; } + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n > * { + margin-right: 14px; + height: 0%; } + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n .TypeEffectiveDisplay__multiplierWrapper__1E9zx { + width: auto; + margin-right: 2px; } + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX3__3LBbd { + margin-right: -4px; } + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n .TypeEffectiveDisplay__multiplierWrapper__1E9zx.TypeEffectiveDisplay__multiplierWrapperX4__iKCza { + margin-right: -10px; } + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n > *, + .TypeEffectiveDisplay__wrapper__1DgN_ .TypeEffectiveDisplay__indicatorWrapper__wJ82n .TypeEffectiveDisplay__multiplierWrapper__1E9zx > * { + flex-basis: unset; + width: 6.75rem; } + /*# sourceMappingURL=main.tmp.css.map*/ \ No newline at end of file diff --git a/dist/main-bundle.js b/dist/main-bundle.js index 2d31870..a104260 100644 --- a/dist/main-bundle.js +++ b/dist/main-bundle.js @@ -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/PokemonExplorer/LeagueStatsList.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/LeagueStatsList.tsx (referenced with cjs require), ./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx (referenced with cjs require) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -36849,23 +36849,25 @@ var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts"); -var ActionsPokemonExplorer = __importStar(__webpack_require__(/*! ./components/PokemonExplorer/actions */ "./src/ts/app/components/PokemonExplorer/actions.ts")); +var ActionsPokemonExplorer = __importStar(__webpack_require__(/*! app/actions */ "./src/ts/app/actions.ts")); -var ActionsPokemonSelectList = __importStar(__webpack_require__(/*! ./components/PokemonSelectList/actions */ "./src/ts/app/components/PokemonSelectList/actions.ts")); +var ActionsPokemonSelectList = __importStar(__webpack_require__(/*! app/components/PokemonSelectList/actions */ "./src/ts/app/components/PokemonSelectList/actions.ts")); -var Footer_1 = __webpack_require__(/*! ./components/Footer */ "./src/ts/app/components/Footer.tsx"); +var Footer_1 = __webpack_require__(/*! app/components/Footer */ "./src/ts/app/components/Footer.tsx"); -var Header_1 = __webpack_require__(/*! ./components/Header */ "./src/ts/app/components/Header.tsx"); +var Header_1 = __webpack_require__(/*! app/components/Header */ "./src/ts/app/components/Header.tsx"); -var PokemonExplorer_1 = __webpack_require__(/*! ./components/PokemonExplorer/PokemonExplorer */ "./src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx"); +var LeagueIvExplorer_1 = __webpack_require__(/*! app/components/LeagueIvExplorer */ "./src/ts/app/components/LeagueIvExplorer.tsx"); -var TypeEffectiveDisplay_1 = __webpack_require__(/*! ./components/PokemonExplorer/TypeEffectiveDisplay */ "./src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx"); +var PokemonDisplay_1 = __webpack_require__(/*! app/components/PokemonDisplay */ "./src/ts/app/components/PokemonDisplay.tsx"); -var PokemonSelectList_1 = __webpack_require__(/*! ./components/PokemonSelectList/PokemonSelectList */ "./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx"); +var PokemonSelectList_1 = __webpack_require__(/*! app/components/PokemonSelectList/PokemonSelectList */ "./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx"); + +var TypeEffectiveDisplay_1 = __webpack_require__(/*! app/components/TypeEffectiveDisplay */ "./src/ts/app/components/TypeEffectiveDisplay.tsx"); var navigation_1 = __webpack_require__(/*! app/utils/navigation */ "./src/ts/app/utils/navigation.ts"); -var styles = __importStar(__webpack_require__(/*! ./styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss")); var PokemonApp = /*#__PURE__*/ @@ -36891,9 +36893,33 @@ function (_react_1$default$Comp) { }); }; - _this.handleTypesClick = function () { + _this.handlePvpClick = function () { + var widgets = _this.state.widgets; + _this.setState({ - activeNavigation: _this.state.activeNavigation !== 'types' ? 'types' : null + widgets: Object.assign({}, widgets, { + pvp: !widgets.pvp + }) + }); + }; + + _this.handleTypesClick = function () { + var widgets = _this.state.widgets; + + _this.setState({ + widgets: Object.assign({}, widgets, { + types: !widgets.types + }) + }); + }; + + _this.handleMovesClick = function () { + var widgets = _this.state.widgets; + + _this.setState({ + widgets: Object.assign({}, widgets, { + moves: !widgets.moves + }) }); }; @@ -36966,7 +36992,12 @@ function (_react_1$default$Comp) { }; _this.state = { - activeNavigation: null + activeNavigation: null, + widgets: { + pvp: true, + types: false, + moves: false + } }; return _this; } @@ -37024,41 +37055,47 @@ function (_react_1$default$Comp) { league = _this$props$pokemonEx.league, individualValues = _this$props$pokemonEx.individualValues, leaguePokemon = _this$props$pokemonEx.leaguePokemon; - var activeNavigation = this.state.activeNavigation; + var _this$state = this.state, + activeNavigation = _this$state.activeNavigation, + widgets = _this$state.widgets; var isOverlayShown = activeNavigation === 'pokedex'; var wrapperCss = classnames_1.default(styles.wrapper, _defineProperty({}, styles.overlaid, isOverlayShown)); var leftNavCss = classnames_1.default(styles.leftNavigation); + var displayWrapperCss = classnames_1.default(styles.displayWrapper); var iconCss = classnames_1.default('icon', 'pixel', 'sprite'); var pokedexCss = classnames_1.default(iconCss, 'pokedex', { active: activeNavigation === 'pokedex' }); var pokedexButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, activeNavigation === 'pokedex')); var pvpCss = classnames_1.default(iconCss, 'pvp', { - active: activeNavigation === 'pvp' + active: widgets.pvp }); - var pvpButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, activeNavigation === 'pvp')); + var pvpButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, widgets.pvp)); var badgeCss = classnames_1.default(iconCss, 'badge', { - active: activeNavigation === 'types' + active: widgets.types }); - var badgeButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, activeNavigation === 'types')); + var badgeButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, widgets.types)); var tmCss = classnames_1.default(iconCss, 'tm', { - active: activeNavigation === 'moves' + active: widgets.moves }); - var tmButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, activeNavigation === 'moves')); + var tmButtonCss = classnames_1.default(_defineProperty({}, styles.activeNavigationButton, widgets.moves)); return react_1.default.createElement("div", { className: wrapperCss }, react_1.default.createElement(Header_1.Header, null), react_1.default.createElement("div", { className: styles.body - }, leaguePokemon !== null && react_1.default.createElement(PokemonExplorer_1.PokemonExplorer, { - temporaryNavigationIsActive: isOverlayShown, - isLoading: this.props.pokemonExplorerState.isLoading, + }, react_1.default.createElement("div", { + className: displayWrapperCss + }, leaguePokemon !== null && react_1.default.createElement(PokemonDisplay_1.PokemonDisplay, { + leaguePokemon: leaguePokemon, + temporaryNavigationIsActive: isOverlayShown + }), widgets.pvp && leaguePokemon !== null && react_1.default.createElement(LeagueIvExplorer_1.LeagueIvExplorer, { activeLeague: league, leaguePokemon: leaguePokemon, individualValues: individualValues, handleChangeIndividualValue: this.handleChangeIndividualValue, handleMaximizeLevel: this.handleMaximizeLevel, - handleChangeLeague: this.handleChangeLeagueNavigation - }), activeNavigation === 'types' && leaguePokemon !== null && react_1.default.createElement(TypeEffectiveDisplay_1.TypeEffectiveDisplay, { + handleChangeLeague: this.handleChangeLeague + })), widgets.types && leaguePokemon !== null && react_1.default.createElement(TypeEffectiveDisplay_1.TypeEffectiveDisplay, { effectiveness: leaguePokemon.effectiveness, pokemonName: leaguePokemon.name }), react_1.default.createElement("div", { @@ -37070,7 +37107,7 @@ function (_react_1$default$Comp) { className: pokedexCss })), react_1.default.createElement("button", { className: pvpButtonCss, - onClick: this.handleTypesClick + onClick: this.handlePvpClick }, react_1.default.createElement("i", { className: pvpCss })), react_1.default.createElement("button", { @@ -37080,7 +37117,7 @@ function (_react_1$default$Comp) { className: badgeCss })), react_1.default.createElement("button", { className: tmButtonCss, - onClick: this.handleTypesClick + onClick: this.handleMovesClick }, react_1.default.createElement("i", { className: tmCss }))), isOverlayShown && react_1.default.createElement("div", { @@ -37125,6 +37162,177 @@ exports.ConnectedPokemonApp = react_redux_1.connect(mapStateToProps, mapDispatch /***/ }), +/***/ "./src/ts/app/actions.ts": +/*!*******************************!*\ + !*** ./src/ts/app/actions.ts ***! + \*******************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _this = this; + +var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var typesafe_actions_1 = __webpack_require__(/*! typesafe-actions */ "./node_modules/typesafe-actions/dist/index.umd.js"); + +var types_1 = __webpack_require__(/*! app/types */ "./src/ts/app/types.ts"); + +var calculator_1 = __webpack_require__(/*! app/utils/calculator */ "./src/ts/app/utils/calculator.ts"); + +exports.setIsLoading = function (isLoading) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IS_LOADING, { + isLoading: isLoading + }); +}; + +exports.setMaxPossibleStats = function (maxStats) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_MAX_STATS, { + maxStats: maxStats + }); +}; + +exports.setLeaguePokemon = function (leaguePokemon) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_LEAGUE_POKEMON, { + leaguePokemon: leaguePokemon + }); +}; + +exports.setIvLevel = function (level) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_LEVEL, { + level: level + }); +}; + +exports.setIvHp = function (ivHp) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_HP, { + ivHp: ivHp + }); +}; + +exports.setIvAtk = function (ivAtk) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_ATK, { + ivAtk: ivAtk + }); +}; + +exports.setIvDef = function (ivDef) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_DEF, { + ivDef: ivDef + }); +}; + +exports.setActiveLeague = function (league) { + return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_ACTIVE_LEAGUE, { + league: league + }); +}; + +exports.fetchConfig = function () { + return function (dispatch, getState, extraArguments) { + return __awaiter(_this, void 0, void 0, + /*#__PURE__*/ + regeneratorRuntime.mark(function _callee() { + var config; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return extraArguments.services.pokemonService.getConfig(); + + case 2: + config = _context.sent; + dispatch(exports.setMaxPossibleStats(config.maxPossibleStats)); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + }; +}; + +exports.maximizeLevel = function () { + return function (dispatch, getState, extraArguments) { + return __awaiter(_this, void 0, void 0, + /*#__PURE__*/ + regeneratorRuntime.mark(function _callee2() { + var pokemonExplorerState, _pokemonExplorerState, ivHp, ivAtk, ivDef, pokemonLeagueValues, statsSet; + + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + pokemonExplorerState = getState().pokemonExplorerState; + _pokemonExplorerState = pokemonExplorerState.individualValues, ivHp = _pokemonExplorerState.ivHp, ivAtk = _pokemonExplorerState.ivAtk, ivDef = _pokemonExplorerState.ivDef; + + if (pokemonExplorerState.leaguePokemon !== null) { + pokemonLeagueValues = pokemonExplorerState.leaguePokemon.pvp[pokemonExplorerState.league]; + statsSet = pokemonLeagueValues.some(function (stats) { + if ((ivHp === null || stats.ivHp === ivHp) && (ivAtk === null || stats.ivAtk === ivAtk) && (ivDef === null || stats.ivDef === ivDef)) { + dispatch(exports.setIvHp(stats.ivHp)); + dispatch(exports.setIvAtk(stats.ivAtk)); + dispatch(exports.setIvDef(stats.ivDef)); + dispatch(exports.setIvLevel(stats.level)); + return true; + } + + return false; + }); + + if (!statsSet && ivHp !== null && ivAtk !== null && ivDef !== null) { + dispatch(exports.setIvLevel(calculator_1.calculateMaxLevelForLeague(pokemonExplorerState.leaguePokemon.stats, ivHp, ivAtk, ivDef, pokemonExplorerState.league))); + } + } + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + }; +}; + +/***/ }), + /***/ "./src/ts/app/components/Footer.tsx": /*!******************************************!*\ !*** ./src/ts/app/components/Footer.tsx ***! @@ -37176,7 +37384,7 @@ Object.defineProperty(exports, "__esModule", { var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); -var styles = __importStar(__webpack_require__(/*! ../styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss")); var Footer = /*#__PURE__*/ @@ -37260,7 +37468,7 @@ var react_router_dom_1 = __webpack_require__(/*! react-router-dom */ "./node_mod var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); -var styles = __importStar(__webpack_require__(/*! ../styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss")); var Header = /*#__PURE__*/ @@ -37301,10 +37509,10 @@ exports.Header = Header; /***/ }), -/***/ "./src/ts/app/components/PokemonExplorer/IvForm.tsx": -/*!**********************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/IvForm.tsx ***! - \**********************************************************/ +/***/ "./src/ts/app/components/IvForm.tsx": +/*!******************************************!*\ + !*** ./src/ts/app/components/IvForm.tsx ***! + \******************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { @@ -37354,7 +37562,7 @@ var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/r var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); -var styles = __importStar(__webpack_require__(/*! ./styles/IvForm.scss */ "./src/ts/app/components/PokemonExplorer/styles/IvForm.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/IvForm.scss */ "./src/ts/app/styles/IvForm.scss")); var IvForm = /*#__PURE__*/ @@ -37519,10 +37727,10 @@ exports.IvForm = IvForm; /***/ }), -/***/ "./src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx": -/*!********************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx ***! - \********************************************************************/ +/***/ "./src/ts/app/components/LeagueIvExplorer.tsx": +/*!****************************************************!*\ + !*** ./src/ts/app/components/LeagueIvExplorer.tsx ***! + \****************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { @@ -37580,15 +37788,15 @@ 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/PokemonExplorer/IvForm.tsx"); +var IvForm_1 = __webpack_require__(/*! ./IvForm */ "./src/ts/app/components/IvForm.tsx"); -var LeagueSelector_1 = __webpack_require__(/*! ./LeagueSelector */ "./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx"); +var LeagueSelector_1 = __webpack_require__(/*! ./LeagueSelector */ "./src/ts/app/components/LeagueSelector.tsx"); -var LeagueStatsList_1 = __webpack_require__(/*! ./LeagueStatsList */ "./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx"); +var LeagueStatsList_1 = __webpack_require__(/*! ./LeagueStatsList */ "./src/ts/app/components/LeagueStatsList.tsx"); -var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/PokemonExplorer/StatDisplay.tsx"); +var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/StatDisplay.tsx"); -var styles = __importStar(__webpack_require__(/*! ./styles/LeagueIvExplorer.scss */ "./src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/LeagueIvExplorer.scss */ "./src/ts/app/styles/LeagueIvExplorer.scss")); var IvDisplayMode; @@ -37789,10 +37997,10 @@ exports.LeagueIvExplorer = LeagueIvExplorer; /***/ }), -/***/ "./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx": -/*!******************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx ***! - \******************************************************************/ +/***/ "./src/ts/app/components/LeagueSelector.tsx": +/*!**************************************************!*\ + !*** ./src/ts/app/components/LeagueSelector.tsx ***! + \**************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { @@ -37844,7 +38052,7 @@ var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts"); -var styles = __importStar(__webpack_require__(/*! ./styles/LeagueSelector.scss */ "./src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/LeagueSelector.scss */ "./src/ts/app/styles/LeagueSelector.scss")); var LeagueSelector = /*#__PURE__*/ @@ -37926,10 +38134,10 @@ exports.LeagueSelector = LeagueSelector; /***/ }), -/***/ "./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx": -/*!*******************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx ***! - \*******************************************************************/ +/***/ "./src/ts/app/components/LeagueStatsList.tsx": +/*!***************************************************!*\ + !*** ./src/ts/app/components/LeagueStatsList.tsx ***! + \***************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { @@ -37987,7 +38195,7 @@ var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/models/Pokemon.ts"); -var styles = __importStar(__webpack_require__(/*! ./styles/LeagueStatsList.scss */ "./src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/LeagueStatsList.scss */ "./src/ts/app/styles/LeagueStatsList.scss")); var LeagueStatsList = /*#__PURE__*/ @@ -38150,10 +38358,10 @@ exports.LeagueStatsList = LeagueStatsList; /***/ }), -/***/ "./src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx": -/*!******************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx ***! - \******************************************************************/ +/***/ "./src/ts/app/components/PokemonDisplay.tsx": +/*!**************************************************!*\ + !*** ./src/ts/app/components/PokemonDisplay.tsx ***! + \**************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { @@ -38209,11 +38417,11 @@ 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/PokemonExplorer/StatDisplay.tsx"); +var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/StatDisplay.tsx"); -var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/PokemonExplorer/TypeIndicator.tsx"); +var TypeIndicator_1 = __webpack_require__(/*! ./TypeIndicator */ "./src/ts/app/components/TypeIndicator.tsx"); -var styles = __importStar(__webpack_require__(/*! ./styles/PokemonDisplay.scss */ "./src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss")); +var styles = __importStar(__webpack_require__(/*! app/styles/PokemonDisplay.scss */ "./src/ts/app/styles/PokemonDisplay.scss")); var PokemonDisplay = /*#__PURE__*/ @@ -38333,929 +38541,6 @@ exports.PokemonDisplay = PokemonDisplay; /***/ }), -/***/ "./src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx": -/*!*******************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/PokemonExplorer.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 LeagueIvExplorer_1 = __webpack_require__(/*! ./LeagueIvExplorer */ "./src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx"); - -var PokemonDisplay_1 = __webpack_require__(/*! ./PokemonDisplay */ "./src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx"); - -var styles = __importStar(__webpack_require__(/*! ./styles/PokemonExplorer.scss */ "./src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss")); - -var PokemonExplorer = -/*#__PURE__*/ -function (_react_1$default$Comp) { - _inherits(PokemonExplorer, _react_1$default$Comp); - - function PokemonExplorer() { - _classCallCheck(this, PokemonExplorer); - - return _possibleConstructorReturn(this, _getPrototypeOf(PokemonExplorer).apply(this, arguments)); - } - - _createClass(PokemonExplorer, [{ - key: "render", - value: function render() { - var _this$props = this.props, - temporaryNavigationIsActive = _this$props.temporaryNavigationIsActive, - className = _this$props.className, - activeLeague = _this$props.activeLeague, - individualValues = _this$props.individualValues, - leaguePokemon = _this$props.leaguePokemon, - handleChangeLeague = _this$props.handleChangeLeague, - handleChangeIndividualValue = _this$props.handleChangeIndividualValue, - handleMaximizeLevel = _this$props.handleMaximizeLevel; - var wrapperCss = classnames_1.default(styles.wrapper, className); - return react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("div", { - className: wrapperCss - }, react_1.default.createElement(PokemonDisplay_1.PokemonDisplay, { - leaguePokemon: leaguePokemon, - temporaryNavigationIsActive: temporaryNavigationIsActive - }), react_1.default.createElement(LeagueIvExplorer_1.LeagueIvExplorer, { - activeLeague: activeLeague, - leaguePokemon: leaguePokemon, - individualValues: individualValues, - handleChangeIndividualValue: handleChangeIndividualValue, - handleMaximizeLevel: handleMaximizeLevel, - handleChangeLeague: handleChangeLeague - }))); - } - }]); - - return PokemonExplorer; -}(react_1.default.Component); - -exports.PokemonExplorer = PokemonExplorer; - -/***/ }), - -/***/ "./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__(/*! ./styles/StatDisplay.scss */ "./src/ts/app/components/PokemonExplorer/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__(/*! ./styles/TypeEffectiveDisplay.scss */ "./src/ts/app/components/PokemonExplorer/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) { - typeIndicator = react_1.default.createElement(TypeIndicator_1.TypeIndicator, { - key: key, - className: "test", - 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__(/*! ./styles/TypeIndicator.scss */ "./src/ts/app/components/PokemonExplorer/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 ***! - \**********************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _this = this; - -var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : new P(function (resolve) { - resolve(result.value); - }).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var typesafe_actions_1 = __webpack_require__(/*! typesafe-actions */ "./node_modules/typesafe-actions/dist/index.umd.js"); - -var types_1 = __webpack_require__(/*! ./types */ "./src/ts/app/components/PokemonExplorer/types.ts"); - -var calculator_1 = __webpack_require__(/*! app/utils/calculator */ "./src/ts/app/utils/calculator.ts"); - -exports.setIsLoading = function (isLoading) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IS_LOADING, { - isLoading: isLoading - }); -}; - -exports.setMaxPossibleStats = function (maxStats) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_MAX_STATS, { - maxStats: maxStats - }); -}; - -exports.setLeaguePokemon = function (leaguePokemon) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_LEAGUE_POKEMON, { - leaguePokemon: leaguePokemon - }); -}; - -exports.setIvLevel = function (level) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_LEVEL, { - level: level - }); -}; - -exports.setIvHp = function (ivHp) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_HP, { - ivHp: ivHp - }); -}; - -exports.setIvAtk = function (ivAtk) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_ATK, { - ivAtk: ivAtk - }); -}; - -exports.setIvDef = function (ivDef) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_DEF, { - ivDef: ivDef - }); -}; - -exports.setActiveLeague = function (league) { - return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_ACTIVE_LEAGUE, { - league: league - }); -}; - -exports.fetchConfig = function () { - return function (dispatch, getState, extraArguments) { - return __awaiter(_this, void 0, void 0, - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee() { - var config; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return extraArguments.services.pokemonService.getConfig(); - - case 2: - config = _context.sent; - dispatch(exports.setMaxPossibleStats(config.maxPossibleStats)); - - case 4: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - }; -}; - -exports.maximizeLevel = function () { - return function (dispatch, getState, extraArguments) { - return __awaiter(_this, void 0, void 0, - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2() { - var pokemonExplorerState, _pokemonExplorerState, ivHp, ivAtk, ivDef, pokemonLeagueValues, statsSet; - - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - pokemonExplorerState = getState().pokemonExplorerState; - _pokemonExplorerState = pokemonExplorerState.individualValues, ivHp = _pokemonExplorerState.ivHp, ivAtk = _pokemonExplorerState.ivAtk, ivDef = _pokemonExplorerState.ivDef; - - if (pokemonExplorerState.leaguePokemon !== null) { - pokemonLeagueValues = pokemonExplorerState.leaguePokemon.pvp[pokemonExplorerState.league]; - statsSet = pokemonLeagueValues.some(function (stats) { - if ((ivHp === null || stats.ivHp === ivHp) && (ivAtk === null || stats.ivAtk === ivAtk) && (ivDef === null || stats.ivDef === ivDef)) { - dispatch(exports.setIvHp(stats.ivHp)); - dispatch(exports.setIvAtk(stats.ivAtk)); - dispatch(exports.setIvDef(stats.ivDef)); - dispatch(exports.setIvLevel(stats.level)); - return true; - } - - return false; - }); - - if (!statsSet && ivHp !== null && ivAtk !== null && ivDef !== null) { - dispatch(exports.setIvLevel(calculator_1.calculateMaxLevelForLeague(pokemonExplorerState.leaguePokemon.stats, ivHp, ivAtk, ivDef, pokemonExplorerState.league))); - } - } - - case 3: - case "end": - return _context2.stop(); - } - } - }, _callee2); - })); - }; -}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/reducers.ts": -/*!***********************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/reducers.ts ***! - \***********************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts"); - -var types_1 = __webpack_require__(/*! ./types */ "./src/ts/app/components/PokemonExplorer/types.ts"); - -exports.initialState = { - isLoading: false, - leaguePokemon: null, - maxPossibleStats: { - baseStamina: 0, - baseAttack: 0, - baseDefense: 0, - level: 0 - }, - individualValues: { - level: null, - ivHp: null, - ivAtk: null, - ivDef: null - }, - league: League_1.League.GREAT -}; - -var reduceSetIsLoading = function reduceSetIsLoading(state, action) { - return Object.assign({}, state, { - isLoading: action.payload.isLoading - }); -}; - -var reduceSetMaxPossibleStats = function reduceSetMaxPossibleStats(state, action) { - return Object.assign({}, state, { - maxPossibleStats: Object.assign({}, action.payload.maxStats) - }); -}; - -var reduceSetLeaguePokemon = function reduceSetLeaguePokemon(state, action) { - return Object.assign({}, state, { - leaguePokemon: action.payload.leaguePokemon - }); -}; - -var reduceSetIvLevel = function reduceSetIvLevel(state, action) { - return Object.assign({}, state, { - individualValues: Object.assign({}, state.individualValues, { - level: action.payload.level - }) - }); -}; - -var reduceSetIvHp = function reduceSetIvHp(state, action) { - return Object.assign({}, state, { - individualValues: Object.assign({}, state.individualValues, { - ivHp: action.payload.ivHp - }) - }); -}; - -var reduceSetIvAtk = function reduceSetIvAtk(state, action) { - return Object.assign({}, state, { - individualValues: Object.assign({}, state.individualValues, { - ivAtk: action.payload.ivAtk - }) - }); -}; - -var reduceSetIvDef = function reduceSetIvDef(state, action) { - return Object.assign({}, state, { - individualValues: Object.assign({}, state.individualValues, { - ivDef: action.payload.ivDef - }) - }); -}; - -var reduceSetActiveLeague = function reduceSetActiveLeague(state, action) { - return Object.assign({}, state, { - league: action.payload.league - }); -}; - -exports.PokemonExplorerReducers = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : exports.initialState; - var action = arguments.length > 1 ? arguments[1] : undefined; - - switch (action.type) { - case types_1.PokemonExplorerActionTypes.SET_IS_LOADING: - return reduceSetIsLoading(state, action); - - case types_1.PokemonExplorerActionTypes.SET_MAX_STATS: - return reduceSetMaxPossibleStats(state, action); - - case types_1.PokemonExplorerActionTypes.SET_LEAGUE_POKEMON: - return reduceSetLeaguePokemon(state, action); - - case types_1.PokemonExplorerActionTypes.SET_IV_LEVEL: - return reduceSetIvLevel(state, action); - - case types_1.PokemonExplorerActionTypes.SET_IV_HP: - return reduceSetIvHp(state, action); - - case types_1.PokemonExplorerActionTypes.SET_IV_ATK: - return reduceSetIvAtk(state, action); - - case types_1.PokemonExplorerActionTypes.SET_IV_DEF: - return reduceSetIvDef(state, action); - - case types_1.PokemonExplorerActionTypes.SET_ACTIVE_LEAGUE: - return reduceSetActiveLeague(state, action); - - default: - return state; - } -}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/IvForm.scss": -/*!******************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/IvForm.scss ***! - \******************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"ivInput":"IvForm__ivInput__xR5IU","levelInput":"IvForm__levelInput__1n6We","fieldRow":"IvForm__fieldRow__3HcBN"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss": -/*!****************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss ***! - \****************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"container":"LeagueIvExplorer__container__3GKct PokemonExplorer__container__3LR-_","leftColumn":"LeagueIvExplorer__leftColumn__3au0L PokemonExplorer__leftColumn__1qHS1","rightColumn":"LeagueIvExplorer__rightColumn__1eyvh PokemonExplorer__rightColumn__KvY23","leaguePokemonRank":"LeagueIvExplorer__leaguePokemonRank__3bjyU","pokemonInfoWrapper":"LeagueIvExplorer__pokemonInfoWrapper__3WVsh","pokemonRankValue":"LeagueIvExplorer__pokemonRankValue__3k3ih","ivsContainer":"LeagueIvExplorer__ivsContainer__31sfb","ivContainerTitle":"LeagueIvExplorer__ivContainerTitle__3Z3eX","diplayingIvList":"LeagueIvExplorer__diplayingIvList__1Q5r8"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss": -/*!**************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss ***! - \**************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"wrapper":"LeagueSelector__wrapper__fxmRz","leagueRadioLabel":"LeagueSelector__leagueRadioLabel__3aPV9","leagueRadio":"LeagueSelector__leagueRadio__3hY7B"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss": -/*!***************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss ***! - \***************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"selectList":"LeagueStatsList__selectList__1FBIL","listItem":"LeagueStatsList__listItem__oCOvr"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss": -/*!**************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss ***! - \**************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"highlight":"PokemonDisplay__highlight__h50BA PokemonApp__highlight__1zywH","pokemonInfoWrapper":"PokemonDisplay__pokemonInfoWrapper__3AW3e PokemonExplorer__container__3LR-_","pokemonInfoLeftColumn":"PokemonDisplay__pokemonInfoLeftColumn__1vugM PokemonExplorer__leftColumn__1qHS1","pokemonInfoRightColumn":"PokemonDisplay__pokemonInfoRightColumn__27Q49 PokemonExplorer__rightColumn__KvY23","pokemonName":"PokemonDisplay__pokemonName__WBKbk","dexHeader":"PokemonDisplay__dexHeader__2HVfr","pokemonTypeWrapper":"PokemonDisplay__pokemonTypeWrapper__1rJIA","formHeader":"PokemonDisplay__formHeader__1pr6M","pokemonBaseStats":"PokemonDisplay__pokemonBaseStats__3UJvn"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss": -/*!***************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss ***! - \***************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"wrapper":"PokemonExplorer__wrapper__3U9Pu","container":"PokemonExplorer__container__3LR-_","leftColumn":"PokemonExplorer__leftColumn__1qHS1","rightColumn":"PokemonExplorer__rightColumn__KvY23"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss": -/*!***********************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss ***! - \***********************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"baseStatRow":"StatDisplay__baseStatRow__1B60A"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss": -/*!********************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss ***! - \********************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"multiplierWrapper":"TypeEffectiveDisplay__multiplierWrapper__14os7","multiplierWrapperX3":"TypeEffectiveDisplay__multiplierWrapperX3__1SBG1","multiplierWrapperX4":"TypeEffectiveDisplay__multiplierWrapperX4__2KqYa","wrapper":"TypeEffectiveDisplay__wrapper__1FFIj","indicatorWrapper":"TypeEffectiveDisplay__indicatorWrapper__2F3AY"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/styles/TypeIndicator.scss": -/*!*************************************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/styles/TypeIndicator.scss ***! - \*************************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"pokemonType":"TypeIndicator__pokemonType__3MOQI"}; - -/***/ }), - -/***/ "./src/ts/app/components/PokemonExplorer/types.ts": -/*!********************************************************!*\ - !*** ./src/ts/app/components/PokemonExplorer/types.ts ***! - \********************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PokemonExplorerActionTypes = { - SET_IS_LOADING: 'POKEMON_EXPLORER/SET_IS_LOADING', - SET_MAX_STATS: 'POKEMON_EXPLORER/SET_MAX_STATS', - SET_LEAGUE_POKEMON: 'POKEMON_EXPLORER/SET_LEAGUE_POKEMON', - SET_IV_LEVEL: 'POKEMON_EXPLORER/SET_IV_LEVEL', - SET_IV_HP: 'POKEMON_EXPLORER/SET_IV_HP', - SET_IV_ATK: 'POKEMON_EXPLORER/SET_IV_ATK', - SET_IV_DEF: 'POKEMON_EXPLORER/SET_IV_DEF', - SET_ACTIVE_LEAGUE: 'POKEMON_EXPLORER/SET_ACTIVE_LEAGUE' -}; - -/***/ }), - /***/ "./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx": /*!***********************************************************************!*\ !*** ./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx ***! @@ -39809,6 +39094,379 @@ 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) { + typeIndicator = react_1.default.createElement(TypeIndicator_1.TypeIndicator, { + key: key, + className: "test", + 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 ***! @@ -39854,15 +39512,15 @@ var redux_thunk_1 = __importDefault(__webpack_require__(/*! redux-thunk */ "./no var PokemonService_1 = __webpack_require__(/*! api/PokemonService */ "./src/ts/api/PokemonService.ts"); -var reducers_1 = __webpack_require__(/*! ./components/PokemonExplorer/reducers */ "./src/ts/app/components/PokemonExplorer/reducers.ts"); +var reducers_1 = __webpack_require__(/*! app/components/PokemonSelectList/reducers */ "./src/ts/app/components/PokemonSelectList/reducers.ts"); -var reducers_2 = __webpack_require__(/*! ./components/PokemonSelectList/reducers */ "./src/ts/app/components/PokemonSelectList/reducers.ts"); +var reducers_2 = __webpack_require__(/*! app/reducers */ "./src/ts/app/reducers.ts"); var PokemonApp_1 = __webpack_require__(/*! ./PokemonApp */ "./src/ts/app/PokemonApp.tsx"); exports.appReducers = Redux.combineReducers({ - pokemonSelectListState: reducers_2.PokemonSelectListReducers, - pokemonExplorerState: reducers_1.PokemonExplorerReducers + pokemonSelectListState: reducers_1.PokemonSelectListReducers, + pokemonExplorerState: reducers_2.PokemonExplorerReducers }); var extraArguments = { services: { @@ -40012,6 +39670,187 @@ exports.TypeOrder = [pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_NORMAL /***/ }), +/***/ "./src/ts/app/reducers.ts": +/*!********************************!*\ + !*** ./src/ts/app/reducers.ts ***! + \********************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts"); + +var types_1 = __webpack_require__(/*! app/types */ "./src/ts/app/types.ts"); + +exports.initialState = { + isLoading: false, + leaguePokemon: null, + maxPossibleStats: { + baseStamina: 0, + baseAttack: 0, + baseDefense: 0, + level: 0 + }, + individualValues: { + level: null, + ivHp: null, + ivAtk: null, + ivDef: null + }, + league: League_1.League.GREAT +}; + +var reduceSetIsLoading = function reduceSetIsLoading(state, action) { + return Object.assign({}, state, { + isLoading: action.payload.isLoading + }); +}; + +var reduceSetMaxPossibleStats = function reduceSetMaxPossibleStats(state, action) { + return Object.assign({}, state, { + maxPossibleStats: Object.assign({}, action.payload.maxStats) + }); +}; + +var reduceSetLeaguePokemon = function reduceSetLeaguePokemon(state, action) { + return Object.assign({}, state, { + leaguePokemon: action.payload.leaguePokemon + }); +}; + +var reduceSetIvLevel = function reduceSetIvLevel(state, action) { + return Object.assign({}, state, { + individualValues: Object.assign({}, state.individualValues, { + level: action.payload.level + }) + }); +}; + +var reduceSetIvHp = function reduceSetIvHp(state, action) { + return Object.assign({}, state, { + individualValues: Object.assign({}, state.individualValues, { + ivHp: action.payload.ivHp + }) + }); +}; + +var reduceSetIvAtk = function reduceSetIvAtk(state, action) { + return Object.assign({}, state, { + individualValues: Object.assign({}, state.individualValues, { + ivAtk: action.payload.ivAtk + }) + }); +}; + +var reduceSetIvDef = function reduceSetIvDef(state, action) { + return Object.assign({}, state, { + individualValues: Object.assign({}, state.individualValues, { + ivDef: action.payload.ivDef + }) + }); +}; + +var reduceSetActiveLeague = function reduceSetActiveLeague(state, action) { + return Object.assign({}, state, { + league: action.payload.league + }); +}; + +exports.PokemonExplorerReducers = function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : exports.initialState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case types_1.PokemonExplorerActionTypes.SET_IS_LOADING: + return reduceSetIsLoading(state, action); + + case types_1.PokemonExplorerActionTypes.SET_MAX_STATS: + return reduceSetMaxPossibleStats(state, action); + + case types_1.PokemonExplorerActionTypes.SET_LEAGUE_POKEMON: + return reduceSetLeaguePokemon(state, action); + + case types_1.PokemonExplorerActionTypes.SET_IV_LEVEL: + return reduceSetIvLevel(state, action); + + case types_1.PokemonExplorerActionTypes.SET_IV_HP: + return reduceSetIvHp(state, action); + + case types_1.PokemonExplorerActionTypes.SET_IV_ATK: + return reduceSetIvAtk(state, action); + + case types_1.PokemonExplorerActionTypes.SET_IV_DEF: + return reduceSetIvDef(state, action); + + case types_1.PokemonExplorerActionTypes.SET_ACTIVE_LEAGUE: + return reduceSetActiveLeague(state, action); + + default: + return state; + } +}; + +/***/ }), + +/***/ "./src/ts/app/styles/IvForm.scss": +/*!***************************************!*\ + !*** ./src/ts/app/styles/IvForm.scss ***! + \***************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"ivInput":"IvForm__ivInput__1KM34","levelInput":"IvForm__levelInput__1cOcl","fieldRow":"IvForm__fieldRow__2b-ft"}; + +/***/ }), + +/***/ "./src/ts/app/styles/LeagueIvExplorer.scss": +/*!*************************************************!*\ + !*** ./src/ts/app/styles/LeagueIvExplorer.scss ***! + \*************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"container":"LeagueIvExplorer__container__23wLQ PokemonApp__container__MsUHy","leftColumn":"LeagueIvExplorer__leftColumn__1HzQ- PokemonApp__leftColumn__3Lv_L","rightColumn":"LeagueIvExplorer__rightColumn__rwhPb PokemonApp__rightColumn__1xE25","leaguePokemonRank":"LeagueIvExplorer__leaguePokemonRank__25epF","pokemonInfoWrapper":"LeagueIvExplorer__pokemonInfoWrapper__3Zqjc","pokemonRankValue":"LeagueIvExplorer__pokemonRankValue__2bxg3","ivsContainer":"LeagueIvExplorer__ivsContainer__7fSaL","ivContainerTitle":"LeagueIvExplorer__ivContainerTitle__3P9q4","diplayingIvList":"LeagueIvExplorer__diplayingIvList__3vrin"}; + +/***/ }), + +/***/ "./src/ts/app/styles/LeagueSelector.scss": +/*!***********************************************!*\ + !*** ./src/ts/app/styles/LeagueSelector.scss ***! + \***********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"wrapper":"LeagueSelector__wrapper__3k27A","leagueRadioLabel":"LeagueSelector__leagueRadioLabel__23hqE","leagueRadio":"LeagueSelector__leagueRadio__26fWw"}; + +/***/ }), + +/***/ "./src/ts/app/styles/LeagueStatsList.scss": +/*!************************************************!*\ + !*** ./src/ts/app/styles/LeagueStatsList.scss ***! + \************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"selectList":"LeagueStatsList__selectList__S5RTA","listItem":"LeagueStatsList__listItem__1pPhh"}; + +/***/ }), + /***/ "./src/ts/app/styles/PokemonApp.scss": /*!*******************************************!*\ !*** ./src/ts/app/styles/PokemonApp.scss ***! @@ -40021,7 +39860,86 @@ exports.TypeOrder = [pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_NORMAL /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin -module.exports = {"wrapper":"PokemonApp__wrapper__3ZEoC","overlaid":"PokemonApp__overlaid__3B_Ol","highlight":"PokemonApp__highlight__1zywH","body":"PokemonApp__body__23cv_","header":"PokemonApp__header__2s_s2","footer":"PokemonApp__footer__3q19Q","leftNavigation":"PokemonApp__leftNavigation__1rBU9","activeNavigationButton":"PokemonApp__activeNavigationButton__lZQ4L","overlay":"PokemonApp__overlay__2vc-r"}; +module.exports = {"wrapper":"PokemonApp__wrapper__3ZEoC","overlaid":"PokemonApp__overlaid__3B_Ol","highlight":"PokemonApp__highlight__1zywH","body":"PokemonApp__body__23cv_","header":"PokemonApp__header__2s_s2","footer":"PokemonApp__footer__3q19Q","leftNavigation":"PokemonApp__leftNavigation__1rBU9","activeNavigationButton":"PokemonApp__activeNavigationButton__lZQ4L","overlay":"PokemonApp__overlay__2vc-r","displayWrapper":"PokemonApp__displayWrapper__2PiN5","container":"PokemonApp__container__MsUHy","leftColumn":"PokemonApp__leftColumn__3Lv_L","rightColumn":"PokemonApp__rightColumn__1xE25"}; + +/***/ }), + +/***/ "./src/ts/app/styles/PokemonDisplay.scss": +/*!***********************************************!*\ + !*** ./src/ts/app/styles/PokemonDisplay.scss ***! + \***********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"highlight":"PokemonDisplay__highlight__2zbxz PokemonApp__highlight__1zywH","pokemonInfoWrapper":"PokemonDisplay__pokemonInfoWrapper__1gaDq PokemonApp__container__MsUHy","pokemonInfoLeftColumn":"PokemonDisplay__pokemonInfoLeftColumn__22kLA PokemonApp__leftColumn__3Lv_L","pokemonInfoRightColumn":"PokemonDisplay__pokemonInfoRightColumn__3TFUR PokemonApp__rightColumn__1xE25","pokemonName":"PokemonDisplay__pokemonName__2XDXE","dexHeader":"PokemonDisplay__dexHeader___Uki8","pokemonTypeWrapper":"PokemonDisplay__pokemonTypeWrapper__2GdkI","formHeader":"PokemonDisplay__formHeader__2EgEf","pokemonBaseStats":"PokemonDisplay__pokemonBaseStats__e699B"}; + +/***/ }), + +/***/ "./src/ts/app/styles/StatDisplay.scss": +/*!********************************************!*\ + !*** ./src/ts/app/styles/StatDisplay.scss ***! + \********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"baseStatRow":"StatDisplay__baseStatRow__3_Kiv"}; + +/***/ }), + +/***/ "./src/ts/app/styles/TypeEffectiveDisplay.scss": +/*!*****************************************************!*\ + !*** ./src/ts/app/styles/TypeEffectiveDisplay.scss ***! + \*****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"multiplierWrapper":"TypeEffectiveDisplay__multiplierWrapper__1E9zx","multiplierWrapperX3":"TypeEffectiveDisplay__multiplierWrapperX3__3LBbd","multiplierWrapperX4":"TypeEffectiveDisplay__multiplierWrapperX4__iKCza","wrapper":"TypeEffectiveDisplay__wrapper__1DgN_","indicatorWrapper":"TypeEffectiveDisplay__indicatorWrapper__wJ82n"}; + +/***/ }), + +/***/ "./src/ts/app/styles/TypeIndicator.scss": +/*!**********************************************!*\ + !*** ./src/ts/app/styles/TypeIndicator.scss ***! + \**********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin +module.exports = {"pokemonType":"TypeIndicator__pokemonType__1rrg9"}; + +/***/ }), + +/***/ "./src/ts/app/types.ts": +/*!*****************************!*\ + !*** ./src/ts/app/types.ts ***! + \*****************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PokemonExplorerActionTypes = { + SET_IS_LOADING: 'POKEMON_EXPLORER/SET_IS_LOADING', + SET_MAX_STATS: 'POKEMON_EXPLORER/SET_MAX_STATS', + SET_LEAGUE_POKEMON: 'POKEMON_EXPLORER/SET_LEAGUE_POKEMON', + SET_IV_LEVEL: 'POKEMON_EXPLORER/SET_IV_LEVEL', + SET_IV_HP: 'POKEMON_EXPLORER/SET_IV_HP', + SET_IV_ATK: 'POKEMON_EXPLORER/SET_IV_ATK', + SET_IV_DEF: 'POKEMON_EXPLORER/SET_IV_DEF', + SET_ACTIVE_LEAGUE: 'POKEMON_EXPLORER/SET_ACTIVE_LEAGUE' +}; /***/ }), diff --git a/src/ts/app/PokemonApp.tsx b/src/ts/app/PokemonApp.tsx index ec0058f..dc4587b 100644 --- a/src/ts/app/PokemonApp.tsx +++ b/src/ts/app/PokemonApp.tsx @@ -8,23 +8,22 @@ import classNames from 'classnames'; import { League } from 'app/models/League'; -import { appReducers } from './index'; +import { appReducers } from 'app/index'; -import * as ActionsPokemonExplorer from './components/PokemonExplorer/actions'; -import * as ActionsPokemonSelectList from './components/PokemonSelectList/actions'; -import { IPokemonAppDispatch } from './types'; +import * as ActionsPokemonExplorer from 'app/actions'; +import * as ActionsPokemonSelectList from 'app/components/PokemonSelectList/actions'; +import { IndividualValueKey, IPokemonAppDispatch } from 'app/types'; -import { IndividualValueKey } from './components/PokemonExplorer/types'; - -import { Footer } from './components/Footer'; -import { Header } from './components/Header'; -import { PokemonExplorer } from './components/PokemonExplorer/PokemonExplorer'; -import { TypeEffectiveDisplay } from './components/PokemonExplorer/TypeEffectiveDisplay'; -import { PokemonSelectList } from './components/PokemonSelectList/PokemonSelectList'; +import { Footer } from 'app/components/Footer'; +import { Header } from 'app/components/Header'; +import { LeagueIvExplorer } from 'app/components/LeagueIvExplorer'; +import { PokemonDisplay } from 'app/components/PokemonDisplay'; +import { PokemonSelectList } from 'app/components/PokemonSelectList/PokemonSelectList'; +import { TypeEffectiveDisplay } from 'app/components/TypeEffectiveDisplay'; import { appendQueryString, getCurrentQueryStringVlaues } from 'app/utils/navigation'; -import * as styles from './styles/PokemonApp.scss'; +import * as styles from 'app/styles/PokemonApp.scss'; type PokemonAppProps = ReturnType; @@ -33,8 +32,11 @@ interface IConnectedPokemonAppProps extends PokemonAppProps, IPokemonAppDispatch location : RouteComponentProps['location']; } +type Navigation = 'pokedex'; +type SubNavigation = 'pvp' | 'types' | 'moves'; interface IState { - activeNavigation : 'pokedex' | 'pvp' | 'types' | 'moves' | null; + activeNavigation : Navigation | null; + widgets : { [ key in SubNavigation ] : boolean }; } class PokemonApp extends React.Component { @@ -44,6 +46,11 @@ class PokemonApp extends React.Component { this.state = { activeNavigation: null, + widgets: { + pvp: true, + types: false, + moves: false, + }, }; } @@ -93,7 +100,8 @@ class PokemonApp extends React.Component { leaguePokemon, } = this.props.pokemonExplorerState; const { - activeNavigation + activeNavigation, + widgets, } = this.state; const isOverlayShown = activeNavigation === 'pokedex'; @@ -109,6 +117,10 @@ class PokemonApp extends React.Component { styles.leftNavigation, ); + const displayWrapperCss = classNames( + styles.displayWrapper, + ); + const iconCss = classNames( 'icon', 'pixel', @@ -132,36 +144,36 @@ class PokemonApp extends React.Component { iconCss, 'pvp', { - active: activeNavigation === 'pvp', + active: widgets.pvp, } ); const pvpButtonCss = classNames( { - [styles.activeNavigationButton]: activeNavigation === 'pvp', + [styles.activeNavigationButton]: widgets.pvp, } ); const badgeCss = classNames( iconCss, 'badge', { - active: activeNavigation === 'types', + active: widgets.types, } ); const badgeButtonCss = classNames( { - [styles.activeNavigationButton]: activeNavigation === 'types', + [styles.activeNavigationButton]: widgets.types, } ); const tmCss = classNames( iconCss, 'tm', { - active: activeNavigation === 'moves', + active: widgets.moves, } ); const tmButtonCss = classNames( { - [styles.activeNavigationButton]: activeNavigation === 'moves', + [styles.activeNavigationButton]: widgets.moves, } ); @@ -169,19 +181,25 @@ class PokemonApp extends React.Component {
- { leaguePokemon !== null && - - } - { activeNavigation === 'types' && leaguePokemon !== null && +
+ { leaguePokemon !== null && + + } + { widgets.pvp && leaguePokemon !== null && + + } +
+ { widgets.types && leaguePokemon !== null && { }
- + - +
{ isOverlayShown &&
@@ -225,9 +243,33 @@ class PokemonApp extends React.Component { }); } - private readonly handleTypesClick = () => { + private readonly handlePvpClick = () => { + const widgets = this.state.widgets; this.setState({ - activeNavigation: this.state.activeNavigation !== 'types' ? 'types' : null, + widgets: { + ...widgets, + pvp: !widgets.pvp + } + }); + } + + private readonly handleTypesClick = () => { + const widgets = this.state.widgets; + this.setState({ + widgets: { + ...widgets, + types: !widgets.types + } + }); + } + + private readonly handleMovesClick = () => { + const widgets = this.state.widgets; + this.setState({ + widgets: { + ...widgets, + moves: !widgets.moves + } }); } diff --git a/src/ts/app/components/PokemonExplorer/actions.ts b/src/ts/app/actions.ts similarity index 96% rename from src/ts/app/components/PokemonExplorer/actions.ts rename to src/ts/app/actions.ts index ed62ae9..f0848b7 100644 --- a/src/ts/app/components/PokemonExplorer/actions.ts +++ b/src/ts/app/actions.ts @@ -1,7 +1,6 @@ import { action } from 'typesafe-actions'; -import { ThunkResult } from 'app/types'; -import { PokemonExplorerActionTypes } from './types'; +import { PokemonExplorerActionTypes, ThunkResult } from 'app/types'; import { calculateMaxLevelForLeague } from 'app/utils/calculator'; diff --git a/src/ts/app/components/Footer.tsx b/src/ts/app/components/Footer.tsx index 5258d53..24bf88a 100644 --- a/src/ts/app/components/Footer.tsx +++ b/src/ts/app/components/Footer.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import * as styles from '../styles/PokemonApp.scss'; +import * as styles from 'app/styles/PokemonApp.scss'; interface IFooterProps {} diff --git a/src/ts/app/components/Header.tsx b/src/ts/app/components/Header.tsx index 285f24f..db1408d 100644 --- a/src/ts/app/components/Header.tsx +++ b/src/ts/app/components/Header.tsx @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'; import classNames from 'classnames'; -import * as styles from '../styles/PokemonApp.scss'; +import * as styles from 'app/styles/PokemonApp.scss'; interface IHeaderProps {} diff --git a/src/ts/app/components/PokemonExplorer/IvForm.tsx b/src/ts/app/components/IvForm.tsx similarity index 98% rename from src/ts/app/components/PokemonExplorer/IvForm.tsx rename to src/ts/app/components/IvForm.tsx index 9798152..c561689 100644 --- a/src/ts/app/components/PokemonExplorer/IvForm.tsx +++ b/src/ts/app/components/IvForm.tsx @@ -2,9 +2,9 @@ import React from 'react'; import classNames from 'classnames'; -import { IIndividualValues, IndividualValueKey } from './types'; +import { IIndividualValues, IndividualValueKey } from '../types'; -import * as styles from './styles/IvForm.scss'; +import * as styles from 'app/styles/IvForm.scss'; export interface IIvFormProps { ivs : IIndividualValues; diff --git a/src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx b/src/ts/app/components/LeagueIvExplorer.tsx similarity index 98% rename from src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx rename to src/ts/app/components/LeagueIvExplorer.tsx index e2014f5..4021bdd 100644 --- a/src/ts/app/components/PokemonExplorer/LeagueIvExplorer.tsx +++ b/src/ts/app/components/LeagueIvExplorer.tsx @@ -6,14 +6,14 @@ import { IBestWorstStats, ILeaguePokemon, League, MaxCpByLeague } from 'app/mode import { Grade, IStats } from 'app/models/Pokemon'; import { calculateCp, calculateStatAtLevel } from 'app/utils/calculator'; -import { IIndividualValues, IndividualValueKey } from './types'; +import { IIndividualValues, IndividualValueKey } from 'app/types'; import { IvForm } from './IvForm'; import { LeagueSelector } from './LeagueSelector'; import { LeagueStatsList } from './LeagueStatsList'; import { StatDisplay } from './StatDisplay'; -import * as styles from './styles/LeagueIvExplorer.scss'; +import * as styles from 'app/styles/LeagueIvExplorer.scss'; export interface ILeagueIvExplorerProps { activeLeague : League; diff --git a/src/ts/app/components/PokemonExplorer/LeagueSelector.tsx b/src/ts/app/components/LeagueSelector.tsx similarity index 98% rename from src/ts/app/components/PokemonExplorer/LeagueSelector.tsx rename to src/ts/app/components/LeagueSelector.tsx index a493057..550e043 100644 --- a/src/ts/app/components/PokemonExplorer/LeagueSelector.tsx +++ b/src/ts/app/components/LeagueSelector.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import { League, LeagueLabels } from 'app/models/League'; -import * as styles from './styles/LeagueSelector.scss'; +import * as styles from 'app/styles/LeagueSelector.scss'; export interface ILeagueSelectorProps { activeLeague : League; diff --git a/src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx b/src/ts/app/components/LeagueStatsList.tsx similarity index 98% rename from src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx rename to src/ts/app/components/LeagueStatsList.tsx index 8e02d89..5220b5c 100644 --- a/src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx +++ b/src/ts/app/components/LeagueStatsList.tsx @@ -7,9 +7,9 @@ import { FixedSizeList } from 'react-window'; import classNames from 'classnames'; import { Grade, IStats } from 'app/models/Pokemon'; -import { IIndividualValues } from './types'; +import { IIndividualValues } from 'app/types'; -import * as styles from './styles/LeagueStatsList.scss'; +import * as styles from 'app/styles/LeagueStatsList.scss'; export interface ILeagueStatsListProps { activePokemonId : POGOProtos.Enums.PokemonId; diff --git a/src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx b/src/ts/app/components/PokemonDisplay.tsx similarity index 99% rename from src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx rename to src/ts/app/components/PokemonDisplay.tsx index a94de9d..ecb686c 100644 --- a/src/ts/app/components/PokemonExplorer/PokemonDisplay.tsx +++ b/src/ts/app/components/PokemonDisplay.tsx @@ -11,7 +11,7 @@ import { formatDexNumber, formatForm, Forms } from 'app/utils/formatter'; import { StatDisplay } from './StatDisplay'; import { TypeIndicator } from './TypeIndicator'; -import * as styles from './styles/PokemonDisplay.scss'; +import * as styles from 'app/styles/PokemonDisplay.scss'; export interface IPokemonDisplay { leaguePokemon : IPokemon; diff --git a/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx b/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx deleted file mode 100644 index 2e4b7c5..0000000 --- a/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; - -import classNames from 'classnames'; - -import { ILeagueIvExplorerProps, LeagueIvExplorer } from './LeagueIvExplorer'; -import { PokemonDisplay } from './PokemonDisplay'; - -import * as styles from './styles/PokemonExplorer.scss'; - -export interface IPokemonExplorerProps extends ILeagueIvExplorerProps { - temporaryNavigationIsActive : boolean; - className? : string; - isLoading : boolean; -} - -export class PokemonExplorer extends React.Component { - - public render() { - const { - temporaryNavigationIsActive, - className, - activeLeague, - individualValues, - leaguePokemon, - handleChangeLeague, - handleChangeIndividualValue, - handleMaximizeLevel, - } = this.props; - - const wrapperCss = classNames( - styles.wrapper, - className - ); - - return ( - -
- - -
-
- ); - } -} diff --git a/src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss b/src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss deleted file mode 100644 index 9d7e014..0000000 --- a/src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss +++ /dev/null @@ -1,31 +0,0 @@ -@import '~styles/Variables.scss'; - -.wrapper { - margin: 0 auto; - // flex-basis: 30rem; - width: 30rem; - display: flex; - flex-flow: column nowrap; -} - -.container { - display: flex; - justify-content: space-evenly; - - .leftColumn, - .rightColumn { - display: flex; - flex-flow: column nowrap; - flex-basis: 45%; - align-items: center; - } - - .leftColumn { - text-align: center; - } - - .rightColumn { - flex-grow: 1; - align-items: start; - } -} diff --git a/src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss.d.ts b/src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss.d.ts deleted file mode 100644 index c3d4a29..0000000 --- a/src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file is automatically generated. -// Please do not change this file! -export const container: string; -export const leftColumn: string; -export const rightColumn: string; -export const wrapper: string; diff --git a/src/ts/app/components/PokemonExplorer/types.ts b/src/ts/app/components/PokemonExplorer/types.ts deleted file mode 100644 index 4876cee..0000000 --- a/src/ts/app/components/PokemonExplorer/types.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ILeaguePokemon, League } from 'app/models/League'; -import { IMaxStats } from 'app/models/Pokemon'; - -export type IndividualValueKey = 'level' | 'hp' | 'atk' | 'def'; -export interface IIndividualValues { - level : number | null; - ivHp : number | null; - ivAtk : number | null; - ivDef : number | null; -} - -export interface IPokemonExplorerState { - isLoading : boolean; - leaguePokemon : ILeaguePokemon | null; - maxPossibleStats : IMaxStats; - individualValues : IIndividualValues; - league : League; -} - -export const PokemonExplorerActionTypes = { - SET_IS_LOADING: 'POKEMON_EXPLORER/SET_IS_LOADING', - SET_MAX_STATS: 'POKEMON_EXPLORER/SET_MAX_STATS', - SET_LEAGUE_POKEMON: 'POKEMON_EXPLORER/SET_LEAGUE_POKEMON', - SET_IV_LEVEL: 'POKEMON_EXPLORER/SET_IV_LEVEL', - SET_IV_HP: 'POKEMON_EXPLORER/SET_IV_HP', - SET_IV_ATK: 'POKEMON_EXPLORER/SET_IV_ATK', - SET_IV_DEF: 'POKEMON_EXPLORER/SET_IV_DEF', - SET_ACTIVE_LEAGUE: 'POKEMON_EXPLORER/SET_ACTIVE_LEAGUE', -}; diff --git a/src/ts/app/components/PokemonExplorer/StatDisplay.tsx b/src/ts/app/components/StatDisplay.tsx similarity index 96% rename from src/ts/app/components/PokemonExplorer/StatDisplay.tsx rename to src/ts/app/components/StatDisplay.tsx index b7d6ab5..c170980 100644 --- a/src/ts/app/components/PokemonExplorer/StatDisplay.tsx +++ b/src/ts/app/components/StatDisplay.tsx @@ -2,7 +2,7 @@ import React from 'react'; import classNames from 'classnames'; -import * as styles from './styles/StatDisplay.scss'; +import * as styles from 'app/styles/StatDisplay.scss'; export interface IStartDisplayProps { statLabel : string; diff --git a/src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx b/src/ts/app/components/TypeEffectiveDisplay.tsx similarity index 98% rename from src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx rename to src/ts/app/components/TypeEffectiveDisplay.tsx index e115a54..3643874 100644 --- a/src/ts/app/components/PokemonExplorer/TypeEffectiveDisplay.tsx +++ b/src/ts/app/components/TypeEffectiveDisplay.tsx @@ -6,7 +6,7 @@ import { IPokemon, TypeEffectiveness } from 'app/models/Pokemon'; import { TypeIndicator } from './TypeIndicator'; -import * as styles from './styles/TypeEffectiveDisplay.scss'; +import * as styles from 'app/styles/TypeEffectiveDisplay.scss'; export interface ITypeEffectiveDisplayProps { pokemonName : string; diff --git a/src/ts/app/components/PokemonExplorer/TypeIndicator.tsx b/src/ts/app/components/TypeIndicator.tsx similarity index 93% rename from src/ts/app/components/PokemonExplorer/TypeIndicator.tsx rename to src/ts/app/components/TypeIndicator.tsx index 2c11388..865fb20 100644 --- a/src/ts/app/components/PokemonExplorer/TypeIndicator.tsx +++ b/src/ts/app/components/TypeIndicator.tsx @@ -6,7 +6,7 @@ import classNames from 'classnames'; import { formatType } from 'app/utils/formatter'; -import * as styles from './styles/TypeIndicator.scss'; +import * as styles from 'app/styles/TypeIndicator.scss'; export interface ITypeEffectiveDisplayProps { className? : string; diff --git a/src/ts/app/index.tsx b/src/ts/app/index.tsx index a7ab125..5e8e219 100644 --- a/src/ts/app/index.tsx +++ b/src/ts/app/index.tsx @@ -9,8 +9,8 @@ import { IPokemonAppExtraArguments } from 'app/types'; import { PokemonService } from 'api/PokemonService'; -import { PokemonExplorerReducers } from './components/PokemonExplorer/reducers'; -import { PokemonSelectListReducers } from './components/PokemonSelectList/reducers'; +import { PokemonSelectListReducers } from 'app/components/PokemonSelectList/reducers'; +import { PokemonExplorerReducers } from 'app/reducers'; import { ConnectedPokemonApp } from './PokemonApp'; diff --git a/src/ts/app/components/PokemonExplorer/reducers.ts b/src/ts/app/reducers.ts similarity index 98% rename from src/ts/app/components/PokemonExplorer/reducers.ts rename to src/ts/app/reducers.ts index 1e5ede6..cd99515 100644 --- a/src/ts/app/components/PokemonExplorer/reducers.ts +++ b/src/ts/app/reducers.ts @@ -2,8 +2,8 @@ import { Reducer } from 'redux'; import { League } from 'app/models/League'; -import * as Actions from './actions'; -import { IPokemonExplorerState, PokemonExplorerActionTypes } from './types'; +import * as Actions from 'app/actions'; +import { IPokemonExplorerState, PokemonExplorerActionTypes } from 'app/types'; export const initialState : IPokemonExplorerState = { isLoading: false, diff --git a/src/ts/app/components/PokemonExplorer/styles/IvForm.scss b/src/ts/app/styles/IvForm.scss similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/IvForm.scss rename to src/ts/app/styles/IvForm.scss diff --git a/src/ts/app/components/PokemonExplorer/styles/IvForm.scss.d.ts b/src/ts/app/styles/IvForm.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/IvForm.scss.d.ts rename to src/ts/app/styles/IvForm.scss.d.ts diff --git a/src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss b/src/ts/app/styles/LeagueIvExplorer.scss similarity index 86% rename from src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss rename to src/ts/app/styles/LeagueIvExplorer.scss index 3b9a1dd..062ded9 100644 --- a/src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss +++ b/src/ts/app/styles/LeagueIvExplorer.scss @@ -1,16 +1,16 @@ @import '~styles/Variables.scss'; .container { - composes: container from './PokemonExplorer.scss'; + composes: container from './PokemonApp.scss'; margin-bottom: 1rem; } .leftColumn { - composes: leftColumn from './PokemonExplorer.scss'; + composes: leftColumn from './PokemonApp.scss'; } .rightColumn { - composes: rightColumn from './PokemonExplorer.scss'; + composes: rightColumn from './PokemonApp.scss'; } .leaguePokemonRank { diff --git a/src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss.d.ts b/src/ts/app/styles/LeagueIvExplorer.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/LeagueIvExplorer.scss.d.ts rename to src/ts/app/styles/LeagueIvExplorer.scss.d.ts diff --git a/src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss b/src/ts/app/styles/LeagueSelector.scss similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss rename to src/ts/app/styles/LeagueSelector.scss diff --git a/src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss.d.ts b/src/ts/app/styles/LeagueSelector.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss.d.ts rename to src/ts/app/styles/LeagueSelector.scss.d.ts diff --git a/src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss b/src/ts/app/styles/LeagueStatsList.scss similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss rename to src/ts/app/styles/LeagueStatsList.scss diff --git a/src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss.d.ts b/src/ts/app/styles/LeagueStatsList.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss.d.ts rename to src/ts/app/styles/LeagueStatsList.scss.d.ts diff --git a/src/ts/app/styles/PokemonApp.scss b/src/ts/app/styles/PokemonApp.scss index 34a68b0..4650d9d 100644 --- a/src/ts/app/styles/PokemonApp.scss +++ b/src/ts/app/styles/PokemonApp.scss @@ -75,3 +75,33 @@ $overlay-opacity: 0.7; background-color: $main-overlay-color; opacity: $overlay-opacity; } + +.displayWrapper { + margin: 0 auto; + // flex-basis: 30rem; + width: 30rem; + display: flex; + flex-flow: column nowrap; +} + +.container { + display: flex; + justify-content: space-evenly; + + .leftColumn, + .rightColumn { + display: flex; + flex-flow: column nowrap; + flex-basis: 45%; + align-items: center; + } + + .leftColumn { + text-align: center; + } + + .rightColumn { + flex-grow: 1; + align-items: start; + } +} diff --git a/src/ts/app/styles/PokemonApp.scss.d.ts b/src/ts/app/styles/PokemonApp.scss.d.ts index d8d9865..ddbb181 100644 --- a/src/ts/app/styles/PokemonApp.scss.d.ts +++ b/src/ts/app/styles/PokemonApp.scss.d.ts @@ -2,10 +2,14 @@ // Please do not change this file! export const activeNavigationButton: string; export const body: string; +export const container: string; +export const displayWrapper: string; export const footer: string; export const header: string; export const highlight: string; +export const leftColumn: string; export const leftNavigation: string; export const overlaid: string; export const overlay: string; +export const rightColumn: string; export const wrapper: string; diff --git a/src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss b/src/ts/app/styles/PokemonDisplay.scss similarity index 71% rename from src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss rename to src/ts/app/styles/PokemonDisplay.scss index 030bc27..9910266 100644 --- a/src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss +++ b/src/ts/app/styles/PokemonDisplay.scss @@ -1,22 +1,22 @@ @import '~styles/Variables.scss'; .highlight { - composes: highlight from '../../../styles/PokemonApp.scss'; + composes: highlight from './PokemonApp.scss'; color: $main-active-font-color; pointer-events: none; } .pokemonInfoWrapper { - composes: container from './PokemonExplorer.scss'; + composes: container from './PokemonApp.scss'; margin-bottom: 1rem; } .pokemonInfoLeftColumn { - composes: leftColumn from './PokemonExplorer.scss'; + composes: leftColumn from './PokemonApp.scss'; } .pokemonInfoRightColumn { - composes: rightColumn from './PokemonExplorer.scss'; + composes: rightColumn from './PokemonApp.scss'; } .pokemonName { diff --git a/src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss.d.ts b/src/ts/app/styles/PokemonDisplay.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/PokemonDisplay.scss.d.ts rename to src/ts/app/styles/PokemonDisplay.scss.d.ts diff --git a/src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss b/src/ts/app/styles/StatDisplay.scss similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss rename to src/ts/app/styles/StatDisplay.scss diff --git a/src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss.d.ts b/src/ts/app/styles/StatDisplay.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss.d.ts rename to src/ts/app/styles/StatDisplay.scss.d.ts diff --git a/src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss b/src/ts/app/styles/TypeEffectiveDisplay.scss similarity index 95% rename from src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss rename to src/ts/app/styles/TypeEffectiveDisplay.scss index 6771aaf..76cd011 100644 --- a/src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss +++ b/src/ts/app/styles/TypeEffectiveDisplay.scss @@ -2,6 +2,7 @@ .multiplierWrapper { position: relative; + z-index: 0; // so the contents don't show up over the overlay padding-top: 6px; padding-right: 6px; diff --git a/src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss.d.ts b/src/ts/app/styles/TypeEffectiveDisplay.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/TypeEffectiveDisplay.scss.d.ts rename to src/ts/app/styles/TypeEffectiveDisplay.scss.d.ts diff --git a/src/ts/app/components/PokemonExplorer/styles/TypeIndicator.scss b/src/ts/app/styles/TypeIndicator.scss similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/TypeIndicator.scss rename to src/ts/app/styles/TypeIndicator.scss diff --git a/src/ts/app/components/PokemonExplorer/styles/TypeIndicator.scss.d.ts b/src/ts/app/styles/TypeIndicator.scss.d.ts similarity index 100% rename from src/ts/app/components/PokemonExplorer/styles/TypeIndicator.scss.d.ts rename to src/ts/app/styles/TypeIndicator.scss.d.ts diff --git a/src/ts/app/types.ts b/src/ts/app/types.ts index 2b9994e..e36fa26 100644 --- a/src/ts/app/types.ts +++ b/src/ts/app/types.ts @@ -3,8 +3,10 @@ import { ThunkAction, ThunkDispatch } from 'redux-thunk'; import { IProviderExtraArguments } from 'common/models/IProviderExtraArguments'; -import { IPokemonExplorerState } from './components/PokemonExplorer/types'; -import { IPokemonSelectListState } from './components/PokemonSelectList/types'; +import { IPokemonSelectListState } from 'app/components/PokemonSelectList/types'; + +import { ILeaguePokemon, League } from 'app/models/League'; +import { IMaxStats } from 'app/models/Pokemon'; import { PokemonService } from 'api/PokemonService'; @@ -26,3 +28,30 @@ type ThunkDispatchPokemonApp = ThunkDispatch