@rpg-engine/long-bow 0.4.81 → 0.4.83
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/Marketplace/BuyPanel.d.ts +1 -0
- package/dist/components/Marketplace/ManagmentPanel.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +47 -14
- 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 +47 -14
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Marketplace/BuyPanel.tsx +10 -2
- package/src/components/Marketplace/ManagmentPanel.tsx +10 -2
- package/src/components/Marketplace/MarketplaceRows.tsx +52 -36
- package/src/components/Marketplace/filters/index.tsx +2 -2
- package/src/stories/Marketplace.stories.tsx +39 -35
- package/src/.DS_Store +0 -0
- package/src/components/.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
- package/src/mocks/atlas/.DS_Store +0 -0
|
@@ -15758,13 +15758,15 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
15758
15758
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
15759
15759
|
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
15760
15760
|
disabled = _ref.disabled;
|
|
15761
|
-
return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemInfoWrapper, {
|
|
15761
|
+
return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(ItemInfoWrapper, {
|
|
15762
15762
|
item: item,
|
|
15763
15763
|
atlasIMG: atlasIMG,
|
|
15764
15764
|
atlasJSON: atlasJSON,
|
|
15765
15765
|
equipmentSet: equipmentSet,
|
|
15766
15766
|
scale: scale
|
|
15767
|
-
}, React__default.createElement(
|
|
15767
|
+
}, React__default.createElement(RarityContainer, {
|
|
15768
|
+
item: item
|
|
15769
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
15768
15770
|
atlasIMG: atlasIMG,
|
|
15769
15771
|
atlasJSON: atlasJSON,
|
|
15770
15772
|
spriteKey: shared.getItemTextureKeyPath({
|
|
@@ -15774,11 +15776,11 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
15774
15776
|
isStackable: item.isStackable
|
|
15775
15777
|
}, atlasJSON),
|
|
15776
15778
|
imgScale: 2
|
|
15777
|
-
}), React__default.createElement(QuantityContainer, null, item.stackQty && item.stackQty > 1 && "x" + Math.round(item.stackQty * 10) / 10)), React__default.createElement(PriceValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
|
|
15779
|
+
})), React__default.createElement(QuantityContainer, null, item.stackQty && item.stackQty > 1 && "x" + Math.round(item.stackQty * 10) / 10))), React__default.createElement(PriceValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
|
|
15778
15780
|
maxLines: 1,
|
|
15779
15781
|
maxWidth: "200px",
|
|
15780
15782
|
fontSize: "10px"
|
|
15781
|
-
}, item.name))))
|
|
15783
|
+
}, item.name)))), React__default.createElement(Flex$1, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(GoldContainer, null, React__default.createElement(SpriteFromAtlas, {
|
|
15782
15784
|
atlasIMG: atlasIMG,
|
|
15783
15785
|
atlasJSON: atlasJSON,
|
|
15784
15786
|
spriteKey: "others/gold-coin-qty-5.png",
|
|
@@ -15813,18 +15815,35 @@ var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
15813
15815
|
displayName: "MarketplaceRows__ItemIconContainer",
|
|
15814
15816
|
componentId: "sc-wmpr1o-3"
|
|
15815
15817
|
})(["display:flex;justify-content:flex-start;align-items:center;"]);
|
|
15816
|
-
var
|
|
15817
|
-
displayName: "
|
|
15818
|
+
var GoldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15819
|
+
displayName: "MarketplaceRows__GoldContainer",
|
|
15818
15820
|
componentId: "sc-wmpr1o-4"
|
|
15819
15821
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
15822
|
+
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15823
|
+
displayName: "MarketplaceRows__SpriteContainer",
|
|
15824
|
+
componentId: "sc-wmpr1o-5"
|
|
15825
|
+
})(["position:relative;left:0.5rem;"]);
|
|
15820
15826
|
var PriceValue = /*#__PURE__*/styled.div.withConfig({
|
|
15821
15827
|
displayName: "MarketplaceRows__PriceValue",
|
|
15822
|
-
componentId: "sc-wmpr1o-
|
|
15828
|
+
componentId: "sc-wmpr1o-6"
|
|
15823
15829
|
})(["margin-left:40px;"]);
|
|
15824
15830
|
var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15825
15831
|
displayName: "MarketplaceRows__ButtonContainer",
|
|
15826
|
-
componentId: "sc-wmpr1o-
|
|
15832
|
+
componentId: "sc-wmpr1o-7"
|
|
15827
15833
|
})(["margin:auto;"]);
|
|
15834
|
+
var RarityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15835
|
+
displayName: "MarketplaceRows__RarityContainer",
|
|
15836
|
+
componentId: "sc-wmpr1o-8"
|
|
15837
|
+
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref2) {
|
|
15838
|
+
var item = _ref2.item;
|
|
15839
|
+
return rarityColor(item);
|
|
15840
|
+
}, function (_ref3) {
|
|
15841
|
+
var item = _ref3.item;
|
|
15842
|
+
return "0 0 5px 8px " + rarityColor(item);
|
|
15843
|
+
}, function (_ref4) {
|
|
15844
|
+
var item = _ref4.item;
|
|
15845
|
+
return "0 0 8px 6px " + rarityColor(item);
|
|
15846
|
+
});
|
|
15828
15847
|
|
|
15829
15848
|
var OrderByType;
|
|
15830
15849
|
(function (OrderByType) {
|
|
@@ -15856,7 +15875,7 @@ var orderByOptions = /*#__PURE__*/Object.values(OrderByType).flatMap(function (o
|
|
|
15856
15875
|
transform: 'translateY(-2px)',
|
|
15857
15876
|
display: 'inline-block'
|
|
15858
15877
|
}
|
|
15859
|
-
}, "\
|
|
15878
|
+
}, "\u2191"))
|
|
15860
15879
|
}, {
|
|
15861
15880
|
id: index * 2 + 2,
|
|
15862
15881
|
value: '-' + orderBy.toLowerCase(),
|
|
@@ -15865,7 +15884,7 @@ var orderByOptions = /*#__PURE__*/Object.values(OrderByType).flatMap(function (o
|
|
|
15865
15884
|
transform: 'translateY(-2px)',
|
|
15866
15885
|
display: 'inline-block'
|
|
15867
15886
|
}
|
|
15868
|
-
}, "\
|
|
15887
|
+
}, "\u2193"))
|
|
15869
15888
|
}];
|
|
15870
15889
|
});
|
|
15871
15890
|
|
|
@@ -15884,7 +15903,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
15884
15903
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
15885
15904
|
characterId = _ref.characterId,
|
|
15886
15905
|
enableHotkeys = _ref.enableHotkeys,
|
|
15887
|
-
disableHotkeys = _ref.disableHotkeys
|
|
15906
|
+
disableHotkeys = _ref.disableHotkeys,
|
|
15907
|
+
currentPage = _ref.currentPage;
|
|
15888
15908
|
var _useState = React.useState(''),
|
|
15889
15909
|
name = _useState[0],
|
|
15890
15910
|
setName = _useState[1];
|
|
@@ -15900,6 +15920,11 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
15900
15920
|
var _useState5 = React.useState(null),
|
|
15901
15921
|
buyingItemId = _useState5[0],
|
|
15902
15922
|
setBuyingItemId = _useState5[1];
|
|
15923
|
+
var itemsContainer = React.useRef(null);
|
|
15924
|
+
React.useEffect(function () {
|
|
15925
|
+
var _itemsContainer$curre;
|
|
15926
|
+
(_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
|
|
15927
|
+
}, [currentPage]);
|
|
15903
15928
|
return React__default.createElement(React__default.Fragment, null, buyingItemId && React__default.createElement(ConfirmModal, {
|
|
15904
15929
|
onClose: setBuyingItemId.bind(null, null),
|
|
15905
15930
|
onConfirm: function onConfirm() {
|
|
@@ -15992,7 +16017,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
15992
16017
|
onChange: onChangeOrder,
|
|
15993
16018
|
width: "100%"
|
|
15994
16019
|
}))), React__default.createElement(ItemComponentScrollWrapper, {
|
|
15995
|
-
id: "MarketContainer"
|
|
16020
|
+
id: "MarketContainer",
|
|
16021
|
+
ref: itemsContainer
|
|
15996
16022
|
}, items == null ? void 0 : items.map(function (_ref2, index) {
|
|
15997
16023
|
var item = _ref2.item,
|
|
15998
16024
|
price = _ref2.price,
|
|
@@ -16048,7 +16074,8 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
16048
16074
|
onAddItemToMarketplace = _ref.onAddItemToMarketplace,
|
|
16049
16075
|
enableHotkeys = _ref.enableHotkeys,
|
|
16050
16076
|
disableHotkeys = _ref.disableHotkeys,
|
|
16051
|
-
onMoneyWithdraw = _ref.onMoneyWithdraw
|
|
16077
|
+
onMoneyWithdraw = _ref.onMoneyWithdraw,
|
|
16078
|
+
currentPage = _ref.currentPage;
|
|
16052
16079
|
var _useState = React.useState(''),
|
|
16053
16080
|
name = _useState[0],
|
|
16054
16081
|
setName = _useState[1];
|
|
@@ -16061,6 +16088,11 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
16061
16088
|
var _useState4 = React.useState(null),
|
|
16062
16089
|
removingItemId = _useState4[0],
|
|
16063
16090
|
setRemovingItemId = _useState4[1];
|
|
16091
|
+
var itemsContainer = React.useRef(null);
|
|
16092
|
+
React.useEffect(function () {
|
|
16093
|
+
var _itemsContainer$curre;
|
|
16094
|
+
(_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
|
|
16095
|
+
}, [currentPage]);
|
|
16064
16096
|
return React__default.createElement(React__default.Fragment, null, isCreatingOffer && React__default.createElement(ConfirmModal, {
|
|
16065
16097
|
onClose: setIsCreatingOffer.bind(null, false),
|
|
16066
16098
|
onConfirm: function onConfirm() {
|
|
@@ -16127,7 +16159,8 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
16127
16159
|
return availableGold > 0 && onMoneyWithdraw();
|
|
16128
16160
|
}
|
|
16129
16161
|
}, "Withdraw")))), React__default.createElement(ItemComponentScrollWrapper$1, {
|
|
16130
|
-
id: "MarketContainer"
|
|
16162
|
+
id: "MarketContainer",
|
|
16163
|
+
ref: itemsContainer
|
|
16131
16164
|
}, items == null ? void 0 : items.map(function (_ref2, index) {
|
|
16132
16165
|
var item = _ref2.item,
|
|
16133
16166
|
price = _ref2.price,
|