@rpg-engine/long-bow 0.5.7 → 0.5.8

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.
@@ -15692,6 +15692,122 @@ var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
15692
15692
  componentId: "sc-15y5p9l-1"
15693
15693
  })(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
15694
15694
 
15695
+ var LeaderboardTable = function LeaderboardTable(props) {
15696
+ var items = props.items,
15697
+ rankType = props.rankType;
15698
+ if (!items) return null;
15699
+ function isTopSkillEntry(entry) {
15700
+ return 'skill' in entry;
15701
+ }
15702
+ return React.createElement(React.Fragment, null, React.createElement("thead", null, React.createElement(TableRowWrapper, null, React.createElement(TableRowValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15703
+ maxLines: 1,
15704
+ maxWidth: "200px",
15705
+ fontSize: "14px"
15706
+ }, "Name"))), rankType === 'Skill' ? React.createElement(TableRowValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15707
+ maxLines: 1,
15708
+ maxWidth: "200px",
15709
+ fontSize: "14px"
15710
+ }, "Skill"))) : null, React.createElement(TableRowValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15711
+ maxLines: 1,
15712
+ maxWidth: "200px",
15713
+ fontSize: "14px"
15714
+ }, "Level"))))), React.createElement("tbody", null, Array.from(items).map(function (entry) {
15715
+ return React.createElement(TableRowWrapper, {
15716
+ key: entry.name
15717
+ }, React.createElement(TableRowValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15718
+ maxLines: 1,
15719
+ maxWidth: "200px",
15720
+ fontSize: "10px"
15721
+ }, entry.name))), isTopSkillEntry(entry) ? React.createElement(TableRowValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15722
+ maxLines: 1,
15723
+ maxWidth: "200px",
15724
+ fontSize: "10px"
15725
+ }, entry.skill))) : null, React.createElement(TableRowValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15726
+ maxLines: 1,
15727
+ maxWidth: "200px",
15728
+ fontSize: "10px"
15729
+ }, entry.level))));
15730
+ })));
15731
+ };
15732
+ var TableRowWrapper = /*#__PURE__*/styled.tr.withConfig({
15733
+ displayName: "LeaderboardTable__TableRowWrapper",
15734
+ componentId: "sc-kk017f-0"
15735
+ })(["margin:auto;padding:0.5rem;&:hover{background-color:", ";}p{font-size:0.8rem;}"], uiColors.darkGray);
15736
+ var TableRowValue = /*#__PURE__*/styled.td.withConfig({
15737
+ displayName: "LeaderboardTable__TableRowValue",
15738
+ componentId: "sc-kk017f-1"
15739
+ })(["padding:0 20px;"]);
15740
+
15741
+ var rankTypeOptions = /*#__PURE__*/['Level', 'Class', 'Skill'].map(function (itemType, index) {
15742
+ return {
15743
+ id: index + 1,
15744
+ value: itemType,
15745
+ option: itemType
15746
+ };
15747
+ });
15748
+ var classTypeOptions = /*#__PURE__*/Object.keys(CharacterClass).map(function (itemType, index) {
15749
+ return {
15750
+ id: index + 1,
15751
+ value: itemType,
15752
+ option: itemType
15753
+ };
15754
+ });
15755
+ var Leaderboard = function Leaderboard(props) {
15756
+ var items = props.items,
15757
+ onChangeRankType = props.onChangeRankType,
15758
+ onChangeClassType = props.onChangeClassType,
15759
+ rankType = props.rankType,
15760
+ skills = props.skills,
15761
+ onChangeSkillType = props.onChangeSkillType;
15762
+ var itemsContainer = useRef(null);
15763
+ useEffect(function () {
15764
+ var _itemsContainer$curre;
15765
+ (_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
15766
+ }, []);
15767
+ var skillTypeOptions = skills.map(function (itemType, index) {
15768
+ return {
15769
+ id: index + 1,
15770
+ value: itemType,
15771
+ option: itemType
15772
+ };
15773
+ });
15774
+ return React.createElement(React.Fragment, null, React.createElement(WrapperContainer, null, React.createElement(StyledDropdown, {
15775
+ options: rankTypeOptions,
15776
+ onChange: onChangeRankType,
15777
+ width: "80%"
15778
+ }), rankType === 'Class' ? React.createElement(StyledDropdown, {
15779
+ options: classTypeOptions,
15780
+ onChange: onChangeClassType,
15781
+ width: "100%"
15782
+ }) : null, rankType === 'Skill' ? React.createElement(StyledDropdown, {
15783
+ options: skillTypeOptions,
15784
+ onChange: onChangeSkillType,
15785
+ width: "100%"
15786
+ }) : null), React.createElement(ItemComponentScrollWrapper, {
15787
+ id: "LeaderboardContainer",
15788
+ ref: itemsContainer
15789
+ }, React.createElement(TableWrapper, null, React.createElement(LeaderboardTable, {
15790
+ items: items,
15791
+ rankType: rankType
15792
+ }))));
15793
+ };
15794
+ var WrapperContainer = /*#__PURE__*/styled.div.withConfig({
15795
+ displayName: "Leaderboard__WrapperContainer",
15796
+ componentId: "sc-1wdsq7i-0"
15797
+ })(["display:grid;grid-template-columns:50% 50%;justify-content:space-between;width:calc(100% - 40px);margin-left:10px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"]);
15798
+ var StyledDropdown = /*#__PURE__*/styled(Dropdown).withConfig({
15799
+ displayName: "Leaderboard__StyledDropdown",
15800
+ componentId: "sc-1wdsq7i-1"
15801
+ })(["margin:3px !important;width:170px !important;"]);
15802
+ var ItemComponentScrollWrapper = /*#__PURE__*/styled.div.withConfig({
15803
+ displayName: "Leaderboard__ItemComponentScrollWrapper",
15804
+ componentId: "sc-1wdsq7i-2"
15805
+ })(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
15806
+ var TableWrapper = /*#__PURE__*/styled.table.withConfig({
15807
+ displayName: "Leaderboard__TableWrapper",
15808
+ componentId: "sc-1wdsq7i-3"
15809
+ })(["margin:auto;width:100%;"]);
15810
+
15695
15811
  var ListMenu = function ListMenu(_ref) {
15696
15812
  var options = _ref.options,
15697
15813
  onSelected = _ref.onSelected,
@@ -16052,19 +16168,19 @@ var BuyPanel = function BuyPanel(_ref) {
16052
16168
  className: "big-input",
16053
16169
  onBlur: enableHotkeys,
16054
16170
  onFocus: disableHotkeys
16055
- }))), React.createElement(WrapperContainer, null, React.createElement(StyledDropdown, {
16171
+ }))), React.createElement(WrapperContainer$1, null, React.createElement(StyledDropdown$1, {
16056
16172
  options: itemTypeOptions,
16057
16173
  onChange: onChangeType,
16058
16174
  width: "95%"
16059
- }), React.createElement(StyledDropdown, {
16175
+ }), React.createElement(StyledDropdown$1, {
16060
16176
  options: itemRarityOptions,
16061
16177
  onChange: onChangeRarity,
16062
16178
  width: "95%"
16063
- }), React.createElement(StyledDropdown, {
16179
+ }), React.createElement(StyledDropdown$1, {
16064
16180
  options: orderByOptions,
16065
16181
  onChange: onChangeOrder,
16066
16182
  width: "100%"
16067
- }))), React.createElement(ItemComponentScrollWrapper, {
16183
+ }))), React.createElement(ItemComponentScrollWrapper$1, {
16068
16184
  id: "MarketContainer",
16069
16185
  ref: itemsContainer
16070
16186
  }, items == null ? void 0 : items.map(function (_ref2, index) {
@@ -16096,15 +16212,15 @@ var FilterInputsWrapper = /*#__PURE__*/styled.div.withConfig({
16096
16212
  displayName: "BuyPanel__FilterInputsWrapper",
16097
16213
  componentId: "sc-1si8t7i-2"
16098
16214
  })(["width:95%;display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;margin-left:10px;gap:5px;color:white;flex-wrap:wrap;p{width:auto;margin:0;}input{width:75px;height:10px;}.big-input{width:130px;}"]);
16099
- var WrapperContainer = /*#__PURE__*/styled.div.withConfig({
16215
+ var WrapperContainer$1 = /*#__PURE__*/styled.div.withConfig({
16100
16216
  displayName: "BuyPanel__WrapperContainer",
16101
16217
  componentId: "sc-1si8t7i-3"
16102
16218
  })(["display:grid;grid-template-columns:40% 30% 30%;justify-content:space-between;width:calc(100% - 40px);margin-left:10px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"]);
16103
- var ItemComponentScrollWrapper = /*#__PURE__*/styled.div.withConfig({
16219
+ var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
16104
16220
  displayName: "BuyPanel__ItemComponentScrollWrapper",
16105
16221
  componentId: "sc-1si8t7i-4"
16106
16222
  })(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
16107
- var StyledDropdown = /*#__PURE__*/styled(Dropdown).withConfig({
16223
+ var StyledDropdown$1 = /*#__PURE__*/styled(Dropdown).withConfig({
16108
16224
  displayName: "BuyPanel__StyledDropdown",
16109
16225
  componentId: "sc-1si8t7i-5"
16110
16226
  })(["margin:3px !important;width:170px !important;"]);
@@ -16206,7 +16322,7 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
16206
16322
  onPointerDown: function onPointerDown() {
16207
16323
  return availableGold > 0 && onMoneyWithdraw();
16208
16324
  }
16209
- }, "Withdraw")))), React.createElement(ItemComponentScrollWrapper$1, {
16325
+ }, "Withdraw")))), React.createElement(ItemComponentScrollWrapper$2, {
16210
16326
  id: "MarketContainer",
16211
16327
  ref: itemsContainer
16212
16328
  }, items == null ? void 0 : items.map(function (_ref2, index) {
@@ -16240,7 +16356,7 @@ var InnerOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
16240
16356
  displayName: "ManagmentPanel__InnerOptionsWrapper",
16241
16357
  componentId: "sc-1yyi6jn-3"
16242
16358
  })(["display:flex;justify-content:space-between;flex-direction:column;height:100%;"]);
16243
- var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
16359
+ var ItemComponentScrollWrapper$2 = /*#__PURE__*/styled.div.withConfig({
16244
16360
  displayName: "ManagmentPanel__ItemComponentScrollWrapper",
16245
16361
  componentId: "sc-1yyi6jn-4"
16246
16362
  })(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
@@ -18168,5 +18284,5 @@ var ButtonWrapper$3 = /*#__PURE__*/styled.div.withConfig({
18168
18284
  componentId: "sc-gptoxp-5"
18169
18285
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
18170
18286
 
18171
- export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, rarityColor, useEventListener };
18287
+ export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, rarityColor, useEventListener };
18172
18288
  //# sourceMappingURL=long-bow.esm.js.map