@rpg-engine/long-bow 0.6.75 → 0.6.77
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/index.d.ts +2 -2
- package/dist/long-bow.cjs.development.js +80 -216
- 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 +80 -216
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/QuestInfo.stories.d.ts +1 -1
- package/dist/stories/QuestList.stories.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/{QuestInfo → Quests/QuestInfo}/QuestInfo.tsx +8 -8
- package/src/components/Quests/QuestList.tsx +202 -0
- package/src/index.tsx +2 -2
- package/src/stories/QuestInfo.stories.tsx +1 -1
- package/src/stories/QuestList.stories.tsx +1 -1
- package/src/components/QuestList.tsx +0 -184
- /package/dist/components/{QuestInfo → Quests/QuestInfo}/QuestInfo.d.ts +0 -0
- /package/dist/components/{QuestList.d.ts → Quests/QuestList.d.ts} +0 -0
- /package/src/components/{QuestInfo → Quests/QuestInfo}/img/default.png +0 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -31875,237 +31875,78 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
31875
31875
|
};
|
|
31876
31876
|
var QuestDraggableContainer = /*#__PURE__*/styled(DraggableContainer).withConfig({
|
|
31877
31877
|
displayName: "QuestInfo__QuestDraggableContainer",
|
|
31878
|
-
componentId: "sc-
|
|
31878
|
+
componentId: "sc-1wccpiy-0"
|
|
31879
31879
|
})(["border:1px solid black;width:600px;padding:0 0 0 0 !important;.DraggableContainer__TitleContainer-sc-184mpyl-2{height:auto;}.container-close{position:absolute;margin-left:auto;top:20px;padding-right:5px;}img{display:inline-block;vertical-align:middle;line-height:normal;}"]);
|
|
31880
31880
|
var QuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31881
31881
|
displayName: "QuestInfo__QuestContainer",
|
|
31882
|
-
componentId: "sc-
|
|
31882
|
+
componentId: "sc-1wccpiy-1"
|
|
31883
31883
|
})(["margin-right:40px;margin-left:40px;"]);
|
|
31884
31884
|
var QuestsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31885
31885
|
displayName: "QuestInfo__QuestsContainer",
|
|
31886
|
-
componentId: "sc-
|
|
31886
|
+
componentId: "sc-1wccpiy-2"
|
|
31887
31887
|
})(["display:flex;align-items:center;"]);
|
|
31888
31888
|
var Content = /*#__PURE__*/styled.div.withConfig({
|
|
31889
31889
|
displayName: "QuestInfo__Content",
|
|
31890
|
-
componentId: "sc-
|
|
31890
|
+
componentId: "sc-1wccpiy-3"
|
|
31891
31891
|
})(["padding:18px;h1{text-align:left;margin:14px 0px;}"]);
|
|
31892
31892
|
var QuestSplitDiv = /*#__PURE__*/styled.div.withConfig({
|
|
31893
31893
|
displayName: "QuestInfo__QuestSplitDiv",
|
|
31894
|
-
componentId: "sc-
|
|
31894
|
+
componentId: "sc-1wccpiy-4"
|
|
31895
31895
|
})(["width:100%;font-size:11px;margin-bottom:10px;hr{margin:0px;padding:0px;}p{margin-bottom:0px;}"]);
|
|
31896
31896
|
var QuestColumn = /*#__PURE__*/styled(Column).withConfig({
|
|
31897
31897
|
displayName: "QuestInfo__QuestColumn",
|
|
31898
|
-
componentId: "sc-
|
|
31898
|
+
componentId: "sc-1wccpiy-5"
|
|
31899
31899
|
})(["padding-top:5px;margin-bottom:20px;display:flex;justify-content:space-evenly;"]);
|
|
31900
31900
|
var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31901
31901
|
displayName: "QuestInfo__TitleContainer",
|
|
31902
|
-
componentId: "sc-
|
|
31902
|
+
componentId: "sc-1wccpiy-6"
|
|
31903
31903
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
31904
31904
|
var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
31905
31905
|
displayName: "QuestInfo__Title",
|
|
31906
|
-
componentId: "sc-
|
|
31906
|
+
componentId: "sc-1wccpiy-7"
|
|
31907
31907
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
31908
31908
|
var Thumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
31909
31909
|
displayName: "QuestInfo__Thumbnail",
|
|
31910
|
-
componentId: "sc-
|
|
31910
|
+
componentId: "sc-1wccpiy-8"
|
|
31911
31911
|
})(["color:white;z-index:22;width:32px * 1.5;margin-right:0.5rem;position:relative;top:-4px;"]);
|
|
31912
31912
|
|
|
31913
|
-
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
31914
|
-
var children = _ref.children;
|
|
31915
|
-
return React.createElement(Container$r, null, children);
|
|
31916
|
-
};
|
|
31917
|
-
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
31918
|
-
displayName: "RPGUIScrollbar__Container",
|
|
31919
|
-
componentId: "sc-p3msmb-0"
|
|
31920
|
-
})([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
|
|
31921
|
-
|
|
31922
|
-
var RPGUIOverrides = function RPGUIOverrides(_ref) {
|
|
31923
|
-
var children = _ref.children;
|
|
31924
|
-
return React.createElement(RPGUIScrollbar, null, children);
|
|
31925
|
-
};
|
|
31926
|
-
|
|
31927
|
-
//@ts-ignore
|
|
31928
|
-
var _RPGUI = RPGUI;
|
|
31929
|
-
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
31930
|
-
var children = _ref.children;
|
|
31931
|
-
return React.createElement(RPGUIOverrides, null, React.createElement("div", {
|
|
31932
|
-
className: "rpgui-content"
|
|
31933
|
-
}, children));
|
|
31934
|
-
};
|
|
31935
|
-
|
|
31936
|
-
var SimpleTooltip = function SimpleTooltip(_ref) {
|
|
31937
|
-
var content = _ref.content,
|
|
31938
|
-
_ref$direction = _ref.direction,
|
|
31939
|
-
direction = _ref$direction === void 0 ? 'top' : _ref$direction,
|
|
31940
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
31941
|
-
backgroundColor = _ref$backgroundColor === void 0 ? uiColors.raisinBlack : _ref$backgroundColor,
|
|
31942
|
-
_ref$textColor = _ref.textColor,
|
|
31943
|
-
textColor = _ref$textColor === void 0 ? uiColors.white : _ref$textColor,
|
|
31944
|
-
children = _ref.children,
|
|
31945
|
-
_ref$showDelay = _ref.showDelay,
|
|
31946
|
-
showDelay = _ref$showDelay === void 0 ? 200 : _ref$showDelay,
|
|
31947
|
-
_ref$hideDelay = _ref.hideDelay,
|
|
31948
|
-
hideDelay = _ref$hideDelay === void 0 ? 200 : _ref$hideDelay;
|
|
31949
|
-
var _useState = useState(false),
|
|
31950
|
-
visible = _useState[0],
|
|
31951
|
-
setVisible = _useState[1];
|
|
31952
|
-
var _useState2 = useState({
|
|
31953
|
-
top: 0,
|
|
31954
|
-
left: 0
|
|
31955
|
-
}),
|
|
31956
|
-
tooltipPosition = _useState2[0],
|
|
31957
|
-
setTooltipPosition = _useState2[1];
|
|
31958
|
-
var tooltipRef = useRef(null);
|
|
31959
|
-
var triggerRef = useRef(null);
|
|
31960
|
-
var timeoutRef = useRef();
|
|
31961
|
-
var calculatePosition = function calculatePosition() {
|
|
31962
|
-
if (!triggerRef.current || !tooltipRef.current) return;
|
|
31963
|
-
var triggerRect = triggerRef.current.getBoundingClientRect();
|
|
31964
|
-
var tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
31965
|
-
var top, left;
|
|
31966
|
-
switch (direction) {
|
|
31967
|
-
case 'top':
|
|
31968
|
-
top = triggerRect.top - tooltipRect.height - 8;
|
|
31969
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
|
|
31970
|
-
break;
|
|
31971
|
-
case 'bottom':
|
|
31972
|
-
top = triggerRect.bottom + 8;
|
|
31973
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
|
|
31974
|
-
break;
|
|
31975
|
-
case 'left':
|
|
31976
|
-
top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
|
|
31977
|
-
left = triggerRect.left - tooltipRect.width - 8;
|
|
31978
|
-
break;
|
|
31979
|
-
case 'right':
|
|
31980
|
-
top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
|
|
31981
|
-
left = triggerRect.right + 8;
|
|
31982
|
-
break;
|
|
31983
|
-
default:
|
|
31984
|
-
top = triggerRect.top - tooltipRect.height - 8;
|
|
31985
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
|
|
31986
|
-
}
|
|
31987
|
-
// Ensure the tooltip stays within the viewport
|
|
31988
|
-
if (left < 8) left = 8;
|
|
31989
|
-
if (left + tooltipRect.width > window.innerWidth) left = window.innerWidth - tooltipRect.width - 8;
|
|
31990
|
-
if (top < 8) top = 8;
|
|
31991
|
-
if (top + tooltipRect.height > window.innerHeight) top = window.innerHeight - tooltipRect.height - 8;
|
|
31992
|
-
setTooltipPosition({
|
|
31993
|
-
top: Math.round(top),
|
|
31994
|
-
left: Math.round(left)
|
|
31995
|
-
});
|
|
31996
|
-
};
|
|
31997
|
-
var showTooltip = function showTooltip() {
|
|
31998
|
-
clearTimeout(timeoutRef.current);
|
|
31999
|
-
timeoutRef.current = setTimeout(function () {
|
|
32000
|
-
setVisible(true);
|
|
32001
|
-
calculatePosition();
|
|
32002
|
-
}, showDelay);
|
|
32003
|
-
};
|
|
32004
|
-
var hideTooltip = function hideTooltip() {
|
|
32005
|
-
clearTimeout(timeoutRef.current);
|
|
32006
|
-
timeoutRef.current = setTimeout(function () {
|
|
32007
|
-
setVisible(false);
|
|
32008
|
-
}, hideDelay);
|
|
32009
|
-
};
|
|
32010
|
-
useEffect(function () {
|
|
32011
|
-
var handleMouseMove = function handleMouseMove(event) {
|
|
32012
|
-
if (visible && tooltipRef.current && triggerRef.current) {
|
|
32013
|
-
var tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
32014
|
-
var triggerRect = triggerRef.current.getBoundingClientRect();
|
|
32015
|
-
var isOutsideTooltip = event.clientX < tooltipRect.left || event.clientX > tooltipRect.right || event.clientY < tooltipRect.top || event.clientY > tooltipRect.bottom;
|
|
32016
|
-
var isOutsideTrigger = event.clientX < triggerRect.left || event.clientX > triggerRect.right || event.clientY < triggerRect.top || event.clientY > triggerRect.bottom;
|
|
32017
|
-
if (isOutsideTooltip && isOutsideTrigger) {
|
|
32018
|
-
hideTooltip();
|
|
32019
|
-
}
|
|
32020
|
-
}
|
|
32021
|
-
};
|
|
32022
|
-
var handleScroll = function handleScroll() {
|
|
32023
|
-
if (visible) {
|
|
32024
|
-
hideTooltip();
|
|
32025
|
-
}
|
|
32026
|
-
};
|
|
32027
|
-
var handleResize = function handleResize() {
|
|
32028
|
-
if (visible) {
|
|
32029
|
-
calculatePosition();
|
|
32030
|
-
}
|
|
32031
|
-
};
|
|
32032
|
-
document.addEventListener('mousemove', handleMouseMove);
|
|
32033
|
-
window.addEventListener('scroll', handleScroll);
|
|
32034
|
-
window.addEventListener('resize', handleResize);
|
|
32035
|
-
return function () {
|
|
32036
|
-
document.removeEventListener('mousemove', handleMouseMove);
|
|
32037
|
-
window.removeEventListener('scroll', handleScroll);
|
|
32038
|
-
window.removeEventListener('resize', handleResize);
|
|
32039
|
-
clearTimeout(timeoutRef.current);
|
|
32040
|
-
};
|
|
32041
|
-
}, [visible]);
|
|
32042
|
-
return React.createElement(TooltipContainer, {
|
|
32043
|
-
ref: triggerRef,
|
|
32044
|
-
onMouseEnter: showTooltip,
|
|
32045
|
-
onMouseLeave: hideTooltip,
|
|
32046
|
-
onFocus: showTooltip,
|
|
32047
|
-
onBlur: hideTooltip
|
|
32048
|
-
}, children, visible && ReactDOM.createPortal(React.createElement(RPGUIRoot, null, React.createElement(TooltipBox, {
|
|
32049
|
-
ref: tooltipRef,
|
|
32050
|
-
direction: direction,
|
|
32051
|
-
backgroundColor: backgroundColor,
|
|
32052
|
-
textColor: textColor,
|
|
32053
|
-
style: {
|
|
32054
|
-
top: tooltipPosition.top,
|
|
32055
|
-
left: tooltipPosition.left
|
|
32056
|
-
}
|
|
32057
|
-
}, content)), document.body));
|
|
32058
|
-
};
|
|
32059
|
-
var TooltipContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32060
|
-
displayName: "SimpleTooltip__TooltipContainer",
|
|
32061
|
-
componentId: "sc-l46vpo-0"
|
|
32062
|
-
})(["display:inline-block;cursor:inherit;"]);
|
|
32063
|
-
var fadeIn$1 = /*#__PURE__*/keyframes(["from{opacity:0;transform:scale(0.95);}to{opacity:1;transform:scale(1);}"]);
|
|
32064
|
-
var TooltipBox = /*#__PURE__*/styled.div.withConfig({
|
|
32065
|
-
displayName: "SimpleTooltip__TooltipBox",
|
|
32066
|
-
componentId: "sc-l46vpo-1"
|
|
32067
|
-
})(["position:fixed;z-index:1000;background-color:", ";color:", ";padding:8px;border-radius:4px;font-size:0.65rem;max-width:250px;box-shadow:0px 4px 8px rgba(0,0,0,0.1);animation:", " 0.2s ease-out;line-height:1.3;"], function (_ref2) {
|
|
32068
|
-
var backgroundColor = _ref2.backgroundColor;
|
|
32069
|
-
return backgroundColor;
|
|
32070
|
-
}, function (_ref3) {
|
|
32071
|
-
var textColor = _ref3.textColor;
|
|
32072
|
-
return textColor;
|
|
32073
|
-
}, fadeIn$1);
|
|
32074
|
-
|
|
32075
31913
|
var QuestList = function QuestList(_ref) {
|
|
32076
31914
|
var quests = _ref.quests;
|
|
32077
|
-
return React.createElement(QuestListContainer, null, quests && quests.length > 0 ?
|
|
32078
|
-
var
|
|
32079
|
-
return React.createElement(
|
|
31915
|
+
return React.createElement(QuestListContainer, null, quests && quests.length > 0 ? quests.map(function (quest, i) {
|
|
31916
|
+
var _formatStatus;
|
|
31917
|
+
return React.createElement(QuestCard, {
|
|
32080
31918
|
key: i
|
|
32081
|
-
}, React.createElement(
|
|
31919
|
+
}, React.createElement(QuestItem, null, React.createElement(Label, null, "Title:"), React.createElement(Value, null, formatText(quest.title))), React.createElement(QuestItem, null, React.createElement(Label, null, "Status:"), React.createElement(Value, {
|
|
32082
31920
|
style: {
|
|
32083
31921
|
color: getStatusColor(quest.status)
|
|
32084
31922
|
}
|
|
32085
|
-
}, (
|
|
32086
|
-
|
|
32087
|
-
direction: "bottom"
|
|
32088
|
-
}, React.createElement(Ellipsis, {
|
|
32089
|
-
maxWidth: "300px"
|
|
32090
|
-
}, formatText(quest.title)))), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
|
|
32091
|
-
content: quest.description,
|
|
32092
|
-
direction: "bottom"
|
|
32093
|
-
}, React.createElement(Ellipsis, {
|
|
32094
|
-
maxWidth: "300px"
|
|
32095
|
-
}, quest.description))), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
|
|
32096
|
-
content: formatObjectives(quest.objectives),
|
|
32097
|
-
direction: "bottom"
|
|
32098
|
-
}, React.createElement(Ellipsis, {
|
|
32099
|
-
maxWidth: "300px"
|
|
32100
|
-
}, formatObjectives(quest.objectives)))), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
|
|
32101
|
-
content: formatRewards(quest.rewards),
|
|
32102
|
-
direction: "bottom"
|
|
32103
|
-
}, React.createElement(Ellipsis, {
|
|
32104
|
-
maxWidth: "200px"
|
|
32105
|
-
}, formatRewards(quest.rewards)))));
|
|
32106
|
-
})))) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")));
|
|
31923
|
+
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label, null, "Description:"), React.createElement(Value, null, quest.description)), React.createElement(QuestItem, null, React.createElement(Label, null, "Objectives:"), React.createElement(Value, null, formatObjectives(quest.objectives))), React.createElement(QuestItem, null, React.createElement(Label, null, "Rewards:"), React.createElement(Value, null, formatRewards(quest.rewards))));
|
|
31924
|
+
}) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")));
|
|
32107
31925
|
};
|
|
32108
|
-
|
|
31926
|
+
var QuestListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31927
|
+
displayName: "QuestList__QuestListContainer",
|
|
31928
|
+
componentId: "sc-1c1y8sp-0"
|
|
31929
|
+
})(["margin-top:20px;margin-bottom:40px;overflow-y:auto;max-height:400px;padding:10px;border-radius:10px;font-size:0.7rem;"]);
|
|
31930
|
+
var QuestCard = /*#__PURE__*/styled.div.withConfig({
|
|
31931
|
+
displayName: "QuestList__QuestCard",
|
|
31932
|
+
componentId: "sc-1c1y8sp-1"
|
|
31933
|
+
})(["background-color:", ";padding:15px;margin-bottom:10px;border-radius:10px;border:1px solid ", ";display:flex;flex-direction:column;"], uiColors.darkGray, uiColors.gray);
|
|
31934
|
+
var QuestItem = /*#__PURE__*/styled.div.withConfig({
|
|
31935
|
+
displayName: "QuestList__QuestItem",
|
|
31936
|
+
componentId: "sc-1c1y8sp-2"
|
|
31937
|
+
})(["display:flex;margin-bottom:5px;flex-wrap:wrap;&:last-child{margin-bottom:0;}"]);
|
|
31938
|
+
var Label = /*#__PURE__*/styled.span.withConfig({
|
|
31939
|
+
displayName: "QuestList__Label",
|
|
31940
|
+
componentId: "sc-1c1y8sp-3"
|
|
31941
|
+
})(["font-weight:bold;color:", " !important;margin-right:10px;"], uiColors.yellow);
|
|
31942
|
+
var Value = /*#__PURE__*/styled.span.withConfig({
|
|
31943
|
+
displayName: "QuestList__Value",
|
|
31944
|
+
componentId: "sc-1c1y8sp-4"
|
|
31945
|
+
})(["flex-grow:1;color:", ";word-wrap:break-word;"], uiColors.white);
|
|
31946
|
+
var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31947
|
+
displayName: "QuestList__NoQuestContainer",
|
|
31948
|
+
componentId: "sc-1c1y8sp-5"
|
|
31949
|
+
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
32109
31950
|
var formatObjectives = function formatObjectives(objectives) {
|
|
32110
31951
|
try {
|
|
32111
31952
|
if (!objectives || !Array.isArray(objectives)) return 'No objectives';
|
|
@@ -32127,22 +31968,28 @@ var formatObjectives = function formatObjectives(objectives) {
|
|
|
32127
31968
|
return 'Error formatting objectives';
|
|
32128
31969
|
}
|
|
32129
31970
|
};
|
|
32130
|
-
// Updated helper function to format rewards
|
|
32131
31971
|
var formatRewards = function formatRewards(rewards) {
|
|
32132
31972
|
try {
|
|
32133
31973
|
if (!rewards || !Array.isArray(rewards)) return 'No rewards';
|
|
32134
31974
|
return rewards.map(function (reward) {
|
|
32135
|
-
var _reward$itemKeys;
|
|
32136
|
-
|
|
32137
|
-
return itemKey
|
|
32138
|
-
}).
|
|
32139
|
-
|
|
31975
|
+
var _reward$itemKeys, _reward$spellKeys;
|
|
31976
|
+
var itemKeysFormatted = reward == null ? void 0 : (_reward$itemKeys = reward.itemKeys) == null ? void 0 : _reward$itemKeys.map(function (itemKey) {
|
|
31977
|
+
return itemKey && (reward == null ? void 0 : reward.qty) !== undefined ? itemKey + " x" + reward.qty : '';
|
|
31978
|
+
}).filter(Boolean).join(', ');
|
|
31979
|
+
var spellKeysFormatted = reward == null ? void 0 : (_reward$spellKeys = reward.spellKeys) == null ? void 0 : _reward$spellKeys.filter(Boolean).join(', ');
|
|
31980
|
+
var formattedReward = itemKeysFormatted ? "" + formatText(itemKeysFormatted) : '';
|
|
31981
|
+
if (spellKeysFormatted) {
|
|
31982
|
+
return formattedReward ? formattedReward + ", Spells: " + formatText(spellKeysFormatted) : "Spells: " + formatText(spellKeysFormatted);
|
|
31983
|
+
}
|
|
31984
|
+
return formattedReward || 'No rewards';
|
|
31985
|
+
}).filter(Boolean).join('; ');
|
|
32140
31986
|
} catch (error) {
|
|
32141
31987
|
console.error("Error formatting rewards: " + JSON.stringify(rewards) + ":", error);
|
|
32142
31988
|
return 'Error on rewards';
|
|
32143
31989
|
}
|
|
32144
31990
|
};
|
|
32145
31991
|
var formatText = function formatText(text) {
|
|
31992
|
+
if (!text) return 'Unknown';
|
|
32146
31993
|
return text.split('-').map(function (word) {
|
|
32147
31994
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
32148
31995
|
}).join(' ');
|
|
@@ -32151,26 +31998,20 @@ var getStatusColor = function getStatusColor(status) {
|
|
|
32151
31998
|
switch (status) {
|
|
32152
31999
|
case QuestStatus.Pending:
|
|
32153
32000
|
return uiColors.orange;
|
|
32154
|
-
// Orange
|
|
32155
32001
|
case QuestStatus.InProgress:
|
|
32156
32002
|
return uiColors.blue;
|
|
32157
|
-
// Deep Sky Blue
|
|
32158
32003
|
case QuestStatus.Completed:
|
|
32159
32004
|
return uiColors.lightGreen;
|
|
32160
|
-
// Lime Green
|
|
32161
32005
|
default:
|
|
32162
32006
|
return uiColors.white;
|
|
32163
|
-
// Default to white
|
|
32164
32007
|
}
|
|
32165
32008
|
};
|
|
32166
|
-
var
|
|
32167
|
-
|
|
32168
|
-
|
|
32169
|
-
|
|
32170
|
-
|
|
32171
|
-
|
|
32172
|
-
componentId: "sc-1a2vx6q-1"
|
|
32173
|
-
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
32009
|
+
var formatStatus = function formatStatus(status) {
|
|
32010
|
+
if (!status) return 'Unknown';
|
|
32011
|
+
return status.split(/(?=[A-Z])/).join(' ').replace(/^\w/, function (c) {
|
|
32012
|
+
return c.toUpperCase();
|
|
32013
|
+
});
|
|
32014
|
+
};
|
|
32174
32015
|
|
|
32175
32016
|
var InputRadio$1 = function InputRadio(_ref) {
|
|
32176
32017
|
var name = _ref.name,
|
|
@@ -32204,6 +32045,29 @@ var InputRadio$1 = function InputRadio(_ref) {
|
|
|
32204
32045
|
}));
|
|
32205
32046
|
};
|
|
32206
32047
|
|
|
32048
|
+
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
32049
|
+
var children = _ref.children;
|
|
32050
|
+
return React.createElement(Container$r, null, children);
|
|
32051
|
+
};
|
|
32052
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
32053
|
+
displayName: "RPGUIScrollbar__Container",
|
|
32054
|
+
componentId: "sc-p3msmb-0"
|
|
32055
|
+
})([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
|
|
32056
|
+
|
|
32057
|
+
var RPGUIOverrides = function RPGUIOverrides(_ref) {
|
|
32058
|
+
var children = _ref.children;
|
|
32059
|
+
return React.createElement(RPGUIScrollbar, null, children);
|
|
32060
|
+
};
|
|
32061
|
+
|
|
32062
|
+
//@ts-ignore
|
|
32063
|
+
var _RPGUI = RPGUI;
|
|
32064
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
32065
|
+
var children = _ref.children;
|
|
32066
|
+
return React.createElement(RPGUIOverrides, null, React.createElement("div", {
|
|
32067
|
+
className: "rpgui-content"
|
|
32068
|
+
}, children));
|
|
32069
|
+
};
|
|
32070
|
+
|
|
32207
32071
|
var Shortcuts = function Shortcuts(_ref) {
|
|
32208
32072
|
var shortcuts = _ref.shortcuts,
|
|
32209
32073
|
onShortcutCast = _ref.onShortcutCast,
|