New source found from dndbeyond.com

This commit is contained in:
2026-07-08 01:00:09 -07:00
parent 9a983a6d7b
commit dcefa0d2f2
2865 changed files with 222467 additions and 49053 deletions
@@ -1,12 +1,9 @@
import axios, { Canceler } from "axios";
import React from "react";
import { connect, DispatchProp } from "react-redux";
import { AnyAction } from "redux";
import {
Button,
LoadingPlaceholder,
Select,
} from "@dndbeyond/character-components/es";
import { Button, LoadingPlaceholder } from "@dndbeyond/character-components/es";
import {
ApiAdapterPromise,
ApiAdapterRequestConfig,
@@ -30,9 +27,11 @@ import {
StartingEquipmentSlotContract,
TypeValueLookup,
DefinitionUtils,
HtmlSelectOption,
} from "@dndbeyond/character-rules-engine/es";
import { Link } from "~/components/Link";
import { Select } from "~/components/Select";
// TODO need to remove this builder reference and replace with better heading
import PageSubHeader from "../../../CharacterBuilder/components/PageSubHeader";
@@ -42,6 +41,7 @@ import * as apiCreatorSelectors from "../../selectors/composite/apiCreator";
import { SharedAppState } from "../../stores/typings";
import { AppLoggerUtils, AppNotificationUtils } from "../../utils";
import StartingEquipmentSlots from "./StartingEquipmentSlots";
import styles from "./styles.module.css";
import { StartingEquipmentRuleSlotSelection } from "./typings";
//duplicated from characterActions typingParts to avoid import issues
@@ -51,6 +51,8 @@ interface StartingEquipmentAddRequestPayloadItem {
entityId: number;
entityTypeId: number;
quantity: number;
originEntityId: number | null;
originEntityTypeId: number | null;
}
//duplicated from characterActions typingParts to avoid import issues
interface StartingEquipmentAddRequestPayload {
@@ -75,7 +77,9 @@ interface RuleChoiceGroupClearPayload {
groupKey: RuleSlotChoiceKey;
}
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> {
isInitialView: boolean;
onStartingEquipmentChoose?: () => void;
startingClass: CharClass | null;
@@ -527,6 +531,8 @@ class StartingEquipment extends React.PureComponent<Props, State> {
entityId: item.id,
entityTypeId: item.entityTypeId,
quantity: rule.quantity ? rule.quantity : 1,
originEntityId: null, //This was added for 2024 Artificer - they could be used for the starting equipment data origin
originEntityTypeId: null, //This was added for 2024 Artificer - they could be used for the starting equipment data origin
});
}
break;
@@ -673,9 +679,9 @@ class StartingEquipment extends React.PureComponent<Props, State> {
diceValues = DiceUtils.getDiceValuesRange(wealthDice);
}
const diceOptions = diceValues.map((value) => ({
const diceOptions: Array<HtmlSelectOption> = diceValues.map((value) => ({
value,
label: value,
label: String(value),
}));
let totalGold = this.getStartingGoldTotal();
@@ -691,10 +697,13 @@ class StartingEquipment extends React.PureComponent<Props, State> {
</div>
<div className="starting-equipment-gold-entry-input">
<Select
className={styles.select}
placeholder={`${diceCount}d${diceValue}`}
options={diceOptions}
onChange={this.handleGoldRolledNumberChange}
value={rolledGoldTotal}
name="starting-gold-rolled"
searchThreshold={null}
/>
</div>
<div className="starting-equipment-gold-entry-multiplier">
@@ -1,6 +1,6 @@
import React from "react";
import { Checkbox, Select } from "@dndbeyond/character-components/es";
import { Checkbox } from "@dndbeyond/character-components/es";
import {
BaseItemDefinitionContract,
Constants,
@@ -13,9 +13,11 @@ import {
} from "@dndbeyond/character-rules-engine/es";
import { HtmlContent } from "~/components/HtmlContent";
import { Select } from "~/components/Select";
import { TypeScriptUtils } from "../../../utils";
import { StartingEquipmentRuleSlotSelection } from "../typings";
import styles from "./styles.module.css";
interface Props {
isMultiSlot: boolean;
@@ -235,13 +237,14 @@ export default class StartingEquipmentRuleSlot extends React.PureComponent<Props
contentNode = (
<div className="starting-equipment-rule">
<Select
className={styles.select}
options={groupedOptions}
value={null}
preventClickPropagating={true}
onChange={this.handleRuleSelection.bind(
this,
ruleIdx
)}
name={`${name}-rule-${ruleIdx}`}
/>
</div>
);