New source found from dndbeyond.com
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { visuallyHidden } from "@mui/utils";
|
||||
import React from "react";
|
||||
import { connect, DispatchProp } from "react-redux";
|
||||
import { AnyAction } from "redux";
|
||||
|
||||
import {
|
||||
ConcentrationIcon,
|
||||
@@ -28,10 +28,11 @@ import {
|
||||
SpellSlotContract,
|
||||
SpellUtils,
|
||||
} from "@dndbeyond/character-rules-engine/es";
|
||||
import { IRollContext } from "@dndbeyond/dice";
|
||||
import { RollContext } from "@dndbeyond/pocket-dimension-dice/types";
|
||||
|
||||
import { TabFilter } from "~/components/TabFilter";
|
||||
import { PaneInfo, useSidebar } from "~/contexts/Sidebar/Sidebar";
|
||||
import a11yStyles from "~/styles/accessibility.module.css";
|
||||
import { PaneComponentEnum } from "~/subApps/sheet/components/Sidebar/types";
|
||||
|
||||
import SpellsLevel from "../../../Shared/components/SpellsLevel";
|
||||
@@ -70,7 +71,9 @@ function hasFilteredLevelSpells(
|
||||
}, false);
|
||||
}
|
||||
|
||||
interface Props extends DispatchProp {
|
||||
// TODO: We are typing with AnyAction here to work around issues with UnknownAction, the type that was introduced in Redux 5.
|
||||
// If we decide to modernize to Redux 5, we will need to refactor much of the Rules Engine redux usage.
|
||||
interface Props extends DispatchProp<AnyAction> {
|
||||
levelSpells: Array<Array<ScaledSpell>>;
|
||||
spellCasterInfo: SpellCasterInfo;
|
||||
ruleData: RuleData;
|
||||
@@ -84,7 +87,7 @@ interface Props extends DispatchProp {
|
||||
diceEnabled: boolean;
|
||||
dataOriginRefData: DataOriginRefData;
|
||||
proficiencyBonus: number;
|
||||
characterRollContext: IRollContext;
|
||||
characterRollContext: RollContext;
|
||||
inventoryManager: InventoryManager;
|
||||
inventoryLookup: InventoryLookup;
|
||||
partyInventoryLookup: InventoryLookup;
|
||||
@@ -352,7 +355,7 @@ class Spells extends React.PureComponent<Props, State> {
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<>
|
||||
{levelSpells.map((spells, level) => {
|
||||
if (!showLevels.includes(ALL_LEVELS) && !showLevels.includes(level)) {
|
||||
return null;
|
||||
@@ -438,7 +441,7 @@ class Spells extends React.PureComponent<Props, State> {
|
||||
</ContentGroup>
|
||||
);
|
||||
})}
|
||||
</React.Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -449,7 +452,7 @@ class Spells extends React.PureComponent<Props, State> {
|
||||
|
||||
return (
|
||||
<section className="ct-spells">
|
||||
<h2 style={visuallyHidden}>Spells</h2>
|
||||
<h2 className={a11yStyles.screenreaderOnly}>Spells</h2>
|
||||
<div className="ct-spells__casting">
|
||||
<SpellsLevelCasting
|
||||
spellCasterInfo={spellCasterInfo}
|
||||
|
||||
Reference in New Issue
Block a user