@rpg-engine/long-bow 0.2.66 → 0.2.68
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/CraftBook/CraftBook.d.ts +15 -0
- package/dist/components/CraftBook/MockItems.d.ts +2 -0
- package/dist/components/itemSelector/ItemSelector.d.ts +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/long-bow.cjs.development.js +260 -104
- 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 -106
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/CraftBook.stories.d.ts +4 -0
- package/package.json +2 -2
- package/src/components/CraftBook/CraftBook.tsx +217 -0
- package/src/components/CraftBook/MockItems.ts +41 -0
- package/src/components/SkillsContainer.tsx +1 -0
- package/src/components/itemSelector/ItemSelector.tsx +5 -1
- package/src/index.tsx +5 -4
- package/src/stories/CraftBook.stories.tsx +40 -0
- package/src/.DS_Store +0 -0
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/mocks/.DS_Store +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICraftableItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IItemCraftSelectorProps {
|
|
4
|
+
atlasJSON: any;
|
|
5
|
+
atlasIMG: any;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSelect: (value: string) => void;
|
|
8
|
+
onCraftItem: (value: string | undefined) => void;
|
|
9
|
+
craftablesItems: ICraftableItem[];
|
|
10
|
+
}
|
|
11
|
+
export interface ShowMessage {
|
|
12
|
+
show: boolean;
|
|
13
|
+
index: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const CraftBook: React.FC<IItemCraftSelectorProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './components/Button';
|
|
|
2
2
|
export * from './components/Character/CharacterSelection';
|
|
3
3
|
export * from './components/Chat/Chat';
|
|
4
4
|
export * from './components/CheckButton';
|
|
5
|
+
export * from './components/CraftBook/CraftBook';
|
|
5
6
|
export * from './components/DraggableContainer';
|
|
6
7
|
export * from './components/Dropdown';
|
|
7
8
|
export * from './components/DropdownSelectorContainer';
|
|
@@ -10,6 +11,7 @@ export * from './components/HistoryDialog';
|
|
|
10
11
|
export * from './components/Input';
|
|
11
12
|
export * from './components/Item/Inventory/ItemContainer';
|
|
12
13
|
export * from './components/Item/Inventory/ItemSlot';
|
|
14
|
+
export * from './components/itemSelector/ItemSelector';
|
|
13
15
|
export * from './components/ListMenu';
|
|
14
16
|
export * from './components/NPCDialog/NPCDialog';
|
|
15
17
|
export * from './components/NPCDialog/NPCMultiDialog';
|
|
@@ -18,17 +20,16 @@ export * from './components/ProgressBar';
|
|
|
18
20
|
export * from './components/PropertySelect/PropertySelect';
|
|
19
21
|
export * from './components/QuestInfo/QuestInfo';
|
|
20
22
|
export * from './components/QuestList';
|
|
21
|
-
export * from './components/RPGUIContainer';
|
|
22
|
-
export * from './components/RPGUIRoot';
|
|
23
23
|
export * from './components/RadioButton';
|
|
24
24
|
export * from './components/RangeSlider';
|
|
25
|
+
export * from './components/RPGUIContainer';
|
|
26
|
+
export * from './components/RPGUIRoot';
|
|
27
|
+
export * from './components/shared/SpriteFromAtlas';
|
|
25
28
|
export * from './components/SkillProgressBar';
|
|
26
29
|
export * from './components/SkillsContainer';
|
|
27
30
|
export * from './components/TextArea';
|
|
28
31
|
export * from './components/TimeWidget/TimeWidget';
|
|
29
32
|
export * from './components/TradingMenu/TradingMenu';
|
|
30
33
|
export * from './components/Truncate';
|
|
31
|
-
export * from './components/itemSelector/ItemSelector';
|
|
32
|
-
export * from './components/shared/SpriteFromAtlas';
|
|
33
34
|
export * from './components/typography/DynamicText';
|
|
34
35
|
export { useEventListener } from './hooks/useEventListener';
|
|
@@ -27327,6 +27327,161 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
|
27327
27327
|
return props.opened ? 'block' : 'none';
|
|
27328
27328
|
});
|
|
27329
27329
|
|
|
27330
|
+
var CraftBook = function CraftBook(_ref) {
|
|
27331
|
+
var atlasIMG = _ref.atlasIMG,
|
|
27332
|
+
atlasJSON = _ref.atlasJSON,
|
|
27333
|
+
onClose = _ref.onClose,
|
|
27334
|
+
onSelect = _ref.onSelect,
|
|
27335
|
+
onCraftItem = _ref.onCraftItem,
|
|
27336
|
+
craftablesItems = _ref.craftablesItems;
|
|
27337
|
+
var optionsId = 0;
|
|
27338
|
+
var _useState = React.useState({
|
|
27339
|
+
show: false,
|
|
27340
|
+
index: 200
|
|
27341
|
+
}),
|
|
27342
|
+
isShown = _useState[0],
|
|
27343
|
+
setIsShown = _useState[1];
|
|
27344
|
+
var _useState2 = React.useState(),
|
|
27345
|
+
craftItem = _useState2[0],
|
|
27346
|
+
setCraftItem = _useState2[1];
|
|
27347
|
+
var getDropdownOptions = function getDropdownOptions() {
|
|
27348
|
+
var options = [];
|
|
27349
|
+
Object.keys(shared.ItemSubType).forEach(function (key) {
|
|
27350
|
+
options.push({
|
|
27351
|
+
id: optionsId,
|
|
27352
|
+
value: key,
|
|
27353
|
+
option: key
|
|
27354
|
+
});
|
|
27355
|
+
optionsId += 1;
|
|
27356
|
+
});
|
|
27357
|
+
return options;
|
|
27358
|
+
};
|
|
27359
|
+
var modifyString = function modifyString(str) {
|
|
27360
|
+
// Split the string by "/" and "."
|
|
27361
|
+
var parts = str.split('/');
|
|
27362
|
+
var fileName = parts[parts.length - 1];
|
|
27363
|
+
parts = fileName.split('.');
|
|
27364
|
+
var name = parts[0];
|
|
27365
|
+
// Replace all occurrences of "-" with " "
|
|
27366
|
+
name = name.replace(/-/g, ' ');
|
|
27367
|
+
// Uppercase the first word
|
|
27368
|
+
var words = name.split(' ');
|
|
27369
|
+
var firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);
|
|
27370
|
+
var modifiedWords = [firstWord].concat(words.slice(1));
|
|
27371
|
+
name = modifiedWords.join(' ');
|
|
27372
|
+
return name;
|
|
27373
|
+
};
|
|
27374
|
+
var handleClick = function handleClick() {
|
|
27375
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
27376
|
+
var elementValue = element.value;
|
|
27377
|
+
setCraftItem(elementValue);
|
|
27378
|
+
};
|
|
27379
|
+
return React__default.createElement(DraggableContainer, {
|
|
27380
|
+
type: exports.RPGUIContainerTypes.Framed,
|
|
27381
|
+
width: "500px",
|
|
27382
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
27383
|
+
onCloseButton: function onCloseButton() {
|
|
27384
|
+
if (onClose) {
|
|
27385
|
+
onClose();
|
|
27386
|
+
}
|
|
27387
|
+
}
|
|
27388
|
+
}, React__default.createElement("div", {
|
|
27389
|
+
style: {
|
|
27390
|
+
width: '100%'
|
|
27391
|
+
}
|
|
27392
|
+
}, React__default.createElement(Title$1, null, 'Harvesting instruments'), React__default.createElement(Subtitle, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
27393
|
+
className: "golden"
|
|
27394
|
+
})), React__default.createElement(Dropdown, {
|
|
27395
|
+
options: getDropdownOptions(),
|
|
27396
|
+
onChange: function onChange(value) {
|
|
27397
|
+
return onSelect(value);
|
|
27398
|
+
}
|
|
27399
|
+
}), React__default.createElement(RadioInputScroller, null, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
27400
|
+
return React__default.createElement(RadioOptionsWrapper, {
|
|
27401
|
+
key: index
|
|
27402
|
+
}, React__default.createElement(SpriteAtlasWrapper, null, React__default.createElement(SpriteFromAtlas, {
|
|
27403
|
+
atlasIMG: atlasIMG,
|
|
27404
|
+
atlasJSON: atlasJSON,
|
|
27405
|
+
spriteKey: option.key,
|
|
27406
|
+
imgScale: 3,
|
|
27407
|
+
grayScale: !option.canCraft
|
|
27408
|
+
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
27409
|
+
className: "rpgui-radio",
|
|
27410
|
+
type: "radio",
|
|
27411
|
+
value: option.name,
|
|
27412
|
+
name: "test",
|
|
27413
|
+
disabled: !option.canCraft
|
|
27414
|
+
}), React__default.createElement("label", {
|
|
27415
|
+
onClick: handleClick,
|
|
27416
|
+
style: {
|
|
27417
|
+
display: 'flex',
|
|
27418
|
+
alignItems: 'center'
|
|
27419
|
+
},
|
|
27420
|
+
onMouseEnter: function onMouseEnter() {
|
|
27421
|
+
return setIsShown({
|
|
27422
|
+
show: true,
|
|
27423
|
+
index: index
|
|
27424
|
+
});
|
|
27425
|
+
},
|
|
27426
|
+
onMouseLeave: function onMouseLeave() {
|
|
27427
|
+
return setIsShown({
|
|
27428
|
+
show: false,
|
|
27429
|
+
index: index
|
|
27430
|
+
});
|
|
27431
|
+
}
|
|
27432
|
+
}, modifyString(option.name)), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
27433
|
+
return React__default.createElement(Recipes, {
|
|
27434
|
+
key: index
|
|
27435
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
27436
|
+
atlasIMG: atlasIMG,
|
|
27437
|
+
atlasJSON: atlasJSON,
|
|
27438
|
+
spriteKey: "" + option.key,
|
|
27439
|
+
imgScale: 1
|
|
27440
|
+
}), React__default.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
27441
|
+
})));
|
|
27442
|
+
})), React__default.createElement(ButtonWrapper, null, React__default.createElement(Button, {
|
|
27443
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
27444
|
+
onClick: onClose
|
|
27445
|
+
}, "Cancel"), React__default.createElement(Button, {
|
|
27446
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
27447
|
+
onClick: function onClick() {
|
|
27448
|
+
return onCraftItem(craftItem);
|
|
27449
|
+
}
|
|
27450
|
+
}, "Craft")));
|
|
27451
|
+
};
|
|
27452
|
+
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
27453
|
+
displayName: "CraftBook__StyledItem",
|
|
27454
|
+
componentId: "sc-19q95ue-0"
|
|
27455
|
+
})(["margin-left:10px;"]);
|
|
27456
|
+
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
27457
|
+
displayName: "CraftBook__Recipes",
|
|
27458
|
+
componentId: "sc-19q95ue-1"
|
|
27459
|
+
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
27460
|
+
var Title$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
27461
|
+
displayName: "CraftBook__Title",
|
|
27462
|
+
componentId: "sc-19q95ue-2"
|
|
27463
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
27464
|
+
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
27465
|
+
displayName: "CraftBook__Subtitle",
|
|
27466
|
+
componentId: "sc-19q95ue-3"
|
|
27467
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
27468
|
+
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
27469
|
+
displayName: "CraftBook__RadioInputScroller",
|
|
27470
|
+
componentId: "sc-19q95ue-4"
|
|
27471
|
+
})(["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;"]);
|
|
27472
|
+
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
27473
|
+
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
27474
|
+
componentId: "sc-19q95ue-5"
|
|
27475
|
+
})(["margin-right:40px;"]);
|
|
27476
|
+
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
27477
|
+
displayName: "CraftBook__RadioOptionsWrapper",
|
|
27478
|
+
componentId: "sc-19q95ue-6"
|
|
27479
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
27480
|
+
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
27481
|
+
displayName: "CraftBook__ButtonWrapper",
|
|
27482
|
+
componentId: "sc-19q95ue-7"
|
|
27483
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
27484
|
+
|
|
27330
27485
|
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
27331
27486
|
var title = _ref.title,
|
|
27332
27487
|
onChange = _ref.onChange,
|
|
@@ -28349,6 +28504,92 @@ var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
28349
28504
|
componentId: "sc-15y5p9l-0"
|
|
28350
28505
|
})(["max-width:280px;display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
28351
28506
|
|
|
28507
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
28508
|
+
var atlasIMG = _ref.atlasIMG,
|
|
28509
|
+
atlasJSON = _ref.atlasJSON,
|
|
28510
|
+
options = _ref.options,
|
|
28511
|
+
onClose = _ref.onClose,
|
|
28512
|
+
onSelect = _ref.onSelect;
|
|
28513
|
+
var _useState = React.useState(),
|
|
28514
|
+
selectedValue = _useState[0],
|
|
28515
|
+
setSelectedValue = _useState[1];
|
|
28516
|
+
var handleClick = function handleClick() {
|
|
28517
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
28518
|
+
var elementValue = element.value;
|
|
28519
|
+
setSelectedValue(elementValue);
|
|
28520
|
+
};
|
|
28521
|
+
React.useEffect(function () {
|
|
28522
|
+
if (selectedValue) {
|
|
28523
|
+
onSelect(selectedValue);
|
|
28524
|
+
}
|
|
28525
|
+
}, [selectedValue]);
|
|
28526
|
+
return React__default.createElement(DraggableContainer, {
|
|
28527
|
+
type: exports.RPGUIContainerTypes.Framed,
|
|
28528
|
+
width: "500px",
|
|
28529
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
28530
|
+
onCloseButton: function onCloseButton() {
|
|
28531
|
+
if (onClose) {
|
|
28532
|
+
onClose();
|
|
28533
|
+
}
|
|
28534
|
+
}
|
|
28535
|
+
}, React__default.createElement("div", {
|
|
28536
|
+
style: {
|
|
28537
|
+
width: '100%'
|
|
28538
|
+
}
|
|
28539
|
+
}, React__default.createElement(Title$2, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
28540
|
+
className: "golden"
|
|
28541
|
+
})), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
28542
|
+
return React__default.createElement(RadioOptionsWrapper$1, {
|
|
28543
|
+
key: index
|
|
28544
|
+
}, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
28545
|
+
atlasIMG: atlasIMG,
|
|
28546
|
+
atlasJSON: atlasJSON,
|
|
28547
|
+
spriteKey: option.imageKey,
|
|
28548
|
+
imgScale: 3
|
|
28549
|
+
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
28550
|
+
className: "rpgui-radio",
|
|
28551
|
+
type: "radio",
|
|
28552
|
+
value: option.name,
|
|
28553
|
+
name: "test"
|
|
28554
|
+
}), React__default.createElement("label", {
|
|
28555
|
+
onClick: handleClick,
|
|
28556
|
+
style: {
|
|
28557
|
+
display: 'flex',
|
|
28558
|
+
alignItems: 'center'
|
|
28559
|
+
}
|
|
28560
|
+
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
28561
|
+
})), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
|
|
28562
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
28563
|
+
onClick: onClose
|
|
28564
|
+
}, "Cancel"), React__default.createElement(Button, {
|
|
28565
|
+
buttonType: exports.ButtonTypes.RPGUIButton
|
|
28566
|
+
}, "Select")));
|
|
28567
|
+
};
|
|
28568
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
28569
|
+
displayName: "ItemSelector__Title",
|
|
28570
|
+
componentId: "sc-gptoxp-0"
|
|
28571
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
28572
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
28573
|
+
displayName: "ItemSelector__Subtitle",
|
|
28574
|
+
componentId: "sc-gptoxp-1"
|
|
28575
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
28576
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
28577
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
28578
|
+
componentId: "sc-gptoxp-2"
|
|
28579
|
+
})(["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;"]);
|
|
28580
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
28581
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
28582
|
+
componentId: "sc-gptoxp-3"
|
|
28583
|
+
})(["margin-right:40px;"]);
|
|
28584
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
28585
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
28586
|
+
componentId: "sc-gptoxp-4"
|
|
28587
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
28588
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
28589
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
28590
|
+
componentId: "sc-gptoxp-5"
|
|
28591
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
28592
|
+
|
|
28352
28593
|
var ListMenu = function ListMenu(_ref) {
|
|
28353
28594
|
var options = _ref.options,
|
|
28354
28595
|
onSelected = _ref.onSelected,
|
|
@@ -28484,7 +28725,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
28484
28725
|
onTouchStart: onRightClick
|
|
28485
28726
|
}), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
28486
28727
|
className: "drag-handler"
|
|
28487
|
-
}, React__default.createElement(Title$
|
|
28728
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
28488
28729
|
src: quests[currentIndex].thumbnail || img$8
|
|
28489
28730
|
}), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
28490
28731
|
className: "golden"
|
|
@@ -28503,7 +28744,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
28503
28744
|
}, button.title);
|
|
28504
28745
|
})))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
28505
28746
|
className: "drag-handler"
|
|
28506
|
-
}, React__default.createElement(Title$
|
|
28747
|
+
}, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
|
|
28507
28748
|
src: quests[0].thumbnail || img$8
|
|
28508
28749
|
}), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
28509
28750
|
className: "golden"
|
|
@@ -28550,7 +28791,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
28550
28791
|
displayName: "QuestInfo__TitleContainer",
|
|
28551
28792
|
componentId: "sc-15s2boc-6"
|
|
28552
28793
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
28553
|
-
var Title$
|
|
28794
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
28554
28795
|
displayName: "QuestInfo__Title",
|
|
28555
28796
|
componentId: "sc-15s2boc-7"
|
|
28556
28797
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -28572,7 +28813,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
28572
28813
|
style: {
|
|
28573
28814
|
width: '100%'
|
|
28574
28815
|
}
|
|
28575
|
-
}, React__default.createElement(Title$
|
|
28816
|
+
}, React__default.createElement(Title$4, null, "Quests"), React__default.createElement("hr", {
|
|
28576
28817
|
className: "golden"
|
|
28577
28818
|
}), React__default.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
28578
28819
|
return React__default.createElement("div", {
|
|
@@ -28593,7 +28834,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
28593
28834
|
displayName: "QuestList__QuestDraggableContainer",
|
|
28594
28835
|
componentId: "sc-1a2vx6q-0"
|
|
28595
28836
|
})([".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;}"]);
|
|
28596
|
-
var Title$
|
|
28837
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
28597
28838
|
displayName: "QuestList__Title",
|
|
28598
28839
|
componentId: "sc-1a2vx6q-1"
|
|
28599
28840
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -28606,15 +28847,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
28606
28847
|
componentId: "sc-1a2vx6q-3"
|
|
28607
28848
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
28608
28849
|
|
|
28609
|
-
//@ts-ignore
|
|
28610
|
-
var _RPGUI = RPGUI;
|
|
28611
|
-
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
28612
|
-
var children = _ref.children;
|
|
28613
|
-
return React__default.createElement("div", {
|
|
28614
|
-
className: "rpgui-content"
|
|
28615
|
-
}, children);
|
|
28616
|
-
};
|
|
28617
|
-
|
|
28618
28850
|
var InputRadio = function InputRadio(_ref) {
|
|
28619
28851
|
var name = _ref.name,
|
|
28620
28852
|
items = _ref.items,
|
|
@@ -28647,6 +28879,15 @@ var InputRadio = function InputRadio(_ref) {
|
|
|
28647
28879
|
}));
|
|
28648
28880
|
};
|
|
28649
28881
|
|
|
28882
|
+
//@ts-ignore
|
|
28883
|
+
var _RPGUI = RPGUI;
|
|
28884
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
28885
|
+
var children = _ref.children;
|
|
28886
|
+
return React__default.createElement("div", {
|
|
28887
|
+
className: "rpgui-content"
|
|
28888
|
+
}, children);
|
|
28889
|
+
};
|
|
28890
|
+
|
|
28650
28891
|
(function (RangeSliderType) {
|
|
28651
28892
|
RangeSliderType["Slider"] = "rpgui-slider";
|
|
28652
28893
|
RangeSliderType["GoldSlider"] = "rpgui-slider golden";
|
|
@@ -29081,7 +29322,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
29081
29322
|
style: {
|
|
29082
29323
|
width: '100%'
|
|
29083
29324
|
}
|
|
29084
|
-
}, React__default.createElement(Title$
|
|
29325
|
+
}, React__default.createElement(Title$5, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
|
|
29085
29326
|
className: "golden"
|
|
29086
29327
|
})), React__default.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
|
|
29087
29328
|
var _qtyMap$get;
|
|
@@ -29094,7 +29335,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
29094
29335
|
traderItem: tradeItem,
|
|
29095
29336
|
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
29096
29337
|
}));
|
|
29097
|
-
})), 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, null, React__default.createElement(Button, {
|
|
29338
|
+
})), 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, {
|
|
29098
29339
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29099
29340
|
disabled: !hasGoldForSale(),
|
|
29100
29341
|
onClick: function onClick() {
|
|
@@ -29107,7 +29348,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
29107
29348
|
}
|
|
29108
29349
|
}, "Cancel"))));
|
|
29109
29350
|
};
|
|
29110
|
-
var Title$
|
|
29351
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
29111
29352
|
displayName: "TradingMenu__Title",
|
|
29112
29353
|
componentId: "sc-1wjsz1l-0"
|
|
29113
29354
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -29131,7 +29372,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
29131
29372
|
displayName: "TradingMenu__AlertWrapper",
|
|
29132
29373
|
componentId: "sc-1wjsz1l-5"
|
|
29133
29374
|
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
29134
|
-
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29375
|
+
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
29135
29376
|
displayName: "TradingMenu__ButtonWrapper",
|
|
29136
29377
|
componentId: "sc-1wjsz1l-6"
|
|
29137
29378
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
|
|
@@ -29152,96 +29393,11 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
|
29152
29393
|
return props.maxLines;
|
|
29153
29394
|
});
|
|
29154
29395
|
|
|
29155
|
-
var ItemSelector = function ItemSelector(_ref) {
|
|
29156
|
-
var atlasIMG = _ref.atlasIMG,
|
|
29157
|
-
atlasJSON = _ref.atlasJSON,
|
|
29158
|
-
options = _ref.options,
|
|
29159
|
-
onClose = _ref.onClose,
|
|
29160
|
-
onSelect = _ref.onSelect;
|
|
29161
|
-
var _useState = React.useState(),
|
|
29162
|
-
selectedValue = _useState[0],
|
|
29163
|
-
setSelectedValue = _useState[1];
|
|
29164
|
-
var handleClick = function handleClick() {
|
|
29165
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
29166
|
-
var elementValue = element.value;
|
|
29167
|
-
setSelectedValue(elementValue);
|
|
29168
|
-
};
|
|
29169
|
-
React.useEffect(function () {
|
|
29170
|
-
if (selectedValue) {
|
|
29171
|
-
onSelect(selectedValue);
|
|
29172
|
-
}
|
|
29173
|
-
}, [selectedValue]);
|
|
29174
|
-
return React__default.createElement(DraggableContainer, {
|
|
29175
|
-
type: exports.RPGUIContainerTypes.Framed,
|
|
29176
|
-
width: "500px",
|
|
29177
|
-
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
29178
|
-
onCloseButton: function onCloseButton() {
|
|
29179
|
-
if (onClose) {
|
|
29180
|
-
onClose();
|
|
29181
|
-
}
|
|
29182
|
-
}
|
|
29183
|
-
}, React__default.createElement("div", {
|
|
29184
|
-
style: {
|
|
29185
|
-
width: '100%'
|
|
29186
|
-
}
|
|
29187
|
-
}, React__default.createElement(Title$4, null, 'Harvesting instruments'), React__default.createElement(Subtitle, null, 'Use the tool, you need it'), React__default.createElement("hr", {
|
|
29188
|
-
className: "golden"
|
|
29189
|
-
})), React__default.createElement(RadioInputScroller, null, options == null ? void 0 : options.map(function (option, index) {
|
|
29190
|
-
return React__default.createElement(RadioOptionsWrapper, {
|
|
29191
|
-
key: index
|
|
29192
|
-
}, React__default.createElement(SpriteAtlasWrapper, null, React__default.createElement(SpriteFromAtlas, {
|
|
29193
|
-
atlasIMG: atlasIMG,
|
|
29194
|
-
atlasJSON: atlasJSON,
|
|
29195
|
-
spriteKey: option.imageKey,
|
|
29196
|
-
imgScale: 3
|
|
29197
|
-
})), React__default.createElement("div", null, React__default.createElement("input", {
|
|
29198
|
-
className: "rpgui-radio",
|
|
29199
|
-
type: "radio",
|
|
29200
|
-
value: option.name,
|
|
29201
|
-
name: "test"
|
|
29202
|
-
}), React__default.createElement("label", {
|
|
29203
|
-
onClick: handleClick,
|
|
29204
|
-
style: {
|
|
29205
|
-
display: 'flex',
|
|
29206
|
-
alignItems: 'center'
|
|
29207
|
-
}
|
|
29208
|
-
}, option.name, " ", React__default.createElement("br", null), option.description)));
|
|
29209
|
-
})), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
|
|
29210
|
-
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29211
|
-
onClick: onClose
|
|
29212
|
-
}, "Cancel"), React__default.createElement(Button, {
|
|
29213
|
-
buttonType: exports.ButtonTypes.RPGUIButton
|
|
29214
|
-
}, "Select")));
|
|
29215
|
-
};
|
|
29216
|
-
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
29217
|
-
displayName: "ItemSelector__Title",
|
|
29218
|
-
componentId: "sc-gptoxp-0"
|
|
29219
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
29220
|
-
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
29221
|
-
displayName: "ItemSelector__Subtitle",
|
|
29222
|
-
componentId: "sc-gptoxp-1"
|
|
29223
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
29224
|
-
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
29225
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
29226
|
-
componentId: "sc-gptoxp-2"
|
|
29227
|
-
})(["width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
29228
|
-
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29229
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
29230
|
-
componentId: "sc-gptoxp-3"
|
|
29231
|
-
})(["margin-right:40px;"]);
|
|
29232
|
-
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29233
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
29234
|
-
componentId: "sc-gptoxp-4"
|
|
29235
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
29236
|
-
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
29237
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
29238
|
-
componentId: "sc-gptoxp-5"
|
|
29239
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
29240
|
-
|
|
29241
29396
|
exports.Button = Button;
|
|
29242
29397
|
exports.CharacterSelection = CharacterSelection;
|
|
29243
29398
|
exports.Chat = Chat;
|
|
29244
29399
|
exports.CheckButton = CheckButton;
|
|
29400
|
+
exports.CraftBook = CraftBook;
|
|
29245
29401
|
exports.DraggableContainer = DraggableContainer;
|
|
29246
29402
|
exports.Dropdown = Dropdown;
|
|
29247
29403
|
exports.DropdownSelectorContainer = DropdownSelectorContainer;
|