@rpg-engine/long-bow 0.5.8 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
- import { TopCharacterEntry, TopSkillEntry } from '@rpg-engine/shared';
2
+ import { IRankingTopCharacterEntry, IRankingTopSkillEntry } from '@rpg-engine/shared';
3
3
  export interface ILeaderboardProps {
4
- items: Set<TopCharacterEntry> | Set<TopSkillEntry> | null;
4
+ items: Set<IRankingTopCharacterEntry> | Set<IRankingTopSkillEntry> | null;
5
5
  onChangeClassType: (value: string) => void;
6
6
  onChangeRankType: (value: string) => void;
7
7
  onChangeSkillType: (value: string) => void;
8
- skills: string[];
8
+ skillOptions: string[];
9
+ rankOptions: string[];
10
+ classOptions: string[];
9
11
  rankType: string;
10
12
  }
11
13
  export declare const Leaderboard: (props: ILeaderboardProps) => JSX.Element;
@@ -1,7 +1,7 @@
1
- import { TopCharacterEntry, TopSkillEntry } from '@rpg-engine/shared';
1
+ import { IRankingTopCharacterEntry, IRankingTopSkillEntry } from '@rpg-engine/shared';
2
2
  import React from 'react';
3
3
  export interface ILeaderboardLevelProps {
4
- items: Set<TopCharacterEntry> | Set<TopSkillEntry> | null;
4
+ items: Set<IRankingTopCharacterEntry> | Set<IRankingTopSkillEntry> | null;
5
5
  rankType: string;
6
6
  }
7
7
  export declare const LeaderboardTable: React.FC<ILeaderboardLevelProps>;
@@ -15740,33 +15740,35 @@ var TableRowValue = /*#__PURE__*/styled.td.withConfig({
15740
15740
  componentId: "sc-kk017f-1"
15741
15741
  })(["padding:0 20px;"]);
15742
15742
 
15743
- var rankTypeOptions = /*#__PURE__*/['Level', 'Class', 'Skill'].map(function (itemType, index) {
15744
- return {
15745
- id: index + 1,
15746
- value: itemType,
15747
- option: itemType
15748
- };
15749
- });
15750
- var classTypeOptions = /*#__PURE__*/Object.keys(shared.CharacterClass).map(function (itemType, index) {
15751
- return {
15752
- id: index + 1,
15753
- value: itemType,
15754
- option: itemType
15755
- };
15756
- });
15757
15743
  var Leaderboard = function Leaderboard(props) {
15758
15744
  var items = props.items,
15759
15745
  onChangeRankType = props.onChangeRankType,
15760
15746
  onChangeClassType = props.onChangeClassType,
15761
15747
  rankType = props.rankType,
15762
- skills = props.skills,
15763
- onChangeSkillType = props.onChangeSkillType;
15748
+ skillOptions = props.skillOptions,
15749
+ onChangeSkillType = props.onChangeSkillType,
15750
+ classOptions = props.classOptions,
15751
+ rankOptions = props.rankOptions;
15764
15752
  var itemsContainer = React.useRef(null);
15765
15753
  React.useEffect(function () {
15766
15754
  var _itemsContainer$curre;
15767
15755
  (_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
15768
15756
  }, []);
15769
- var skillTypeOptions = skills.map(function (itemType, index) {
15757
+ var rankTypeOptions = rankOptions.map(function (itemType, index) {
15758
+ return {
15759
+ id: index + 1,
15760
+ value: itemType,
15761
+ option: itemType
15762
+ };
15763
+ });
15764
+ var skillTypeOptions = skillOptions.map(function (itemType, index) {
15765
+ return {
15766
+ id: index + 1,
15767
+ value: itemType,
15768
+ option: itemType
15769
+ };
15770
+ });
15771
+ var classTypeOptions = classOptions.map(function (itemType, index) {
15770
15772
  return {
15771
15773
  id: index + 1,
15772
15774
  value: itemType,