@rpg-engine/long-bow 0.8.146 → 0.8.149
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/BlueprintSearchModal.d.ts +2 -0
- package/dist/components/Marketplace/BuyOrderDetailsModal.d.ts +2 -0
- package/dist/components/Marketplace/BuyOrderPanel.d.ts +2 -0
- package/dist/components/Marketplace/BuyPanel.d.ts +1 -0
- package/dist/components/Marketplace/Marketplace.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +188 -88
- 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 +188 -88
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Marketplace/BlueprintSearchModal.tsx +79 -25
- package/src/components/Marketplace/BuyOrderDetailsModal.tsx +8 -0
- package/src/components/Marketplace/BuyOrderPanel.tsx +50 -15
- package/src/components/Marketplace/BuyPanel.tsx +40 -2
- package/src/components/Marketplace/HistoryPanel.tsx +1 -1
- package/src/components/Marketplace/Marketplace.tsx +7 -1
- package/src/stories/Features/marketplace/HistoryPanel.stories.tsx +3 -3
- package/src/stories/Features/trading/Marketplace.stories.tsx +3 -3
package/dist/long-bow.esm.js
CHANGED
|
@@ -44616,7 +44616,9 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44616
44616
|
currentPage = _ref.currentPage,
|
|
44617
44617
|
isLoading = _ref.isLoading,
|
|
44618
44618
|
atlasJSON = _ref.atlasJSON,
|
|
44619
|
-
atlasIMG = _ref.atlasIMG
|
|
44619
|
+
atlasIMG = _ref.atlasIMG,
|
|
44620
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
44621
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
44620
44622
|
var _useState = useState(''),
|
|
44621
44623
|
searchName = _useState[0],
|
|
44622
44624
|
setSearchName = _useState[1];
|
|
@@ -44626,24 +44628,40 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44626
44628
|
var _useState3 = useState(''),
|
|
44627
44629
|
selectedSubType = _useState3[0],
|
|
44628
44630
|
setSelectedSubType = _useState3[1];
|
|
44629
|
-
|
|
44630
|
-
var
|
|
44631
|
+
var searchNameRef = useRef(searchName);
|
|
44632
|
+
var selectedTypeRef = useRef(selectedType);
|
|
44633
|
+
var selectedSubTypeRef = useRef(selectedSubType);
|
|
44634
|
+
searchNameRef.current = searchName;
|
|
44635
|
+
selectedTypeRef.current = selectedType;
|
|
44636
|
+
selectedSubTypeRef.current = selectedSubType;
|
|
44637
|
+
var triggerSearch = useCallback(function (overrides) {
|
|
44631
44638
|
var _overrides$name, _overrides$itemType, _overrides$itemSubTyp, _overrides$page;
|
|
44632
44639
|
onSearch({
|
|
44633
44640
|
npcId: '',
|
|
44634
|
-
name: (_overrides$name = overrides == null ? void 0 : overrides.name) != null ? _overrides$name :
|
|
44635
|
-
itemType: (_overrides$itemType = overrides == null ? void 0 : overrides.itemType) != null ? _overrides$itemType :
|
|
44636
|
-
itemSubType: (_overrides$itemSubTyp = overrides == null ? void 0 : overrides.itemSubType) != null ? _overrides$itemSubTyp :
|
|
44641
|
+
name: (_overrides$name = overrides == null ? void 0 : overrides.name) != null ? _overrides$name : searchNameRef.current,
|
|
44642
|
+
itemType: (_overrides$itemType = overrides == null ? void 0 : overrides.itemType) != null ? _overrides$itemType : selectedTypeRef.current,
|
|
44643
|
+
itemSubType: (_overrides$itemSubTyp = overrides == null ? void 0 : overrides.itemSubType) != null ? _overrides$itemSubTyp : selectedSubTypeRef.current,
|
|
44637
44644
|
page: (_overrides$page = overrides == null ? void 0 : overrides.page) != null ? _overrides$page : 1,
|
|
44638
44645
|
limit: BLUEPRINTS_PER_PAGE
|
|
44639
44646
|
});
|
|
44640
|
-
};
|
|
44647
|
+
}, [onSearch]);
|
|
44648
|
+
var debouncedNameSearch = useMemo(function () {
|
|
44649
|
+
return debounce(function (name) {
|
|
44650
|
+
return triggerSearch({
|
|
44651
|
+
name: name,
|
|
44652
|
+
page: 1
|
|
44653
|
+
});
|
|
44654
|
+
}, 300);
|
|
44655
|
+
}, [triggerSearch]);
|
|
44656
|
+
useEffect(function () {
|
|
44657
|
+
return function () {
|
|
44658
|
+
debouncedNameSearch.cancel();
|
|
44659
|
+
};
|
|
44660
|
+
}, [debouncedNameSearch]);
|
|
44661
|
+
if (!isOpen) return null;
|
|
44641
44662
|
var handleNameChange = function handleNameChange(e) {
|
|
44642
44663
|
setSearchName(e.target.value);
|
|
44643
|
-
|
|
44644
|
-
name: e.target.value,
|
|
44645
|
-
page: 1
|
|
44646
|
-
});
|
|
44664
|
+
debouncedNameSearch(e.target.value);
|
|
44647
44665
|
};
|
|
44648
44666
|
var handleTypeChange = function handleTypeChange(value) {
|
|
44649
44667
|
setSelectedType(value);
|
|
@@ -44683,7 +44701,9 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44683
44701
|
}, React.createElement(FaTimes, null))), React.createElement(InputWrapper, null, React.createElement("p", null, "SEARCH"), React.createElement(StyledInput$2, {
|
|
44684
44702
|
value: searchName,
|
|
44685
44703
|
onChange: handleNameChange,
|
|
44686
|
-
placeholder: "Search by name..."
|
|
44704
|
+
placeholder: "Search by name...",
|
|
44705
|
+
onFocus: disableHotkeys,
|
|
44706
|
+
onBlur: enableHotkeys
|
|
44687
44707
|
})), React.createElement(FiltersRow, null, React.createElement(StyledDropdown$2, {
|
|
44688
44708
|
key: "type-" + selectedType,
|
|
44689
44709
|
options: typeOptions,
|
|
@@ -44694,12 +44714,14 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44694
44714
|
options: subTypeOptions,
|
|
44695
44715
|
onChange: handleSubTypeChange,
|
|
44696
44716
|
width: "100%"
|
|
44697
|
-
})), React.createElement(ResultsWrapper, null,
|
|
44717
|
+
})), React.createElement(ResultsWrapper, null, blueprints.length === 0 && !isLoading ? React.createElement(EmptyState$2, null, "No items found") : React.createElement(ResultsContent, {
|
|
44718
|
+
"$dimmed": isLoading
|
|
44719
|
+
}, React.createElement(BlueprintTable, {
|
|
44698
44720
|
blueprints: blueprints,
|
|
44699
44721
|
atlasJSON: atlasJSON,
|
|
44700
44722
|
atlasIMG: atlasIMG,
|
|
44701
44723
|
onSelect: onSelect
|
|
44702
|
-
})), React.createElement(PagerContainer$1, null, React.createElement(Pager, {
|
|
44724
|
+
})), isLoading && React.createElement(LoadingOverlay, null, React.createElement(LoadingText, null, "Loading..."))), React.createElement(PagerContainer$1, null, React.createElement(Pager, {
|
|
44703
44725
|
totalItems: totalCount,
|
|
44704
44726
|
currentPage: currentPage,
|
|
44705
44727
|
itemsPerPage: BLUEPRINTS_PER_PAGE,
|
|
@@ -44749,16 +44771,66 @@ var StyledDropdown$2 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
|
44749
44771
|
var ResultsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
44750
44772
|
displayName: "BlueprintSearchModal__ResultsWrapper",
|
|
44751
44773
|
componentId: "sc-i7bssq-10"
|
|
44752
|
-
})(["overflow-y:auto;
|
|
44774
|
+
})(["position:relative;overflow-y:auto;height:320px;background:rgba(0,0,0,0.2);border:1px solid rgba(255,255,255,0.05);border-radius:4px;"]);
|
|
44775
|
+
var ResultsContent = /*#__PURE__*/styled.div.withConfig({
|
|
44776
|
+
displayName: "BlueprintSearchModal__ResultsContent",
|
|
44777
|
+
componentId: "sc-i7bssq-11"
|
|
44778
|
+
})(["opacity:", ";transition:opacity 0.15s ease;"], function (p) {
|
|
44779
|
+
return p.$dimmed ? 0.4 : 1;
|
|
44780
|
+
});
|
|
44781
|
+
var LoadingOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
44782
|
+
displayName: "BlueprintSearchModal__LoadingOverlay",
|
|
44783
|
+
componentId: "sc-i7bssq-12"
|
|
44784
|
+
})(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;"]);
|
|
44785
|
+
var LoadingText = /*#__PURE__*/styled.span.withConfig({
|
|
44786
|
+
displayName: "BlueprintSearchModal__LoadingText",
|
|
44787
|
+
componentId: "sc-i7bssq-13"
|
|
44788
|
+
})(["font-size:0.55rem;color:#f59e0b;text-transform:uppercase;letter-spacing:1px;"]);
|
|
44753
44789
|
var EmptyState$2 = /*#__PURE__*/styled.div.withConfig({
|
|
44754
44790
|
displayName: "BlueprintSearchModal__EmptyState",
|
|
44755
|
-
componentId: "sc-i7bssq-
|
|
44756
|
-
})(["display:flex;align-items:center;justify-content:center;height:
|
|
44791
|
+
componentId: "sc-i7bssq-14"
|
|
44792
|
+
})(["display:flex;align-items:center;justify-content:center;height:100%;font-size:0.55rem;color:#666;text-transform:uppercase;letter-spacing:1px;"]);
|
|
44757
44793
|
var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
44758
44794
|
displayName: "BlueprintSearchModal__PagerContainer",
|
|
44759
|
-
componentId: "sc-i7bssq-
|
|
44795
|
+
componentId: "sc-i7bssq-15"
|
|
44760
44796
|
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
44761
44797
|
|
|
44798
|
+
var SegmentedToggle = function SegmentedToggle(_ref) {
|
|
44799
|
+
var options = _ref.options,
|
|
44800
|
+
activeId = _ref.activeId,
|
|
44801
|
+
onChange = _ref.onChange,
|
|
44802
|
+
className = _ref.className;
|
|
44803
|
+
return React.createElement(Container$B, {
|
|
44804
|
+
className: className
|
|
44805
|
+
}, options.map(function (option) {
|
|
44806
|
+
return React.createElement(OptionButton, {
|
|
44807
|
+
key: option.id,
|
|
44808
|
+
type: "button",
|
|
44809
|
+
"$active": option.id === activeId,
|
|
44810
|
+
onClick: function onClick() {
|
|
44811
|
+
return onChange(option.id);
|
|
44812
|
+
}
|
|
44813
|
+
}, option.label);
|
|
44814
|
+
}));
|
|
44815
|
+
};
|
|
44816
|
+
var Container$B = /*#__PURE__*/styled.div.withConfig({
|
|
44817
|
+
displayName: "SegmentedToggle__Container",
|
|
44818
|
+
componentId: "sc-1itx2kn-0"
|
|
44819
|
+
})(["display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;"]);
|
|
44820
|
+
var OptionButton = /*#__PURE__*/styled.button.withConfig({
|
|
44821
|
+
displayName: "SegmentedToggle__OptionButton",
|
|
44822
|
+
componentId: "sc-1itx2kn-1"
|
|
44823
|
+
})(["border:1px solid ", ";background:", ";color:", ";border-radius:999px;padding:8px 12px;cursor:pointer;font-size:0.56rem;text-transform:uppercase;letter-spacing:0.8px;transition:background 0.15s ease,border-color 0.15s ease,color 0.15s ease;&:hover{border-color:rgba(245,158,11,0.45);color:#fde68a;}"], function (_ref2) {
|
|
44824
|
+
var $active = _ref2.$active;
|
|
44825
|
+
return $active ? 'rgba(245, 158, 11, 0.75)' : 'rgba(255, 255, 255, 0.08)';
|
|
44826
|
+
}, function (_ref3) {
|
|
44827
|
+
var $active = _ref3.$active;
|
|
44828
|
+
return $active ? 'rgba(245, 158, 11, 0.16)' : 'rgba(0, 0, 0, 0.18)';
|
|
44829
|
+
}, function (_ref4) {
|
|
44830
|
+
var $active = _ref4.$active;
|
|
44831
|
+
return $active ? '#fde68a' : '#cfcfcf';
|
|
44832
|
+
});
|
|
44833
|
+
|
|
44762
44834
|
var scaleIn$1 = /*#__PURE__*/keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
44763
44835
|
var rarityOptions = [{
|
|
44764
44836
|
id: 1,
|
|
@@ -44793,7 +44865,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44793
44865
|
onRarityChange = _ref.onRarityChange,
|
|
44794
44866
|
onConfirm = _ref.onConfirm,
|
|
44795
44867
|
atlasJSON = _ref.atlasJSON,
|
|
44796
|
-
atlasIMG = _ref.atlasIMG
|
|
44868
|
+
atlasIMG = _ref.atlasIMG,
|
|
44869
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
44870
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
44797
44871
|
if (!isOpen || !blueprint) return null;
|
|
44798
44872
|
var stopPropagation = function stopPropagation(e) {
|
|
44799
44873
|
e.stopPropagation();
|
|
@@ -44827,7 +44901,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44827
44901
|
},
|
|
44828
44902
|
placeholder: "Qty",
|
|
44829
44903
|
type: "number",
|
|
44830
|
-
min: 1
|
|
44904
|
+
min: 1,
|
|
44905
|
+
onFocus: disableHotkeys,
|
|
44906
|
+
onBlur: enableHotkeys
|
|
44831
44907
|
})), React.createElement(FieldRow, null, React.createElement(Label$4, null, "Max Gold"), React.createElement(StyledInput$3, {
|
|
44832
44908
|
value: maxPrice || '',
|
|
44833
44909
|
onChange: function onChange(e) {
|
|
@@ -44835,7 +44911,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44835
44911
|
},
|
|
44836
44912
|
placeholder: "Max gold",
|
|
44837
44913
|
type: "number",
|
|
44838
|
-
min: 1
|
|
44914
|
+
min: 1,
|
|
44915
|
+
onFocus: disableHotkeys,
|
|
44916
|
+
onBlur: enableHotkeys
|
|
44839
44917
|
})), React.createElement(FieldRow, null, React.createElement(Label$4, null, "Rarity"), React.createElement(StyledDropdown$3, {
|
|
44840
44918
|
key: rarity,
|
|
44841
44919
|
options: rarityOptions,
|
|
@@ -44958,9 +45036,9 @@ var Pill = /*#__PURE__*/styled.span.withConfig({
|
|
|
44958
45036
|
|
|
44959
45037
|
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
44960
45038
|
var children = _ref.children;
|
|
44961
|
-
return React.createElement(Container$
|
|
45039
|
+
return React.createElement(Container$C, null, children);
|
|
44962
45040
|
};
|
|
44963
|
-
var Container$
|
|
45041
|
+
var Container$C = /*#__PURE__*/styled.div.withConfig({
|
|
44964
45042
|
displayName: "RPGUIScrollbar__Container",
|
|
44965
45043
|
componentId: "sc-p3msmb-0"
|
|
44966
45044
|
})([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
|
|
@@ -45289,7 +45367,9 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45289
45367
|
yourBuyOrdersTotal = props.yourBuyOrdersTotal,
|
|
45290
45368
|
yourBuyOrdersPage = props.yourBuyOrdersPage,
|
|
45291
45369
|
onYourBuyOrdersPageChange = props.onYourBuyOrdersPageChange,
|
|
45292
|
-
onCancelBuyOrder = props.onCancelBuyOrder
|
|
45370
|
+
onCancelBuyOrder = props.onCancelBuyOrder,
|
|
45371
|
+
enableHotkeys = props.enableHotkeys,
|
|
45372
|
+
disableHotkeys = props.disableHotkeys;
|
|
45293
45373
|
// Local blueprint display: cleared immediately on Place Request so the
|
|
45294
45374
|
// panel returns to "Select Item" without waiting for the consumer to update
|
|
45295
45375
|
// the prop. Cancel keeps it shown so the user can reopen the modal.
|
|
@@ -45299,6 +45379,9 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45299
45379
|
var _useState2 = useState(!!selectedBlueprint),
|
|
45300
45380
|
isDetailsOpen = _useState2[0],
|
|
45301
45381
|
setIsDetailsOpen = _useState2[1];
|
|
45382
|
+
var _useState3 = useState('Active'),
|
|
45383
|
+
statusFilter = _useState3[0],
|
|
45384
|
+
setStatusFilter = _useState3[1];
|
|
45302
45385
|
// Sync when consumer provides a new blueprint (e.g. after search selection)
|
|
45303
45386
|
useEffect(function () {
|
|
45304
45387
|
if (selectedBlueprint) {
|
|
@@ -45312,10 +45395,12 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45312
45395
|
setDisplayedBlueprint(undefined);
|
|
45313
45396
|
setIsDetailsOpen(false);
|
|
45314
45397
|
onCloseDetails == null ? void 0 : onCloseDetails();
|
|
45398
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
45315
45399
|
};
|
|
45316
45400
|
// Cancel: just close the modal, keep blueprint displayed for reopening
|
|
45317
45401
|
var handleCloseDetails = function handleCloseDetails() {
|
|
45318
45402
|
setIsDetailsOpen(false);
|
|
45403
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
45319
45404
|
};
|
|
45320
45405
|
return React.createElement(PanelWrapper, null, displayedBlueprint && isDetailsOpen && React.createElement(BuyOrderDetailsModal, {
|
|
45321
45406
|
isOpen: true,
|
|
@@ -45329,7 +45414,9 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45329
45414
|
onRarityChange: onRarityChange,
|
|
45330
45415
|
onConfirm: handleConfirm,
|
|
45331
45416
|
atlasJSON: atlasJSON,
|
|
45332
|
-
atlasIMG: atlasIMG
|
|
45417
|
+
atlasIMG: atlasIMG,
|
|
45418
|
+
enableHotkeys: enableHotkeys,
|
|
45419
|
+
disableHotkeys: disableHotkeys
|
|
45333
45420
|
}), React.createElement(FormRow, null, displayedBlueprint ? React.createElement(SelectedBlueprintDisplay, {
|
|
45334
45421
|
onPointerDown: onOpenBlueprintSearch
|
|
45335
45422
|
}, React.createElement(RarityContainer, {
|
|
@@ -45350,18 +45437,41 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45350
45437
|
label: "Select Item",
|
|
45351
45438
|
iconColor: "#f59e0b",
|
|
45352
45439
|
onClick: onOpenBlueprintSearch
|
|
45440
|
+
})), React.createElement(FilterRow$1, null, React.createElement(SectionTitle$1, null, "Your Buy Requests"), React.createElement(SegmentedToggle, {
|
|
45441
|
+
options: [{
|
|
45442
|
+
id: 'Active',
|
|
45443
|
+
label: 'Active'
|
|
45444
|
+
}, {
|
|
45445
|
+
id: 'Fulfilled',
|
|
45446
|
+
label: 'Fulfilled'
|
|
45447
|
+
}, {
|
|
45448
|
+
id: 'Expired',
|
|
45449
|
+
label: 'Expired'
|
|
45450
|
+
}, {
|
|
45451
|
+
id: 'All',
|
|
45452
|
+
label: 'All'
|
|
45453
|
+
}],
|
|
45454
|
+
activeId: statusFilter,
|
|
45455
|
+
onChange: function onChange(id) {
|
|
45456
|
+
return setStatusFilter(id);
|
|
45457
|
+
}
|
|
45353
45458
|
})), React.createElement(ScrollArea, {
|
|
45354
45459
|
id: "MarketContainer"
|
|
45355
|
-
}, React.createElement(Section$1, null,
|
|
45356
|
-
|
|
45357
|
-
|
|
45358
|
-
buyOrder: order,
|
|
45359
|
-
atlasJSON: atlasJSON,
|
|
45360
|
-
atlasIMG: atlasIMG,
|
|
45361
|
-
isOwn: true,
|
|
45362
|
-
onCancel: onCancelBuyOrder
|
|
45460
|
+
}, React.createElement(Section$1, null, function () {
|
|
45461
|
+
var filtered = statusFilter === 'All' ? yourBuyOrders : yourBuyOrders.filter(function (o) {
|
|
45462
|
+
return o.status === MarketplaceBuyOrderStatus[statusFilter];
|
|
45363
45463
|
});
|
|
45364
|
-
|
|
45464
|
+
return filtered.length === 0 ? React.createElement(EmptyState$3, null, "No requests yet") : filtered.map(function (order) {
|
|
45465
|
+
return React.createElement(BuyOrderRow, {
|
|
45466
|
+
key: order._id,
|
|
45467
|
+
buyOrder: order,
|
|
45468
|
+
atlasJSON: atlasJSON,
|
|
45469
|
+
atlasIMG: atlasIMG,
|
|
45470
|
+
isOwn: true,
|
|
45471
|
+
onCancel: onCancelBuyOrder
|
|
45472
|
+
});
|
|
45473
|
+
});
|
|
45474
|
+
}(), yourBuyOrdersTotal > BUY_ORDERS_PER_PAGE && React.createElement(PagerRow, null, React.createElement(Pager, {
|
|
45365
45475
|
totalItems: yourBuyOrdersTotal,
|
|
45366
45476
|
currentPage: yourBuyOrdersPage,
|
|
45367
45477
|
itemsPerPage: BUY_ORDERS_PER_PAGE,
|
|
@@ -45376,25 +45486,29 @@ var FormRow = /*#__PURE__*/styled.div.withConfig({
|
|
|
45376
45486
|
displayName: "BuyOrderPanel__FormRow",
|
|
45377
45487
|
componentId: "sc-1eb11ct-1"
|
|
45378
45488
|
})(["display:flex;gap:8px;align-items:center;background:rgba(0,0,0,0.15);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:8px 12px;overflow:visible;"]);
|
|
45489
|
+
var FilterRow$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45490
|
+
displayName: "BuyOrderPanel__FilterRow",
|
|
45491
|
+
componentId: "sc-1eb11ct-2"
|
|
45492
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:0 4px;"]);
|
|
45379
45493
|
var ScrollArea = /*#__PURE__*/styled.div.withConfig({
|
|
45380
45494
|
displayName: "BuyOrderPanel__ScrollArea",
|
|
45381
|
-
componentId: "sc-1eb11ct-
|
|
45495
|
+
componentId: "sc-1eb11ct-3"
|
|
45382
45496
|
})(["display:flex;flex-direction:column;gap:6px;overflow-y:scroll;max-height:420px;"]);
|
|
45383
45497
|
var Section$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45384
45498
|
displayName: "BuyOrderPanel__Section",
|
|
45385
|
-
componentId: "sc-1eb11ct-
|
|
45499
|
+
componentId: "sc-1eb11ct-4"
|
|
45386
45500
|
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
45387
45501
|
var SectionTitle$1 = /*#__PURE__*/styled.p.withConfig({
|
|
45388
45502
|
displayName: "BuyOrderPanel__SectionTitle",
|
|
45389
|
-
componentId: "sc-1eb11ct-
|
|
45503
|
+
componentId: "sc-1eb11ct-5"
|
|
45390
45504
|
})(["margin:0 0 2px 0;font-size:0.45rem;color:#666;text-transform:uppercase;letter-spacing:1px;"]);
|
|
45391
45505
|
var SelectedBlueprintDisplay = /*#__PURE__*/styled.button.withConfig({
|
|
45392
45506
|
displayName: "BuyOrderPanel__SelectedBlueprintDisplay",
|
|
45393
|
-
componentId: "sc-1eb11ct-
|
|
45507
|
+
componentId: "sc-1eb11ct-6"
|
|
45394
45508
|
})(["background:rgba(245,158,11,0.08);border:1px solid rgba(245,158,11,0.4);border-radius:4px;padding:6px 10px;cursor:pointer;text-align:left;display:flex;align-items:center;gap:8px;transition:background 0.1s;> div:first-child{position:relative;top:2px;left:2px;}&:hover{background:rgba(245,158,11,0.15);}"]);
|
|
45395
45509
|
var RarityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
45396
45510
|
displayName: "BuyOrderPanel__RarityContainer",
|
|
45397
|
-
componentId: "sc-1eb11ct-
|
|
45511
|
+
componentId: "sc-1eb11ct-7"
|
|
45398
45512
|
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref) {
|
|
45399
45513
|
var $rarity = _ref.$rarity;
|
|
45400
45514
|
return rarityColor({
|
|
@@ -45413,61 +45527,25 @@ var RarityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
45413
45527
|
});
|
|
45414
45528
|
var ChangeTextWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45415
45529
|
displayName: "BuyOrderPanel__ChangeTextWrapper",
|
|
45416
|
-
componentId: "sc-1eb11ct-
|
|
45530
|
+
componentId: "sc-1eb11ct-8"
|
|
45417
45531
|
})(["display:flex;flex-direction:column;gap:2px;min-width:0;"]);
|
|
45418
45532
|
var BlueprintName$1 = /*#__PURE__*/styled.span.withConfig({
|
|
45419
45533
|
displayName: "BuyOrderPanel__BlueprintName",
|
|
45420
|
-
componentId: "sc-1eb11ct-
|
|
45534
|
+
componentId: "sc-1eb11ct-9"
|
|
45421
45535
|
})(["font-size:0.5rem;color:#ddd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]);
|
|
45422
45536
|
var ChangeText = /*#__PURE__*/styled.span.withConfig({
|
|
45423
45537
|
displayName: "BuyOrderPanel__ChangeText",
|
|
45424
|
-
componentId: "sc-1eb11ct-
|
|
45538
|
+
componentId: "sc-1eb11ct-10"
|
|
45425
45539
|
})(["font-size:0.4rem;color:#f59e0b;"]);
|
|
45426
45540
|
var EmptyState$3 = /*#__PURE__*/styled.div.withConfig({
|
|
45427
45541
|
displayName: "BuyOrderPanel__EmptyState",
|
|
45428
|
-
componentId: "sc-1eb11ct-
|
|
45542
|
+
componentId: "sc-1eb11ct-11"
|
|
45429
45543
|
})(["display:flex;align-items:center;justify-content:center;height:45px;font-size:0.45rem;color:#555;text-transform:uppercase;letter-spacing:1px;background:rgba(0,0,0,0.15);border-radius:4px;"]);
|
|
45430
45544
|
var PagerRow = /*#__PURE__*/styled.div.withConfig({
|
|
45431
45545
|
displayName: "BuyOrderPanel__PagerRow",
|
|
45432
|
-
componentId: "sc-1eb11ct-
|
|
45546
|
+
componentId: "sc-1eb11ct-12"
|
|
45433
45547
|
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
45434
45548
|
|
|
45435
|
-
var SegmentedToggle = function SegmentedToggle(_ref) {
|
|
45436
|
-
var options = _ref.options,
|
|
45437
|
-
activeId = _ref.activeId,
|
|
45438
|
-
onChange = _ref.onChange,
|
|
45439
|
-
className = _ref.className;
|
|
45440
|
-
return React.createElement(Container$C, {
|
|
45441
|
-
className: className
|
|
45442
|
-
}, options.map(function (option) {
|
|
45443
|
-
return React.createElement(OptionButton, {
|
|
45444
|
-
key: option.id,
|
|
45445
|
-
type: "button",
|
|
45446
|
-
"$active": option.id === activeId,
|
|
45447
|
-
onClick: function onClick() {
|
|
45448
|
-
return onChange(option.id);
|
|
45449
|
-
}
|
|
45450
|
-
}, option.label);
|
|
45451
|
-
}));
|
|
45452
|
-
};
|
|
45453
|
-
var Container$C = /*#__PURE__*/styled.div.withConfig({
|
|
45454
|
-
displayName: "SegmentedToggle__Container",
|
|
45455
|
-
componentId: "sc-1itx2kn-0"
|
|
45456
|
-
})(["display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;"]);
|
|
45457
|
-
var OptionButton = /*#__PURE__*/styled.button.withConfig({
|
|
45458
|
-
displayName: "SegmentedToggle__OptionButton",
|
|
45459
|
-
componentId: "sc-1itx2kn-1"
|
|
45460
|
-
})(["border:1px solid ", ";background:", ";color:", ";border-radius:999px;padding:8px 12px;cursor:pointer;font-size:0.56rem;text-transform:uppercase;letter-spacing:0.8px;transition:background 0.15s ease,border-color 0.15s ease,color 0.15s ease;&:hover{border-color:rgba(245,158,11,0.45);color:#fde68a;}"], function (_ref2) {
|
|
45461
|
-
var $active = _ref2.$active;
|
|
45462
|
-
return $active ? 'rgba(245, 158, 11, 0.75)' : 'rgba(255, 255, 255, 0.08)';
|
|
45463
|
-
}, function (_ref3) {
|
|
45464
|
-
var $active = _ref3.$active;
|
|
45465
|
-
return $active ? 'rgba(245, 158, 11, 0.16)' : 'rgba(0, 0, 0, 0.18)';
|
|
45466
|
-
}, function (_ref4) {
|
|
45467
|
-
var $active = _ref4.$active;
|
|
45468
|
-
return $active ? '#fde68a' : '#cfcfcf';
|
|
45469
|
-
});
|
|
45470
|
-
|
|
45471
45549
|
var MarketplaceBuyModal = function MarketplaceBuyModal(_ref) {
|
|
45472
45550
|
var goldPrice = _ref.goldPrice,
|
|
45473
45551
|
dcEquivalentPrice = _ref.dcEquivalentPrice,
|
|
@@ -45907,7 +45985,9 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
45907
45985
|
openBuyOrdersTotal = _ref$openBuyOrdersTot === void 0 ? 0 : _ref$openBuyOrdersTot,
|
|
45908
45986
|
_ref$openBuyOrdersPag = _ref.openBuyOrdersPage,
|
|
45909
45987
|
openBuyOrdersPage = _ref$openBuyOrdersPag === void 0 ? 1 : _ref$openBuyOrdersPag,
|
|
45910
|
-
onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange
|
|
45988
|
+
onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange,
|
|
45989
|
+
_ref$isLoading = _ref.isLoading,
|
|
45990
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
|
|
45911
45991
|
var _useState = useState(''),
|
|
45912
45992
|
name = _useState[0],
|
|
45913
45993
|
setName = _useState[1];
|
|
@@ -46146,7 +46226,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46146
46226
|
}))))), React.createElement(ItemComponentScrollWrapper$1, {
|
|
46147
46227
|
id: "MarketContainer",
|
|
46148
46228
|
ref: itemsContainer
|
|
46149
|
-
}, !hasVisibleContent && React.createElement(EmptyState$4, null, "No offers match the current filters."), showSellSection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Sell Offers"), React.createElement(SectionMeta, null, groupedItems.length, " groups")), groupedItems.length === 0 ? React.createElement(SectionEmpty, null, "No sell offers found.") : groupedItems.map(function (_ref2) {
|
|
46229
|
+
}, isLoading && !hasVisibleContent && React.createElement(LoadingState, null, React.createElement(Spinner$2, null), React.createElement(LoadingText$1, null, "Loading marketplace...")), !isLoading && !hasVisibleContent && React.createElement(EmptyState$4, null, "No offers match the current filters."), showSellSection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Sell Offers"), React.createElement(SectionMeta, null, groupedItems.length, " groups")), groupedItems.length === 0 ? React.createElement(SectionEmpty, null, "No sell offers found.") : groupedItems.map(function (_ref2) {
|
|
46150
46230
|
var bestListing = _ref2.bestListing,
|
|
46151
46231
|
otherListings = _ref2.otherListings;
|
|
46152
46232
|
return React.createElement(GroupedMarketplaceRow, {
|
|
@@ -46258,6 +46338,19 @@ var StyledDropdown$4 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
|
46258
46338
|
displayName: "BuyPanel__StyledDropdown",
|
|
46259
46339
|
componentId: "sc-1si8t7i-15"
|
|
46260
46340
|
})(["margin:0px !important;width:100% !important;"]);
|
|
46341
|
+
var spin = /*#__PURE__*/keyframes(["to{transform:rotate(360deg);}"]);
|
|
46342
|
+
var LoadingState = /*#__PURE__*/styled.div.withConfig({
|
|
46343
|
+
displayName: "BuyPanel__LoadingState",
|
|
46344
|
+
componentId: "sc-1si8t7i-16"
|
|
46345
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;height:100%;min-height:160px;"]);
|
|
46346
|
+
var Spinner$2 = /*#__PURE__*/styled.div.withConfig({
|
|
46347
|
+
displayName: "BuyPanel__Spinner",
|
|
46348
|
+
componentId: "sc-1si8t7i-17"
|
|
46349
|
+
})(["width:28px;height:28px;border:3px solid rgba(245,158,11,0.2);border-top-color:#f59e0b;border-radius:50%;animation:", " 0.7s linear infinite;"], spin);
|
|
46350
|
+
var LoadingText$1 = /*#__PURE__*/styled.span.withConfig({
|
|
46351
|
+
displayName: "BuyPanel__LoadingText",
|
|
46352
|
+
componentId: "sc-1si8t7i-18"
|
|
46353
|
+
})(["font-size:0.48rem;color:#8a8a8a;text-transform:uppercase;letter-spacing:1px;"]);
|
|
46261
46354
|
|
|
46262
46355
|
var _TRANSACTION_TYPE_COL;
|
|
46263
46356
|
var HISTORY_ITEMS_PER_PAGE = 10;
|
|
@@ -46311,7 +46404,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46311
46404
|
var getDCEquivalentPrice = function getDCEquivalentPrice(goldPrice) {
|
|
46312
46405
|
return dcToGoldSwapRate > 0 ? goldToDC(goldPrice) : 0;
|
|
46313
46406
|
};
|
|
46314
|
-
return React.createElement(PanelWrapper$1, null, React.createElement(FilterRow$
|
|
46407
|
+
return React.createElement(PanelWrapper$1, null, React.createElement(FilterRow$2, null, React.createElement(FilterLabel$1, null, "FILTER BY TYPE"), React.createElement(StyledDropdown$5, {
|
|
46315
46408
|
key: selectedType,
|
|
46316
46409
|
options: transactionTypeOptions,
|
|
46317
46410
|
onChange: onTypeChange,
|
|
@@ -46319,6 +46412,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46319
46412
|
})), React.createElement(ScrollArea$1, {
|
|
46320
46413
|
id: "MarketContainer"
|
|
46321
46414
|
}, transactions.length === 0 ? React.createElement(EmptyState$5, null, "No transactions yet") : transactions.map(function (tx, index) {
|
|
46415
|
+
var _tx$metadata;
|
|
46322
46416
|
return React.createElement(RowWrapper$1, {
|
|
46323
46417
|
key: index,
|
|
46324
46418
|
"$even": index % 2 === 0,
|
|
@@ -46329,7 +46423,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46329
46423
|
fontSize: "10px"
|
|
46330
46424
|
}, tx.itemName)) : React.createElement(ItemName$3, null, React.createElement(NoItemText, null, tx.type === MarketplaceTransactionType.Withdrawal ? 'Gold Withdrawal' : '--')), React.createElement(MetaRow$1, null, React.createElement(Label$5, {
|
|
46331
46425
|
"$bg": TRANSACTION_TYPE_COLORS$1[tx.type]
|
|
46332
|
-
}, formatTransactionLabel(tx.type)), React.createElement(SecondaryText, null, formatDate(tx.createdAt)), tx.counterpartName && React.createElement(SecondaryText, null, "w/ ", tx.counterpartName)))), tx.goldAmount > 0 && React.createElement(PriceSection, null, tx.currency === 'dc' ?
|
|
46426
|
+
}, formatTransactionLabel(tx.type)), React.createElement(SecondaryText, null, formatDate(tx.createdAt)), tx.counterpartName && React.createElement(SecondaryText, null, "w/ ", tx.counterpartName)))), tx.goldAmount > 0 && React.createElement(PriceSection, null, ((_tx$metadata = tx.metadata) == null ? void 0 : _tx$metadata['currency']) === 'dc' ?
|
|
46333
46427
|
// Show DC only
|
|
46334
46428
|
React.createElement(DCPriceRow$1, null, atlasIMG && atlasJSON && React.createElement(DCCoinWrapper$1, null, React.createElement(SimpleTooltip, {
|
|
46335
46429
|
content: "Definya Coin",
|
|
@@ -46366,7 +46460,7 @@ var PanelWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
46366
46460
|
displayName: "HistoryPanel__PanelWrapper",
|
|
46367
46461
|
componentId: "sc-74mioa-0"
|
|
46368
46462
|
})(["display:flex;flex-direction:column;gap:8px;padding:0 2.5%;width:100%;box-sizing:border-box;"]);
|
|
46369
|
-
var FilterRow$
|
|
46463
|
+
var FilterRow$2 = /*#__PURE__*/styled.div.withConfig({
|
|
46370
46464
|
displayName: "HistoryPanel__FilterRow",
|
|
46371
46465
|
componentId: "sc-74mioa-1"
|
|
46372
46466
|
})(["display:flex;align-items:center;gap:12px;background:rgba(0,0,0,0.15);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:8px 12px;"]);
|
|
@@ -46818,6 +46912,7 @@ var Marketplace = function Marketplace(props) {
|
|
|
46818
46912
|
};
|
|
46819
46913
|
var handleBlueprintSelect = function handleBlueprintSelect(blueprint) {
|
|
46820
46914
|
setIsBlueprintSearchOpen(false);
|
|
46915
|
+
props.enableHotkeys == null ? void 0 : props.enableHotkeys();
|
|
46821
46916
|
onBlueprintSelect == null ? void 0 : onBlueprintSelect(blueprint);
|
|
46822
46917
|
};
|
|
46823
46918
|
var showSharedPager = activeTab === 'sell';
|
|
@@ -46889,11 +46984,14 @@ var Marketplace = function Marketplace(props) {
|
|
|
46889
46984
|
yourBuyOrdersTotal: yourBuyOrdersTotal,
|
|
46890
46985
|
yourBuyOrdersPage: yourBuyOrdersPage,
|
|
46891
46986
|
onYourBuyOrdersPageChange: onYourBuyOrdersPageChange != null ? onYourBuyOrdersPageChange : function () {},
|
|
46892
|
-
onCancelBuyOrder: onCancelBuyOrder != null ? onCancelBuyOrder : function () {}
|
|
46987
|
+
onCancelBuyOrder: onCancelBuyOrder != null ? onCancelBuyOrder : function () {},
|
|
46988
|
+
enableHotkeys: props.enableHotkeys,
|
|
46989
|
+
disableHotkeys: props.disableHotkeys
|
|
46893
46990
|
}), React.createElement(BlueprintSearchModal, {
|
|
46894
46991
|
isOpen: isBlueprintSearchOpen,
|
|
46895
46992
|
onClose: function onClose() {
|
|
46896
|
-
|
|
46993
|
+
setIsBlueprintSearchOpen(false);
|
|
46994
|
+
props.enableHotkeys == null ? void 0 : props.enableHotkeys();
|
|
46897
46995
|
},
|
|
46898
46996
|
onSelect: handleBlueprintSelect,
|
|
46899
46997
|
onSearch: onBlueprintSearch != null ? onBlueprintSearch : function () {},
|
|
@@ -46902,7 +47000,9 @@ var Marketplace = function Marketplace(props) {
|
|
|
46902
47000
|
currentPage: blueprintSearchCurrentPage,
|
|
46903
47001
|
isLoading: blueprintSearchIsLoading,
|
|
46904
47002
|
atlasJSON: props.atlasJSON,
|
|
46905
|
-
atlasIMG: props.atlasIMG
|
|
47003
|
+
atlasIMG: props.atlasIMG,
|
|
47004
|
+
enableHotkeys: props.enableHotkeys,
|
|
47005
|
+
disableHotkeys: props.disableHotkeys
|
|
46906
47006
|
})), activeTab === 'history' && React.createElement(HistoryPanel, {
|
|
46907
47007
|
transactions: historyTransactions,
|
|
46908
47008
|
totalCount: historyTotalCount,
|