@rpg-engine/long-bow 0.4.87 → 0.4.89
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.
- package/dist/components/PartySystem/PartyManager/PartyManager.d.ts +4 -2
- package/dist/components/PartySystem/PartyManager/PartyManagerRows.d.ts +2 -1
- package/dist/components/PartySystem/mockedConstantes/mockedValues.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +66 -25
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +67 -27
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/components/PartySystem/PartyManager/PartyManager.tsx +42 -12
- package/src/components/PartySystem/PartyManager/PartyManagerRows.tsx +10 -5
- package/src/components/PartySystem/mockedConstantes/mockedValues.tsx +23 -5
- package/src/components/SkillProgressBar.tsx +6 -9
- package/src/mocks/.DS_Store +0 -0
- package/src/mocks/atlas/.DS_Store +0 -0
- package/src/stories/PartyManager.stories.tsx +2 -2
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component, useState, useEffect, useRef, useMemo, Fragment } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSubType, ItemSlotType, isMobileOrTablet, getSPForLevel, getXPForLevel, PeriodOfDay } from '@rpg-engine/shared';
|
|
3
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSubType, ItemSlotType, isMobileOrTablet, CharacterClass, getSPForLevel, getXPForLevel, PeriodOfDay } from '@rpg-engine/shared';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
6
6
|
import { RxPaperPlane } from 'react-icons/rx';
|
|
@@ -16342,13 +16342,16 @@ var RowsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
16342
16342
|
var PartyManagerRow = function PartyManagerRow(_ref) {
|
|
16343
16343
|
var charName = _ref.charName,
|
|
16344
16344
|
charClass = _ref.charClass,
|
|
16345
|
-
|
|
16346
|
-
|
|
16345
|
+
isLeader = _ref.isLeader,
|
|
16346
|
+
isLeaderRow = _ref.isLeaderRow;
|
|
16347
|
+
return React.createElement(PartyWrapper$2, null, React.createElement(TextContainer$5, null, charName), React.createElement(TextContainer$5, null, charClass), React.createElement("div", {
|
|
16347
16348
|
className: "cancel-button"
|
|
16348
16349
|
}, React.createElement(Button, {
|
|
16349
|
-
buttonType: ButtonTypes.RPGUIButton
|
|
16350
|
-
|
|
16351
|
-
|
|
16350
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
16351
|
+
disabled: !isLeader
|
|
16352
|
+
}, isLeaderRow ? 'Leader' : 'Remove')), React.createElement(Button, {
|
|
16353
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
16354
|
+
disabled: !isLeader
|
|
16352
16355
|
}, "New Leader"));
|
|
16353
16356
|
};
|
|
16354
16357
|
var PartyWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -16361,7 +16364,8 @@ var TextContainer$5 = /*#__PURE__*/styled.div.withConfig({
|
|
|
16361
16364
|
})(["color:", ";"], uiColors.white);
|
|
16362
16365
|
|
|
16363
16366
|
var PartyManager = function PartyManager(_ref) {
|
|
16364
|
-
var partyRows = _ref.partyRows
|
|
16367
|
+
var partyRows = _ref.partyRows,
|
|
16368
|
+
isLeader = _ref.isLeader;
|
|
16365
16369
|
return React.createElement(DraggableContainer, {
|
|
16366
16370
|
type: RPGUIContainerTypes.Framed,
|
|
16367
16371
|
onCloseButton: function onCloseButton() {
|
|
@@ -16378,15 +16382,22 @@ var PartyManager = function PartyManager(_ref) {
|
|
|
16378
16382
|
className: "golden"
|
|
16379
16383
|
}))), React.createElement(RowsWrapper$2, {
|
|
16380
16384
|
className: "partyRows"
|
|
16381
|
-
}, partyRows.
|
|
16385
|
+
}, partyRows ? React.createElement(React.Fragment, null, React.createElement(PartyManagerRow, {
|
|
16386
|
+
key: partyRows.leader._id,
|
|
16387
|
+
id: partyRows.leader._id,
|
|
16388
|
+
charName: partyRows.leader.name,
|
|
16389
|
+
charClass: partyRows.leader["class"],
|
|
16390
|
+
isLeader: isLeader,
|
|
16391
|
+
isLeaderRow: true
|
|
16392
|
+
}), partyRows.members.map(function (partyRows) {
|
|
16382
16393
|
return React.createElement(PartyManagerRow, {
|
|
16383
|
-
key: partyRows.
|
|
16384
|
-
charName: partyRows.
|
|
16385
|
-
charClass: partyRows
|
|
16386
|
-
|
|
16387
|
-
|
|
16394
|
+
key: partyRows._id,
|
|
16395
|
+
charName: partyRows.name,
|
|
16396
|
+
charClass: partyRows["class"],
|
|
16397
|
+
id: partyRows._id,
|
|
16398
|
+
isLeader: isLeader
|
|
16388
16399
|
});
|
|
16389
|
-
})));
|
|
16400
|
+
})) : React.createElement(React.Fragment, null, React.createElement(NotinParty, null, "You are not in party. ", React.createElement("br", null), "Please create a new party"))));
|
|
16390
16401
|
};
|
|
16391
16402
|
var Wrapper$5 = /*#__PURE__*/styled.div.withConfig({
|
|
16392
16403
|
displayName: "PartyManager__Wrapper",
|
|
@@ -16400,6 +16411,10 @@ var Title$6 = /*#__PURE__*/styled.h1.withConfig({
|
|
|
16400
16411
|
displayName: "PartyManager__Title",
|
|
16401
16412
|
componentId: "sc-1yqcad8-2"
|
|
16402
16413
|
})(["font-size:0.6rem;color:", " !important;"], uiColors.yellow);
|
|
16414
|
+
var NotinParty = /*#__PURE__*/styled.h1.withConfig({
|
|
16415
|
+
displayName: "PartyManager__NotinParty",
|
|
16416
|
+
componentId: "sc-1yqcad8-3"
|
|
16417
|
+
})(["font-size:0.6rem;margin:auto;"]);
|
|
16403
16418
|
|
|
16404
16419
|
var mockedPartyRows = [{
|
|
16405
16420
|
id: /*#__PURE__*/v4(),
|
|
@@ -16466,6 +16481,33 @@ var mockedPartyRows = [{
|
|
|
16466
16481
|
isInvited: true,
|
|
16467
16482
|
partyName: 'Party'
|
|
16468
16483
|
}];
|
|
16484
|
+
var mockedPlayersRows2 = {
|
|
16485
|
+
id: /*#__PURE__*/v4(),
|
|
16486
|
+
leader: {
|
|
16487
|
+
_id: /*#__PURE__*/v4(),
|
|
16488
|
+
"class": CharacterClass.Druid,
|
|
16489
|
+
name: 'leader'
|
|
16490
|
+
},
|
|
16491
|
+
members: [{
|
|
16492
|
+
_id: /*#__PURE__*/v4(),
|
|
16493
|
+
"class": CharacterClass.Druid,
|
|
16494
|
+
name: 'blblb'
|
|
16495
|
+
}, {
|
|
16496
|
+
_id: /*#__PURE__*/v4(),
|
|
16497
|
+
"class": CharacterClass.Druid,
|
|
16498
|
+
name: 'blblb'
|
|
16499
|
+
}, {
|
|
16500
|
+
_id: /*#__PURE__*/v4(),
|
|
16501
|
+
"class": CharacterClass.Druid,
|
|
16502
|
+
name: 'blblb'
|
|
16503
|
+
}, {
|
|
16504
|
+
_id: /*#__PURE__*/v4(),
|
|
16505
|
+
"class": CharacterClass.Druid,
|
|
16506
|
+
name: 'blblb'
|
|
16507
|
+
}],
|
|
16508
|
+
maxSize: 5,
|
|
16509
|
+
size: 4
|
|
16510
|
+
};
|
|
16469
16511
|
var mockedPlayersRows = [{
|
|
16470
16512
|
id: /*#__PURE__*/v4(),
|
|
16471
16513
|
charName: 'CharNome',
|
|
@@ -16501,27 +16543,27 @@ var mockedPartyManager = [{
|
|
|
16501
16543
|
id: /*#__PURE__*/v4(),
|
|
16502
16544
|
charName: 'CharNome',
|
|
16503
16545
|
charClass: 'CharClass',
|
|
16504
|
-
|
|
16546
|
+
isLeader: false
|
|
16505
16547
|
}, {
|
|
16506
16548
|
id: /*#__PURE__*/v4(),
|
|
16507
16549
|
charName: 'CharNome',
|
|
16508
16550
|
charClass: 'CharClass',
|
|
16509
|
-
|
|
16551
|
+
isLeader: false
|
|
16510
16552
|
}, {
|
|
16511
16553
|
id: /*#__PURE__*/v4(),
|
|
16512
16554
|
charName: 'CharNome',
|
|
16513
16555
|
charClass: 'CharClass',
|
|
16514
|
-
|
|
16556
|
+
isLeader: false
|
|
16515
16557
|
}, {
|
|
16516
16558
|
id: /*#__PURE__*/v4(),
|
|
16517
16559
|
charName: 'CharNome',
|
|
16518
16560
|
charClass: 'CharClass',
|
|
16519
|
-
|
|
16561
|
+
isLeader: false
|
|
16520
16562
|
}, {
|
|
16521
16563
|
id: /*#__PURE__*/v4(),
|
|
16522
16564
|
charName: 'CharNome',
|
|
16523
16565
|
charClass: 'CharClass',
|
|
16524
|
-
|
|
16566
|
+
isLeader: false
|
|
16525
16567
|
}];
|
|
16526
16568
|
|
|
16527
16569
|
var ProgressBar = function ProgressBar(_ref) {
|
|
@@ -16963,15 +17005,13 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
16963
17005
|
if (!skillPointsToNextLevel) {
|
|
16964
17006
|
skillPointsToNextLevel = getSPForLevel(level + 1);
|
|
16965
17007
|
}
|
|
16966
|
-
var skillsBuffsCalc = function skillsBuffsCalc(
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
return "+" + result.toFixed(2);
|
|
16970
|
-
} else {
|
|
16971
|
-
return "" + result.toFixed(2);
|
|
17008
|
+
var skillsBuffsCalc = function skillsBuffsCalc() {
|
|
17009
|
+
if (buffAndDebuff) {
|
|
17010
|
+
return 1 + buffAndDebuff / 100;
|
|
16972
17011
|
}
|
|
17012
|
+
return;
|
|
16973
17013
|
};
|
|
16974
|
-
return React.createElement(React.Fragment, null, React.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React.createElement(React.Fragment, null, buffAndDebuff > 0 ? React.createElement(BuffAndDebuffContainer, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameBuff, null, skillName), React.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(
|
|
17014
|
+
return React.createElement(React.Fragment, null, React.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React.createElement(React.Fragment, null, buffAndDebuff > 0 ? React.createElement(BuffAndDebuffContainer, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameBuff, null, skillName), React.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React.createElement(TitleNameBuffContainer, null, React.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React.createElement(React.Fragment, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameDebuff, null, skillName), React.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React.createElement("div", null, React.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React.createElement(TitleName, null, skillName)), !buffAndDebuff && React.createElement(TitleNameContainer, null, React.createElement(TitleName, null, skillName), React.createElement(ValueDisplay, null, "lv ", level))), React.createElement(ProgressBody, null, React.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React.createElement(SpriteContainer$1, null, React.createElement(ErrorBoundary, null, React.createElement(SpriteFromAtlas, {
|
|
16975
17015
|
atlasIMG: atlasIMG,
|
|
16976
17016
|
atlasJSON: atlasJSON,
|
|
16977
17017
|
spriteKey: texturePath,
|
|
@@ -17940,5 +17980,5 @@ var ButtonWrapper$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17940
17980
|
componentId: "sc-gptoxp-5"
|
|
17941
17981
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
17942
17982
|
|
|
17943
|
-
export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, 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, rarityColor, useEventListener };
|
|
17983
|
+
export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, 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 };
|
|
17944
17984
|
//# sourceMappingURL=long-bow.esm.js.map
|