@rpg-engine/long-bow 0.3.0 → 0.3.24
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 +261 -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 +261 -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 +81 -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,146 @@ 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
|
+
type: "text",
|
|
32792
|
+
autoComplete: "off",
|
|
32793
|
+
onFocus: onFocus,
|
|
32794
|
+
onBlur: onBlur
|
|
32795
|
+
})), React__default.createElement(Column, {
|
|
32796
|
+
justifyContent: "flex-end"
|
|
32797
|
+
}, React__default.createElement(Button$1, {
|
|
32798
|
+
buttonColor: buttonColor,
|
|
32799
|
+
buttonBackgroundColor: buttonBackgroundColor,
|
|
32800
|
+
id: "chat-send-button",
|
|
32801
|
+
style: {
|
|
32802
|
+
borderRadius: '20%'
|
|
32803
|
+
}
|
|
32804
|
+
}, React__default.createElement(ci.CiPaperplane, {
|
|
32805
|
+
size: 20
|
|
32806
|
+
}))))));
|
|
32807
|
+
};
|
|
32808
|
+
var ChatContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32809
|
+
displayName: "Chat__ChatContainer",
|
|
32810
|
+
componentId: "sc-1bk05n6-0"
|
|
32811
|
+
})(["height:", ";width:", ";padding:10px;margin-top:100px;background-color:rgba(0,0,0,0.1);"], function (props) {
|
|
32812
|
+
return props.height;
|
|
32813
|
+
}, function (_ref3) {
|
|
32814
|
+
var width = _ref3.width;
|
|
32815
|
+
return width;
|
|
32816
|
+
});
|
|
32817
|
+
var TextField = /*#__PURE__*/styled.input.withConfig({
|
|
32818
|
+
displayName: "Chat__TextField",
|
|
32819
|
+
componentId: "sc-1bk05n6-1"
|
|
32820
|
+
})(["width:100%;background-color:rgba(0,0,0,0.2) !important;border:none !important;"]);
|
|
32821
|
+
var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32822
|
+
displayName: "Chat__MessagesContainer",
|
|
32823
|
+
componentId: "sc-1bk05n6-2"
|
|
32824
|
+
})(["overflow:hidden;height:70%;margin-bottom:10px;"]);
|
|
32825
|
+
var Message = /*#__PURE__*/styled.div.withConfig({
|
|
32826
|
+
displayName: "Chat__Message",
|
|
32827
|
+
componentId: "sc-1bk05n6-3"
|
|
32828
|
+
})(["margin-bottom:8px;color:", ";"], function (_ref4) {
|
|
32829
|
+
var color = _ref4.color;
|
|
32830
|
+
return color;
|
|
32831
|
+
});
|
|
32832
|
+
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32833
|
+
displayName: "Chat__Form",
|
|
32834
|
+
componentId: "sc-1bk05n6-4"
|
|
32835
|
+
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32836
|
+
var Button$1 = /*#__PURE__*/styled.button.withConfig({
|
|
32837
|
+
displayName: "Chat__Button",
|
|
32838
|
+
componentId: "sc-1bk05n6-5"
|
|
32839
|
+
})(["color:", ";background-color:", ";width:50px;height:40px;border:none !important;"], function (_ref5) {
|
|
32840
|
+
var buttonColor = _ref5.buttonColor;
|
|
32841
|
+
return buttonColor;
|
|
32842
|
+
}, function (_ref6) {
|
|
32843
|
+
var buttonBackgroundColor = _ref6.buttonBackgroundColor;
|
|
32844
|
+
return buttonBackgroundColor;
|
|
32845
|
+
});
|
|
32846
|
+
|
|
32706
32847
|
var uiColors = {
|
|
32707
32848
|
lightGray: '#757161',
|
|
32708
32849
|
gray: '#4E4A4E',
|
|
@@ -32762,20 +32903,7 @@ var Container$4 = /*#__PURE__*/styled.div.withConfig({
|
|
|
32762
32903
|
return width;
|
|
32763
32904
|
});
|
|
32764
32905
|
|
|
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) {
|
|
32906
|
+
var ChatDeprecated = function ChatDeprecated(_ref) {
|
|
32779
32907
|
var chatMessages = _ref.chatMessages,
|
|
32780
32908
|
onSendChatMessage = _ref.onSendChatMessage,
|
|
32781
32909
|
_ref$opacity = _ref.opacity,
|
|
@@ -32840,7 +32968,7 @@ var Chat = function Chat(_ref) {
|
|
|
32840
32968
|
width: '100%',
|
|
32841
32969
|
height: '80%',
|
|
32842
32970
|
className: "chat-body dark-background"
|
|
32843
|
-
}, onRenderChatMessages(chatMessages)), React__default.createElement(Form, {
|
|
32971
|
+
}, onRenderChatMessages(chatMessages)), React__default.createElement(Form$1, {
|
|
32844
32972
|
onSubmit: handleSubmit
|
|
32845
32973
|
}, React__default.createElement(Column, {
|
|
32846
32974
|
flex: 70
|
|
@@ -32864,30 +32992,30 @@ var Chat = function Chat(_ref) {
|
|
|
32864
32992
|
}, "Send"))))));
|
|
32865
32993
|
};
|
|
32866
32994
|
var Container$5 = /*#__PURE__*/styled.div.withConfig({
|
|
32867
|
-
displayName: "
|
|
32868
|
-
componentId: "sc-
|
|
32995
|
+
displayName: "ChatDeprecated__Container",
|
|
32996
|
+
componentId: "sc-fuuod3-0"
|
|
32869
32997
|
})(["position:relative;"]);
|
|
32870
32998
|
var CloseButton = /*#__PURE__*/styled.div.withConfig({
|
|
32871
|
-
displayName: "
|
|
32872
|
-
componentId: "sc-
|
|
32999
|
+
displayName: "ChatDeprecated__CloseButton",
|
|
33000
|
+
componentId: "sc-fuuod3-1"
|
|
32873
33001
|
})(["position:absolute;top:2px;right:0px;color:white;z-index:22;font-size:0.7rem;"]);
|
|
32874
33002
|
var CustomInput = /*#__PURE__*/styled(Input).withConfig({
|
|
32875
|
-
displayName: "
|
|
32876
|
-
componentId: "sc-
|
|
33003
|
+
displayName: "ChatDeprecated__CustomInput",
|
|
33004
|
+
componentId: "sc-fuuod3-2"
|
|
32877
33005
|
})(["height:30px;width:100%;.rpgui-content .input{min-height:39px;}"]);
|
|
32878
33006
|
var CustomContainer = /*#__PURE__*/styled(RPGUIContainer).withConfig({
|
|
32879
|
-
displayName: "
|
|
32880
|
-
componentId: "sc-
|
|
33007
|
+
displayName: "ChatDeprecated__CustomContainer",
|
|
33008
|
+
componentId: "sc-fuuod3-3"
|
|
32881
33009
|
})(["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
33010
|
return props.opacity;
|
|
32883
33011
|
}, uiColors.darkGray);
|
|
32884
|
-
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32885
|
-
displayName: "
|
|
32886
|
-
componentId: "sc-
|
|
33012
|
+
var Form$1 = /*#__PURE__*/styled.form.withConfig({
|
|
33013
|
+
displayName: "ChatDeprecated__Form",
|
|
33014
|
+
componentId: "sc-fuuod3-4"
|
|
32887
33015
|
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32888
33016
|
var MessageText = /*#__PURE__*/styled.p.withConfig({
|
|
32889
|
-
displayName: "
|
|
32890
|
-
componentId: "sc-
|
|
33017
|
+
displayName: "ChatDeprecated__MessageText",
|
|
33018
|
+
componentId: "sc-fuuod3-5"
|
|
32891
33019
|
})(["display:block !important;width:100%;font-size:", " !important;overflow-y:auto;margin:0;"], uiFonts.size.xsmall);
|
|
32892
33020
|
|
|
32893
33021
|
var CheckButton = function CheckButton(_ref) {
|
|
@@ -34684,6 +34812,92 @@ var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34684
34812
|
componentId: "sc-15y5p9l-1"
|
|
34685
34813
|
})(["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
34814
|
|
|
34815
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34816
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34817
|
+
atlasJSON = _ref.atlasJSON,
|
|
34818
|
+
options = _ref.options,
|
|
34819
|
+
onClose = _ref.onClose,
|
|
34820
|
+
onSelect = _ref.onSelect;
|
|
34821
|
+
var _useState = React.useState(),
|
|
34822
|
+
selectedValue = _useState[0],
|
|
34823
|
+
setSelectedValue = _useState[1];
|
|
34824
|
+
var handleClick = function handleClick() {
|
|
34825
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34826
|
+
var elementValue = element.value;
|
|
34827
|
+
setSelectedValue(elementValue);
|
|
34828
|
+
};
|
|
34829
|
+
React.useEffect(function () {
|
|
34830
|
+
if (selectedValue) {
|
|
34831
|
+
onSelect(selectedValue);
|
|
34832
|
+
}
|
|
34833
|
+
}, [selectedValue]);
|
|
34834
|
+
return React__default.createElement(DraggableContainer, {
|
|
34835
|
+
type: exports.RPGUIContainerTypes.Framed,
|
|
34836
|
+
width: "500px",
|
|
34837
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34838
|
+
onCloseButton: function onCloseButton() {
|
|
34839
|
+
if (onClose) {
|
|
34840
|
+
onClose();
|
|
34841
|
+
}
|
|
34842
|
+
}
|
|
34843
|
+
}, React__default.createElement("div", {
|
|
34844
|
+
style: {
|
|
34845
|
+
width: '100%'
|
|
34846
|
+
}
|
|
34847
|
+
}, React__default.createElement(Title$2, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
34848
|
+
className: "golden"
|
|
34849
|
+
})), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34850
|
+
return React__default.createElement(RadioOptionsWrapper$1, {
|
|
34851
|
+
key: index
|
|
34852
|
+
}, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
34853
|
+
atlasIMG: atlasIMG,
|
|
34854
|
+
atlasJSON: atlasJSON,
|
|
34855
|
+
spriteKey: option.imageKey,
|
|
34856
|
+
imgScale: 3
|
|
34857
|
+
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
34858
|
+
className: "rpgui-radio",
|
|
34859
|
+
type: "radio",
|
|
34860
|
+
value: option.name,
|
|
34861
|
+
name: "test"
|
|
34862
|
+
}), React__default.createElement("label", {
|
|
34863
|
+
onClick: handleClick,
|
|
34864
|
+
style: {
|
|
34865
|
+
display: 'flex',
|
|
34866
|
+
alignItems: 'center'
|
|
34867
|
+
}
|
|
34868
|
+
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
34869
|
+
})), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
|
|
34870
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
34871
|
+
onClick: onClose
|
|
34872
|
+
}, "Cancel"), React__default.createElement(Button, {
|
|
34873
|
+
buttonType: exports.ButtonTypes.RPGUIButton
|
|
34874
|
+
}, "Select")));
|
|
34875
|
+
};
|
|
34876
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34877
|
+
displayName: "ItemSelector__Title",
|
|
34878
|
+
componentId: "sc-gptoxp-0"
|
|
34879
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34880
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34881
|
+
displayName: "ItemSelector__Subtitle",
|
|
34882
|
+
componentId: "sc-gptoxp-1"
|
|
34883
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34884
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34885
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34886
|
+
componentId: "sc-gptoxp-2"
|
|
34887
|
+
})(["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;"]);
|
|
34888
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34889
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34890
|
+
componentId: "sc-gptoxp-3"
|
|
34891
|
+
})(["margin-right:40px;"]);
|
|
34892
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34893
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34894
|
+
componentId: "sc-gptoxp-4"
|
|
34895
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34896
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34897
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34898
|
+
componentId: "sc-gptoxp-5"
|
|
34899
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34900
|
+
|
|
34687
34901
|
var ListMenu = function ListMenu(_ref) {
|
|
34688
34902
|
var options = _ref.options,
|
|
34689
34903
|
onSelected = _ref.onSelected,
|
|
@@ -34819,7 +35033,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34819
35033
|
onTouchStart: onRightClick
|
|
34820
35034
|
}), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
34821
35035
|
className: "drag-handler"
|
|
34822
|
-
}, React__default.createElement(Title$
|
|
35036
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
34823
35037
|
src: quests[currentIndex].thumbnail || img$9
|
|
34824
35038
|
}), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
34825
35039
|
className: "golden"
|
|
@@ -34838,7 +35052,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34838
35052
|
}, button.title);
|
|
34839
35053
|
})))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
34840
35054
|
className: "drag-handler"
|
|
34841
|
-
}, React__default.createElement(Title$
|
|
35055
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
34842
35056
|
src: quests[0].thumbnail || img$9
|
|
34843
35057
|
}), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
34844
35058
|
className: "golden"
|
|
@@ -34885,7 +35099,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
34885
35099
|
displayName: "QuestInfo__TitleContainer",
|
|
34886
35100
|
componentId: "sc-15s2boc-6"
|
|
34887
35101
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
34888
|
-
var Title$
|
|
35102
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34889
35103
|
displayName: "QuestInfo__Title",
|
|
34890
35104
|
componentId: "sc-15s2boc-7"
|
|
34891
35105
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -34907,7 +35121,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
34907
35121
|
style: {
|
|
34908
35122
|
width: '100%'
|
|
34909
35123
|
}
|
|
34910
|
-
}, React__default.createElement(Title$
|
|
35124
|
+
}, React__default.createElement(Title$4, null, "Quests"), React__default.createElement("hr", {
|
|
34911
35125
|
className: "golden"
|
|
34912
35126
|
}), React__default.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
34913
35127
|
return React__default.createElement("div", {
|
|
@@ -34928,7 +35142,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
34928
35142
|
displayName: "QuestList__QuestDraggableContainer",
|
|
34929
35143
|
componentId: "sc-1a2vx6q-0"
|
|
34930
35144
|
})([".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$
|
|
35145
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
34932
35146
|
displayName: "QuestList__Title",
|
|
34933
35147
|
componentId: "sc-1a2vx6q-1"
|
|
34934
35148
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -34941,15 +35155,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34941
35155
|
componentId: "sc-1a2vx6q-3"
|
|
34942
35156
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
34943
35157
|
|
|
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
35158
|
var InputRadio = function InputRadio(_ref) {
|
|
34954
35159
|
var name = _ref.name,
|
|
34955
35160
|
items = _ref.items,
|
|
@@ -34982,6 +35187,15 @@ var InputRadio = function InputRadio(_ref) {
|
|
|
34982
35187
|
}));
|
|
34983
35188
|
};
|
|
34984
35189
|
|
|
35190
|
+
//@ts-ignore
|
|
35191
|
+
var _RPGUI = RPGUI;
|
|
35192
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
35193
|
+
var children = _ref.children;
|
|
35194
|
+
return React__default.createElement("div", {
|
|
35195
|
+
className: "rpgui-content"
|
|
35196
|
+
}, children);
|
|
35197
|
+
};
|
|
35198
|
+
|
|
34985
35199
|
var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
34986
35200
|
var value = _ref.value,
|
|
34987
35201
|
_ref$bgColor = _ref.bgColor,
|
|
@@ -35386,7 +35600,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35386
35600
|
style: {
|
|
35387
35601
|
width: '100%'
|
|
35388
35602
|
}
|
|
35389
|
-
}, React__default.createElement(Title$
|
|
35603
|
+
}, React__default.createElement(Title$5, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
|
|
35390
35604
|
className: "golden"
|
|
35391
35605
|
})), React__default.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
|
|
35392
35606
|
var _qtyMap$get;
|
|
@@ -35399,7 +35613,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35399
35613
|
traderItem: tradeItem,
|
|
35400
35614
|
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
35401
35615
|
}));
|
|
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$
|
|
35616
|
+
})), 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
35617
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35404
35618
|
disabled: !hasGoldForSale(),
|
|
35405
35619
|
onClick: function onClick() {
|
|
@@ -35412,7 +35626,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35412
35626
|
}
|
|
35413
35627
|
}, "Cancel"))));
|
|
35414
35628
|
};
|
|
35415
|
-
var Title$
|
|
35629
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35416
35630
|
displayName: "TradingMenu__Title",
|
|
35417
35631
|
componentId: "sc-1wjsz1l-0"
|
|
35418
35632
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -35436,7 +35650,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
35436
35650
|
displayName: "TradingMenu__AlertWrapper",
|
|
35437
35651
|
componentId: "sc-1wjsz1l-5"
|
|
35438
35652
|
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
35439
|
-
var ButtonWrapper$
|
|
35653
|
+
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35440
35654
|
displayName: "TradingMenu__ButtonWrapper",
|
|
35441
35655
|
componentId: "sc-1wjsz1l-6"
|
|
35442
35656
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
|
|
@@ -35457,95 +35671,10 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
|
35457
35671
|
return props.maxLines;
|
|
35458
35672
|
});
|
|
35459
35673
|
|
|
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
35674
|
exports.Button = Button;
|
|
35547
35675
|
exports.CharacterSelection = CharacterSelection;
|
|
35548
35676
|
exports.Chat = Chat;
|
|
35677
|
+
exports.ChatDeprecated = ChatDeprecated;
|
|
35549
35678
|
exports.CheckButton = CheckButton;
|
|
35550
35679
|
exports.CraftBook = CraftBook;
|
|
35551
35680
|
exports.DraggableContainer = DraggableContainer;
|