@rpg-engine/long-bow 0.4.6 → 0.4.8
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/ConfirmModal.d.ts +8 -0
- package/dist/components/DraggableContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +7 -7
- package/dist/components/Marketplace/BuyPanel.d.ts +22 -0
- package/dist/components/Marketplace/ManagmentPanel.d.ts +18 -0
- package/dist/components/Marketplace/Marketplace.d.ts +22 -9
- package/dist/components/Marketplace/MarketplaceRows.d.ts +3 -1
- package/dist/components/Marketplace/{__mocks__ → filters}/index.d.ts +1 -3
- package/dist/components/Pager.d.ts +9 -0
- package/dist/components/SkillProgressBar.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +552 -147
- 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 +552 -147
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ConfirmModal.tsx +87 -0
- package/src/components/DraggableContainer.tsx +3 -0
- package/src/components/Dropdown.tsx +14 -6
- package/src/components/Item/Inventory/ItemSlot.tsx +31 -16
- package/src/components/Marketplace/BuyPanel.tsx +296 -0
- package/src/components/Marketplace/ManagmentPanel.tsx +247 -0
- package/src/components/Marketplace/Marketplace.tsx +74 -100
- package/src/components/Marketplace/MarketplaceRows.tsx +82 -92
- package/src/components/Marketplace/{__mocks__ → filters}/index.tsx +13 -11
- package/src/components/Pager.tsx +94 -0
- package/src/components/SkillProgressBar.tsx +69 -4
- package/src/components/SkillsContainer.tsx +1 -0
- package/src/components/Spellbook/Spell.tsx +0 -1
- package/src/components/Spellbook/Spellbook.tsx +1 -17
- package/src/components/Spellbook/mockSpells.ts +68 -68
- package/src/components/shared/Ellipsis.tsx +10 -2
- package/src/mocks/skills.mocks.ts +2 -0
- package/src/stories/Marketplace.stories.tsx +22 -11
package/dist/long-bow.esm.js
CHANGED
|
@@ -9,6 +9,7 @@ import ReactDOM from 'react-dom';
|
|
|
9
9
|
import { camelCase } from 'lodash-es';
|
|
10
10
|
import { observer } from 'mobx-react-lite';
|
|
11
11
|
import { v4 } from 'uuid';
|
|
12
|
+
import { AiFillCaretRight } from 'react-icons/ai';
|
|
12
13
|
import 'rpgui/rpgui.min.css';
|
|
13
14
|
import 'rpgui/rpgui.min.js';
|
|
14
15
|
import capitalize from 'lodash-es/capitalize';
|
|
@@ -12345,14 +12346,14 @@ var Ellipsis = function Ellipsis(_ref) {
|
|
|
12345
12346
|
maxWidth: maxWidth,
|
|
12346
12347
|
fontSize: fontSize,
|
|
12347
12348
|
center: center
|
|
12348
|
-
}, React.createElement("
|
|
12349
|
+
}, React.createElement("span", {
|
|
12349
12350
|
className: "ellipsis-" + maxLines + "-lines"
|
|
12350
12351
|
}, children));
|
|
12351
12352
|
};
|
|
12352
|
-
var Container$1 = /*#__PURE__*/styled.
|
|
12353
|
+
var Container$1 = /*#__PURE__*/styled.span.withConfig({
|
|
12353
12354
|
displayName: "Ellipsis__Container",
|
|
12354
12355
|
componentId: "sc-ysrlju-0"
|
|
12355
|
-
})(["
|
|
12356
|
+
})(["display:block;margin:0;.ellipsis-1-lines{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:", ";font-size:", ";", "}.ellipsis-2-lines{display:block;display:-webkit-box;max-width:", "px;height:25px;margin:0 auto;line-height:1;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;font-size:", ";}.ellipsis-3-lines{display:block;display:-webkit-box;max-width:", "px;height:43px;margin:0 auto;line-height:1;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;font-size:", ";}"], function (props) {
|
|
12356
12357
|
return props.maxWidth;
|
|
12357
12358
|
}, function (props) {
|
|
12358
12359
|
return props.fontSize;
|
|
@@ -13051,7 +13052,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13051
13052
|
x: 0,
|
|
13052
13053
|
y: 0
|
|
13053
13054
|
} : _ref$initialPosition,
|
|
13054
|
-
scale = _ref.scale
|
|
13055
|
+
scale = _ref.scale,
|
|
13056
|
+
_ref$dragDisabled = _ref.dragDisabled,
|
|
13057
|
+
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled;
|
|
13055
13058
|
var draggableRef = useRef(null);
|
|
13056
13059
|
useOutsideClick(draggableRef, 'item-container');
|
|
13057
13060
|
useEffect(function () {
|
|
@@ -13069,6 +13072,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13069
13072
|
}, []);
|
|
13070
13073
|
return React.createElement(Draggable, {
|
|
13071
13074
|
cancel: ".container-close," + cancelDrag,
|
|
13075
|
+
disabled: dragDisabled,
|
|
13072
13076
|
onDrag: function onDrag(_e, data) {
|
|
13073
13077
|
if (onPositionChange) {
|
|
13074
13078
|
onPositionChange({
|
|
@@ -13493,7 +13497,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13493
13497
|
y: 0
|
|
13494
13498
|
});
|
|
13495
13499
|
setIsFocused(false);
|
|
13496
|
-
if (item) {
|
|
13500
|
+
if (item && containerType) {
|
|
13497
13501
|
setContextActions(generateContextMenu(item, containerType, isDepotSystem));
|
|
13498
13502
|
}
|
|
13499
13503
|
}, [item, isDepotSystem]);
|
|
@@ -13609,7 +13613,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13609
13613
|
});
|
|
13610
13614
|
setIsFocused(false);
|
|
13611
13615
|
} else if (item) {
|
|
13612
|
-
onDragEnd(quantity);
|
|
13616
|
+
onDragEnd == null ? void 0 : onDragEnd(quantity);
|
|
13613
13617
|
}
|
|
13614
13618
|
};
|
|
13615
13619
|
return React.createElement(Container$a, {
|
|
@@ -13617,7 +13621,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13617
13621
|
className: "rpgui-icon empty-slot",
|
|
13618
13622
|
onMouseUp: function onMouseUp() {
|
|
13619
13623
|
var data = item ? item : null;
|
|
13620
|
-
if (onPlaceDrop) onPlaceDrop(data, slotIndex, containerType);
|
|
13624
|
+
if (onPlaceDrop && containerType) onPlaceDrop(data, slotIndex, containerType);
|
|
13621
13625
|
},
|
|
13622
13626
|
onTouchEnd: function onTouchEnd(e) {
|
|
13623
13627
|
var _document$elementFrom;
|
|
@@ -13631,11 +13635,15 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13631
13635
|
});
|
|
13632
13636
|
(_document$elementFrom = document.elementFromPoint(clientX, clientY)) == null ? void 0 : _document$elementFrom.dispatchEvent(simulatedEvent);
|
|
13633
13637
|
},
|
|
13638
|
+
onPointerDown: onDragStart !== undefined && onDragEnd !== undefined ? undefined : function () {
|
|
13639
|
+
if (item) onPointerDown(item.type, containerType != null ? containerType : null, item);
|
|
13640
|
+
},
|
|
13634
13641
|
isSelectingShortcut: isSelectingShortcut && ((item == null ? void 0 : item.type) === ItemType.Consumable || (item == null ? void 0 : item.type) === ItemType.Tool)
|
|
13635
13642
|
}, React.createElement(Draggable, {
|
|
13636
13643
|
axis: isSelectingShortcut ? 'none' : 'both',
|
|
13637
13644
|
defaultClassName: item ? 'draggable' : 'empty-slot',
|
|
13638
13645
|
scale: dragScale,
|
|
13646
|
+
disabled: onDragStart === undefined || onDragEnd === undefined,
|
|
13639
13647
|
onStop: function onStop(e, data) {
|
|
13640
13648
|
var target = e.target;
|
|
13641
13649
|
if (target != null && target.id.includes('shortcutSetter') && setItemShortcut && item) {
|
|
@@ -13669,7 +13677,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13669
13677
|
y: y
|
|
13670
13678
|
});
|
|
13671
13679
|
setTimeout(function () {
|
|
13672
|
-
if (checkIfItemCanBeMoved()) {
|
|
13680
|
+
if (checkIfItemCanBeMoved != null && checkIfItemCanBeMoved()) {
|
|
13673
13681
|
if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;
|
|
13674
13682
|
if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty, onSuccesfulDrag);else onSuccesfulDrag(item.stackQty);
|
|
13675
13683
|
} else {
|
|
@@ -13697,14 +13705,14 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13697
13705
|
});
|
|
13698
13706
|
}
|
|
13699
13707
|
}
|
|
13700
|
-
onPointerDown(item.type, containerType, item);
|
|
13708
|
+
onPointerDown(item.type, containerType != null ? containerType : null, item);
|
|
13701
13709
|
}
|
|
13702
13710
|
},
|
|
13703
13711
|
onStart: function onStart() {
|
|
13704
13712
|
if (!item || isSelectingShortcut) {
|
|
13705
13713
|
return;
|
|
13706
13714
|
}
|
|
13707
|
-
if (onDragStart) {
|
|
13715
|
+
if (onDragStart && containerType) {
|
|
13708
13716
|
onDragStart(item, slotIndex, containerType);
|
|
13709
13717
|
}
|
|
13710
13718
|
},
|
|
@@ -13720,7 +13728,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13720
13728
|
ref: dragContainer,
|
|
13721
13729
|
isFocused: isFocused,
|
|
13722
13730
|
onMouseOver: function onMouseOver(event) {
|
|
13723
|
-
_onMouseOver(event, slotIndex, item, event.clientX, event.clientY);
|
|
13731
|
+
_onMouseOver == null ? void 0 : _onMouseOver(event, slotIndex, item, event.clientX, event.clientY);
|
|
13724
13732
|
},
|
|
13725
13733
|
onMouseOut: function onMouseOut() {
|
|
13726
13734
|
if (_onMouseOut) _onMouseOut();
|
|
@@ -13749,7 +13757,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13749
13757
|
onSelected: function onSelected(optionId) {
|
|
13750
13758
|
setIsContextMenuVisible(false);
|
|
13751
13759
|
if (item) {
|
|
13752
|
-
_onSelected(optionId, item);
|
|
13760
|
+
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13753
13761
|
}
|
|
13754
13762
|
}
|
|
13755
13763
|
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
@@ -13757,7 +13765,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13757
13765
|
onSelected: function onSelected(optionId) {
|
|
13758
13766
|
setIsContextMenuVisible(false);
|
|
13759
13767
|
if (item) {
|
|
13760
|
-
_onSelected(optionId, item);
|
|
13768
|
+
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13761
13769
|
}
|
|
13762
13770
|
},
|
|
13763
13771
|
onOutsideClick: function onOutsideClick() {
|
|
@@ -14430,7 +14438,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
14430
14438
|
}, React.createElement(DropdownSelect, {
|
|
14431
14439
|
id: "dropdown-" + dropdownId,
|
|
14432
14440
|
className: "rpgui-dropdown-imp rpgui-dropdown-imp-header",
|
|
14433
|
-
|
|
14441
|
+
onPointerUp: function onPointerUp() {
|
|
14434
14442
|
return setOpened(function (prev) {
|
|
14435
14443
|
return !prev;
|
|
14436
14444
|
});
|
|
@@ -14441,7 +14449,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
14441
14449
|
}, options.map(function (option) {
|
|
14442
14450
|
return React.createElement("li", {
|
|
14443
14451
|
key: option.id,
|
|
14444
|
-
|
|
14452
|
+
onPointerUp: function onPointerUp() {
|
|
14445
14453
|
setSelectedValue(option.value);
|
|
14446
14454
|
setSelectedOption(option.option);
|
|
14447
14455
|
setOpened(false);
|
|
@@ -14458,11 +14466,11 @@ var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
|
14458
14466
|
var DropdownSelect = /*#__PURE__*/styled.p.withConfig({
|
|
14459
14467
|
displayName: "Dropdown__DropdownSelect",
|
|
14460
14468
|
componentId: "sc-8arn65-1"
|
|
14461
|
-
})(["width:100%;box-sizing:border-box;"]);
|
|
14469
|
+
})(["width:100%;box-sizing:border-box;label{display:inline-block;transform:translateY(-2px);}"]);
|
|
14462
14470
|
var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
14463
14471
|
displayName: "Dropdown__DropdownOptions",
|
|
14464
14472
|
componentId: "sc-8arn65-2"
|
|
14465
|
-
})(["position:absolute;width:100%;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
14473
|
+
})(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
14466
14474
|
return props.opened ? 'block' : 'none';
|
|
14467
14475
|
});
|
|
14468
14476
|
|
|
@@ -15129,6 +15137,75 @@ var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
|
15129
15137
|
componentId: "sc-i9097t-1"
|
|
15130
15138
|
})(["margin-right:0.5rem;"]);
|
|
15131
15139
|
|
|
15140
|
+
var Pager = function Pager(_ref) {
|
|
15141
|
+
var totalItems = _ref.totalItems,
|
|
15142
|
+
currentPage = _ref.currentPage,
|
|
15143
|
+
itemsPerPage = _ref.itemsPerPage,
|
|
15144
|
+
onPageChange = _ref.onPageChange;
|
|
15145
|
+
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
15146
|
+
return React.createElement(Container$g, null, React.createElement("p", null, "Total items: ", totalItems), React.createElement(PagerContainer, null, React.createElement("button", {
|
|
15147
|
+
disabled: currentPage === 1,
|
|
15148
|
+
onPointerDown: function onPointerDown() {
|
|
15149
|
+
return onPageChange(Math.max(currentPage - 1, 1));
|
|
15150
|
+
}
|
|
15151
|
+
}, '<'), React.createElement("div", {
|
|
15152
|
+
className: "rpgui-container framed-grey"
|
|
15153
|
+
}, currentPage), React.createElement("button", {
|
|
15154
|
+
disabled: currentPage === totalPages,
|
|
15155
|
+
onPointerDown: function onPointerDown() {
|
|
15156
|
+
return onPageChange(Math.min(currentPage + 1, totalPages));
|
|
15157
|
+
}
|
|
15158
|
+
}, '>')));
|
|
15159
|
+
};
|
|
15160
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
15161
|
+
displayName: "Pager__Container",
|
|
15162
|
+
componentId: "sc-1ekmf50-0"
|
|
15163
|
+
})(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
|
|
15164
|
+
var PagerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15165
|
+
displayName: "Pager__PagerContainer",
|
|
15166
|
+
componentId: "sc-1ekmf50-1"
|
|
15167
|
+
})(["display:flex;justify-content:center;align-items:center;gap:5px;p{margin:0;}div{color:white;}button{width:40px;height:40px;background-color:", ";border:none;border-radius:5px;color:white;:hover{background-color:", ";}:disabled{opacity:0.5;}&.active{background-color:", ";font-weight:bold;color:black;}}"], uiColors.darkGray, uiColors.lightGray, uiColors.orange);
|
|
15168
|
+
|
|
15169
|
+
var ConfirmModal = function ConfirmModal(_ref) {
|
|
15170
|
+
var onConfirm = _ref.onConfirm,
|
|
15171
|
+
onClose = _ref.onClose,
|
|
15172
|
+
message = _ref.message;
|
|
15173
|
+
return React.createElement(ModalPortal, null, React.createElement(Background, null), React.createElement(Container$h, {
|
|
15174
|
+
onPointerDown: onClose
|
|
15175
|
+
}, React.createElement(DraggableContainer, {
|
|
15176
|
+
width: "auto",
|
|
15177
|
+
dragDisabled: true
|
|
15178
|
+
}, React.createElement(Wrapper$1, {
|
|
15179
|
+
onPointerDown: function onPointerDown(e) {
|
|
15180
|
+
return e.stopPropagation();
|
|
15181
|
+
}
|
|
15182
|
+
}, React.createElement("p", null, message != null ? message : 'Are you sure?'), React.createElement(ButtonsWrapper, null, React.createElement("div", {
|
|
15183
|
+
className: "cancel-button"
|
|
15184
|
+
}, React.createElement(Button, {
|
|
15185
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15186
|
+
onPointerDown: onClose
|
|
15187
|
+
}, "No")), React.createElement(Button, {
|
|
15188
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15189
|
+
onPointerDown: onConfirm
|
|
15190
|
+
}, "Yes"))))));
|
|
15191
|
+
};
|
|
15192
|
+
var Background = /*#__PURE__*/styled.div.withConfig({
|
|
15193
|
+
displayName: "ConfirmModal__Background",
|
|
15194
|
+
componentId: "sc-11qkyu1-0"
|
|
15195
|
+
})(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
|
|
15196
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
15197
|
+
displayName: "ConfirmModal__Container",
|
|
15198
|
+
componentId: "sc-11qkyu1-1"
|
|
15199
|
+
})(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
|
|
15200
|
+
var Wrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15201
|
+
displayName: "ConfirmModal__Wrapper",
|
|
15202
|
+
componentId: "sc-11qkyu1-2"
|
|
15203
|
+
})(["p{margin:0;}"]);
|
|
15204
|
+
var ButtonsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15205
|
+
displayName: "ConfirmModal__ButtonsWrapper",
|
|
15206
|
+
componentId: "sc-11qkyu1-3"
|
|
15207
|
+
})(["display:flex;justify-content:flex-end;gap:5px;margin-top:5px;.cancel-button{filter:grayscale(0.7);}"]);
|
|
15208
|
+
|
|
15132
15209
|
var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
15133
15210
|
var atlasJSON = _ref.atlasJSON,
|
|
15134
15211
|
atlasIMG = _ref.atlasIMG,
|
|
@@ -15136,14 +15213,16 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
15136
15213
|
itemPrice = _ref.itemPrice,
|
|
15137
15214
|
equipmentSet = _ref.equipmentSet,
|
|
15138
15215
|
scale = _ref.scale,
|
|
15139
|
-
|
|
15140
|
-
|
|
15216
|
+
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
15217
|
+
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
15218
|
+
disabled = _ref.disabled;
|
|
15219
|
+
return React.createElement(MarketplaceWrapper, null, React.createElement(ItemInfoWrapper, {
|
|
15141
15220
|
item: item,
|
|
15142
15221
|
atlasIMG: atlasIMG,
|
|
15143
15222
|
atlasJSON: atlasJSON,
|
|
15144
15223
|
equipmentSet: equipmentSet,
|
|
15145
15224
|
scale: scale
|
|
15146
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
15225
|
+
}, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
|
|
15147
15226
|
atlasIMG: atlasIMG,
|
|
15148
15227
|
atlasJSON: atlasJSON,
|
|
15149
15228
|
spriteKey: getItemTextureKeyPath({
|
|
@@ -15153,136 +15232,446 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
15153
15232
|
isStackable: item.isStackable
|
|
15154
15233
|
}, atlasJSON),
|
|
15155
15234
|
imgScale: 2
|
|
15156
|
-
}))), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15235
|
+
}), React.createElement(QuantityContainer, null, item.stackQty && item.stackQty > 1 && "x" + Math.round(item.stackQty * 10) / 10)), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15157
15236
|
maxLines: 1,
|
|
15158
|
-
maxWidth: "
|
|
15237
|
+
maxWidth: "200px",
|
|
15159
15238
|
fontSize: "10px"
|
|
15160
|
-
}, item.name)))), React.createElement(
|
|
15161
|
-
maxLines: 1,
|
|
15162
|
-
maxWidth: "150px",
|
|
15163
|
-
fontSize: "10px"
|
|
15164
|
-
}, item.rarity))))), React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
|
|
15239
|
+
}, item.name))))), React.createElement(Flex$1, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
|
|
15165
15240
|
atlasIMG: atlasIMG,
|
|
15166
15241
|
atlasJSON: atlasJSON,
|
|
15167
|
-
spriteKey:
|
|
15242
|
+
spriteKey: "others/gold-coin-qty-5.png",
|
|
15168
15243
|
imgScale: 2
|
|
15169
15244
|
})), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15170
15245
|
maxLines: 1,
|
|
15171
|
-
maxWidth: "
|
|
15246
|
+
maxWidth: "200px",
|
|
15172
15247
|
fontSize: "10px"
|
|
15173
15248
|
}, "$", itemPrice)))), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
|
|
15174
15249
|
buttonType: ButtonTypes.RPGUIButton,
|
|
15175
|
-
|
|
15176
|
-
|
|
15250
|
+
disabled: disabled,
|
|
15251
|
+
onPointerDown: function onPointerDown() {
|
|
15252
|
+
if (disabled) return;
|
|
15253
|
+
onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy();
|
|
15254
|
+
onMarketPlaceItemRemove == null ? void 0 : onMarketPlaceItemRemove();
|
|
15177
15255
|
}
|
|
15178
|
-
},
|
|
15256
|
+
}, onMarketPlaceItemBuy ? 'Buy' : 'Remove'))));
|
|
15179
15257
|
};
|
|
15180
|
-
var
|
|
15181
|
-
displayName: "
|
|
15258
|
+
var MarketplaceWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15259
|
+
displayName: "MarketplaceRows__MarketplaceWrapper",
|
|
15182
15260
|
componentId: "sc-wmpr1o-0"
|
|
15183
|
-
})(["margin:auto;display:
|
|
15261
|
+
})(["margin:auto;display:flex;justify-content:space-between;padding:0.5rem;&:hover{background-color:", ";}p{font-size:0.8rem;}"], uiColors.darkGray);
|
|
15262
|
+
var QuantityContainer = /*#__PURE__*/styled.p.withConfig({
|
|
15263
|
+
displayName: "MarketplaceRows__QuantityContainer",
|
|
15264
|
+
componentId: "sc-wmpr1o-1"
|
|
15265
|
+
})(["position:absolute;display:block;top:15px;left:25px;font-size:", " !important;"], uiFonts.size.xsmall);
|
|
15266
|
+
var Flex$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15267
|
+
displayName: "MarketplaceRows__Flex",
|
|
15268
|
+
componentId: "sc-wmpr1o-2"
|
|
15269
|
+
})(["display:flex;gap:24px;"]);
|
|
15184
15270
|
var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15185
15271
|
displayName: "MarketplaceRows__ItemIconContainer",
|
|
15186
|
-
componentId: "sc-wmpr1o-
|
|
15272
|
+
componentId: "sc-wmpr1o-3"
|
|
15187
15273
|
})(["display:flex;justify-content:flex-start;align-items:center;"]);
|
|
15188
15274
|
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15189
15275
|
displayName: "MarketplaceRows__SpriteContainer",
|
|
15190
|
-
componentId: "sc-wmpr1o-2"
|
|
15191
|
-
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
15192
|
-
var Item$1 = /*#__PURE__*/styled.span.withConfig({
|
|
15193
|
-
displayName: "MarketplaceRows__Item",
|
|
15194
|
-
componentId: "sc-wmpr1o-3"
|
|
15195
|
-
})(["color:white;text-align:center;z-index:1;width:100%;"]);
|
|
15196
|
-
var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15197
|
-
displayName: "MarketplaceRows__TextOverlay",
|
|
15198
15276
|
componentId: "sc-wmpr1o-4"
|
|
15199
|
-
})(["
|
|
15200
|
-
var QuantityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15201
|
-
displayName: "MarketplaceRows__QuantityContainer",
|
|
15202
|
-
componentId: "sc-wmpr1o-5"
|
|
15203
|
-
})(["position:relative;display:flex;min-width:100px;justify-content:center;align-items:center;"]);
|
|
15204
|
-
var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
|
|
15205
|
-
displayName: "MarketplaceRows__QuantityDisplay",
|
|
15206
|
-
componentId: "sc-wmpr1o-6"
|
|
15207
|
-
})(["font-size:", ";"], uiFonts.size.small);
|
|
15277
|
+
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
15208
15278
|
var PriceValue = /*#__PURE__*/styled.div.withConfig({
|
|
15209
15279
|
displayName: "MarketplaceRows__PriceValue",
|
|
15210
|
-
componentId: "sc-wmpr1o-
|
|
15280
|
+
componentId: "sc-wmpr1o-5"
|
|
15211
15281
|
})(["margin-left:40px;"]);
|
|
15212
15282
|
var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15213
15283
|
displayName: "MarketplaceRows__ButtonContainer",
|
|
15214
|
-
componentId: "sc-wmpr1o-
|
|
15284
|
+
componentId: "sc-wmpr1o-6"
|
|
15215
15285
|
})(["margin:auto;"]);
|
|
15216
15286
|
|
|
15217
|
-
var
|
|
15287
|
+
var OrderByType;
|
|
15288
|
+
(function (OrderByType) {
|
|
15289
|
+
OrderByType["Name"] = "Name";
|
|
15290
|
+
OrderByType["Price"] = "Price";
|
|
15291
|
+
})(OrderByType || (OrderByType = {}));
|
|
15292
|
+
var itemTypeOptions = /*#__PURE__*/['Type'].concat(Object.keys(ItemSubType)).filter(function (type) {
|
|
15293
|
+
return type !== 'DeadBody';
|
|
15294
|
+
}).map(function (itemType, index) {
|
|
15295
|
+
return {
|
|
15296
|
+
id: index + 1,
|
|
15297
|
+
value: itemType,
|
|
15298
|
+
option: itemType
|
|
15299
|
+
};
|
|
15300
|
+
});
|
|
15301
|
+
var itemRarityOptions = /*#__PURE__*/['Rarity'].concat(Object.values(ItemRarities)).map(function (itemRarity, index) {
|
|
15302
|
+
return {
|
|
15303
|
+
id: index + 1,
|
|
15304
|
+
value: itemRarity,
|
|
15305
|
+
option: itemRarity
|
|
15306
|
+
};
|
|
15307
|
+
});
|
|
15308
|
+
var orderByOptions = /*#__PURE__*/Object.values(OrderByType).flatMap(function (orderBy, index) {
|
|
15309
|
+
return [{
|
|
15310
|
+
id: index * 2 + 1,
|
|
15311
|
+
value: orderBy.toLowerCase(),
|
|
15312
|
+
option: React.createElement(React.Fragment, null, orderBy, ' ', React.createElement("span", {
|
|
15313
|
+
style: {
|
|
15314
|
+
transform: 'translateY(-2px)',
|
|
15315
|
+
display: 'inline-block'
|
|
15316
|
+
}
|
|
15317
|
+
}, "\u2193"))
|
|
15318
|
+
}, {
|
|
15319
|
+
id: index * 2 + 2,
|
|
15320
|
+
value: '-' + orderBy.toLowerCase(),
|
|
15321
|
+
option: React.createElement(React.Fragment, null, orderBy, ' ', React.createElement("span", {
|
|
15322
|
+
style: {
|
|
15323
|
+
transform: 'translateY(-2px)',
|
|
15324
|
+
display: 'inline-block'
|
|
15325
|
+
}
|
|
15326
|
+
}, "\u2191"))
|
|
15327
|
+
}];
|
|
15328
|
+
});
|
|
15329
|
+
|
|
15330
|
+
var BuyPanel = function BuyPanel(_ref) {
|
|
15218
15331
|
var items = _ref.items,
|
|
15219
15332
|
atlasIMG = _ref.atlasIMG,
|
|
15220
15333
|
atlasJSON = _ref.atlasJSON,
|
|
15221
|
-
onClose = _ref.onClose,
|
|
15222
|
-
optionsType = _ref.optionsType,
|
|
15223
|
-
optionsRarity = _ref.optionsRarity,
|
|
15224
|
-
optionsPrice = _ref.optionsPrice,
|
|
15225
15334
|
onChangeType = _ref.onChangeType,
|
|
15226
15335
|
onChangeRarity = _ref.onChangeRarity,
|
|
15227
15336
|
onChangeOrder = _ref.onChangeOrder,
|
|
15228
15337
|
onChangeNameInput = _ref.onChangeNameInput,
|
|
15229
|
-
|
|
15338
|
+
onChangeMainLevelInput = _ref.onChangeMainLevelInput,
|
|
15339
|
+
onChangeSecondaryLevelInput = _ref.onChangeSecondaryLevelInput,
|
|
15340
|
+
onChangePriceInput = _ref.onChangePriceInput,
|
|
15230
15341
|
equipmentSet = _ref.equipmentSet,
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
|
|
15234
|
-
|
|
15235
|
-
|
|
15342
|
+
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
15343
|
+
characterId = _ref.characterId,
|
|
15344
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
15345
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
15346
|
+
var _useState = useState(''),
|
|
15347
|
+
name = _useState[0],
|
|
15348
|
+
setName = _useState[1];
|
|
15349
|
+
var _useState2 = useState([undefined, undefined]),
|
|
15350
|
+
mainLevel = _useState2[0],
|
|
15351
|
+
setMainLevel = _useState2[1];
|
|
15352
|
+
var _useState3 = useState([undefined, undefined]),
|
|
15353
|
+
secondaryLevel = _useState3[0],
|
|
15354
|
+
setSecondaryLevel = _useState3[1];
|
|
15355
|
+
var _useState4 = useState([undefined, undefined]),
|
|
15356
|
+
price = _useState4[0],
|
|
15357
|
+
setPrice = _useState4[1];
|
|
15358
|
+
var _useState5 = useState(null),
|
|
15359
|
+
buyingItemId = _useState5[0],
|
|
15360
|
+
setBuyingItemId = _useState5[1];
|
|
15361
|
+
return React.createElement(React.Fragment, null, buyingItemId && React.createElement(ConfirmModal, {
|
|
15362
|
+
onClose: setBuyingItemId.bind(null, null),
|
|
15363
|
+
onConfirm: function onConfirm() {
|
|
15364
|
+
onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy(buyingItemId);
|
|
15365
|
+
setBuyingItemId(null);
|
|
15366
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
15236
15367
|
},
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15368
|
+
message: "Are you sure to buy this item?"
|
|
15369
|
+
}), React.createElement(InputWrapper, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
|
|
15370
|
+
onChange: function onChange(e) {
|
|
15371
|
+
setName(e.target.value);
|
|
15372
|
+
onChangeNameInput(e.target.value);
|
|
15373
|
+
},
|
|
15374
|
+
value: name,
|
|
15375
|
+
placeholder: "Enter name...",
|
|
15376
|
+
onBlur: enableHotkeys,
|
|
15377
|
+
onFocus: disableHotkeys
|
|
15378
|
+
})), React.createElement(OptionsWrapper, null, React.createElement(FilterInputsWrapper, null, React.createElement("div", null, React.createElement("p", null, "Main level"), React.createElement(Input, {
|
|
15379
|
+
onChange: function onChange(e) {
|
|
15380
|
+
setMainLevel([Number(e.target.value), mainLevel[1]]);
|
|
15381
|
+
onChangeMainLevelInput([Number(e.target.value), mainLevel[1]]);
|
|
15382
|
+
},
|
|
15383
|
+
placeholder: "Min",
|
|
15384
|
+
type: "number",
|
|
15385
|
+
min: 0,
|
|
15386
|
+
onBlur: enableHotkeys,
|
|
15387
|
+
onFocus: disableHotkeys
|
|
15388
|
+
}), React.createElement(AiFillCaretRight, null), React.createElement(Input, {
|
|
15389
|
+
onChange: function onChange(e) {
|
|
15390
|
+
setMainLevel([mainLevel[0], Number(e.target.value)]);
|
|
15391
|
+
onChangeMainLevelInput([mainLevel[0], Number(e.target.value)]);
|
|
15392
|
+
},
|
|
15393
|
+
placeholder: "Max",
|
|
15394
|
+
type: "number",
|
|
15395
|
+
min: 0,
|
|
15396
|
+
onBlur: enableHotkeys,
|
|
15397
|
+
onFocus: disableHotkeys
|
|
15398
|
+
})), React.createElement("div", null, React.createElement("p", null, "Secondary level"), React.createElement(Input, {
|
|
15399
|
+
onChange: function onChange(e) {
|
|
15400
|
+
setSecondaryLevel([Number(e.target.value), secondaryLevel[1]]);
|
|
15401
|
+
onChangeSecondaryLevelInput([Number(e.target.value), secondaryLevel[1]]);
|
|
15402
|
+
},
|
|
15403
|
+
placeholder: "Min",
|
|
15404
|
+
type: "number",
|
|
15405
|
+
min: 0,
|
|
15406
|
+
onBlur: enableHotkeys,
|
|
15407
|
+
onFocus: disableHotkeys
|
|
15408
|
+
}), React.createElement(AiFillCaretRight, null), React.createElement(Input, {
|
|
15409
|
+
onChange: function onChange(e) {
|
|
15410
|
+
setSecondaryLevel([secondaryLevel[0], Number(e.target.value)]);
|
|
15411
|
+
onChangeSecondaryLevelInput([secondaryLevel[0], Number(e.target.value)]);
|
|
15412
|
+
},
|
|
15413
|
+
placeholder: "Max",
|
|
15414
|
+
type: "number",
|
|
15415
|
+
min: 0,
|
|
15416
|
+
onBlur: enableHotkeys,
|
|
15417
|
+
onFocus: disableHotkeys
|
|
15418
|
+
})), React.createElement("div", null, React.createElement("p", null, "Price"), React.createElement(Input, {
|
|
15419
|
+
onChange: function onChange(e) {
|
|
15420
|
+
setPrice([Number(e.target.value), price[1]]);
|
|
15421
|
+
onChangePriceInput([Number(e.target.value), price[1]]);
|
|
15422
|
+
},
|
|
15423
|
+
placeholder: "Min",
|
|
15424
|
+
type: "number",
|
|
15425
|
+
min: 0,
|
|
15426
|
+
className: "big-input",
|
|
15427
|
+
onBlur: enableHotkeys,
|
|
15428
|
+
onFocus: disableHotkeys
|
|
15429
|
+
}), React.createElement(AiFillCaretRight, null), React.createElement(Input, {
|
|
15430
|
+
onChange: function onChange(e) {
|
|
15431
|
+
setPrice([price[0], Number(e.target.value)]);
|
|
15432
|
+
onChangePriceInput([price[0], Number(e.target.value)]);
|
|
15433
|
+
},
|
|
15434
|
+
placeholder: "Max",
|
|
15435
|
+
type: "number",
|
|
15436
|
+
min: 0,
|
|
15437
|
+
className: "big-input",
|
|
15438
|
+
onBlur: enableHotkeys,
|
|
15439
|
+
onFocus: disableHotkeys
|
|
15440
|
+
}))), React.createElement(WrapperContainer, null, React.createElement(StyledDropdown, {
|
|
15441
|
+
options: itemTypeOptions,
|
|
15245
15442
|
onChange: onChangeType,
|
|
15246
|
-
width:
|
|
15443
|
+
width: "95%"
|
|
15247
15444
|
}), React.createElement(StyledDropdown, {
|
|
15248
|
-
options:
|
|
15445
|
+
options: itemRarityOptions,
|
|
15249
15446
|
onChange: onChangeRarity,
|
|
15250
|
-
width:
|
|
15447
|
+
width: "95%"
|
|
15251
15448
|
}), React.createElement(StyledDropdown, {
|
|
15252
|
-
options:
|
|
15449
|
+
options: orderByOptions,
|
|
15253
15450
|
onChange: onChangeOrder,
|
|
15254
|
-
width:
|
|
15255
|
-
})), React.createElement(ItemComponentScrollWrapper, {
|
|
15451
|
+
width: "100%"
|
|
15452
|
+
}))), React.createElement(ItemComponentScrollWrapper, {
|
|
15256
15453
|
id: "MarketContainer"
|
|
15257
|
-
}, items == null ? void 0 : items.map(function (
|
|
15454
|
+
}, items == null ? void 0 : items.map(function (_ref2, index) {
|
|
15455
|
+
var item = _ref2.item,
|
|
15456
|
+
price = _ref2.price,
|
|
15457
|
+
_id = _ref2._id,
|
|
15458
|
+
owner = _ref2.owner;
|
|
15258
15459
|
return React.createElement(MarketplaceRows, {
|
|
15259
15460
|
key: item.key + "_" + index,
|
|
15260
15461
|
atlasIMG: atlasIMG,
|
|
15261
15462
|
atlasJSON: atlasJSON,
|
|
15262
15463
|
item: item,
|
|
15263
|
-
itemPrice:
|
|
15464
|
+
itemPrice: price,
|
|
15264
15465
|
equipmentSet: equipmentSet,
|
|
15265
|
-
|
|
15466
|
+
onMarketPlaceItemBuy: setBuyingItemId.bind(null, _id),
|
|
15467
|
+
disabled: owner === characterId
|
|
15266
15468
|
});
|
|
15267
|
-
})))
|
|
15469
|
+
})));
|
|
15268
15470
|
};
|
|
15269
15471
|
var InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15270
|
-
displayName: "
|
|
15271
|
-
componentId: "sc-
|
|
15272
|
-
})(["width:95%;display:flex;justify-content:flex-start;align-items:center;margin:auto;
|
|
15472
|
+
displayName: "BuyPanel__InputWrapper",
|
|
15473
|
+
componentId: "sc-1si8t7i-0"
|
|
15474
|
+
})(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
|
|
15475
|
+
var OptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15476
|
+
displayName: "BuyPanel__OptionsWrapper",
|
|
15477
|
+
componentId: "sc-1si8t7i-1"
|
|
15478
|
+
})(["width:100%;height:100px;"]);
|
|
15479
|
+
var FilterInputsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15480
|
+
displayName: "BuyPanel__FilterInputsWrapper",
|
|
15481
|
+
componentId: "sc-1si8t7i-2"
|
|
15482
|
+
})(["width:95%;display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;margin-left:10px;gap:5px;color:white;flex-wrap:wrap;p{width:auto;margin:0;}input{width:75px;height:10px;}.big-input{width:130px;}"]);
|
|
15273
15483
|
var WrapperContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15274
|
-
displayName: "
|
|
15275
|
-
componentId: "sc-
|
|
15276
|
-
})(["display:grid;grid-template-columns:
|
|
15484
|
+
displayName: "BuyPanel__WrapperContainer",
|
|
15485
|
+
componentId: "sc-1si8t7i-3"
|
|
15486
|
+
})(["display:grid;grid-template-columns:40% 30% 30%;justify-content:space-between;width:calc(100% - 40px);margin-left:10px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"]);
|
|
15277
15487
|
var ItemComponentScrollWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15278
|
-
displayName: "
|
|
15279
|
-
componentId: "sc-
|
|
15280
|
-
})(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;"]);
|
|
15488
|
+
displayName: "BuyPanel__ItemComponentScrollWrapper",
|
|
15489
|
+
componentId: "sc-1si8t7i-4"
|
|
15490
|
+
})(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
|
|
15281
15491
|
var StyledDropdown = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
15282
|
-
displayName: "
|
|
15283
|
-
componentId: "sc-
|
|
15492
|
+
displayName: "BuyPanel__StyledDropdown",
|
|
15493
|
+
componentId: "sc-1si8t7i-5"
|
|
15284
15494
|
})(["margin:3px !important;width:170px !important;"]);
|
|
15285
15495
|
|
|
15496
|
+
var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
15497
|
+
var items = _ref.items,
|
|
15498
|
+
atlasIMG = _ref.atlasIMG,
|
|
15499
|
+
atlasJSON = _ref.atlasJSON,
|
|
15500
|
+
onChangeNameInput = _ref.onChangeNameInput,
|
|
15501
|
+
equipmentSet = _ref.equipmentSet,
|
|
15502
|
+
availableGold = _ref.availableGold,
|
|
15503
|
+
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
15504
|
+
selectedItemToSell = _ref.selectedItemToSell,
|
|
15505
|
+
onSelectedItemToSellRemove = _ref.onSelectedItemToSellRemove,
|
|
15506
|
+
onAddItemToMarketplace = _ref.onAddItemToMarketplace,
|
|
15507
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
15508
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
15509
|
+
onMoneyWithdraw = _ref.onMoneyWithdraw;
|
|
15510
|
+
var _useState = useState(''),
|
|
15511
|
+
name = _useState[0],
|
|
15512
|
+
setName = _useState[1];
|
|
15513
|
+
var _useState2 = useState(''),
|
|
15514
|
+
price = _useState2[0],
|
|
15515
|
+
setPrice = _useState2[1];
|
|
15516
|
+
var _useState3 = useState(false),
|
|
15517
|
+
isCreatingOffer = _useState3[0],
|
|
15518
|
+
setIsCreatingOffer = _useState3[1];
|
|
15519
|
+
var _useState4 = useState(null),
|
|
15520
|
+
removingItemId = _useState4[0],
|
|
15521
|
+
setRemovingItemId = _useState4[1];
|
|
15522
|
+
return React.createElement(React.Fragment, null, isCreatingOffer && React.createElement(ConfirmModal, {
|
|
15523
|
+
onClose: setIsCreatingOffer.bind(null, false),
|
|
15524
|
+
onConfirm: function onConfirm() {
|
|
15525
|
+
if (selectedItemToSell && price && Number(price)) {
|
|
15526
|
+
onAddItemToMarketplace(selectedItemToSell, Number(price));
|
|
15527
|
+
setPrice('');
|
|
15528
|
+
onSelectedItemToSellRemove(selectedItemToSell);
|
|
15529
|
+
setIsCreatingOffer(false);
|
|
15530
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
15531
|
+
}
|
|
15532
|
+
},
|
|
15533
|
+
message: "Are you sure to create this offer?"
|
|
15534
|
+
}), removingItemId && React.createElement(ConfirmModal, {
|
|
15535
|
+
onClose: setRemovingItemId.bind(null, null),
|
|
15536
|
+
onConfirm: function onConfirm() {
|
|
15537
|
+
onMarketPlaceItemRemove == null ? void 0 : onMarketPlaceItemRemove(removingItemId);
|
|
15538
|
+
setRemovingItemId(null);
|
|
15539
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
15540
|
+
},
|
|
15541
|
+
message: "Are you sure to remove this item?"
|
|
15542
|
+
}), React.createElement(InputWrapper$1, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
|
|
15543
|
+
onChange: function onChange(e) {
|
|
15544
|
+
setName(e.target.value);
|
|
15545
|
+
onChangeNameInput(e.target.value);
|
|
15546
|
+
},
|
|
15547
|
+
value: name,
|
|
15548
|
+
placeholder: "Enter name...",
|
|
15549
|
+
onBlur: enableHotkeys,
|
|
15550
|
+
onFocus: disableHotkeys
|
|
15551
|
+
})), React.createElement(OptionsWrapper$1, null, React.createElement(InnerOptionsWrapper, null, React.createElement(SellDescription, null, "Click on item in inventory to sell it"), React.createElement(Flex$2, null, React.createElement(ItemSlot, {
|
|
15552
|
+
slotIndex: 0,
|
|
15553
|
+
atlasIMG: atlasIMG,
|
|
15554
|
+
atlasJSON: atlasJSON,
|
|
15555
|
+
onPointerDown: function onPointerDown(_, __, item) {
|
|
15556
|
+
return onSelectedItemToSellRemove(item);
|
|
15557
|
+
},
|
|
15558
|
+
item: selectedItemToSell
|
|
15559
|
+
}), React.createElement(PriceInputWrapper, null, React.createElement("p", null, "Enter price"), React.createElement(Flex$2, null, React.createElement(Input, {
|
|
15560
|
+
onChange: function onChange(e) {
|
|
15561
|
+
setPrice(e.target.value);
|
|
15562
|
+
},
|
|
15563
|
+
value: price,
|
|
15564
|
+
placeholder: "Enter price...",
|
|
15565
|
+
type: "number",
|
|
15566
|
+
disabled: !selectedItemToSell,
|
|
15567
|
+
onBlur: enableHotkeys,
|
|
15568
|
+
onFocus: disableHotkeys
|
|
15569
|
+
}), React.createElement(Button, {
|
|
15570
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15571
|
+
disabled: !selectedItemToSell || !price,
|
|
15572
|
+
onPointerDown: function onPointerDown() {
|
|
15573
|
+
if (selectedItemToSell && price && Number(price)) {
|
|
15574
|
+
setIsCreatingOffer(true);
|
|
15575
|
+
}
|
|
15576
|
+
}
|
|
15577
|
+
}, "Create offer"))))), React.createElement(InnerOptionsWrapper, null, React.createElement(AvailableGold, {
|
|
15578
|
+
"$disabled": availableGold === 0
|
|
15579
|
+
}, React.createElement("p", null, "Available gold"), React.createElement("p", {
|
|
15580
|
+
className: "center"
|
|
15581
|
+
}, "$", availableGold), React.createElement(Button, {
|
|
15582
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15583
|
+
disabled: availableGold === 0,
|
|
15584
|
+
onPointerDown: function onPointerDown() {
|
|
15585
|
+
return availableGold > 0 && onMoneyWithdraw();
|
|
15586
|
+
}
|
|
15587
|
+
}, "Withdraw")))), React.createElement(ItemComponentScrollWrapper$1, {
|
|
15588
|
+
id: "MarketContainer"
|
|
15589
|
+
}, items == null ? void 0 : items.map(function (_ref2, index) {
|
|
15590
|
+
var item = _ref2.item,
|
|
15591
|
+
price = _ref2.price,
|
|
15592
|
+
_id = _ref2._id;
|
|
15593
|
+
return React.createElement(MarketplaceRows, {
|
|
15594
|
+
key: item.key + "_" + index,
|
|
15595
|
+
atlasIMG: atlasIMG,
|
|
15596
|
+
atlasJSON: atlasJSON,
|
|
15597
|
+
item: item,
|
|
15598
|
+
itemPrice: price,
|
|
15599
|
+
equipmentSet: equipmentSet,
|
|
15600
|
+
onMarketPlaceItemRemove: setRemovingItemId.bind(null, _id)
|
|
15601
|
+
});
|
|
15602
|
+
})));
|
|
15603
|
+
};
|
|
15604
|
+
var Flex$2 = /*#__PURE__*/styled.div.withConfig({
|
|
15605
|
+
displayName: "ManagmentPanel__Flex",
|
|
15606
|
+
componentId: "sc-1yyi6jn-0"
|
|
15607
|
+
})(["display:flex;gap:5px;align-items:center;"]);
|
|
15608
|
+
var InputWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15609
|
+
displayName: "ManagmentPanel__InputWrapper",
|
|
15610
|
+
componentId: "sc-1yyi6jn-1"
|
|
15611
|
+
})(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
|
|
15612
|
+
var OptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15613
|
+
displayName: "ManagmentPanel__OptionsWrapper",
|
|
15614
|
+
componentId: "sc-1yyi6jn-2"
|
|
15615
|
+
})(["width:100%;height:100px;display:flex;align-items:center;justify-content:space-around;"]);
|
|
15616
|
+
var InnerOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15617
|
+
displayName: "ManagmentPanel__InnerOptionsWrapper",
|
|
15618
|
+
componentId: "sc-1yyi6jn-3"
|
|
15619
|
+
})(["display:flex;justify-content:space-between;flex-direction:column;height:100%;"]);
|
|
15620
|
+
var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15621
|
+
displayName: "ManagmentPanel__ItemComponentScrollWrapper",
|
|
15622
|
+
componentId: "sc-1yyi6jn-4"
|
|
15623
|
+
})(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
|
|
15624
|
+
var PriceInputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15625
|
+
displayName: "ManagmentPanel__PriceInputWrapper",
|
|
15626
|
+
componentId: "sc-1yyi6jn-5"
|
|
15627
|
+
})(["p{margin:0;}input{width:200px;}"]);
|
|
15628
|
+
var SellDescription = /*#__PURE__*/styled.p.withConfig({
|
|
15629
|
+
displayName: "ManagmentPanel__SellDescription",
|
|
15630
|
+
componentId: "sc-1yyi6jn-6"
|
|
15631
|
+
})(["margin:0;font-size:", " !important;"], uiFonts.size.xsmall);
|
|
15632
|
+
var AvailableGold = /*#__PURE__*/styled.div.withConfig({
|
|
15633
|
+
displayName: "ManagmentPanel__AvailableGold",
|
|
15634
|
+
componentId: "sc-1yyi6jn-7"
|
|
15635
|
+
})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;p{margin:0;color:", " !important;}.center{text-align:center;font-size:", " !important;color:", " !important;}"], function (props) {
|
|
15636
|
+
return props.$disabled ? uiColors.lightGray : 'white';
|
|
15637
|
+
}, uiFonts.size.large, function (props) {
|
|
15638
|
+
return props.$disabled ? uiColors.lightGray : uiColors.lightGreen;
|
|
15639
|
+
});
|
|
15640
|
+
|
|
15641
|
+
var Marketplace = function Marketplace(props) {
|
|
15642
|
+
var onClose = props.onClose,
|
|
15643
|
+
scale = props.scale,
|
|
15644
|
+
onYourPanelToggle = props.onYourPanelToggle;
|
|
15645
|
+
var _useState = useState(false),
|
|
15646
|
+
isYourPanel = _useState[0],
|
|
15647
|
+
setIsYourPanel = _useState[1];
|
|
15648
|
+
return React.createElement(DraggableContainer, {
|
|
15649
|
+
type: RPGUIContainerTypes.Framed,
|
|
15650
|
+
onCloseButton: function onCloseButton() {
|
|
15651
|
+
if (onClose) onClose();
|
|
15652
|
+
},
|
|
15653
|
+
width: "800px",
|
|
15654
|
+
cancelDrag: "#MarketContainer, .rpgui-dropdown-imp, input, .empty-slot, button",
|
|
15655
|
+
scale: scale
|
|
15656
|
+
}, isYourPanel && React.createElement(React.Fragment, null, React.createElement(ManagmentPanel, Object.assign({}, props)), React.createElement(PagerContainer$1, null, React.createElement(Button, {
|
|
15657
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15658
|
+
onPointerDown: function onPointerDown() {
|
|
15659
|
+
onYourPanelToggle(false);
|
|
15660
|
+
setIsYourPanel(false);
|
|
15661
|
+
}
|
|
15662
|
+
}, "Go to marketplace"), React.createElement(Pager, Object.assign({}, props)))), !isYourPanel && React.createElement(React.Fragment, null, React.createElement(BuyPanel, Object.assign({}, props)), React.createElement(PagerContainer$1, null, React.createElement(Button, {
|
|
15663
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15664
|
+
onPointerDown: function onPointerDown() {
|
|
15665
|
+
onYourPanelToggle(true);
|
|
15666
|
+
setIsYourPanel(true);
|
|
15667
|
+
}
|
|
15668
|
+
}, "Go to your panel"), React.createElement(Pager, Object.assign({}, props)))));
|
|
15669
|
+
};
|
|
15670
|
+
var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15671
|
+
displayName: "Marketplace__PagerContainer",
|
|
15672
|
+
componentId: "sc-h904b1-0"
|
|
15673
|
+
})(["display:flex;justify-content:space-between;align-items:center;width:calc(100% - 30px);"]);
|
|
15674
|
+
|
|
15286
15675
|
var img$5 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
|
|
15287
15676
|
|
|
15288
15677
|
var img$6 = 'data:image/gif;base64,R0lGODlhQAAgAPIAAAAAAA0NDRERESIiIigoKFlZWf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD/wi63P4wykmrvTjrzbv/YAgIZGmeaKquakQWcCzPdG3fNukIeO//PQGDBywafcIF8chswpKKZcxApTqvNOiIZi0YsODncFaFlcNOrdTbJVff0/c3Lp/Xs2N37cy2ndt6ZnhKXHdsc4d7VnwyfIxqPWWOXXWLgHSGYoSNbZKVZp2WiJyjg1GFcaClqaqJhasyUAFrh3Cur3KqubWXBQIBAAEDtDeMaEEDAcLEx2gCycvN0jHPysPT09XR2M3a19zH3gTM4EYCBNDD4yzs7e4r48nB6gT19vf4+fr7/P3P8sKGvRtIkMUAeQoCHlzIsKHDhxAjSoTWQJnFixgzatzIsQWjRQYJAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD8Ai63P4wykmrvTjrzbv/YCiOlGCeaKqubMtGZiHPdG3feI6bjqD/wOBPwPAJj0ggcWFMOp+ypaI5M1it0KxNCqDKsAWDdhwt1q5fMPnJ9aJt17g4HafJ3/et+Tzn99V+aThqfTNtcHlhhIBVWG+BdDSHOmiPeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
@@ -15324,7 +15713,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15324
15713
|
type: RPGUIContainerTypes.FramedGold,
|
|
15325
15714
|
width: '50%',
|
|
15326
15715
|
height: '180px'
|
|
15327
|
-
}, React.createElement(React.Fragment, null, React.createElement(Container$
|
|
15716
|
+
}, React.createElement(React.Fragment, null, React.createElement(Container$i, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer, {
|
|
15328
15717
|
flex: '70%'
|
|
15329
15718
|
}, React.createElement(NPCDialogText, {
|
|
15330
15719
|
onStartStep: function onStartStep() {
|
|
@@ -15366,7 +15755,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15366
15755
|
src: img$6
|
|
15367
15756
|
}))), ")"));
|
|
15368
15757
|
};
|
|
15369
|
-
var Container$
|
|
15758
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
15370
15759
|
displayName: "NPCMultiDialog__Container",
|
|
15371
15760
|
componentId: "sc-rvu5wg-0"
|
|
15372
15761
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15570,7 +15959,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15570
15959
|
return null;
|
|
15571
15960
|
});
|
|
15572
15961
|
};
|
|
15573
|
-
return React.createElement(Container$
|
|
15962
|
+
return React.createElement(Container$j, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
15574
15963
|
text: currentQuestion.text,
|
|
15575
15964
|
onStart: function onStart() {
|
|
15576
15965
|
return setCanShowAnswers(false);
|
|
@@ -15580,7 +15969,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15580
15969
|
}
|
|
15581
15970
|
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
15582
15971
|
};
|
|
15583
|
-
var Container$
|
|
15972
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
15584
15973
|
displayName: "QuestionDialog__Container",
|
|
15585
15974
|
componentId: "sc-bxc5u0-0"
|
|
15586
15975
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -15628,14 +16017,14 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
15628
16017
|
}
|
|
15629
16018
|
return value * 100 / max;
|
|
15630
16019
|
};
|
|
15631
|
-
return React.createElement(Container$
|
|
16020
|
+
return React.createElement(Container$k, {
|
|
15632
16021
|
className: "rpgui-progress",
|
|
15633
16022
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
15634
16023
|
"data-rpguitype": "progress",
|
|
15635
16024
|
percentageWidth: percentageWidth,
|
|
15636
16025
|
minWidth: minWidth,
|
|
15637
16026
|
style: style
|
|
15638
|
-
}, displayText && React.createElement(TextOverlay$
|
|
16027
|
+
}, displayText && React.createElement(TextOverlay$1, null, React.createElement(ProgressBarText, null, value, "/", max)), React.createElement("div", {
|
|
15639
16028
|
className: " rpgui-progress-track"
|
|
15640
16029
|
}, React.createElement("div", {
|
|
15641
16030
|
className: "rpgui-progress-fill " + color + " ",
|
|
@@ -15653,11 +16042,11 @@ var ProgressBarText = /*#__PURE__*/styled.span.withConfig({
|
|
|
15653
16042
|
displayName: "ProgressBar__ProgressBarText",
|
|
15654
16043
|
componentId: "sc-qa6fzh-0"
|
|
15655
16044
|
})(["font-size:", " !important;color:white;text-align:center;z-index:1;position:absolute;left:50%;transform:translateX(-50%);top:12px;"], uiFonts.size.small);
|
|
15656
|
-
var TextOverlay$
|
|
16045
|
+
var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15657
16046
|
displayName: "ProgressBar__TextOverlay",
|
|
15658
16047
|
componentId: "sc-qa6fzh-1"
|
|
15659
16048
|
})(["width:100%;position:relative;"]);
|
|
15660
|
-
var Container$
|
|
16049
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
15661
16050
|
displayName: "ProgressBar__Container",
|
|
15662
16051
|
componentId: "sc-qa6fzh-2"
|
|
15663
16052
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
|
|
@@ -15996,7 +16385,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
15996
16385
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
15997
16386
|
_ref$margin = _ref.margin,
|
|
15998
16387
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
15999
|
-
return React.createElement(Container$
|
|
16388
|
+
return React.createElement(Container$l, {
|
|
16000
16389
|
className: "simple-progress-bar"
|
|
16001
16390
|
}, React.createElement(ProgressBarContainer, {
|
|
16002
16391
|
margin: margin
|
|
@@ -16005,7 +16394,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
16005
16394
|
bgColor: bgColor
|
|
16006
16395
|
}))));
|
|
16007
16396
|
};
|
|
16008
|
-
var Container$
|
|
16397
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
16009
16398
|
displayName: "SimpleProgressBar__Container",
|
|
16010
16399
|
componentId: "sc-mbeil3-0"
|
|
16011
16400
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -16038,13 +16427,20 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
16038
16427
|
_ref$showSkillPoints = _ref.showSkillPoints,
|
|
16039
16428
|
showSkillPoints = _ref$showSkillPoints === void 0 ? true : _ref$showSkillPoints,
|
|
16040
16429
|
atlasIMG = _ref.atlasIMG,
|
|
16041
|
-
atlasJSON = _ref.atlasJSON
|
|
16430
|
+
atlasJSON = _ref.atlasJSON,
|
|
16431
|
+
buffAndDebuff = _ref.buffAndDebuff;
|
|
16042
16432
|
if (!skillPointsToNextLevel) {
|
|
16043
16433
|
skillPointsToNextLevel = getSPForLevel(level + 1);
|
|
16044
16434
|
}
|
|
16045
16435
|
var nextLevelSPWillbe = skillPoints + skillPointsToNextLevel;
|
|
16046
16436
|
var ratio = skillPoints / nextLevelSPWillbe * 100;
|
|
16047
|
-
|
|
16437
|
+
var skillsBuffsCalc = function skillsBuffsCalc() {
|
|
16438
|
+
if (buffAndDebuff) {
|
|
16439
|
+
return 1 + buffAndDebuff / 100;
|
|
16440
|
+
}
|
|
16441
|
+
return;
|
|
16442
|
+
};
|
|
16443
|
+
return React.createElement(React.Fragment, null, React.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React.createElement(React.Fragment, null, buffAndDebuff > 0 ? React.createElement(BuffAndDebuffContainer, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameBuff, null, skillName), React.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React.createElement(TitleNameBuffContainer, null, React.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React.createElement(React.Fragment, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameDebuff, null, skillName), React.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React.createElement("div", null, React.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React.createElement(TitleName, null, skillName)), !buffAndDebuff && React.createElement(TitleNameContainer, null, React.createElement(TitleName, null, skillName), React.createElement(ValueDisplay, null, "lv ", level))), React.createElement(ProgressBody, null, React.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React.createElement(SpriteContainer$1, null, React.createElement(ErrorBoundary, null, React.createElement(SpriteFromAtlas, {
|
|
16048
16444
|
atlasIMG: atlasIMG,
|
|
16049
16445
|
atlasJSON: atlasJSON,
|
|
16050
16446
|
spriteKey: texturePath,
|
|
@@ -16076,22 +16472,42 @@ var TitleName = /*#__PURE__*/styled.span.withConfig({
|
|
|
16076
16472
|
displayName: "SkillProgressBar__TitleName",
|
|
16077
16473
|
componentId: "sc-5vuroc-4"
|
|
16078
16474
|
})(["margin-left:5px;"]);
|
|
16475
|
+
var TitleNameBuff = /*#__PURE__*/styled.span.withConfig({
|
|
16476
|
+
displayName: "SkillProgressBar__TitleNameBuff",
|
|
16477
|
+
componentId: "sc-5vuroc-5"
|
|
16478
|
+
})(["margin-left:5px;color:", " !important;"], uiColors.lightGreen);
|
|
16479
|
+
var TitleNameDebuff = /*#__PURE__*/styled.span.withConfig({
|
|
16480
|
+
displayName: "SkillProgressBar__TitleNameDebuff",
|
|
16481
|
+
componentId: "sc-5vuroc-6"
|
|
16482
|
+
})(["margin-left:5px;color:", " !important;"], uiColors.red);
|
|
16079
16483
|
var ValueDisplay = /*#__PURE__*/styled.span.withConfig({
|
|
16080
16484
|
displayName: "SkillProgressBar__ValueDisplay",
|
|
16081
|
-
componentId: "sc-5vuroc-
|
|
16485
|
+
componentId: "sc-5vuroc-7"
|
|
16082
16486
|
})([""]);
|
|
16083
16487
|
var ProgressIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16084
16488
|
displayName: "SkillProgressBar__ProgressIconContainer",
|
|
16085
|
-
componentId: "sc-5vuroc-
|
|
16489
|
+
componentId: "sc-5vuroc-8"
|
|
16086
16490
|
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
16087
16491
|
var ProgressBody = /*#__PURE__*/styled.div.withConfig({
|
|
16088
16492
|
displayName: "SkillProgressBar__ProgressBody",
|
|
16089
|
-
componentId: "sc-5vuroc-
|
|
16493
|
+
componentId: "sc-5vuroc-9"
|
|
16090
16494
|
})(["display:flex;flex-direction:row;width:100%;"]);
|
|
16091
16495
|
var ProgressTitle = /*#__PURE__*/styled.div.withConfig({
|
|
16092
16496
|
displayName: "SkillProgressBar__ProgressTitle",
|
|
16093
|
-
componentId: "sc-5vuroc-
|
|
16094
|
-
})(["width:100%;display:flex;flex-direction:
|
|
16497
|
+
componentId: "sc-5vuroc-10"
|
|
16498
|
+
})(["width:100%;display:flex;flex-direction:column;justify-content:space-between;span{font-size:0.6rem;}"]);
|
|
16499
|
+
var BuffAndDebuffContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16500
|
+
displayName: "SkillProgressBar__BuffAndDebuffContainer",
|
|
16501
|
+
componentId: "sc-5vuroc-11"
|
|
16502
|
+
})([""]);
|
|
16503
|
+
var TitleNameBuffContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16504
|
+
displayName: "SkillProgressBar__TitleNameBuffContainer",
|
|
16505
|
+
componentId: "sc-5vuroc-12"
|
|
16506
|
+
})([""]);
|
|
16507
|
+
var TitleNameContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16508
|
+
displayName: "SkillProgressBar__TitleNameContainer",
|
|
16509
|
+
componentId: "sc-5vuroc-13"
|
|
16510
|
+
})(["display:flex;justify-content:space-between;"]);
|
|
16095
16511
|
|
|
16096
16512
|
var skillProps = {
|
|
16097
16513
|
attributes: {
|
|
@@ -16178,7 +16594,8 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
16178
16594
|
skillPointsToNextLevel: Math.round(skillDetails.skillPointsToNextLevel) || 0,
|
|
16179
16595
|
texturePath: value,
|
|
16180
16596
|
atlasIMG: atlasIMG,
|
|
16181
|
-
atlasJSON: atlasJSON
|
|
16597
|
+
atlasJSON: atlasJSON,
|
|
16598
|
+
buffAndDebuff: skillDetails.buffAndDebuff
|
|
16182
16599
|
}));
|
|
16183
16600
|
}
|
|
16184
16601
|
return output;
|
|
@@ -16245,7 +16662,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
16245
16662
|
castingType = spell.castingType,
|
|
16246
16663
|
cooldown = spell.cooldown,
|
|
16247
16664
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
16248
|
-
return React.createElement(Container$
|
|
16665
|
+
return React.createElement(Container$m, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$6, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
|
|
16249
16666
|
className: "label"
|
|
16250
16667
|
}, "Casting Type:"), React.createElement("div", {
|
|
16251
16668
|
className: "value"
|
|
@@ -16271,7 +16688,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
16271
16688
|
className: "value"
|
|
16272
16689
|
}, requiredItem))), React.createElement(Description$1, null, description));
|
|
16273
16690
|
};
|
|
16274
|
-
var Container$
|
|
16691
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
16275
16692
|
displayName: "SpellInfo__Container",
|
|
16276
16693
|
componentId: "sc-4hbw3q-0"
|
|
16277
16694
|
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:30rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, uiColors.lightGray);
|
|
@@ -16299,13 +16716,13 @@ var Statistic$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
16299
16716
|
var SpellInfoDisplay = function SpellInfoDisplay(_ref) {
|
|
16300
16717
|
var spell = _ref.spell,
|
|
16301
16718
|
isMobile = _ref.isMobile;
|
|
16302
|
-
return React.createElement(Flex$
|
|
16719
|
+
return React.createElement(Flex$3, {
|
|
16303
16720
|
"$isMobile": isMobile
|
|
16304
16721
|
}, React.createElement(SpellInfo, {
|
|
16305
16722
|
spell: spell
|
|
16306
16723
|
}));
|
|
16307
16724
|
};
|
|
16308
|
-
var Flex$
|
|
16725
|
+
var Flex$3 = /*#__PURE__*/styled.div.withConfig({
|
|
16309
16726
|
displayName: "SpellInfoDisplay__Flex",
|
|
16310
16727
|
componentId: "sc-1htnsmm-0"
|
|
16311
16728
|
})(["display:flex;gap:0.5rem;flex-direction:", ";@media (max-width:580px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
|
|
@@ -16325,7 +16742,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
16325
16742
|
var _ref$current;
|
|
16326
16743
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
16327
16744
|
};
|
|
16328
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
16745
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$n, {
|
|
16329
16746
|
ref: ref,
|
|
16330
16747
|
onTouchEnd: function onTouchEnd() {
|
|
16331
16748
|
handleFadeOut();
|
|
@@ -16350,7 +16767,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
16350
16767
|
}, option.text);
|
|
16351
16768
|
}))));
|
|
16352
16769
|
};
|
|
16353
|
-
var Container$
|
|
16770
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
16354
16771
|
displayName: "MobileSpellTooltip__Container",
|
|
16355
16772
|
componentId: "sc-6p7uvr-0"
|
|
16356
16773
|
})(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
|
|
@@ -16391,13 +16808,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
16391
16808
|
}
|
|
16392
16809
|
return;
|
|
16393
16810
|
}, []);
|
|
16394
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
16811
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$o, {
|
|
16395
16812
|
ref: ref
|
|
16396
16813
|
}, React.createElement(SpellInfoDisplay, {
|
|
16397
16814
|
spell: spell
|
|
16398
16815
|
})));
|
|
16399
16816
|
};
|
|
16400
|
-
var Container$
|
|
16817
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
16401
16818
|
displayName: "SpellTooltip__Container",
|
|
16402
16819
|
componentId: "sc-1go0gwg-0"
|
|
16403
16820
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -16449,8 +16866,7 @@ var Spell = function Spell(_ref) {
|
|
|
16449
16866
|
var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
|
|
16450
16867
|
return React.createElement(SpellInfoWrapper, {
|
|
16451
16868
|
spell: spell
|
|
16452
|
-
}, React.createElement(Container$
|
|
16453
|
-
disabled: disabled || (activeCooldown != null ? activeCooldown : 0) > 0,
|
|
16869
|
+
}, React.createElement(Container$p, {
|
|
16454
16870
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
16455
16871
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
16456
16872
|
className: "spell"
|
|
@@ -16464,7 +16880,7 @@ var Spell = function Spell(_ref) {
|
|
|
16464
16880
|
className: "mana"
|
|
16465
16881
|
}, manaCost))));
|
|
16466
16882
|
};
|
|
16467
|
-
var Container$
|
|
16883
|
+
var Container$p = /*#__PURE__*/styled.button.withConfig({
|
|
16468
16884
|
displayName: "Spell__Container",
|
|
16469
16885
|
componentId: "sc-j96fa2-0"
|
|
16470
16886
|
})(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
|
|
@@ -16521,17 +16937,6 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
16521
16937
|
var _useState2 = useState(-1),
|
|
16522
16938
|
settingShortcutIndex = _useState2[0],
|
|
16523
16939
|
setSettingShortcutIndex = _useState2[1];
|
|
16524
|
-
useEffect(function () {
|
|
16525
|
-
var handleEscapeClose = function handleEscapeClose(e) {
|
|
16526
|
-
if (e.key === 'Escape') {
|
|
16527
|
-
onClose == null ? void 0 : onClose();
|
|
16528
|
-
}
|
|
16529
|
-
};
|
|
16530
|
-
document.addEventListener('keydown', handleEscapeClose);
|
|
16531
|
-
return function () {
|
|
16532
|
-
document.removeEventListener('keydown', handleEscapeClose);
|
|
16533
|
-
};
|
|
16534
|
-
}, [onClose]);
|
|
16535
16940
|
var spellsToDisplay = useMemo(function () {
|
|
16536
16941
|
return spells.sort(function (a, b) {
|
|
16537
16942
|
if (a.minMagicLevelRequired > b.minMagicLevelRequired) return 1;
|
|
@@ -16552,7 +16957,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
16552
16957
|
height: "inherit",
|
|
16553
16958
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
16554
16959
|
scale: scale
|
|
16555
|
-
}, React.createElement(Container$
|
|
16960
|
+
}, React.createElement(Container$q, null, React.createElement(Title$8, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
16556
16961
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16557
16962
|
settingShortcutIndex: settingShortcutIndex,
|
|
16558
16963
|
shortcuts: shortcuts,
|
|
@@ -16586,7 +16991,7 @@ var Title$8 = /*#__PURE__*/styled.h1.withConfig({
|
|
|
16586
16991
|
displayName: "Spellbook__Title",
|
|
16587
16992
|
componentId: "sc-r02nfq-0"
|
|
16588
16993
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
16589
|
-
var Container$
|
|
16994
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
16590
16995
|
displayName: "Spellbook__Container",
|
|
16591
16996
|
componentId: "sc-r02nfq-1"
|
|
16592
16997
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -16702,7 +17107,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
16702
17107
|
className: "arrow-selector",
|
|
16703
17108
|
direction: "left",
|
|
16704
17109
|
onPointerDown: onLeftClick
|
|
16705
|
-
}), React.createElement(QuantityDisplay
|
|
17110
|
+
}), React.createElement(QuantityDisplay, null, React.createElement(TextOverlay$2, null, React.createElement(Item$1, null, selectedQty))), React.createElement(StyledArrow, {
|
|
16706
17111
|
size: 32,
|
|
16707
17112
|
className: "arrow-selector",
|
|
16708
17113
|
direction: "right",
|
|
@@ -16738,11 +17143,11 @@ var NameValue = /*#__PURE__*/styled.div.withConfig({
|
|
|
16738
17143
|
displayName: "TradingItemRow__NameValue",
|
|
16739
17144
|
componentId: "sc-mja0b5-5"
|
|
16740
17145
|
})(["p{font-size:0.75rem;margin:0;}"]);
|
|
16741
|
-
var Item$
|
|
17146
|
+
var Item$1 = /*#__PURE__*/styled.span.withConfig({
|
|
16742
17147
|
displayName: "TradingItemRow__Item",
|
|
16743
17148
|
componentId: "sc-mja0b5-6"
|
|
16744
17149
|
})(["color:white;text-align:center;z-index:1;width:100%;"]);
|
|
16745
|
-
var TextOverlay$
|
|
17150
|
+
var TextOverlay$2 = /*#__PURE__*/styled.div.withConfig({
|
|
16746
17151
|
displayName: "TradingItemRow__TextOverlay",
|
|
16747
17152
|
componentId: "sc-mja0b5-7"
|
|
16748
17153
|
})(["width:100%;position:relative;"]);
|
|
@@ -16750,7 +17155,7 @@ var QuantityContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
16750
17155
|
displayName: "TradingItemRow__QuantityContainer",
|
|
16751
17156
|
componentId: "sc-mja0b5-8"
|
|
16752
17157
|
})(["position:relative;display:flex;min-width:100px;width:40%;justify-content:center;align-items:center;flex:40%;"]);
|
|
16753
|
-
var QuantityDisplay
|
|
17158
|
+
var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
|
|
16754
17159
|
displayName: "TradingItemRow__QuantityDisplay",
|
|
16755
17160
|
componentId: "sc-mja0b5-9"
|
|
16756
17161
|
})(["font-size:", ";"], uiFonts.size.small);
|
|
@@ -16887,11 +17292,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
16887
17292
|
var _ref$maxLines = _ref.maxLines,
|
|
16888
17293
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
16889
17294
|
children = _ref.children;
|
|
16890
|
-
return React.createElement(Container$
|
|
17295
|
+
return React.createElement(Container$r, {
|
|
16891
17296
|
maxLines: maxLines
|
|
16892
17297
|
}, children);
|
|
16893
17298
|
};
|
|
16894
|
-
var Container$
|
|
17299
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
16895
17300
|
displayName: "Truncate__Container",
|
|
16896
17301
|
componentId: "sc-6x00qb-0"
|
|
16897
17302
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
@@ -16954,7 +17359,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
16954
17359
|
var _useState2 = useState(false),
|
|
16955
17360
|
showGoNextIndicator = _useState2[0],
|
|
16956
17361
|
setShowGoNextIndicator = _useState2[1];
|
|
16957
|
-
return React.createElement(Container$
|
|
17362
|
+
return React.createElement(Container$s, null, React.createElement(DynamicText, {
|
|
16958
17363
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
16959
17364
|
onFinish: function onFinish() {
|
|
16960
17365
|
setShowGoNextIndicator(true);
|
|
@@ -16972,7 +17377,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
16972
17377
|
}
|
|
16973
17378
|
}));
|
|
16974
17379
|
};
|
|
16975
|
-
var Container$
|
|
17380
|
+
var Container$s = /*#__PURE__*/styled.div.withConfig({
|
|
16976
17381
|
displayName: "NPCDialogText__Container",
|
|
16977
17382
|
componentId: "sc-1cxkdh9-0"
|
|
16978
17383
|
})([""]);
|
|
@@ -17014,7 +17419,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
17014
17419
|
}
|
|
17015
17420
|
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
17016
17421
|
src: imagePath || img$5
|
|
17017
|
-
}))) : React.createElement(React.Fragment, null, React.createElement(Container$
|
|
17422
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$t, null, React.createElement(TextContainer$2, {
|
|
17018
17423
|
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
17019
17424
|
}, React.createElement(NPCDialogText, {
|
|
17020
17425
|
type: type,
|
|
@@ -17028,7 +17433,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
17028
17433
|
src: imagePath || img$5
|
|
17029
17434
|
})))));
|
|
17030
17435
|
};
|
|
17031
|
-
var Container$
|
|
17436
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
17032
17437
|
displayName: "NPCDialog__Container",
|
|
17033
17438
|
componentId: "sc-1b4aw74-0"
|
|
17034
17439
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|