@rpg-engine/long-bow 0.6.76 → 0.6.78
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/DraggableContainer.d.ts +2 -0
- package/dist/components/Multitab/TabsContainer.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/long-bow.cjs.development.js +88 -217
- 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 +88 -217
- 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/DraggableContainer.tsx +12 -2
- package/src/components/Multitab/TabsContainer.tsx +4 -0
- package/src/components/{QuestInfo → Quests/QuestInfo}/QuestInfo.tsx +8 -8
- package/src/components/{QuestList.tsx → Quests/QuestList.tsx} +89 -89
- package/src/index.tsx +2 -2
- package/src/stories/QuestInfo.stories.tsx +1 -1
- package/src/stories/QuestList.stories.tsx +1 -1
- /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/index.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ export * from './components/NPCDialog/QuestionDialog/QuestionDialog';
|
|
|
33
33
|
export * from './components/PartySystem';
|
|
34
34
|
export * from './components/ProgressBar';
|
|
35
35
|
export * from './components/PropertySelect/PropertySelect';
|
|
36
|
-
export * from './components/QuestInfo/QuestInfo';
|
|
37
|
-
export * from './components/QuestList';
|
|
36
|
+
export * from './components/Quests/QuestInfo/QuestInfo';
|
|
37
|
+
export * from './components/Quests/QuestList';
|
|
38
38
|
export * from './components/RadioButton';
|
|
39
39
|
export * from './components/RangeSlider';
|
|
40
40
|
export * from './components/RPGUI/RPGUIContainer';
|
|
@@ -26943,6 +26943,8 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
26943
26943
|
_ref$width = _ref.width,
|
|
26944
26944
|
width = _ref$width === void 0 ? '50%' : _ref$width,
|
|
26945
26945
|
height = _ref.height,
|
|
26946
|
+
minHeight = _ref.minHeight,
|
|
26947
|
+
minWidth = _ref.minWidth,
|
|
26946
26948
|
className = _ref.className,
|
|
26947
26949
|
_ref$type = _ref.type,
|
|
26948
26950
|
type = _ref$type === void 0 ? exports.RPGUIContainerTypes.FramedGold : _ref$type,
|
|
@@ -27018,6 +27020,8 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
27018
27020
|
ref: draggableRef,
|
|
27019
27021
|
width: width,
|
|
27020
27022
|
height: height || 'auto',
|
|
27023
|
+
minWidth: minWidth,
|
|
27024
|
+
minHeight: minHeight,
|
|
27021
27025
|
className: "rpgui-container " + type + " " + className,
|
|
27022
27026
|
isFullScreen: isFullScreen,
|
|
27023
27027
|
opacity: opacity
|
|
@@ -27034,16 +27038,22 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
27034
27038
|
var Container$7 = /*#__PURE__*/styled__default.div.withConfig({
|
|
27035
27039
|
displayName: "DraggableContainer__Container",
|
|
27036
27040
|
componentId: "sc-184mpyl-0"
|
|
27037
|
-
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
27041
|
+
})(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
27038
27042
|
return props.height;
|
|
27039
27043
|
}, function (_ref2) {
|
|
27040
27044
|
var width = _ref2.width;
|
|
27041
27045
|
return width;
|
|
27042
27046
|
}, function (_ref3) {
|
|
27043
|
-
var
|
|
27044
|
-
return
|
|
27047
|
+
var minWidth = _ref3.minWidth;
|
|
27048
|
+
return minWidth || 'auto';
|
|
27045
27049
|
}, function (_ref4) {
|
|
27046
|
-
var
|
|
27050
|
+
var minHeight = _ref4.minHeight;
|
|
27051
|
+
return minHeight || 'auto';
|
|
27052
|
+
}, function (_ref5) {
|
|
27053
|
+
var opacity = _ref5.opacity;
|
|
27054
|
+
return opacity && styled.css(["opacity:", ";"], opacity);
|
|
27055
|
+
}, function (_ref6) {
|
|
27056
|
+
var isFullScreen = _ref6.isFullScreen;
|
|
27047
27057
|
return isFullScreen && styled.css(["justify-content:center;align-items:flex-start;align-content:flex-start;"]);
|
|
27048
27058
|
});
|
|
27049
27059
|
var CloseButton$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -27061,8 +27071,9 @@ var Title = /*#__PURE__*/styled__default.h1.withConfig({
|
|
|
27061
27071
|
var Icon = /*#__PURE__*/styled__default.img.withConfig({
|
|
27062
27072
|
displayName: "DraggableContainer__Icon",
|
|
27063
27073
|
componentId: "sc-184mpyl-4"
|
|
27064
|
-
})(["color:white;z-index:22;font-size:", ";width:", ";margin-right:0.5rem;"], uiFonts.size.xsmall, function (
|
|
27065
|
-
|
|
27074
|
+
})(["color:white;z-index:22;font-size:", ";width:", ";margin-right:0.5rem;"], uiFonts.size.xsmall, function (_ref7) {
|
|
27075
|
+
var width = _ref7.width;
|
|
27076
|
+
return width;
|
|
27066
27077
|
});
|
|
27067
27078
|
|
|
27068
27079
|
var InputRadio = function InputRadio(_ref) {
|
|
@@ -31213,6 +31224,8 @@ var TabsContainer = function TabsContainer(_ref) {
|
|
|
31213
31224
|
,
|
|
31214
31225
|
width: styles == null ? void 0 : styles.width,
|
|
31215
31226
|
height: styles == null ? void 0 : styles.height,
|
|
31227
|
+
minWidth: styles == null ? void 0 : styles.minWidth,
|
|
31228
|
+
minHeight: styles == null ? void 0 : styles.minHeight,
|
|
31216
31229
|
className: styles == null ? void 0 : styles.className,
|
|
31217
31230
|
title: styles == null ? void 0 : styles.title,
|
|
31218
31231
|
imgSrc: styles == null ? void 0 : styles.imgSrc,
|
|
@@ -31877,237 +31890,78 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
31877
31890
|
};
|
|
31878
31891
|
var QuestDraggableContainer = /*#__PURE__*/styled__default(DraggableContainer).withConfig({
|
|
31879
31892
|
displayName: "QuestInfo__QuestDraggableContainer",
|
|
31880
|
-
componentId: "sc-
|
|
31893
|
+
componentId: "sc-1wccpiy-0"
|
|
31881
31894
|
})(["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;}"]);
|
|
31882
31895
|
var QuestContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31883
31896
|
displayName: "QuestInfo__QuestContainer",
|
|
31884
|
-
componentId: "sc-
|
|
31897
|
+
componentId: "sc-1wccpiy-1"
|
|
31885
31898
|
})(["margin-right:40px;margin-left:40px;"]);
|
|
31886
31899
|
var QuestsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31887
31900
|
displayName: "QuestInfo__QuestsContainer",
|
|
31888
|
-
componentId: "sc-
|
|
31901
|
+
componentId: "sc-1wccpiy-2"
|
|
31889
31902
|
})(["display:flex;align-items:center;"]);
|
|
31890
31903
|
var Content = /*#__PURE__*/styled__default.div.withConfig({
|
|
31891
31904
|
displayName: "QuestInfo__Content",
|
|
31892
|
-
componentId: "sc-
|
|
31905
|
+
componentId: "sc-1wccpiy-3"
|
|
31893
31906
|
})(["padding:18px;h1{text-align:left;margin:14px 0px;}"]);
|
|
31894
31907
|
var QuestSplitDiv = /*#__PURE__*/styled__default.div.withConfig({
|
|
31895
31908
|
displayName: "QuestInfo__QuestSplitDiv",
|
|
31896
|
-
componentId: "sc-
|
|
31909
|
+
componentId: "sc-1wccpiy-4"
|
|
31897
31910
|
})(["width:100%;font-size:11px;margin-bottom:10px;hr{margin:0px;padding:0px;}p{margin-bottom:0px;}"]);
|
|
31898
31911
|
var QuestColumn = /*#__PURE__*/styled__default(Column).withConfig({
|
|
31899
31912
|
displayName: "QuestInfo__QuestColumn",
|
|
31900
|
-
componentId: "sc-
|
|
31913
|
+
componentId: "sc-1wccpiy-5"
|
|
31901
31914
|
})(["padding-top:5px;margin-bottom:20px;display:flex;justify-content:space-evenly;"]);
|
|
31902
31915
|
var TitleContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31903
31916
|
displayName: "QuestInfo__TitleContainer",
|
|
31904
|
-
componentId: "sc-
|
|
31917
|
+
componentId: "sc-1wccpiy-6"
|
|
31905
31918
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
31906
31919
|
var Title$7 = /*#__PURE__*/styled__default.h1.withConfig({
|
|
31907
31920
|
displayName: "QuestInfo__Title",
|
|
31908
|
-
componentId: "sc-
|
|
31921
|
+
componentId: "sc-1wccpiy-7"
|
|
31909
31922
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
31910
31923
|
var Thumbnail = /*#__PURE__*/styled__default.img.withConfig({
|
|
31911
31924
|
displayName: "QuestInfo__Thumbnail",
|
|
31912
|
-
componentId: "sc-
|
|
31925
|
+
componentId: "sc-1wccpiy-8"
|
|
31913
31926
|
})(["color:white;z-index:22;width:32px * 1.5;margin-right:0.5rem;position:relative;top:-4px;"]);
|
|
31914
31927
|
|
|
31915
|
-
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
31916
|
-
var children = _ref.children;
|
|
31917
|
-
return React__default.createElement(Container$r, null, children);
|
|
31918
|
-
};
|
|
31919
|
-
var Container$r = /*#__PURE__*/styled__default.div.withConfig({
|
|
31920
|
-
displayName: "RPGUIScrollbar__Container",
|
|
31921
|
-
componentId: "sc-p3msmb-0"
|
|
31922
|
-
})([".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;}"]);
|
|
31923
|
-
|
|
31924
|
-
var RPGUIOverrides = function RPGUIOverrides(_ref) {
|
|
31925
|
-
var children = _ref.children;
|
|
31926
|
-
return React__default.createElement(RPGUIScrollbar, null, children);
|
|
31927
|
-
};
|
|
31928
|
-
|
|
31929
|
-
//@ts-ignore
|
|
31930
|
-
var _RPGUI = RPGUI;
|
|
31931
|
-
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
31932
|
-
var children = _ref.children;
|
|
31933
|
-
return React__default.createElement(RPGUIOverrides, null, React__default.createElement("div", {
|
|
31934
|
-
className: "rpgui-content"
|
|
31935
|
-
}, children));
|
|
31936
|
-
};
|
|
31937
|
-
|
|
31938
|
-
var SimpleTooltip = function SimpleTooltip(_ref) {
|
|
31939
|
-
var content = _ref.content,
|
|
31940
|
-
_ref$direction = _ref.direction,
|
|
31941
|
-
direction = _ref$direction === void 0 ? 'top' : _ref$direction,
|
|
31942
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
31943
|
-
backgroundColor = _ref$backgroundColor === void 0 ? uiColors.raisinBlack : _ref$backgroundColor,
|
|
31944
|
-
_ref$textColor = _ref.textColor,
|
|
31945
|
-
textColor = _ref$textColor === void 0 ? uiColors.white : _ref$textColor,
|
|
31946
|
-
children = _ref.children,
|
|
31947
|
-
_ref$showDelay = _ref.showDelay,
|
|
31948
|
-
showDelay = _ref$showDelay === void 0 ? 200 : _ref$showDelay,
|
|
31949
|
-
_ref$hideDelay = _ref.hideDelay,
|
|
31950
|
-
hideDelay = _ref$hideDelay === void 0 ? 200 : _ref$hideDelay;
|
|
31951
|
-
var _useState = React.useState(false),
|
|
31952
|
-
visible = _useState[0],
|
|
31953
|
-
setVisible = _useState[1];
|
|
31954
|
-
var _useState2 = React.useState({
|
|
31955
|
-
top: 0,
|
|
31956
|
-
left: 0
|
|
31957
|
-
}),
|
|
31958
|
-
tooltipPosition = _useState2[0],
|
|
31959
|
-
setTooltipPosition = _useState2[1];
|
|
31960
|
-
var tooltipRef = React.useRef(null);
|
|
31961
|
-
var triggerRef = React.useRef(null);
|
|
31962
|
-
var timeoutRef = React.useRef();
|
|
31963
|
-
var calculatePosition = function calculatePosition() {
|
|
31964
|
-
if (!triggerRef.current || !tooltipRef.current) return;
|
|
31965
|
-
var triggerRect = triggerRef.current.getBoundingClientRect();
|
|
31966
|
-
var tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
31967
|
-
var top, left;
|
|
31968
|
-
switch (direction) {
|
|
31969
|
-
case 'top':
|
|
31970
|
-
top = triggerRect.top - tooltipRect.height - 8;
|
|
31971
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
|
|
31972
|
-
break;
|
|
31973
|
-
case 'bottom':
|
|
31974
|
-
top = triggerRect.bottom + 8;
|
|
31975
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
|
|
31976
|
-
break;
|
|
31977
|
-
case 'left':
|
|
31978
|
-
top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
|
|
31979
|
-
left = triggerRect.left - tooltipRect.width - 8;
|
|
31980
|
-
break;
|
|
31981
|
-
case 'right':
|
|
31982
|
-
top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
|
|
31983
|
-
left = triggerRect.right + 8;
|
|
31984
|
-
break;
|
|
31985
|
-
default:
|
|
31986
|
-
top = triggerRect.top - tooltipRect.height - 8;
|
|
31987
|
-
left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
|
|
31988
|
-
}
|
|
31989
|
-
// Ensure the tooltip stays within the viewport
|
|
31990
|
-
if (left < 8) left = 8;
|
|
31991
|
-
if (left + tooltipRect.width > window.innerWidth) left = window.innerWidth - tooltipRect.width - 8;
|
|
31992
|
-
if (top < 8) top = 8;
|
|
31993
|
-
if (top + tooltipRect.height > window.innerHeight) top = window.innerHeight - tooltipRect.height - 8;
|
|
31994
|
-
setTooltipPosition({
|
|
31995
|
-
top: Math.round(top),
|
|
31996
|
-
left: Math.round(left)
|
|
31997
|
-
});
|
|
31998
|
-
};
|
|
31999
|
-
var showTooltip = function showTooltip() {
|
|
32000
|
-
clearTimeout(timeoutRef.current);
|
|
32001
|
-
timeoutRef.current = setTimeout(function () {
|
|
32002
|
-
setVisible(true);
|
|
32003
|
-
calculatePosition();
|
|
32004
|
-
}, showDelay);
|
|
32005
|
-
};
|
|
32006
|
-
var hideTooltip = function hideTooltip() {
|
|
32007
|
-
clearTimeout(timeoutRef.current);
|
|
32008
|
-
timeoutRef.current = setTimeout(function () {
|
|
32009
|
-
setVisible(false);
|
|
32010
|
-
}, hideDelay);
|
|
32011
|
-
};
|
|
32012
|
-
React.useEffect(function () {
|
|
32013
|
-
var handleMouseMove = function handleMouseMove(event) {
|
|
32014
|
-
if (visible && tooltipRef.current && triggerRef.current) {
|
|
32015
|
-
var tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
32016
|
-
var triggerRect = triggerRef.current.getBoundingClientRect();
|
|
32017
|
-
var isOutsideTooltip = event.clientX < tooltipRect.left || event.clientX > tooltipRect.right || event.clientY < tooltipRect.top || event.clientY > tooltipRect.bottom;
|
|
32018
|
-
var isOutsideTrigger = event.clientX < triggerRect.left || event.clientX > triggerRect.right || event.clientY < triggerRect.top || event.clientY > triggerRect.bottom;
|
|
32019
|
-
if (isOutsideTooltip && isOutsideTrigger) {
|
|
32020
|
-
hideTooltip();
|
|
32021
|
-
}
|
|
32022
|
-
}
|
|
32023
|
-
};
|
|
32024
|
-
var handleScroll = function handleScroll() {
|
|
32025
|
-
if (visible) {
|
|
32026
|
-
hideTooltip();
|
|
32027
|
-
}
|
|
32028
|
-
};
|
|
32029
|
-
var handleResize = function handleResize() {
|
|
32030
|
-
if (visible) {
|
|
32031
|
-
calculatePosition();
|
|
32032
|
-
}
|
|
32033
|
-
};
|
|
32034
|
-
document.addEventListener('mousemove', handleMouseMove);
|
|
32035
|
-
window.addEventListener('scroll', handleScroll);
|
|
32036
|
-
window.addEventListener('resize', handleResize);
|
|
32037
|
-
return function () {
|
|
32038
|
-
document.removeEventListener('mousemove', handleMouseMove);
|
|
32039
|
-
window.removeEventListener('scroll', handleScroll);
|
|
32040
|
-
window.removeEventListener('resize', handleResize);
|
|
32041
|
-
clearTimeout(timeoutRef.current);
|
|
32042
|
-
};
|
|
32043
|
-
}, [visible]);
|
|
32044
|
-
return React__default.createElement(TooltipContainer, {
|
|
32045
|
-
ref: triggerRef,
|
|
32046
|
-
onMouseEnter: showTooltip,
|
|
32047
|
-
onMouseLeave: hideTooltip,
|
|
32048
|
-
onFocus: showTooltip,
|
|
32049
|
-
onBlur: hideTooltip
|
|
32050
|
-
}, children, visible && ReactDOM.createPortal(React__default.createElement(RPGUIRoot, null, React__default.createElement(TooltipBox, {
|
|
32051
|
-
ref: tooltipRef,
|
|
32052
|
-
direction: direction,
|
|
32053
|
-
backgroundColor: backgroundColor,
|
|
32054
|
-
textColor: textColor,
|
|
32055
|
-
style: {
|
|
32056
|
-
top: tooltipPosition.top,
|
|
32057
|
-
left: tooltipPosition.left
|
|
32058
|
-
}
|
|
32059
|
-
}, content)), document.body));
|
|
32060
|
-
};
|
|
32061
|
-
var TooltipContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
32062
|
-
displayName: "SimpleTooltip__TooltipContainer",
|
|
32063
|
-
componentId: "sc-l46vpo-0"
|
|
32064
|
-
})(["display:inline-block;cursor:inherit;"]);
|
|
32065
|
-
var fadeIn$1 = /*#__PURE__*/styled.keyframes(["from{opacity:0;transform:scale(0.95);}to{opacity:1;transform:scale(1);}"]);
|
|
32066
|
-
var TooltipBox = /*#__PURE__*/styled__default.div.withConfig({
|
|
32067
|
-
displayName: "SimpleTooltip__TooltipBox",
|
|
32068
|
-
componentId: "sc-l46vpo-1"
|
|
32069
|
-
})(["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) {
|
|
32070
|
-
var backgroundColor = _ref2.backgroundColor;
|
|
32071
|
-
return backgroundColor;
|
|
32072
|
-
}, function (_ref3) {
|
|
32073
|
-
var textColor = _ref3.textColor;
|
|
32074
|
-
return textColor;
|
|
32075
|
-
}, fadeIn$1);
|
|
32076
|
-
|
|
32077
31928
|
var QuestList = function QuestList(_ref) {
|
|
32078
31929
|
var quests = _ref.quests;
|
|
32079
|
-
return React__default.createElement(QuestListContainer, null, quests && quests.length > 0 ?
|
|
32080
|
-
var
|
|
32081
|
-
return React__default.createElement(
|
|
31930
|
+
return React__default.createElement(QuestListContainer, null, quests && quests.length > 0 ? quests.map(function (quest, i) {
|
|
31931
|
+
var _formatStatus;
|
|
31932
|
+
return React__default.createElement(QuestCard, {
|
|
32082
31933
|
key: i
|
|
32083
|
-
}, React__default.createElement(
|
|
31934
|
+
}, React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Title:"), React__default.createElement(Value, null, formatText(quest.title))), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Status:"), React__default.createElement(Value, {
|
|
32084
31935
|
style: {
|
|
32085
31936
|
color: getStatusColor(quest.status)
|
|
32086
31937
|
}
|
|
32087
|
-
}, (
|
|
32088
|
-
|
|
32089
|
-
direction: "bottom"
|
|
32090
|
-
}, React__default.createElement(Ellipsis, {
|
|
32091
|
-
maxWidth: "300px"
|
|
32092
|
-
}, formatText(quest.title)))), React__default.createElement(TableCell, null, React__default.createElement(SimpleTooltip, {
|
|
32093
|
-
content: quest.description,
|
|
32094
|
-
direction: "bottom"
|
|
32095
|
-
}, React__default.createElement(Ellipsis, {
|
|
32096
|
-
maxWidth: "300px"
|
|
32097
|
-
}, quest.description))), React__default.createElement(TableCell, null, React__default.createElement(SimpleTooltip, {
|
|
32098
|
-
content: formatObjectives(quest.objectives),
|
|
32099
|
-
direction: "bottom"
|
|
32100
|
-
}, React__default.createElement(Ellipsis, {
|
|
32101
|
-
maxWidth: "300px"
|
|
32102
|
-
}, formatObjectives(quest.objectives)))), React__default.createElement(TableCell, null, React__default.createElement(SimpleTooltip, {
|
|
32103
|
-
content: formatRewards(quest.rewards),
|
|
32104
|
-
direction: "bottom"
|
|
32105
|
-
}, React__default.createElement(Ellipsis, {
|
|
32106
|
-
maxWidth: "200px"
|
|
32107
|
-
}, formatRewards(quest.rewards)))));
|
|
32108
|
-
})))) : React__default.createElement(NoQuestContainer, null, React__default.createElement("p", null, "There are no ongoing quests")));
|
|
31938
|
+
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Description:"), React__default.createElement(Value, null, quest.description)), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Objectives:"), React__default.createElement(Value, null, formatObjectives(quest.objectives))), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Rewards:"), React__default.createElement(Value, null, formatRewards(quest.rewards))));
|
|
31939
|
+
}) : React__default.createElement(NoQuestContainer, null, React__default.createElement("p", null, "There are no ongoing quests")));
|
|
32109
31940
|
};
|
|
32110
|
-
|
|
31941
|
+
var QuestListContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31942
|
+
displayName: "QuestList__QuestListContainer",
|
|
31943
|
+
componentId: "sc-1c1y8sp-0"
|
|
31944
|
+
})(["margin-top:20px;margin-bottom:40px;overflow-y:auto;max-height:400px;padding:10px;border-radius:10px;font-size:0.7rem;"]);
|
|
31945
|
+
var QuestCard = /*#__PURE__*/styled__default.div.withConfig({
|
|
31946
|
+
displayName: "QuestList__QuestCard",
|
|
31947
|
+
componentId: "sc-1c1y8sp-1"
|
|
31948
|
+
})(["background-color:", ";padding:15px;margin-bottom:10px;border-radius:10px;border:1px solid ", ";display:flex;flex-direction:column;"], uiColors.darkGray, uiColors.gray);
|
|
31949
|
+
var QuestItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31950
|
+
displayName: "QuestList__QuestItem",
|
|
31951
|
+
componentId: "sc-1c1y8sp-2"
|
|
31952
|
+
})(["display:flex;margin-bottom:5px;flex-wrap:wrap;&:last-child{margin-bottom:0;}"]);
|
|
31953
|
+
var Label = /*#__PURE__*/styled__default.span.withConfig({
|
|
31954
|
+
displayName: "QuestList__Label",
|
|
31955
|
+
componentId: "sc-1c1y8sp-3"
|
|
31956
|
+
})(["font-weight:bold;color:", " !important;margin-right:10px;"], uiColors.yellow);
|
|
31957
|
+
var Value = /*#__PURE__*/styled__default.span.withConfig({
|
|
31958
|
+
displayName: "QuestList__Value",
|
|
31959
|
+
componentId: "sc-1c1y8sp-4"
|
|
31960
|
+
})(["flex-grow:1;color:", ";word-wrap:break-word;"], uiColors.white);
|
|
31961
|
+
var NoQuestContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31962
|
+
displayName: "QuestList__NoQuestContainer",
|
|
31963
|
+
componentId: "sc-1c1y8sp-5"
|
|
31964
|
+
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
32111
31965
|
var formatObjectives = function formatObjectives(objectives) {
|
|
32112
31966
|
try {
|
|
32113
31967
|
if (!objectives || !Array.isArray(objectives)) return 'No objectives';
|
|
@@ -32129,7 +31983,6 @@ var formatObjectives = function formatObjectives(objectives) {
|
|
|
32129
31983
|
return 'Error formatting objectives';
|
|
32130
31984
|
}
|
|
32131
31985
|
};
|
|
32132
|
-
// Updated helper function to format rewards
|
|
32133
31986
|
var formatRewards = function formatRewards(rewards) {
|
|
32134
31987
|
try {
|
|
32135
31988
|
if (!rewards || !Array.isArray(rewards)) return 'No rewards';
|
|
@@ -32151,6 +32004,7 @@ var formatRewards = function formatRewards(rewards) {
|
|
|
32151
32004
|
}
|
|
32152
32005
|
};
|
|
32153
32006
|
var formatText = function formatText(text) {
|
|
32007
|
+
if (!text) return 'Unknown';
|
|
32154
32008
|
return text.split('-').map(function (word) {
|
|
32155
32009
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
32156
32010
|
}).join(' ');
|
|
@@ -32159,26 +32013,20 @@ var getStatusColor = function getStatusColor(status) {
|
|
|
32159
32013
|
switch (status) {
|
|
32160
32014
|
case shared.QuestStatus.Pending:
|
|
32161
32015
|
return uiColors.orange;
|
|
32162
|
-
// Orange
|
|
32163
32016
|
case shared.QuestStatus.InProgress:
|
|
32164
32017
|
return uiColors.blue;
|
|
32165
|
-
// Deep Sky Blue
|
|
32166
32018
|
case shared.QuestStatus.Completed:
|
|
32167
32019
|
return uiColors.lightGreen;
|
|
32168
|
-
// Lime Green
|
|
32169
32020
|
default:
|
|
32170
32021
|
return uiColors.white;
|
|
32171
|
-
// Default to white
|
|
32172
32022
|
}
|
|
32173
32023
|
};
|
|
32174
|
-
var
|
|
32175
|
-
|
|
32176
|
-
|
|
32177
|
-
|
|
32178
|
-
|
|
32179
|
-
|
|
32180
|
-
componentId: "sc-1a2vx6q-1"
|
|
32181
|
-
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
32024
|
+
var formatStatus = function formatStatus(status) {
|
|
32025
|
+
if (!status) return 'Unknown';
|
|
32026
|
+
return status.split(/(?=[A-Z])/).join(' ').replace(/^\w/, function (c) {
|
|
32027
|
+
return c.toUpperCase();
|
|
32028
|
+
});
|
|
32029
|
+
};
|
|
32182
32030
|
|
|
32183
32031
|
var InputRadio$1 = function InputRadio(_ref) {
|
|
32184
32032
|
var name = _ref.name,
|
|
@@ -32212,6 +32060,29 @@ var InputRadio$1 = function InputRadio(_ref) {
|
|
|
32212
32060
|
}));
|
|
32213
32061
|
};
|
|
32214
32062
|
|
|
32063
|
+
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
32064
|
+
var children = _ref.children;
|
|
32065
|
+
return React__default.createElement(Container$r, null, children);
|
|
32066
|
+
};
|
|
32067
|
+
var Container$r = /*#__PURE__*/styled__default.div.withConfig({
|
|
32068
|
+
displayName: "RPGUIScrollbar__Container",
|
|
32069
|
+
componentId: "sc-p3msmb-0"
|
|
32070
|
+
})([".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;}"]);
|
|
32071
|
+
|
|
32072
|
+
var RPGUIOverrides = function RPGUIOverrides(_ref) {
|
|
32073
|
+
var children = _ref.children;
|
|
32074
|
+
return React__default.createElement(RPGUIScrollbar, null, children);
|
|
32075
|
+
};
|
|
32076
|
+
|
|
32077
|
+
//@ts-ignore
|
|
32078
|
+
var _RPGUI = RPGUI;
|
|
32079
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
32080
|
+
var children = _ref.children;
|
|
32081
|
+
return React__default.createElement(RPGUIOverrides, null, React__default.createElement("div", {
|
|
32082
|
+
className: "rpgui-content"
|
|
32083
|
+
}, children));
|
|
32084
|
+
};
|
|
32085
|
+
|
|
32215
32086
|
var Shortcuts = function Shortcuts(_ref) {
|
|
32216
32087
|
var shortcuts = _ref.shortcuts,
|
|
32217
32088
|
onShortcutCast = _ref.onShortcutCast,
|