@rpg-engine/long-bow 0.2.51 → 0.2.53

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.
@@ -9,5 +9,6 @@ export interface IItemContainerProps {
9
9
  type: ItemContainerType;
10
10
  atlasJSON: any;
11
11
  atlasIMG: any;
12
+ disableContextMenu?: boolean;
12
13
  }
13
14
  export declare const ItemContainer: React.FC<IItemContainerProps>;
@@ -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];
@@ -28152,12 +28154,12 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
28152
28154
  },
28153
28155
  onClick: function onClick() {
28154
28156
  setTooltipVisible(false);
28155
- if (item) {
28157
+ if (item && !isContextMenuDisabled) {
28156
28158
  setIsContextMenuVisible(!isContextMenuVisible);
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,