@rpg-engine/long-bow 0.3.0 → 0.3.23
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/Chat/Chat.d.ts +4 -0
- package/dist/components/Chatdeprecated/ChatDeprecated.d.ts +13 -0
- package/dist/index.d.ts +5 -4
- package/dist/long-bow.cjs.development.js +262 -132
- 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 +262 -133
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/ChatDeprecated.stories.d.ts +5 -0
- package/package.json +3 -1
- package/src/.DS_Store +0 -0
- package/src/components/Chat/Chat.tsx +82 -105
- package/src/components/Chatdeprecated/ChatDeprecated.tsx +200 -0
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/index.tsx +5 -4
- package/src/mocks/.DS_Store +0 -0
- package/src/mocks/atlas/.DS_Store +0 -0
- package/src/stories/Chat.stories.tsx +17 -2
- package/src/stories/ChatDeprecated.stories.tsx +170 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IChatMessage } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IChatDeprecatedProps {
|
|
4
|
+
chatMessages: IChatMessage[];
|
|
5
|
+
onSendChatMessage: (message: string) => void;
|
|
6
|
+
onCloseButton: () => void;
|
|
7
|
+
onFocus?: () => void;
|
|
8
|
+
onBlur?: () => void;
|
|
9
|
+
opacity?: number;
|
|
10
|
+
width?: string;
|
|
11
|
+
height?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ChatDeprecated: React.FC<IChatDeprecatedProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './components/Button';
|
|
2
2
|
export * from './components/Character/CharacterSelection';
|
|
3
3
|
export * from './components/Chat/Chat';
|
|
4
|
+
export * from './components/Chatdeprecated/ChatDeprecated';
|
|
4
5
|
export * from './components/CheckButton';
|
|
5
6
|
export * from './components/CraftBook/CraftBook';
|
|
6
7
|
export * from './components/DraggableContainer';
|
|
@@ -12,6 +13,7 @@ export * from './components/Input';
|
|
|
12
13
|
export { ErrorBoundary } from './components/Item/Inventory/ErrorBoundary';
|
|
13
14
|
export * from './components/Item/Inventory/ItemContainer';
|
|
14
15
|
export * from './components/Item/Inventory/ItemSlot';
|
|
16
|
+
export * from './components/itemSelector/ItemSelector';
|
|
15
17
|
export * from './components/ListMenu';
|
|
16
18
|
export * from './components/NPCDialog/NPCDialog';
|
|
17
19
|
export * from './components/NPCDialog/NPCMultiDialog';
|
|
@@ -20,17 +22,16 @@ export * from './components/ProgressBar';
|
|
|
20
22
|
export * from './components/PropertySelect/PropertySelect';
|
|
21
23
|
export * from './components/QuestInfo/QuestInfo';
|
|
22
24
|
export * from './components/QuestList';
|
|
23
|
-
export * from './components/RPGUIContainer';
|
|
24
|
-
export * from './components/RPGUIRoot';
|
|
25
25
|
export * from './components/RadioButton';
|
|
26
26
|
export * from './components/RangeSlider';
|
|
27
|
+
export * from './components/RPGUIContainer';
|
|
28
|
+
export * from './components/RPGUIRoot';
|
|
29
|
+
export * from './components/shared/SpriteFromAtlas';
|
|
27
30
|
export * from './components/SkillProgressBar';
|
|
28
31
|
export * from './components/SkillsContainer';
|
|
29
32
|
export * from './components/TextArea';
|
|
30
33
|
export * from './components/TimeWidget/TimeWidget';
|
|
31
34
|
export * from './components/TradingMenu/TradingMenu';
|
|
32
35
|
export * from './components/Truncate';
|
|
33
|
-
export * from './components/itemSelector/ItemSelector';
|
|
34
|
-
export * from './components/shared/SpriteFromAtlas';
|
|
35
36
|
export * from './components/typography/DynamicText';
|
|
36
37
|
export { useEventListener } from './hooks/useEventListener';
|
|
@@ -10,6 +10,7 @@ var styled = _interopDefault(require('styled-components'));
|
|
|
10
10
|
var shared = require('@rpg-engine/shared');
|
|
11
11
|
var dayjs = _interopDefault(require('dayjs'));
|
|
12
12
|
var reactErrorBoundary = require('react-error-boundary');
|
|
13
|
+
var ci = require('react-icons/ci');
|
|
13
14
|
var Draggable = _interopDefault(require('react-draggable'));
|
|
14
15
|
var uuid = require('uuid');
|
|
15
16
|
var mobxReactLite = require('mobx-react-lite');
|
|
@@ -32703,6 +32704,147 @@ var Container$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
32703
32704
|
componentId: "sc-b34498-0"
|
|
32704
32705
|
})(["display:flex;flex-direction:column;align-items:center;image-rendering:pixelated;"]);
|
|
32705
32706
|
|
|
32707
|
+
var Column = /*#__PURE__*/styled.div.withConfig({
|
|
32708
|
+
displayName: "Column",
|
|
32709
|
+
componentId: "sc-1pesqff-0"
|
|
32710
|
+
})(["flex:", ";display:flex;flex-wrap:", ";align-items:", ";justify-content:", ";"], function (props) {
|
|
32711
|
+
return props.flex || 'auto';
|
|
32712
|
+
}, function (props) {
|
|
32713
|
+
return props.flexWrap || 'nowrap';
|
|
32714
|
+
}, function (props) {
|
|
32715
|
+
return props.alignItems || 'flex-start';
|
|
32716
|
+
}, function (props) {
|
|
32717
|
+
return props.justifyContent || 'flex-start';
|
|
32718
|
+
});
|
|
32719
|
+
|
|
32720
|
+
var Chat = function Chat(_ref) {
|
|
32721
|
+
var chatMessages = _ref.chatMessages,
|
|
32722
|
+
onSendChatMessage = _ref.onSendChatMessage,
|
|
32723
|
+
_ref$width = _ref.width,
|
|
32724
|
+
width = _ref$width === void 0 ? '80%' : _ref$width,
|
|
32725
|
+
_ref$height = _ref.height,
|
|
32726
|
+
height = _ref$height === void 0 ? '250px' : _ref$height,
|
|
32727
|
+
onFocus = _ref.onFocus,
|
|
32728
|
+
onBlur = _ref.onBlur,
|
|
32729
|
+
_ref$color = _ref.color,
|
|
32730
|
+
color = _ref$color === void 0 ? '#c65102' : _ref$color,
|
|
32731
|
+
_ref$buttonColor = _ref.buttonColor,
|
|
32732
|
+
buttonColor = _ref$buttonColor === void 0 ? '#005b96' : _ref$buttonColor,
|
|
32733
|
+
_ref$buttonBackground = _ref.buttonBackgroundColor,
|
|
32734
|
+
buttonBackgroundColor = _ref$buttonBackground === void 0 ? '#FFF' : _ref$buttonBackground;
|
|
32735
|
+
var _useState = React.useState(''),
|
|
32736
|
+
message = _useState[0],
|
|
32737
|
+
setMessage = _useState[1];
|
|
32738
|
+
React.useEffect(function () {
|
|
32739
|
+
scrollChatToBottom();
|
|
32740
|
+
}, []);
|
|
32741
|
+
React.useEffect(function () {
|
|
32742
|
+
scrollChatToBottom();
|
|
32743
|
+
}, [chatMessages]);
|
|
32744
|
+
var scrollChatToBottom = function scrollChatToBottom() {
|
|
32745
|
+
var scrollingElement = document.querySelector('.chat-body');
|
|
32746
|
+
if (scrollingElement) {
|
|
32747
|
+
scrollingElement.scrollTop = scrollingElement.scrollHeight;
|
|
32748
|
+
}
|
|
32749
|
+
};
|
|
32750
|
+
var handleSubmit = function handleSubmit(event) {
|
|
32751
|
+
event.preventDefault();
|
|
32752
|
+
onSendChatMessage(message);
|
|
32753
|
+
setMessage('');
|
|
32754
|
+
};
|
|
32755
|
+
var getInputValue = function getInputValue(value) {
|
|
32756
|
+
setMessage(value);
|
|
32757
|
+
};
|
|
32758
|
+
var onRenderMessageLines = function onRenderMessageLines(emitter, createdAt, message) {
|
|
32759
|
+
return dayjs(createdAt || new Date()).format('HH:mm') + " " + (emitter != null && emitter.name ? emitter.name + ": " : 'Unknown: ') + " " + message;
|
|
32760
|
+
};
|
|
32761
|
+
var onRenderChatMessages = function onRenderChatMessages(chatMessages) {
|
|
32762
|
+
return chatMessages != null && chatMessages.length ? chatMessages == null ? void 0 : chatMessages.map(function (_ref2, index) {
|
|
32763
|
+
var _id = _ref2._id,
|
|
32764
|
+
createdAt = _ref2.createdAt,
|
|
32765
|
+
emitter = _ref2.emitter,
|
|
32766
|
+
message = _ref2.message;
|
|
32767
|
+
return React__default.createElement(Message, {
|
|
32768
|
+
color: color,
|
|
32769
|
+
key: _id + "_" + index
|
|
32770
|
+
}, onRenderMessageLines(emitter, createdAt, message));
|
|
32771
|
+
}) : React__default.createElement(Message, {
|
|
32772
|
+
color: color
|
|
32773
|
+
}, "No messages available.");
|
|
32774
|
+
};
|
|
32775
|
+
return React__default.createElement(ChatContainer, {
|
|
32776
|
+
width: width,
|
|
32777
|
+
height: height
|
|
32778
|
+
}, React__default.createElement(reactErrorBoundary.ErrorBoundary, {
|
|
32779
|
+
fallback: React__default.createElement("p", null, "Oops! Your chat has crashed.")
|
|
32780
|
+
}, React__default.createElement(MessagesContainer, null, onRenderChatMessages(chatMessages)), React__default.createElement(Form, {
|
|
32781
|
+
onSubmit: handleSubmit
|
|
32782
|
+
}, React__default.createElement(Column, {
|
|
32783
|
+
flex: 70
|
|
32784
|
+
}, React__default.createElement(TextField, {
|
|
32785
|
+
value: message,
|
|
32786
|
+
id: "inputMessage",
|
|
32787
|
+
onChange: function onChange(e) {
|
|
32788
|
+
return getInputValue(e.target.value);
|
|
32789
|
+
},
|
|
32790
|
+
height: 20,
|
|
32791
|
+
className: "chat-input dark-background",
|
|
32792
|
+
type: "text",
|
|
32793
|
+
autoComplete: "off",
|
|
32794
|
+
onFocus: onFocus,
|
|
32795
|
+
onBlur: onBlur
|
|
32796
|
+
})), React__default.createElement(Column, {
|
|
32797
|
+
justifyContent: "flex-end"
|
|
32798
|
+
}, React__default.createElement(Button$1, {
|
|
32799
|
+
buttonColor: buttonColor,
|
|
32800
|
+
buttonBackgroundColor: buttonBackgroundColor,
|
|
32801
|
+
id: "chat-send-button",
|
|
32802
|
+
style: {
|
|
32803
|
+
borderRadius: '20%'
|
|
32804
|
+
}
|
|
32805
|
+
}, React__default.createElement(ci.CiPaperplane, {
|
|
32806
|
+
size: 20
|
|
32807
|
+
}))))));
|
|
32808
|
+
};
|
|
32809
|
+
var ChatContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32810
|
+
displayName: "Chat__ChatContainer",
|
|
32811
|
+
componentId: "sc-1bk05n6-0"
|
|
32812
|
+
})(["height:", ";width:", ";border-radius:10px;padding:40px 30px;margin-top:100px;box-shadow:-3px -3px 9px #aaa9a9a2,3px 3px 7px rgba(147,149,151,0.671);"], function (props) {
|
|
32813
|
+
return props.height;
|
|
32814
|
+
}, function (_ref3) {
|
|
32815
|
+
var width = _ref3.width;
|
|
32816
|
+
return width;
|
|
32817
|
+
});
|
|
32818
|
+
var TextField = /*#__PURE__*/styled.input.withConfig({
|
|
32819
|
+
displayName: "Chat__TextField",
|
|
32820
|
+
componentId: "sc-1bk05n6-1"
|
|
32821
|
+
})(["width:100%;border-radius:10px;box-shadow:-3px -3px 9px #aaa9a9a2,3px 3px 7px rgba(147,149,151,0.671);"]);
|
|
32822
|
+
var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32823
|
+
displayName: "Chat__MessagesContainer",
|
|
32824
|
+
componentId: "sc-1bk05n6-2"
|
|
32825
|
+
})(["overflow:hidden;height:70%;margin-bottom:20px;"]);
|
|
32826
|
+
var Message = /*#__PURE__*/styled.div.withConfig({
|
|
32827
|
+
displayName: "Chat__Message",
|
|
32828
|
+
componentId: "sc-1bk05n6-3"
|
|
32829
|
+
})(["margin-bottom:8px;color:", ";"], function (_ref4) {
|
|
32830
|
+
var color = _ref4.color;
|
|
32831
|
+
return color;
|
|
32832
|
+
});
|
|
32833
|
+
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32834
|
+
displayName: "Chat__Form",
|
|
32835
|
+
componentId: "sc-1bk05n6-4"
|
|
32836
|
+
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32837
|
+
var Button$1 = /*#__PURE__*/styled.button.withConfig({
|
|
32838
|
+
displayName: "Chat__Button",
|
|
32839
|
+
componentId: "sc-1bk05n6-5"
|
|
32840
|
+
})(["color:", ";background-color:", ";width:50px;height:40px;"], function (_ref5) {
|
|
32841
|
+
var buttonColor = _ref5.buttonColor;
|
|
32842
|
+
return buttonColor;
|
|
32843
|
+
}, function (_ref6) {
|
|
32844
|
+
var buttonBackgroundColor = _ref6.buttonBackgroundColor;
|
|
32845
|
+
return buttonBackgroundColor;
|
|
32846
|
+
});
|
|
32847
|
+
|
|
32706
32848
|
var uiColors = {
|
|
32707
32849
|
lightGray: '#757161',
|
|
32708
32850
|
gray: '#4E4A4E',
|
|
@@ -32762,20 +32904,7 @@ var Container$4 = /*#__PURE__*/styled.div.withConfig({
|
|
|
32762
32904
|
return width;
|
|
32763
32905
|
});
|
|
32764
32906
|
|
|
32765
|
-
var
|
|
32766
|
-
displayName: "Column",
|
|
32767
|
-
componentId: "sc-1pesqff-0"
|
|
32768
|
-
})(["flex:", ";display:flex;flex-wrap:", ";align-items:", ";justify-content:", ";"], function (props) {
|
|
32769
|
-
return props.flex || 'auto';
|
|
32770
|
-
}, function (props) {
|
|
32771
|
-
return props.flexWrap || 'nowrap';
|
|
32772
|
-
}, function (props) {
|
|
32773
|
-
return props.alignItems || 'flex-start';
|
|
32774
|
-
}, function (props) {
|
|
32775
|
-
return props.justifyContent || 'flex-start';
|
|
32776
|
-
});
|
|
32777
|
-
|
|
32778
|
-
var Chat = function Chat(_ref) {
|
|
32907
|
+
var ChatDeprecated = function ChatDeprecated(_ref) {
|
|
32779
32908
|
var chatMessages = _ref.chatMessages,
|
|
32780
32909
|
onSendChatMessage = _ref.onSendChatMessage,
|
|
32781
32910
|
_ref$opacity = _ref.opacity,
|
|
@@ -32840,7 +32969,7 @@ var Chat = function Chat(_ref) {
|
|
|
32840
32969
|
width: '100%',
|
|
32841
32970
|
height: '80%',
|
|
32842
32971
|
className: "chat-body dark-background"
|
|
32843
|
-
}, onRenderChatMessages(chatMessages)), React__default.createElement(Form, {
|
|
32972
|
+
}, onRenderChatMessages(chatMessages)), React__default.createElement(Form$1, {
|
|
32844
32973
|
onSubmit: handleSubmit
|
|
32845
32974
|
}, React__default.createElement(Column, {
|
|
32846
32975
|
flex: 70
|
|
@@ -32864,30 +32993,30 @@ var Chat = function Chat(_ref) {
|
|
|
32864
32993
|
}, "Send"))))));
|
|
32865
32994
|
};
|
|
32866
32995
|
var Container$5 = /*#__PURE__*/styled.div.withConfig({
|
|
32867
|
-
displayName: "
|
|
32868
|
-
componentId: "sc-
|
|
32996
|
+
displayName: "ChatDeprecated__Container",
|
|
32997
|
+
componentId: "sc-fuuod3-0"
|
|
32869
32998
|
})(["position:relative;"]);
|
|
32870
32999
|
var CloseButton = /*#__PURE__*/styled.div.withConfig({
|
|
32871
|
-
displayName: "
|
|
32872
|
-
componentId: "sc-
|
|
33000
|
+
displayName: "ChatDeprecated__CloseButton",
|
|
33001
|
+
componentId: "sc-fuuod3-1"
|
|
32873
33002
|
})(["position:absolute;top:2px;right:0px;color:white;z-index:22;font-size:0.7rem;"]);
|
|
32874
33003
|
var CustomInput = /*#__PURE__*/styled(Input).withConfig({
|
|
32875
|
-
displayName: "
|
|
32876
|
-
componentId: "sc-
|
|
33004
|
+
displayName: "ChatDeprecated__CustomInput",
|
|
33005
|
+
componentId: "sc-fuuod3-2"
|
|
32877
33006
|
})(["height:30px;width:100%;.rpgui-content .input{min-height:39px;}"]);
|
|
32878
33007
|
var CustomContainer = /*#__PURE__*/styled(RPGUIContainer).withConfig({
|
|
32879
|
-
displayName: "
|
|
32880
|
-
componentId: "sc-
|
|
33008
|
+
displayName: "ChatDeprecated__CustomContainer",
|
|
33009
|
+
componentId: "sc-fuuod3-3"
|
|
32881
33010
|
})(["display:block;opacity:", ";&:hover{opacity:1;}.dark-background{background-color:", " !important;}.chat-body{&.rpgui-container.framed-grey{background:unset;}max-height:170px;overflow-y:auto;}"], function (props) {
|
|
32882
33011
|
return props.opacity;
|
|
32883
33012
|
}, uiColors.darkGray);
|
|
32884
|
-
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32885
|
-
displayName: "
|
|
32886
|
-
componentId: "sc-
|
|
33013
|
+
var Form$1 = /*#__PURE__*/styled.form.withConfig({
|
|
33014
|
+
displayName: "ChatDeprecated__Form",
|
|
33015
|
+
componentId: "sc-fuuod3-4"
|
|
32887
33016
|
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32888
33017
|
var MessageText = /*#__PURE__*/styled.p.withConfig({
|
|
32889
|
-
displayName: "
|
|
32890
|
-
componentId: "sc-
|
|
33018
|
+
displayName: "ChatDeprecated__MessageText",
|
|
33019
|
+
componentId: "sc-fuuod3-5"
|
|
32891
33020
|
})(["display:block !important;width:100%;font-size:", " !important;overflow-y:auto;margin:0;"], uiFonts.size.xsmall);
|
|
32892
33021
|
|
|
32893
33022
|
var CheckButton = function CheckButton(_ref) {
|
|
@@ -34684,6 +34813,92 @@ var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34684
34813
|
componentId: "sc-15y5p9l-1"
|
|
34685
34814
|
})(["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);"]);
|
|
34686
34815
|
|
|
34816
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34817
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34818
|
+
atlasJSON = _ref.atlasJSON,
|
|
34819
|
+
options = _ref.options,
|
|
34820
|
+
onClose = _ref.onClose,
|
|
34821
|
+
onSelect = _ref.onSelect;
|
|
34822
|
+
var _useState = React.useState(),
|
|
34823
|
+
selectedValue = _useState[0],
|
|
34824
|
+
setSelectedValue = _useState[1];
|
|
34825
|
+
var handleClick = function handleClick() {
|
|
34826
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34827
|
+
var elementValue = element.value;
|
|
34828
|
+
setSelectedValue(elementValue);
|
|
34829
|
+
};
|
|
34830
|
+
React.useEffect(function () {
|
|
34831
|
+
if (selectedValue) {
|
|
34832
|
+
onSelect(selectedValue);
|
|
34833
|
+
}
|
|
34834
|
+
}, [selectedValue]);
|
|
34835
|
+
return React__default.createElement(DraggableContainer, {
|
|
34836
|
+
type: exports.RPGUIContainerTypes.Framed,
|
|
34837
|
+
width: "500px",
|
|
34838
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34839
|
+
onCloseButton: function onCloseButton() {
|
|
34840
|
+
if (onClose) {
|
|
34841
|
+
onClose();
|
|
34842
|
+
}
|
|
34843
|
+
}
|
|
34844
|
+
}, React__default.createElement("div", {
|
|
34845
|
+
style: {
|
|
34846
|
+
width: '100%'
|
|
34847
|
+
}
|
|
34848
|
+
}, React__default.createElement(Title$2, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
34849
|
+
className: "golden"
|
|
34850
|
+
})), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34851
|
+
return React__default.createElement(RadioOptionsWrapper$1, {
|
|
34852
|
+
key: index
|
|
34853
|
+
}, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
34854
|
+
atlasIMG: atlasIMG,
|
|
34855
|
+
atlasJSON: atlasJSON,
|
|
34856
|
+
spriteKey: option.imageKey,
|
|
34857
|
+
imgScale: 3
|
|
34858
|
+
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
34859
|
+
className: "rpgui-radio",
|
|
34860
|
+
type: "radio",
|
|
34861
|
+
value: option.name,
|
|
34862
|
+
name: "test"
|
|
34863
|
+
}), React__default.createElement("label", {
|
|
34864
|
+
onClick: handleClick,
|
|
34865
|
+
style: {
|
|
34866
|
+
display: 'flex',
|
|
34867
|
+
alignItems: 'center'
|
|
34868
|
+
}
|
|
34869
|
+
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
34870
|
+
})), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
|
|
34871
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
34872
|
+
onClick: onClose
|
|
34873
|
+
}, "Cancel"), React__default.createElement(Button, {
|
|
34874
|
+
buttonType: exports.ButtonTypes.RPGUIButton
|
|
34875
|
+
}, "Select")));
|
|
34876
|
+
};
|
|
34877
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34878
|
+
displayName: "ItemSelector__Title",
|
|
34879
|
+
componentId: "sc-gptoxp-0"
|
|
34880
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34881
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34882
|
+
displayName: "ItemSelector__Subtitle",
|
|
34883
|
+
componentId: "sc-gptoxp-1"
|
|
34884
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34885
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34886
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34887
|
+
componentId: "sc-gptoxp-2"
|
|
34888
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
34889
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34890
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34891
|
+
componentId: "sc-gptoxp-3"
|
|
34892
|
+
})(["margin-right:40px;"]);
|
|
34893
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34894
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34895
|
+
componentId: "sc-gptoxp-4"
|
|
34896
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34897
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34898
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34899
|
+
componentId: "sc-gptoxp-5"
|
|
34900
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34901
|
+
|
|
34687
34902
|
var ListMenu = function ListMenu(_ref) {
|
|
34688
34903
|
var options = _ref.options,
|
|
34689
34904
|
onSelected = _ref.onSelected,
|
|
@@ -34819,7 +35034,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34819
35034
|
onTouchStart: onRightClick
|
|
34820
35035
|
}), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
34821
35036
|
className: "drag-handler"
|
|
34822
|
-
}, React__default.createElement(Title$
|
|
35037
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
34823
35038
|
src: quests[currentIndex].thumbnail || img$9
|
|
34824
35039
|
}), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
34825
35040
|
className: "golden"
|
|
@@ -34838,7 +35053,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34838
35053
|
}, button.title);
|
|
34839
35054
|
})))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
34840
35055
|
className: "drag-handler"
|
|
34841
|
-
}, React__default.createElement(Title$
|
|
35056
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
34842
35057
|
src: quests[0].thumbnail || img$9
|
|
34843
35058
|
}), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
34844
35059
|
className: "golden"
|
|
@@ -34885,7 +35100,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
34885
35100
|
displayName: "QuestInfo__TitleContainer",
|
|
34886
35101
|
componentId: "sc-15s2boc-6"
|
|
34887
35102
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
34888
|
-
var Title$
|
|
35103
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34889
35104
|
displayName: "QuestInfo__Title",
|
|
34890
35105
|
componentId: "sc-15s2boc-7"
|
|
34891
35106
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -34907,7 +35122,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
34907
35122
|
style: {
|
|
34908
35123
|
width: '100%'
|
|
34909
35124
|
}
|
|
34910
|
-
}, React__default.createElement(Title$
|
|
35125
|
+
}, React__default.createElement(Title$4, null, "Quests"), React__default.createElement("hr", {
|
|
34911
35126
|
className: "golden"
|
|
34912
35127
|
}), React__default.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
34913
35128
|
return React__default.createElement("div", {
|
|
@@ -34928,7 +35143,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
34928
35143
|
displayName: "QuestList__QuestDraggableContainer",
|
|
34929
35144
|
componentId: "sc-1a2vx6q-0"
|
|
34930
35145
|
})([".container-close{top:10px;right:10px;}.quest-title{text-align:left;margin-left:44px;margin-top:20px;color:yellow;}.quest-desc{margin-top:12px;margin-left:44px;}.rpgui-progress{min-width:80%;margin:0 auto;}"]);
|
|
34931
|
-
var Title$
|
|
35146
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
34932
35147
|
displayName: "QuestList__Title",
|
|
34933
35148
|
componentId: "sc-1a2vx6q-1"
|
|
34934
35149
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -34941,15 +35156,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34941
35156
|
componentId: "sc-1a2vx6q-3"
|
|
34942
35157
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
34943
35158
|
|
|
34944
|
-
//@ts-ignore
|
|
34945
|
-
var _RPGUI = RPGUI;
|
|
34946
|
-
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
34947
|
-
var children = _ref.children;
|
|
34948
|
-
return React__default.createElement("div", {
|
|
34949
|
-
className: "rpgui-content"
|
|
34950
|
-
}, children);
|
|
34951
|
-
};
|
|
34952
|
-
|
|
34953
35159
|
var InputRadio = function InputRadio(_ref) {
|
|
34954
35160
|
var name = _ref.name,
|
|
34955
35161
|
items = _ref.items,
|
|
@@ -34982,6 +35188,15 @@ var InputRadio = function InputRadio(_ref) {
|
|
|
34982
35188
|
}));
|
|
34983
35189
|
};
|
|
34984
35190
|
|
|
35191
|
+
//@ts-ignore
|
|
35192
|
+
var _RPGUI = RPGUI;
|
|
35193
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
35194
|
+
var children = _ref.children;
|
|
35195
|
+
return React__default.createElement("div", {
|
|
35196
|
+
className: "rpgui-content"
|
|
35197
|
+
}, children);
|
|
35198
|
+
};
|
|
35199
|
+
|
|
34985
35200
|
var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
34986
35201
|
var value = _ref.value,
|
|
34987
35202
|
_ref$bgColor = _ref.bgColor,
|
|
@@ -35386,7 +35601,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35386
35601
|
style: {
|
|
35387
35602
|
width: '100%'
|
|
35388
35603
|
}
|
|
35389
|
-
}, React__default.createElement(Title$
|
|
35604
|
+
}, React__default.createElement(Title$5, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
|
|
35390
35605
|
className: "golden"
|
|
35391
35606
|
})), React__default.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
|
|
35392
35607
|
var _qtyMap$get;
|
|
@@ -35399,7 +35614,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35399
35614
|
traderItem: tradeItem,
|
|
35400
35615
|
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
35401
35616
|
}));
|
|
35402
|
-
})), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), !hasGoldForSale() ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", getFinalGold())), React__default.createElement(ButtonWrapper$
|
|
35617
|
+
})), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), !hasGoldForSale() ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", getFinalGold())), React__default.createElement(ButtonWrapper$2, null, React__default.createElement(Button, {
|
|
35403
35618
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35404
35619
|
disabled: !hasGoldForSale(),
|
|
35405
35620
|
onClick: function onClick() {
|
|
@@ -35412,7 +35627,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35412
35627
|
}
|
|
35413
35628
|
}, "Cancel"))));
|
|
35414
35629
|
};
|
|
35415
|
-
var Title$
|
|
35630
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35416
35631
|
displayName: "TradingMenu__Title",
|
|
35417
35632
|
componentId: "sc-1wjsz1l-0"
|
|
35418
35633
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -35436,7 +35651,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
35436
35651
|
displayName: "TradingMenu__AlertWrapper",
|
|
35437
35652
|
componentId: "sc-1wjsz1l-5"
|
|
35438
35653
|
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
35439
|
-
var ButtonWrapper$
|
|
35654
|
+
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35440
35655
|
displayName: "TradingMenu__ButtonWrapper",
|
|
35441
35656
|
componentId: "sc-1wjsz1l-6"
|
|
35442
35657
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
|
|
@@ -35457,95 +35672,10 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
|
35457
35672
|
return props.maxLines;
|
|
35458
35673
|
});
|
|
35459
35674
|
|
|
35460
|
-
var ItemSelector = function ItemSelector(_ref) {
|
|
35461
|
-
var atlasIMG = _ref.atlasIMG,
|
|
35462
|
-
atlasJSON = _ref.atlasJSON,
|
|
35463
|
-
options = _ref.options,
|
|
35464
|
-
onClose = _ref.onClose,
|
|
35465
|
-
onSelect = _ref.onSelect;
|
|
35466
|
-
var _useState = React.useState(),
|
|
35467
|
-
selectedValue = _useState[0],
|
|
35468
|
-
setSelectedValue = _useState[1];
|
|
35469
|
-
var handleClick = function handleClick() {
|
|
35470
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
35471
|
-
var elementValue = element.value;
|
|
35472
|
-
setSelectedValue(elementValue);
|
|
35473
|
-
};
|
|
35474
|
-
React.useEffect(function () {
|
|
35475
|
-
if (selectedValue) {
|
|
35476
|
-
onSelect(selectedValue);
|
|
35477
|
-
}
|
|
35478
|
-
}, [selectedValue]);
|
|
35479
|
-
return React__default.createElement(DraggableContainer, {
|
|
35480
|
-
type: exports.RPGUIContainerTypes.Framed,
|
|
35481
|
-
width: "500px",
|
|
35482
|
-
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
35483
|
-
onCloseButton: function onCloseButton() {
|
|
35484
|
-
if (onClose) {
|
|
35485
|
-
onClose();
|
|
35486
|
-
}
|
|
35487
|
-
}
|
|
35488
|
-
}, React__default.createElement("div", {
|
|
35489
|
-
style: {
|
|
35490
|
-
width: '100%'
|
|
35491
|
-
}
|
|
35492
|
-
}, React__default.createElement(Title$5, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
35493
|
-
className: "golden"
|
|
35494
|
-
})), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
35495
|
-
return React__default.createElement(RadioOptionsWrapper$1, {
|
|
35496
|
-
key: index
|
|
35497
|
-
}, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
35498
|
-
atlasIMG: atlasIMG,
|
|
35499
|
-
atlasJSON: atlasJSON,
|
|
35500
|
-
spriteKey: option.imageKey,
|
|
35501
|
-
imgScale: 3
|
|
35502
|
-
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
35503
|
-
className: "rpgui-radio",
|
|
35504
|
-
type: "radio",
|
|
35505
|
-
value: option.name,
|
|
35506
|
-
name: "test"
|
|
35507
|
-
}), React__default.createElement("label", {
|
|
35508
|
-
onClick: handleClick,
|
|
35509
|
-
style: {
|
|
35510
|
-
display: 'flex',
|
|
35511
|
-
alignItems: 'center'
|
|
35512
|
-
}
|
|
35513
|
-
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
35514
|
-
})), React__default.createElement(ButtonWrapper$2, null, React__default.createElement(Button, {
|
|
35515
|
-
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35516
|
-
onClick: onClose
|
|
35517
|
-
}, "Cancel"), React__default.createElement(Button, {
|
|
35518
|
-
buttonType: exports.ButtonTypes.RPGUIButton
|
|
35519
|
-
}, "Select")));
|
|
35520
|
-
};
|
|
35521
|
-
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35522
|
-
displayName: "ItemSelector__Title",
|
|
35523
|
-
componentId: "sc-gptoxp-0"
|
|
35524
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
35525
|
-
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
35526
|
-
displayName: "ItemSelector__Subtitle",
|
|
35527
|
-
componentId: "sc-gptoxp-1"
|
|
35528
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
35529
|
-
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35530
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
35531
|
-
componentId: "sc-gptoxp-2"
|
|
35532
|
-
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
35533
|
-
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35534
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
35535
|
-
componentId: "sc-gptoxp-3"
|
|
35536
|
-
})(["margin-right:40px;"]);
|
|
35537
|
-
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35538
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
35539
|
-
componentId: "sc-gptoxp-4"
|
|
35540
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
35541
|
-
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35542
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
35543
|
-
componentId: "sc-gptoxp-5"
|
|
35544
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
35545
|
-
|
|
35546
35675
|
exports.Button = Button;
|
|
35547
35676
|
exports.CharacterSelection = CharacterSelection;
|
|
35548
35677
|
exports.Chat = Chat;
|
|
35678
|
+
exports.ChatDeprecated = ChatDeprecated;
|
|
35549
35679
|
exports.CheckButton = CheckButton;
|
|
35550
35680
|
exports.CraftBook = CraftBook;
|
|
35551
35681
|
exports.DraggableContainer = DraggableContainer;
|