@rpg-engine/long-bow 0.7.13 → 0.7.14
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/Quests/QuestList.d.ts +11 -1
- package/dist/long-bow.cjs.development.js +25 -73
- 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 +23 -74
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Quests/QuestList.tsx +24 -87
package/dist/long-bow.esm.js
CHANGED
|
@@ -31953,22 +31953,36 @@ var Thumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
|
31953
31953
|
})(["color:white;z-index:22;width:32px * 1.5;margin-right:0.5rem;position:relative;top:-4px;"]);
|
|
31954
31954
|
|
|
31955
31955
|
var QuestList = function QuestList(_ref) {
|
|
31956
|
-
var quests = _ref.quests
|
|
31957
|
-
|
|
31956
|
+
var quests = _ref.quests,
|
|
31957
|
+
styles = _ref.styles;
|
|
31958
|
+
return React.createElement(QuestListContainer, {
|
|
31959
|
+
style: styles == null ? void 0 : styles.container
|
|
31960
|
+
}, quests && quests.length > 0 ? quests.map(function (quest, i) {
|
|
31958
31961
|
var _formatStatus;
|
|
31959
31962
|
return React.createElement(QuestCard, {
|
|
31960
|
-
key: i
|
|
31961
|
-
|
|
31962
|
-
|
|
31963
|
+
key: i,
|
|
31964
|
+
style: styles == null ? void 0 : styles.card
|
|
31965
|
+
}, React.createElement(QuestItem, null, React.createElement(Label, {
|
|
31966
|
+
style: styles == null ? void 0 : styles.label
|
|
31967
|
+
}, "Title:"), React.createElement(Value, {
|
|
31968
|
+
style: styles == null ? void 0 : styles.value
|
|
31969
|
+
}, formatText(quest.title))), React.createElement(QuestItem, null, React.createElement(Label, {
|
|
31970
|
+
style: styles == null ? void 0 : styles.label
|
|
31971
|
+
}, "Status:"), React.createElement(Value, {
|
|
31972
|
+
style: _extends({}, styles == null ? void 0 : styles.value, {
|
|
31963
31973
|
color: getStatusColor(quest.status)
|
|
31964
|
-
}
|
|
31965
|
-
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label,
|
|
31974
|
+
})
|
|
31975
|
+
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label, {
|
|
31976
|
+
style: styles == null ? void 0 : styles.label
|
|
31977
|
+
}, "Description:"), React.createElement(Value, {
|
|
31978
|
+
style: styles == null ? void 0 : styles.value
|
|
31979
|
+
}, quest.description)));
|
|
31966
31980
|
}) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")));
|
|
31967
31981
|
};
|
|
31968
31982
|
var QuestListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31969
31983
|
displayName: "QuestList__QuestListContainer",
|
|
31970
31984
|
componentId: "sc-1c1y8sp-0"
|
|
31971
|
-
})(["
|
|
31985
|
+
})(["max-height:400px;padding:10px;border-radius:10px;font-size:0.7rem;"]);
|
|
31972
31986
|
var QuestCard = /*#__PURE__*/styled.div.withConfig({
|
|
31973
31987
|
displayName: "QuestList__QuestCard",
|
|
31974
31988
|
componentId: "sc-1c1y8sp-1"
|
|
@@ -31989,71 +32003,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
31989
32003
|
displayName: "QuestList__NoQuestContainer",
|
|
31990
32004
|
componentId: "sc-1c1y8sp-5"
|
|
31991
32005
|
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
31992
|
-
// const formatObjectives = (
|
|
31993
|
-
// objectives: (IQuestObjectiveKill | IQuestObjectiveInteraction)[]
|
|
31994
|
-
// ) => {
|
|
31995
|
-
// try {
|
|
31996
|
-
// if (!objectives || !Array.isArray(objectives)) return '';
|
|
31997
|
-
// return objectives
|
|
31998
|
-
// .map(objective => {
|
|
31999
|
-
// if ('killCountTarget' in objective) {
|
|
32000
|
-
// const killObjective = objective as IQuestObjectiveKill;
|
|
32001
|
-
// return `Kill ${formatText(
|
|
32002
|
-
// killObjective.creatureKeys?.join(', ') ?? ''
|
|
32003
|
-
// )}: ${killObjective.killCount ?? 0}/${killObjective.killCountTarget ??
|
|
32004
|
-
// 0}`;
|
|
32005
|
-
// } else if ('targetNPCkey' in objective) {
|
|
32006
|
-
// const interactionObjective = objective as IQuestObjectiveInteraction;
|
|
32007
|
-
// return `Interact with NPC: ${formatText(
|
|
32008
|
-
// interactionObjective.targetNPCkey ?? ''
|
|
32009
|
-
// )}`;
|
|
32010
|
-
// } else {
|
|
32011
|
-
// return '';
|
|
32012
|
-
// }
|
|
32013
|
-
// })
|
|
32014
|
-
// .filter(Boolean)
|
|
32015
|
-
// .join('; ');
|
|
32016
|
-
// } catch (error) {
|
|
32017
|
-
// console.error('Error formatting objectives:', error);
|
|
32018
|
-
// return '';
|
|
32019
|
-
// }
|
|
32020
|
-
// };
|
|
32021
|
-
// const formatRewards = (rewards: IQuest['rewards']) => {
|
|
32022
|
-
// try {
|
|
32023
|
-
// if (!rewards || !Array.isArray(rewards)) return '';
|
|
32024
|
-
// return rewards
|
|
32025
|
-
// .map(reward => {
|
|
32026
|
-
// const itemKeysFormatted = reward?.itemKeys
|
|
32027
|
-
// ?.map(itemKey =>
|
|
32028
|
-
// itemKey && reward?.qty !== undefined
|
|
32029
|
-
// ? `${itemKey} x${reward.qty}`
|
|
32030
|
-
// : ''
|
|
32031
|
-
// )
|
|
32032
|
-
// .filter(Boolean)
|
|
32033
|
-
// .join(', ');
|
|
32034
|
-
// const spellKeysFormatted = reward?.spellKeys
|
|
32035
|
-
// ?.filter(Boolean)
|
|
32036
|
-
// .join(', ');
|
|
32037
|
-
// const formattedReward = itemKeysFormatted
|
|
32038
|
-
// ? `${formatText(itemKeysFormatted)}`
|
|
32039
|
-
// : '';
|
|
32040
|
-
// if (spellKeysFormatted) {
|
|
32041
|
-
// return formattedReward
|
|
32042
|
-
// ? `${formattedReward}, Spells: ${formatText(spellKeysFormatted)}`
|
|
32043
|
-
// : `Spells: ${formatText(spellKeysFormatted)}`;
|
|
32044
|
-
// }
|
|
32045
|
-
// return formattedReward || '';
|
|
32046
|
-
// })
|
|
32047
|
-
// .filter(Boolean)
|
|
32048
|
-
// .join('; ');
|
|
32049
|
-
// } catch (error) {
|
|
32050
|
-
// console.error(
|
|
32051
|
-
// `Error formatting rewards: ${JSON.stringify(rewards)}:`,
|
|
32052
|
-
// error
|
|
32053
|
-
// );
|
|
32054
|
-
// return '';
|
|
32055
|
-
// }
|
|
32056
|
-
// };
|
|
32057
32006
|
var formatText = function formatText(text) {
|
|
32058
32007
|
if (!text) return '';
|
|
32059
32008
|
return text.split('-').map(function (word) {
|
|
@@ -33623,5 +33572,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
33623
33572
|
componentId: "sc-7tgzv2-6"
|
|
33624
33573
|
})(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
|
|
33625
33574
|
|
|
33626
|
-
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, Table, TableCell, TableHeader, TableRow, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
33575
|
+
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, Table, TableCell, TableHeader, TableRow, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatStatus, formatText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
33627
33576
|
//# sourceMappingURL=long-bow.esm.js.map
|