@rpg-engine/long-bow 0.2.51 → 0.2.52
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/Item/Inventory/ItemContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +8 -3
- 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 +8 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemContainer.tsx +3 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +3 -1
|
@@ -12,6 +12,7 @@ interface IProps {
|
|
|
12
12
|
onClick: (ItemType: ItemType, itemContainerType: ItemContainerType | null, item: IItem) => void;
|
|
13
13
|
atlasJSON: any;
|
|
14
14
|
atlasIMG: any;
|
|
15
|
+
isContextMenuDisabled?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare const ItemSlot: React.FC<IProps>;
|
|
17
18
|
export {};
|
|
@@ -28042,7 +28042,9 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
28042
28042
|
_onClick = _ref.onClick,
|
|
28043
28043
|
_onSelected = _ref.onSelected,
|
|
28044
28044
|
atlasJSON = _ref.atlasJSON,
|
|
28045
|
-
atlasIMG = _ref.atlasIMG
|
|
28045
|
+
atlasIMG = _ref.atlasIMG,
|
|
28046
|
+
_ref$isContextMenuDis = _ref.isContextMenuDisabled,
|
|
28047
|
+
isContextMenuDisabled = _ref$isContextMenuDis === void 0 ? false : _ref$isContextMenuDis;
|
|
28046
28048
|
var _useState = React.useState(false),
|
|
28047
28049
|
isTooltipVisible = _useState[0],
|
|
28048
28050
|
setTooltipVisible = _useState[1];
|
|
@@ -28157,7 +28159,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
28157
28159
|
_onClick(item.type, containerType, item);
|
|
28158
28160
|
}
|
|
28159
28161
|
}
|
|
28160
|
-
}, isContextMenuVisible && contextActions && React__default.createElement(RelativeListMenu, {
|
|
28162
|
+
}, !isContextMenuDisabled && isContextMenuVisible && contextActions && React__default.createElement(RelativeListMenu, {
|
|
28161
28163
|
options: contextActions,
|
|
28162
28164
|
onSelected: function onSelected(optionId) {
|
|
28163
28165
|
setIsContextMenuVisible(false);
|
|
@@ -28805,12 +28807,15 @@ var ItemContainer = function ItemContainer(_ref) {
|
|
|
28805
28807
|
onItemClick = _ref.onItemClick,
|
|
28806
28808
|
type = _ref.type,
|
|
28807
28809
|
atlasJSON = _ref.atlasJSON,
|
|
28808
|
-
atlasIMG = _ref.atlasIMG
|
|
28810
|
+
atlasIMG = _ref.atlasIMG,
|
|
28811
|
+
_ref$disableContextMe = _ref.disableContextMenu,
|
|
28812
|
+
disableContextMenu = _ref$disableContextMe === void 0 ? false : _ref$disableContextMe;
|
|
28809
28813
|
var onRenderSlots = function onRenderSlots() {
|
|
28810
28814
|
var slots = [];
|
|
28811
28815
|
for (var i = 0; i < itemContainer.slotQty; i++) {
|
|
28812
28816
|
var _itemContainer$slots;
|
|
28813
28817
|
slots.push(React__default.createElement(ItemSlot, {
|
|
28818
|
+
isContextMenuDisabled: disableContextMenu,
|
|
28814
28819
|
key: i,
|
|
28815
28820
|
slotIndex: i,
|
|
28816
28821
|
item: ((_itemContainer$slots = itemContainer.slots) == null ? void 0 : _itemContainer$slots[i]) || null,
|