@rpg-engine/long-bow 0.5.77 → 0.5.79
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/Abstractions/SlotsContainer.d.ts +2 -0
- package/dist/components/DraggableContainer.d.ts +2 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +45 -10
- 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 +46 -11
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Abstractions/SlotsContainer.tsx +6 -0
- package/src/components/AsyncDropdown.tsx +5 -7
- package/src/components/DraggableContainer.tsx +29 -1
- package/src/components/Dropdown.tsx +3 -5
- package/src/components/Item/Inventory/ItemContainer.tsx +18 -3
- package/src/stories/ItemContainer.stories.tsx +3 -3
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect, Component, useRef, useContext, createContext, useMemo, useCallback, Fragment } from 'react';
|
|
2
2
|
import { BeatLoader } from 'react-spinners';
|
|
3
|
-
import styled, { keyframes } from 'styled-components';
|
|
3
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, ItemSlotType, isMobileOrTablet, CharacterClass, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
@@ -13467,8 +13467,14 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13467
13467
|
} : _ref$initialPosition,
|
|
13468
13468
|
scale = _ref.scale,
|
|
13469
13469
|
_ref$dragDisabled = _ref.dragDisabled,
|
|
13470
|
-
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled
|
|
13470
|
+
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled,
|
|
13471
|
+
isFullScreen = _ref.isFullScreen,
|
|
13472
|
+
opacity = _ref.opacity;
|
|
13471
13473
|
var draggableRef = useRef(null);
|
|
13474
|
+
if (isFullScreen) {
|
|
13475
|
+
width = '100%';
|
|
13476
|
+
height = '100%';
|
|
13477
|
+
}
|
|
13472
13478
|
useOutsideClick(draggableRef, 'item-container');
|
|
13473
13479
|
useEffect(function () {
|
|
13474
13480
|
document.addEventListener('clickOutside', function (event) {
|
|
@@ -13516,7 +13522,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13516
13522
|
ref: draggableRef,
|
|
13517
13523
|
width: width,
|
|
13518
13524
|
height: height || 'auto',
|
|
13519
|
-
className: "rpgui-container " + type + " " + className
|
|
13525
|
+
className: "rpgui-container " + type + " " + className,
|
|
13526
|
+
isFullScreen: isFullScreen,
|
|
13527
|
+
opacity: opacity
|
|
13520
13528
|
}, title && React.createElement(TitleContainer, {
|
|
13521
13529
|
className: "drag-handler"
|
|
13522
13530
|
}, React.createElement(Title, null, imgSrc && React.createElement(Icon, {
|
|
@@ -13530,11 +13538,17 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13530
13538
|
var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
13531
13539
|
displayName: "DraggableContainer__Container",
|
|
13532
13540
|
componentId: "sc-184mpyl-0"
|
|
13533
|
-
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated
|
|
13541
|
+
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
13534
13542
|
return props.height;
|
|
13535
13543
|
}, function (_ref2) {
|
|
13536
13544
|
var width = _ref2.width;
|
|
13537
13545
|
return width;
|
|
13546
|
+
}, function (_ref3) {
|
|
13547
|
+
var opacity = _ref3.opacity;
|
|
13548
|
+
return opacity && css(["opacity:", ";"], opacity);
|
|
13549
|
+
}, function (_ref4) {
|
|
13550
|
+
var isFullScreen = _ref4.isFullScreen;
|
|
13551
|
+
return isFullScreen && css(["justify-content:center;align-items:flex-start;align-content:flex-start;"]);
|
|
13538
13552
|
});
|
|
13539
13553
|
var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
13540
13554
|
displayName: "DraggableContainer__CloseButton",
|
|
@@ -13543,7 +13557,7 @@ var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
13543
13557
|
var TitleContainer = /*#__PURE__*/styled.div.withConfig({
|
|
13544
13558
|
displayName: "DraggableContainer__TitleContainer",
|
|
13545
13559
|
componentId: "sc-184mpyl-2"
|
|
13546
|
-
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;"]);
|
|
13560
|
+
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;max-height:42px;"]);
|
|
13547
13561
|
var Title = /*#__PURE__*/styled.h1.withConfig({
|
|
13548
13562
|
displayName: "DraggableContainer__Title",
|
|
13549
13563
|
componentId: "sc-184mpyl-3"
|
|
@@ -16116,8 +16130,12 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
16116
16130
|
onOutsideClick = _ref.onOutsideClick,
|
|
16117
16131
|
initialPosition = _ref.initialPosition,
|
|
16118
16132
|
scale = _ref.scale,
|
|
16119
|
-
width = _ref.width
|
|
16133
|
+
width = _ref.width,
|
|
16134
|
+
isFullScreen = _ref.isFullScreen,
|
|
16135
|
+
opacity = _ref.opacity;
|
|
16120
16136
|
return React.createElement(DraggableContainer, {
|
|
16137
|
+
isFullScreen: isFullScreen,
|
|
16138
|
+
opacity: opacity,
|
|
16121
16139
|
title: title,
|
|
16122
16140
|
type: RPGUIContainerTypes.Framed,
|
|
16123
16141
|
onCloseButton: function onCloseButton() {
|
|
@@ -16503,7 +16521,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16503
16521
|
equipmentSet = _ref.equipmentSet,
|
|
16504
16522
|
isDepotSystem = _ref.isDepotSystem,
|
|
16505
16523
|
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
16506
|
-
onPositionChangeStart = _ref.onPositionChangeStart
|
|
16524
|
+
onPositionChangeStart = _ref.onPositionChangeStart,
|
|
16525
|
+
isFullScreen = _ref.isFullScreen,
|
|
16526
|
+
opacity = _ref.opacity;
|
|
16507
16527
|
var _useState = useState({
|
|
16508
16528
|
isOpen: false,
|
|
16509
16529
|
maxQuantity: 1,
|
|
@@ -16623,7 +16643,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16623
16643
|
initialPosition: initialPosition,
|
|
16624
16644
|
scale: scale,
|
|
16625
16645
|
onPositionChangeEnd: onPositionChangeEnd,
|
|
16626
|
-
onPositionChangeStart: onPositionChangeStart
|
|
16646
|
+
onPositionChangeStart: onPositionChangeStart,
|
|
16647
|
+
isFullScreen: isFullScreen,
|
|
16648
|
+
opacity: opacity
|
|
16627
16649
|
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
16628
16650
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16629
16651
|
settingShortcutIndex: settingShortcutIndex,
|
|
@@ -16634,7 +16656,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16634
16656
|
}), React.createElement(ItemsContainer, {
|
|
16635
16657
|
className: "item-container-body",
|
|
16636
16658
|
ref: containerRef,
|
|
16637
|
-
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL
|
|
16659
|
+
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL,
|
|
16660
|
+
isFullScreen: isFullScreen
|
|
16638
16661
|
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(ItemQuantitySelectorModal, {
|
|
16639
16662
|
quantitySelect: quantitySelect,
|
|
16640
16663
|
setQuantitySelect: setQuantitySelect
|
|
@@ -16643,9 +16666,21 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16643
16666
|
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16644
16667
|
displayName: "ItemContainer__ItemsContainer",
|
|
16645
16668
|
componentId: "sc-15y5p9l-0"
|
|
16646
|
-
})(["display:flex;justify-content:
|
|
16647
|
-
var
|
|
16669
|
+
})(["display:flex;justify-content:", ";flex-wrap:wrap;max-height:", ";overflow-y:", ";overflow-x:hidden;width:", ";margin-top:", ";"], function (_ref2) {
|
|
16670
|
+
var isFullScreen = _ref2.isFullScreen;
|
|
16671
|
+
return isFullScreen ? 'flex-start' : 'center';
|
|
16672
|
+
}, function (_ref3) {
|
|
16673
|
+
var isFullScreen = _ref3.isFullScreen;
|
|
16674
|
+
return isFullScreen ? '100vh' : '270px';
|
|
16675
|
+
}, function (_ref4) {
|
|
16676
|
+
var isScrollable = _ref4.isScrollable;
|
|
16648
16677
|
return isScrollable ? 'scroll' : 'hidden';
|
|
16678
|
+
}, function (_ref5) {
|
|
16679
|
+
var isFullScreen = _ref5.isFullScreen;
|
|
16680
|
+
return isFullScreen ? '100vw' : '415px';
|
|
16681
|
+
}, function (_ref6) {
|
|
16682
|
+
var isFullScreen = _ref6.isFullScreen;
|
|
16683
|
+
return isFullScreen ? '1rem' : '0';
|
|
16649
16684
|
});
|
|
16650
16685
|
|
|
16651
16686
|
var LeaderboardTable = function LeaderboardTable(props) {
|