@rpg-engine/long-bow 0.8.145 → 0.8.148
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/BlueprintTable.d.ts +9 -0
- package/dist/components/Marketplace/BuyOrderDetailsModal.d.ts +2 -0
- package/dist/components/Marketplace/BuyOrderPanel.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +280 -151
- 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 +280 -151
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Marketplace/BlueprintSearchModal.tsx +77 -146
- package/src/components/Marketplace/BlueprintTable.tsx +158 -0
- package/src/components/Marketplace/BuyOrderDetailsModal.tsx +17 -10
- package/src/components/Marketplace/BuyOrderPanel.tsx +75 -22
- package/src/components/Marketplace/HistoryPanel.tsx +1 -1
- package/src/components/Marketplace/Marketplace.tsx +6 -1
- package/src/stories/Features/marketplace/BuyOrderPanel.stories.tsx +197 -81
- package/src/stories/Features/marketplace/HistoryPanel.stories.tsx +3 -3
- package/src/stories/Features/trading/Marketplace.stories.tsx +30 -7
package/dist/long-bow.esm.js
CHANGED
|
@@ -44507,7 +44507,79 @@ var TabButton$1 = /*#__PURE__*/styled.button.withConfig({
|
|
|
44507
44507
|
return $active ? '#ffffff' : '#888888';
|
|
44508
44508
|
});
|
|
44509
44509
|
|
|
44510
|
+
var BlueprintTable = function BlueprintTable(_ref) {
|
|
44511
|
+
var blueprints = _ref.blueprints,
|
|
44512
|
+
atlasJSON = _ref.atlasJSON,
|
|
44513
|
+
atlasIMG = _ref.atlasIMG,
|
|
44514
|
+
onSelect = _ref.onSelect;
|
|
44515
|
+
return React.createElement(React.Fragment, null, React.createElement(ResultsHeader, null, React.createElement("span", null), React.createElement(ColName, null, "Name"), React.createElement(ColType, null, "Type"), React.createElement(ColTier, null, "Tier")), blueprints.map(function (blueprint) {
|
|
44516
|
+
return React.createElement(ResultRow, {
|
|
44517
|
+
key: blueprint.key,
|
|
44518
|
+
"$selectable": !!onSelect,
|
|
44519
|
+
onPointerDown: onSelect ? function () {
|
|
44520
|
+
return onSelect(blueprint);
|
|
44521
|
+
} : undefined
|
|
44522
|
+
}, React.createElement(SpriteWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
44523
|
+
atlasJSON: atlasJSON,
|
|
44524
|
+
atlasIMG: atlasIMG,
|
|
44525
|
+
spriteKey: blueprint.texturePath || blueprint.key,
|
|
44526
|
+
width: 32,
|
|
44527
|
+
height: 32,
|
|
44528
|
+
imgScale: 2,
|
|
44529
|
+
centered: true
|
|
44530
|
+
})), React.createElement(ColName, null, React.createElement(BlueprintName, null, blueprint.name), (blueprint.type || blueprint.subType) && React.createElement(BlueprintMeta, null, [blueprint.type, blueprint.subType].filter(Boolean).filter(function (v, i, arr) {
|
|
44531
|
+
return arr.indexOf(v) === i;
|
|
44532
|
+
}).join(' · '))), React.createElement(ColType, null, React.createElement(TypeText, null, blueprint.type), blueprint.subType && blueprint.subType !== blueprint.type && React.createElement(SubTypeText, null, blueprint.subType)), React.createElement(ColTier, null, "T", blueprint.tier));
|
|
44533
|
+
}));
|
|
44534
|
+
};
|
|
44535
|
+
var tableRowBase = "\n display: grid;\n grid-template-columns: 40px 1fr 120px 50px;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n";
|
|
44536
|
+
var ResultsHeader = /*#__PURE__*/styled.div.withConfig({
|
|
44537
|
+
displayName: "BlueprintTable__ResultsHeader",
|
|
44538
|
+
componentId: "sc-1ysxhx2-0"
|
|
44539
|
+
})(["", " background:rgba(0,0,0,0.4);border-bottom:1px solid rgba(255,255,255,0.1);position:sticky;top:0;z-index:1;> *{font-size:0.45rem;color:#888;text-transform:uppercase;letter-spacing:1px;}"], tableRowBase);
|
|
44540
|
+
var ResultRow = /*#__PURE__*/styled.div.withConfig({
|
|
44541
|
+
displayName: "BlueprintTable__ResultRow",
|
|
44542
|
+
componentId: "sc-1ysxhx2-1"
|
|
44543
|
+
})(["", " border-bottom:1px solid rgba(255,255,255,0.04);cursor:", ";transition:background 0.1s;&:hover{background:", ";}&:last-child{border-bottom:none;}"], tableRowBase, function (p) {
|
|
44544
|
+
return p.$selectable ? 'pointer' : 'default';
|
|
44545
|
+
}, function (p) {
|
|
44546
|
+
return p.$selectable ? 'rgba(245, 158, 11, 0.08)' : 'none';
|
|
44547
|
+
});
|
|
44548
|
+
var SpriteWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
44549
|
+
displayName: "BlueprintTable__SpriteWrapper",
|
|
44550
|
+
componentId: "sc-1ysxhx2-2"
|
|
44551
|
+
})(["display:flex;align-items:center;justify-content:center;width:40px;height:32px;"]);
|
|
44552
|
+
var ColName = /*#__PURE__*/styled.div.withConfig({
|
|
44553
|
+
displayName: "BlueprintTable__ColName",
|
|
44554
|
+
componentId: "sc-1ysxhx2-3"
|
|
44555
|
+
})(["display:flex;flex-direction:column;gap:2px;overflow:hidden;"]);
|
|
44556
|
+
var BlueprintName = /*#__PURE__*/styled.span.withConfig({
|
|
44557
|
+
displayName: "BlueprintTable__BlueprintName",
|
|
44558
|
+
componentId: "sc-1ysxhx2-4"
|
|
44559
|
+
})(["font-size:0.5rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44560
|
+
var BlueprintMeta = /*#__PURE__*/styled.span.withConfig({
|
|
44561
|
+
displayName: "BlueprintTable__BlueprintMeta",
|
|
44562
|
+
componentId: "sc-1ysxhx2-5"
|
|
44563
|
+
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44564
|
+
var ColType = /*#__PURE__*/styled.div.withConfig({
|
|
44565
|
+
displayName: "BlueprintTable__ColType",
|
|
44566
|
+
componentId: "sc-1ysxhx2-6"
|
|
44567
|
+
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
44568
|
+
var TypeText = /*#__PURE__*/styled.span.withConfig({
|
|
44569
|
+
displayName: "BlueprintTable__TypeText",
|
|
44570
|
+
componentId: "sc-1ysxhx2-7"
|
|
44571
|
+
})(["font-size:0.45rem;color:#aaa;"]);
|
|
44572
|
+
var SubTypeText = /*#__PURE__*/styled.span.withConfig({
|
|
44573
|
+
displayName: "BlueprintTable__SubTypeText",
|
|
44574
|
+
componentId: "sc-1ysxhx2-8"
|
|
44575
|
+
})(["font-size:0.4rem;color:#666;"]);
|
|
44576
|
+
var ColTier = /*#__PURE__*/styled.div.withConfig({
|
|
44577
|
+
displayName: "BlueprintTable__ColTier",
|
|
44578
|
+
componentId: "sc-1ysxhx2-9"
|
|
44579
|
+
})(["font-size:0.5rem;color:#f59e0b;text-align:center;"]);
|
|
44580
|
+
|
|
44510
44581
|
var BLUEPRINTS_PER_PAGE = 10;
|
|
44582
|
+
var scaleIn = /*#__PURE__*/keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
44511
44583
|
var typeOptions = /*#__PURE__*/[{
|
|
44512
44584
|
id: 1,
|
|
44513
44585
|
value: '',
|
|
@@ -44544,7 +44616,9 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44544
44616
|
currentPage = _ref.currentPage,
|
|
44545
44617
|
isLoading = _ref.isLoading,
|
|
44546
44618
|
atlasJSON = _ref.atlasJSON,
|
|
44547
|
-
atlasIMG = _ref.atlasIMG
|
|
44619
|
+
atlasIMG = _ref.atlasIMG,
|
|
44620
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
44621
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
44548
44622
|
var _useState = useState(''),
|
|
44549
44623
|
searchName = _useState[0],
|
|
44550
44624
|
setSearchName = _useState[1];
|
|
@@ -44554,24 +44628,40 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44554
44628
|
var _useState3 = useState(''),
|
|
44555
44629
|
selectedSubType = _useState3[0],
|
|
44556
44630
|
setSelectedSubType = _useState3[1];
|
|
44557
|
-
|
|
44558
|
-
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) {
|
|
44559
44638
|
var _overrides$name, _overrides$itemType, _overrides$itemSubTyp, _overrides$page;
|
|
44560
44639
|
onSearch({
|
|
44561
44640
|
npcId: '',
|
|
44562
|
-
name: (_overrides$name = overrides == null ? void 0 : overrides.name) != null ? _overrides$name :
|
|
44563
|
-
itemType: (_overrides$itemType = overrides == null ? void 0 : overrides.itemType) != null ? _overrides$itemType :
|
|
44564
|
-
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,
|
|
44565
44644
|
page: (_overrides$page = overrides == null ? void 0 : overrides.page) != null ? _overrides$page : 1,
|
|
44566
44645
|
limit: BLUEPRINTS_PER_PAGE
|
|
44567
44646
|
});
|
|
44568
|
-
};
|
|
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;
|
|
44569
44662
|
var handleNameChange = function handleNameChange(e) {
|
|
44570
44663
|
setSearchName(e.target.value);
|
|
44571
|
-
|
|
44572
|
-
name: e.target.value,
|
|
44573
|
-
page: 1
|
|
44574
|
-
});
|
|
44664
|
+
debouncedNameSearch(e.target.value);
|
|
44575
44665
|
};
|
|
44576
44666
|
var handleTypeChange = function handleTypeChange(value) {
|
|
44577
44667
|
setSelectedType(value);
|
|
@@ -44611,7 +44701,9 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44611
44701
|
}, React.createElement(FaTimes, null))), React.createElement(InputWrapper, null, React.createElement("p", null, "SEARCH"), React.createElement(StyledInput$2, {
|
|
44612
44702
|
value: searchName,
|
|
44613
44703
|
onChange: handleNameChange,
|
|
44614
|
-
placeholder: "Search by name..."
|
|
44704
|
+
placeholder: "Search by name...",
|
|
44705
|
+
onFocus: disableHotkeys,
|
|
44706
|
+
onBlur: enableHotkeys
|
|
44615
44707
|
})), React.createElement(FiltersRow, null, React.createElement(StyledDropdown$2, {
|
|
44616
44708
|
key: "type-" + selectedType,
|
|
44617
44709
|
options: typeOptions,
|
|
@@ -44622,22 +44714,14 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44622
44714
|
options: subTypeOptions,
|
|
44623
44715
|
onChange: handleSubTypeChange,
|
|
44624
44716
|
width: "100%"
|
|
44625
|
-
})), React.createElement(ResultsWrapper, null,
|
|
44626
|
-
|
|
44627
|
-
|
|
44628
|
-
|
|
44629
|
-
|
|
44630
|
-
|
|
44631
|
-
|
|
44632
|
-
|
|
44633
|
-
atlasIMG: atlasIMG,
|
|
44634
|
-
spriteKey: blueprint.texturePath || blueprint.key,
|
|
44635
|
-
width: 32,
|
|
44636
|
-
height: 32,
|
|
44637
|
-
imgScale: 2,
|
|
44638
|
-
centered: true
|
|
44639
|
-
})), React.createElement(ColName, null, React.createElement(BlueprintName, null, blueprint.name), React.createElement(BlueprintKey, null, blueprint.key)), React.createElement(ColType, null, React.createElement(TypeText, null, blueprint.type), blueprint.subType && blueprint.subType !== blueprint.type && React.createElement(SubTypeText, null, blueprint.subType)), React.createElement(ColTier, null, "T", blueprint.tier));
|
|
44640
|
-
}))), React.createElement(PagerContainer$1, null, React.createElement(Pager, {
|
|
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, {
|
|
44720
|
+
blueprints: blueprints,
|
|
44721
|
+
atlasJSON: atlasJSON,
|
|
44722
|
+
atlasIMG: atlasIMG,
|
|
44723
|
+
onSelect: onSelect
|
|
44724
|
+
})), isLoading && React.createElement(LoadingOverlay, null, React.createElement(LoadingText, null, "Loading..."))), React.createElement(PagerContainer$1, null, React.createElement(Pager, {
|
|
44641
44725
|
totalItems: totalCount,
|
|
44642
44726
|
currentPage: currentPage,
|
|
44643
44727
|
itemsPerPage: BLUEPRINTS_PER_PAGE,
|
|
@@ -44655,7 +44739,7 @@ var ModalContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
44655
44739
|
var ModalContent$2 = /*#__PURE__*/styled.div.withConfig({
|
|
44656
44740
|
displayName: "BlueprintSearchModal__ModalContent",
|
|
44657
44741
|
componentId: "sc-i7bssq-2"
|
|
44658
|
-
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:600px;max-width:90%;display:flex;flex-direction:column;gap:12px;pointer-events:auto;animation:
|
|
44742
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:600px;max-width:90%;display:flex;flex-direction:column;gap:12px;pointer-events:auto;animation:", " 0.15s ease-out;"], scaleIn);
|
|
44659
44743
|
var Header$8 = /*#__PURE__*/styled.div.withConfig({
|
|
44660
44744
|
displayName: "BlueprintSearchModal__Header",
|
|
44661
44745
|
componentId: "sc-i7bssq-3"
|
|
@@ -44675,7 +44759,7 @@ var InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
44675
44759
|
var StyledInput$2 = /*#__PURE__*/styled(Input).withConfig({
|
|
44676
44760
|
displayName: "BlueprintSearchModal__StyledInput",
|
|
44677
44761
|
componentId: "sc-i7bssq-7"
|
|
44678
|
-
})(["flex:1;
|
|
44762
|
+
})(["flex:1;"]);
|
|
44679
44763
|
var FiltersRow = /*#__PURE__*/styled.div.withConfig({
|
|
44680
44764
|
displayName: "BlueprintSearchModal__FiltersRow",
|
|
44681
44765
|
componentId: "sc-i7bssq-8"
|
|
@@ -44687,57 +44771,67 @@ var StyledDropdown$2 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
|
44687
44771
|
var ResultsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
44688
44772
|
displayName: "BlueprintSearchModal__ResultsWrapper",
|
|
44689
44773
|
componentId: "sc-i7bssq-10"
|
|
44690
|
-
})(["overflow-y:auto;
|
|
44691
|
-
var
|
|
44692
|
-
|
|
44693
|
-
displayName: "BlueprintSearchModal__ResultsHeader",
|
|
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",
|
|
44694
44777
|
componentId: "sc-i7bssq-11"
|
|
44695
|
-
})(["", "
|
|
44696
|
-
|
|
44697
|
-
|
|
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",
|
|
44698
44783
|
componentId: "sc-i7bssq-12"
|
|
44699
|
-
})(["
|
|
44700
|
-
var
|
|
44701
|
-
displayName: "
|
|
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",
|
|
44702
44787
|
componentId: "sc-i7bssq-13"
|
|
44703
|
-
})(["
|
|
44704
|
-
var ColName = /*#__PURE__*/styled.div.withConfig({
|
|
44705
|
-
displayName: "BlueprintSearchModal__ColName",
|
|
44706
|
-
componentId: "sc-i7bssq-14"
|
|
44707
|
-
})(["display:flex;flex-direction:column;gap:2px;overflow:hidden;"]);
|
|
44708
|
-
var BlueprintName = /*#__PURE__*/styled.span.withConfig({
|
|
44709
|
-
displayName: "BlueprintSearchModal__BlueprintName",
|
|
44710
|
-
componentId: "sc-i7bssq-15"
|
|
44711
|
-
})(["font-size:0.5rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44712
|
-
var BlueprintKey = /*#__PURE__*/styled.span.withConfig({
|
|
44713
|
-
displayName: "BlueprintSearchModal__BlueprintKey",
|
|
44714
|
-
componentId: "sc-i7bssq-16"
|
|
44715
|
-
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44716
|
-
var ColType = /*#__PURE__*/styled.div.withConfig({
|
|
44717
|
-
displayName: "BlueprintSearchModal__ColType",
|
|
44718
|
-
componentId: "sc-i7bssq-17"
|
|
44719
|
-
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
44720
|
-
var TypeText = /*#__PURE__*/styled.span.withConfig({
|
|
44721
|
-
displayName: "BlueprintSearchModal__TypeText",
|
|
44722
|
-
componentId: "sc-i7bssq-18"
|
|
44723
|
-
})(["font-size:0.45rem;color:#aaa;"]);
|
|
44724
|
-
var SubTypeText = /*#__PURE__*/styled.span.withConfig({
|
|
44725
|
-
displayName: "BlueprintSearchModal__SubTypeText",
|
|
44726
|
-
componentId: "sc-i7bssq-19"
|
|
44727
|
-
})(["font-size:0.4rem;color:#666;"]);
|
|
44728
|
-
var ColTier = /*#__PURE__*/styled.div.withConfig({
|
|
44729
|
-
displayName: "BlueprintSearchModal__ColTier",
|
|
44730
|
-
componentId: "sc-i7bssq-20"
|
|
44731
|
-
})(["font-size:0.5rem;color:#f59e0b;text-align:center;"]);
|
|
44788
|
+
})(["font-size:0.55rem;color:#f59e0b;text-transform:uppercase;letter-spacing:1px;"]);
|
|
44732
44789
|
var EmptyState$2 = /*#__PURE__*/styled.div.withConfig({
|
|
44733
44790
|
displayName: "BlueprintSearchModal__EmptyState",
|
|
44734
|
-
componentId: "sc-i7bssq-
|
|
44735
|
-
})(["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;"]);
|
|
44736
44793
|
var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
44737
44794
|
displayName: "BlueprintSearchModal__PagerContainer",
|
|
44738
|
-
componentId: "sc-i7bssq-
|
|
44795
|
+
componentId: "sc-i7bssq-15"
|
|
44739
44796
|
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
44740
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
|
+
|
|
44834
|
+
var scaleIn$1 = /*#__PURE__*/keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
44741
44835
|
var rarityOptions = [{
|
|
44742
44836
|
id: 1,
|
|
44743
44837
|
value: 'Common',
|
|
@@ -44771,7 +44865,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44771
44865
|
onRarityChange = _ref.onRarityChange,
|
|
44772
44866
|
onConfirm = _ref.onConfirm,
|
|
44773
44867
|
atlasJSON = _ref.atlasJSON,
|
|
44774
|
-
atlasIMG = _ref.atlasIMG
|
|
44868
|
+
atlasIMG = _ref.atlasIMG,
|
|
44869
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
44870
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
44775
44871
|
if (!isOpen || !blueprint) return null;
|
|
44776
44872
|
var stopPropagation = function stopPropagation(e) {
|
|
44777
44873
|
e.stopPropagation();
|
|
@@ -44796,14 +44892,18 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44796
44892
|
width: 32,
|
|
44797
44893
|
height: 32,
|
|
44798
44894
|
imgScale: 2
|
|
44799
|
-
})), React.createElement(ItemInfo$1, null, React.createElement(ItemName, null, blueprint.name), React.createElement(
|
|
44895
|
+
})), React.createElement(ItemInfo$1, null, React.createElement(ItemName, null, blueprint.name), React.createElement(ItemMeta, null, [blueprint.type, blueprint.subType].filter(Boolean).filter(function (v, i, arr) {
|
|
44896
|
+
return arr.indexOf(v) === i;
|
|
44897
|
+
}).join(' · '), " \xB7 T", blueprint.tier))), React.createElement(FormSection, null, React.createElement(FieldRow, null, React.createElement(Label$4, null, "Quantity"), React.createElement(StyledInput$3, {
|
|
44800
44898
|
value: quantity || '',
|
|
44801
44899
|
onChange: function onChange(e) {
|
|
44802
44900
|
return onQuantityChange(Number(e.target.value));
|
|
44803
44901
|
},
|
|
44804
44902
|
placeholder: "Qty",
|
|
44805
44903
|
type: "number",
|
|
44806
|
-
min: 1
|
|
44904
|
+
min: 1,
|
|
44905
|
+
onFocus: disableHotkeys,
|
|
44906
|
+
onBlur: enableHotkeys
|
|
44807
44907
|
})), React.createElement(FieldRow, null, React.createElement(Label$4, null, "Max Gold"), React.createElement(StyledInput$3, {
|
|
44808
44908
|
value: maxPrice || '',
|
|
44809
44909
|
onChange: function onChange(e) {
|
|
@@ -44811,7 +44911,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44811
44911
|
},
|
|
44812
44912
|
placeholder: "Max gold",
|
|
44813
44913
|
type: "number",
|
|
44814
|
-
min: 1
|
|
44914
|
+
min: 1,
|
|
44915
|
+
onFocus: disableHotkeys,
|
|
44916
|
+
onBlur: enableHotkeys
|
|
44815
44917
|
})), React.createElement(FieldRow, null, React.createElement(Label$4, null, "Rarity"), React.createElement(StyledDropdown$3, {
|
|
44816
44918
|
key: rarity,
|
|
44817
44919
|
options: rarityOptions,
|
|
@@ -44840,7 +44942,7 @@ var ModalContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
44840
44942
|
var ModalContent$3 = /*#__PURE__*/styled.div.withConfig({
|
|
44841
44943
|
displayName: "BuyOrderDetailsModal__ModalContent",
|
|
44842
44944
|
componentId: "sc-6bghe9-2"
|
|
44843
|
-
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:400px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:
|
|
44945
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:400px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:", " 0.15s ease-out;"], scaleIn$1);
|
|
44844
44946
|
var Header$9 = /*#__PURE__*/styled.div.withConfig({
|
|
44845
44947
|
displayName: "BuyOrderDetailsModal__Header",
|
|
44846
44948
|
componentId: "sc-6bghe9-3"
|
|
@@ -44869,8 +44971,8 @@ var ItemName = /*#__PURE__*/styled.span.withConfig({
|
|
|
44869
44971
|
displayName: "BuyOrderDetailsModal__ItemName",
|
|
44870
44972
|
componentId: "sc-6bghe9-9"
|
|
44871
44973
|
})(["font-size:0.55rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44872
|
-
var
|
|
44873
|
-
displayName: "
|
|
44974
|
+
var ItemMeta = /*#__PURE__*/styled.span.withConfig({
|
|
44975
|
+
displayName: "BuyOrderDetailsModal__ItemMeta",
|
|
44874
44976
|
componentId: "sc-6bghe9-10"
|
|
44875
44977
|
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44876
44978
|
var FormSection = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -44888,7 +44990,7 @@ var Label$4 = /*#__PURE__*/styled.label.withConfig({
|
|
|
44888
44990
|
var StyledInput$3 = /*#__PURE__*/styled(Input).withConfig({
|
|
44889
44991
|
displayName: "BuyOrderDetailsModal__StyledInput",
|
|
44890
44992
|
componentId: "sc-6bghe9-14"
|
|
44891
|
-
})(["
|
|
44993
|
+
})(["width:100%;"]);
|
|
44892
44994
|
var StyledDropdown$3 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
44893
44995
|
displayName: "BuyOrderDetailsModal__StyledDropdown",
|
|
44894
44996
|
componentId: "sc-6bghe9-15"
|
|
@@ -44934,9 +45036,9 @@ var Pill = /*#__PURE__*/styled.span.withConfig({
|
|
|
44934
45036
|
|
|
44935
45037
|
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
44936
45038
|
var children = _ref.children;
|
|
44937
|
-
return React.createElement(Container$
|
|
45039
|
+
return React.createElement(Container$C, null, children);
|
|
44938
45040
|
};
|
|
44939
|
-
var Container$
|
|
45041
|
+
var Container$C = /*#__PURE__*/styled.div.withConfig({
|
|
44940
45042
|
displayName: "RPGUIScrollbar__Container",
|
|
44941
45043
|
componentId: "sc-p3msmb-0"
|
|
44942
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;}"]);
|
|
@@ -45265,18 +45367,45 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45265
45367
|
yourBuyOrdersTotal = props.yourBuyOrdersTotal,
|
|
45266
45368
|
yourBuyOrdersPage = props.yourBuyOrdersPage,
|
|
45267
45369
|
onYourBuyOrdersPageChange = props.onYourBuyOrdersPageChange,
|
|
45268
|
-
onCancelBuyOrder = props.onCancelBuyOrder
|
|
45370
|
+
onCancelBuyOrder = props.onCancelBuyOrder,
|
|
45371
|
+
enableHotkeys = props.enableHotkeys,
|
|
45372
|
+
disableHotkeys = props.disableHotkeys;
|
|
45373
|
+
// Local blueprint display: cleared immediately on Place Request so the
|
|
45374
|
+
// panel returns to "Select Item" without waiting for the consumer to update
|
|
45375
|
+
// the prop. Cancel keeps it shown so the user can reopen the modal.
|
|
45376
|
+
var _useState = useState(selectedBlueprint),
|
|
45377
|
+
displayedBlueprint = _useState[0],
|
|
45378
|
+
setDisplayedBlueprint = _useState[1];
|
|
45379
|
+
var _useState2 = useState(!!selectedBlueprint),
|
|
45380
|
+
isDetailsOpen = _useState2[0],
|
|
45381
|
+
setIsDetailsOpen = _useState2[1];
|
|
45382
|
+
var _useState3 = useState('Active'),
|
|
45383
|
+
statusFilter = _useState3[0],
|
|
45384
|
+
setStatusFilter = _useState3[1];
|
|
45385
|
+
// Sync when consumer provides a new blueprint (e.g. after search selection)
|
|
45386
|
+
useEffect(function () {
|
|
45387
|
+
if (selectedBlueprint) {
|
|
45388
|
+
setDisplayedBlueprint(selectedBlueprint);
|
|
45389
|
+
setIsDetailsOpen(true);
|
|
45390
|
+
}
|
|
45391
|
+
}, [selectedBlueprint]);
|
|
45392
|
+
// Place request: clear display + close modal, then notify consumer
|
|
45269
45393
|
var handleConfirm = function handleConfirm() {
|
|
45270
45394
|
onPlaceBuyOrder();
|
|
45395
|
+
setDisplayedBlueprint(undefined);
|
|
45396
|
+
setIsDetailsOpen(false);
|
|
45271
45397
|
onCloseDetails == null ? void 0 : onCloseDetails();
|
|
45398
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
45272
45399
|
};
|
|
45400
|
+
// Cancel: just close the modal, keep blueprint displayed for reopening
|
|
45273
45401
|
var handleCloseDetails = function handleCloseDetails() {
|
|
45274
|
-
|
|
45402
|
+
setIsDetailsOpen(false);
|
|
45403
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
45275
45404
|
};
|
|
45276
|
-
return React.createElement(PanelWrapper, null,
|
|
45405
|
+
return React.createElement(PanelWrapper, null, displayedBlueprint && isDetailsOpen && React.createElement(BuyOrderDetailsModal, {
|
|
45277
45406
|
isOpen: true,
|
|
45278
45407
|
onClose: handleCloseDetails,
|
|
45279
|
-
blueprint:
|
|
45408
|
+
blueprint: displayedBlueprint,
|
|
45280
45409
|
quantity: currentQuantity,
|
|
45281
45410
|
maxPrice: currentMaxPrice,
|
|
45282
45411
|
rarity: selectedRarity,
|
|
@@ -45285,20 +45414,22 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45285
45414
|
onRarityChange: onRarityChange,
|
|
45286
45415
|
onConfirm: handleConfirm,
|
|
45287
45416
|
atlasJSON: atlasJSON,
|
|
45288
|
-
atlasIMG: atlasIMG
|
|
45289
|
-
|
|
45417
|
+
atlasIMG: atlasIMG,
|
|
45418
|
+
enableHotkeys: enableHotkeys,
|
|
45419
|
+
disableHotkeys: disableHotkeys
|
|
45420
|
+
}), React.createElement(FormRow, null, displayedBlueprint ? React.createElement(SelectedBlueprintDisplay, {
|
|
45290
45421
|
onPointerDown: onOpenBlueprintSearch
|
|
45291
45422
|
}, React.createElement(RarityContainer, {
|
|
45292
45423
|
"$rarity": selectedRarity
|
|
45293
45424
|
}, React.createElement(SpriteFromAtlas, {
|
|
45294
45425
|
atlasIMG: atlasIMG,
|
|
45295
45426
|
atlasJSON: atlasJSON,
|
|
45296
|
-
spriteKey:
|
|
45427
|
+
spriteKey: displayedBlueprint.texturePath || displayedBlueprint.key,
|
|
45297
45428
|
width: 32,
|
|
45298
45429
|
height: 32,
|
|
45299
45430
|
imgScale: 2,
|
|
45300
45431
|
centered: true
|
|
45301
|
-
})), React.createElement(ChangeTextWrapper, null, React.createElement(BlueprintName$1, null,
|
|
45432
|
+
})), React.createElement(ChangeTextWrapper, null, React.createElement(BlueprintName$1, null, displayedBlueprint.name), React.createElement(ChangeText, null, "change"))) : React.createElement(CTAButton, {
|
|
45302
45433
|
icon: React.createElement(Search, {
|
|
45303
45434
|
width: 18,
|
|
45304
45435
|
height: 18
|
|
@@ -45306,18 +45437,41 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45306
45437
|
label: "Select Item",
|
|
45307
45438
|
iconColor: "#f59e0b",
|
|
45308
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
|
+
}
|
|
45309
45458
|
})), React.createElement(ScrollArea, {
|
|
45310
45459
|
id: "MarketContainer"
|
|
45311
|
-
}, React.createElement(Section$1, null,
|
|
45312
|
-
|
|
45313
|
-
|
|
45314
|
-
buyOrder: order,
|
|
45315
|
-
atlasJSON: atlasJSON,
|
|
45316
|
-
atlasIMG: atlasIMG,
|
|
45317
|
-
isOwn: true,
|
|
45318
|
-
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];
|
|
45319
45463
|
});
|
|
45320
|
-
|
|
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, {
|
|
45321
45475
|
totalItems: yourBuyOrdersTotal,
|
|
45322
45476
|
currentPage: yourBuyOrdersPage,
|
|
45323
45477
|
itemsPerPage: BUY_ORDERS_PER_PAGE,
|
|
@@ -45332,25 +45486,29 @@ var FormRow = /*#__PURE__*/styled.div.withConfig({
|
|
|
45332
45486
|
displayName: "BuyOrderPanel__FormRow",
|
|
45333
45487
|
componentId: "sc-1eb11ct-1"
|
|
45334
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;"]);
|
|
45335
45493
|
var ScrollArea = /*#__PURE__*/styled.div.withConfig({
|
|
45336
45494
|
displayName: "BuyOrderPanel__ScrollArea",
|
|
45337
|
-
componentId: "sc-1eb11ct-
|
|
45495
|
+
componentId: "sc-1eb11ct-3"
|
|
45338
45496
|
})(["display:flex;flex-direction:column;gap:6px;overflow-y:scroll;max-height:420px;"]);
|
|
45339
45497
|
var Section$1 = /*#__PURE__*/styled.div.withConfig({
|
|
45340
45498
|
displayName: "BuyOrderPanel__Section",
|
|
45341
|
-
componentId: "sc-1eb11ct-
|
|
45499
|
+
componentId: "sc-1eb11ct-4"
|
|
45342
45500
|
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
45343
45501
|
var SectionTitle$1 = /*#__PURE__*/styled.p.withConfig({
|
|
45344
45502
|
displayName: "BuyOrderPanel__SectionTitle",
|
|
45345
|
-
componentId: "sc-1eb11ct-
|
|
45503
|
+
componentId: "sc-1eb11ct-5"
|
|
45346
45504
|
})(["margin:0 0 2px 0;font-size:0.45rem;color:#666;text-transform:uppercase;letter-spacing:1px;"]);
|
|
45347
45505
|
var SelectedBlueprintDisplay = /*#__PURE__*/styled.button.withConfig({
|
|
45348
45506
|
displayName: "BuyOrderPanel__SelectedBlueprintDisplay",
|
|
45349
|
-
componentId: "sc-1eb11ct-
|
|
45507
|
+
componentId: "sc-1eb11ct-6"
|
|
45350
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);}"]);
|
|
45351
45509
|
var RarityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
45352
45510
|
displayName: "BuyOrderPanel__RarityContainer",
|
|
45353
|
-
componentId: "sc-1eb11ct-
|
|
45511
|
+
componentId: "sc-1eb11ct-7"
|
|
45354
45512
|
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref) {
|
|
45355
45513
|
var $rarity = _ref.$rarity;
|
|
45356
45514
|
return rarityColor({
|
|
@@ -45369,61 +45527,25 @@ var RarityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
45369
45527
|
});
|
|
45370
45528
|
var ChangeTextWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
45371
45529
|
displayName: "BuyOrderPanel__ChangeTextWrapper",
|
|
45372
|
-
componentId: "sc-1eb11ct-
|
|
45530
|
+
componentId: "sc-1eb11ct-8"
|
|
45373
45531
|
})(["display:flex;flex-direction:column;gap:2px;min-width:0;"]);
|
|
45374
45532
|
var BlueprintName$1 = /*#__PURE__*/styled.span.withConfig({
|
|
45375
45533
|
displayName: "BuyOrderPanel__BlueprintName",
|
|
45376
|
-
componentId: "sc-1eb11ct-
|
|
45534
|
+
componentId: "sc-1eb11ct-9"
|
|
45377
45535
|
})(["font-size:0.5rem;color:#ddd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]);
|
|
45378
45536
|
var ChangeText = /*#__PURE__*/styled.span.withConfig({
|
|
45379
45537
|
displayName: "BuyOrderPanel__ChangeText",
|
|
45380
|
-
componentId: "sc-1eb11ct-
|
|
45538
|
+
componentId: "sc-1eb11ct-10"
|
|
45381
45539
|
})(["font-size:0.4rem;color:#f59e0b;"]);
|
|
45382
45540
|
var EmptyState$3 = /*#__PURE__*/styled.div.withConfig({
|
|
45383
45541
|
displayName: "BuyOrderPanel__EmptyState",
|
|
45384
|
-
componentId: "sc-1eb11ct-
|
|
45542
|
+
componentId: "sc-1eb11ct-11"
|
|
45385
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;"]);
|
|
45386
45544
|
var PagerRow = /*#__PURE__*/styled.div.withConfig({
|
|
45387
45545
|
displayName: "BuyOrderPanel__PagerRow",
|
|
45388
|
-
componentId: "sc-1eb11ct-
|
|
45546
|
+
componentId: "sc-1eb11ct-12"
|
|
45389
45547
|
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
45390
45548
|
|
|
45391
|
-
var SegmentedToggle = function SegmentedToggle(_ref) {
|
|
45392
|
-
var options = _ref.options,
|
|
45393
|
-
activeId = _ref.activeId,
|
|
45394
|
-
onChange = _ref.onChange,
|
|
45395
|
-
className = _ref.className;
|
|
45396
|
-
return React.createElement(Container$C, {
|
|
45397
|
-
className: className
|
|
45398
|
-
}, options.map(function (option) {
|
|
45399
|
-
return React.createElement(OptionButton, {
|
|
45400
|
-
key: option.id,
|
|
45401
|
-
type: "button",
|
|
45402
|
-
"$active": option.id === activeId,
|
|
45403
|
-
onClick: function onClick() {
|
|
45404
|
-
return onChange(option.id);
|
|
45405
|
-
}
|
|
45406
|
-
}, option.label);
|
|
45407
|
-
}));
|
|
45408
|
-
};
|
|
45409
|
-
var Container$C = /*#__PURE__*/styled.div.withConfig({
|
|
45410
|
-
displayName: "SegmentedToggle__Container",
|
|
45411
|
-
componentId: "sc-1itx2kn-0"
|
|
45412
|
-
})(["display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;"]);
|
|
45413
|
-
var OptionButton = /*#__PURE__*/styled.button.withConfig({
|
|
45414
|
-
displayName: "SegmentedToggle__OptionButton",
|
|
45415
|
-
componentId: "sc-1itx2kn-1"
|
|
45416
|
-
})(["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) {
|
|
45417
|
-
var $active = _ref2.$active;
|
|
45418
|
-
return $active ? 'rgba(245, 158, 11, 0.75)' : 'rgba(255, 255, 255, 0.08)';
|
|
45419
|
-
}, function (_ref3) {
|
|
45420
|
-
var $active = _ref3.$active;
|
|
45421
|
-
return $active ? 'rgba(245, 158, 11, 0.16)' : 'rgba(0, 0, 0, 0.18)';
|
|
45422
|
-
}, function (_ref4) {
|
|
45423
|
-
var $active = _ref4.$active;
|
|
45424
|
-
return $active ? '#fde68a' : '#cfcfcf';
|
|
45425
|
-
});
|
|
45426
|
-
|
|
45427
45549
|
var MarketplaceBuyModal = function MarketplaceBuyModal(_ref) {
|
|
45428
45550
|
var goldPrice = _ref.goldPrice,
|
|
45429
45551
|
dcEquivalentPrice = _ref.dcEquivalentPrice,
|
|
@@ -46267,7 +46389,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46267
46389
|
var getDCEquivalentPrice = function getDCEquivalentPrice(goldPrice) {
|
|
46268
46390
|
return dcToGoldSwapRate > 0 ? goldToDC(goldPrice) : 0;
|
|
46269
46391
|
};
|
|
46270
|
-
return React.createElement(PanelWrapper$1, null, React.createElement(FilterRow$
|
|
46392
|
+
return React.createElement(PanelWrapper$1, null, React.createElement(FilterRow$2, null, React.createElement(FilterLabel$1, null, "FILTER BY TYPE"), React.createElement(StyledDropdown$5, {
|
|
46271
46393
|
key: selectedType,
|
|
46272
46394
|
options: transactionTypeOptions,
|
|
46273
46395
|
onChange: onTypeChange,
|
|
@@ -46275,6 +46397,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46275
46397
|
})), React.createElement(ScrollArea$1, {
|
|
46276
46398
|
id: "MarketContainer"
|
|
46277
46399
|
}, transactions.length === 0 ? React.createElement(EmptyState$5, null, "No transactions yet") : transactions.map(function (tx, index) {
|
|
46400
|
+
var _tx$metadata;
|
|
46278
46401
|
return React.createElement(RowWrapper$1, {
|
|
46279
46402
|
key: index,
|
|
46280
46403
|
"$even": index % 2 === 0,
|
|
@@ -46285,7 +46408,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46285
46408
|
fontSize: "10px"
|
|
46286
46409
|
}, 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, {
|
|
46287
46410
|
"$bg": TRANSACTION_TYPE_COLORS$1[tx.type]
|
|
46288
|
-
}, 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' ?
|
|
46411
|
+
}, 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' ?
|
|
46289
46412
|
// Show DC only
|
|
46290
46413
|
React.createElement(DCPriceRow$1, null, atlasIMG && atlasJSON && React.createElement(DCCoinWrapper$1, null, React.createElement(SimpleTooltip, {
|
|
46291
46414
|
content: "Definya Coin",
|
|
@@ -46322,7 +46445,7 @@ var PanelWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
46322
46445
|
displayName: "HistoryPanel__PanelWrapper",
|
|
46323
46446
|
componentId: "sc-74mioa-0"
|
|
46324
46447
|
})(["display:flex;flex-direction:column;gap:8px;padding:0 2.5%;width:100%;box-sizing:border-box;"]);
|
|
46325
|
-
var FilterRow$
|
|
46448
|
+
var FilterRow$2 = /*#__PURE__*/styled.div.withConfig({
|
|
46326
46449
|
displayName: "HistoryPanel__FilterRow",
|
|
46327
46450
|
componentId: "sc-74mioa-1"
|
|
46328
46451
|
})(["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;"]);
|
|
@@ -46774,6 +46897,7 @@ var Marketplace = function Marketplace(props) {
|
|
|
46774
46897
|
};
|
|
46775
46898
|
var handleBlueprintSelect = function handleBlueprintSelect(blueprint) {
|
|
46776
46899
|
setIsBlueprintSearchOpen(false);
|
|
46900
|
+
props.enableHotkeys == null ? void 0 : props.enableHotkeys();
|
|
46777
46901
|
onBlueprintSelect == null ? void 0 : onBlueprintSelect(blueprint);
|
|
46778
46902
|
};
|
|
46779
46903
|
var showSharedPager = activeTab === 'sell';
|
|
@@ -46845,11 +46969,14 @@ var Marketplace = function Marketplace(props) {
|
|
|
46845
46969
|
yourBuyOrdersTotal: yourBuyOrdersTotal,
|
|
46846
46970
|
yourBuyOrdersPage: yourBuyOrdersPage,
|
|
46847
46971
|
onYourBuyOrdersPageChange: onYourBuyOrdersPageChange != null ? onYourBuyOrdersPageChange : function () {},
|
|
46848
|
-
onCancelBuyOrder: onCancelBuyOrder != null ? onCancelBuyOrder : function () {}
|
|
46972
|
+
onCancelBuyOrder: onCancelBuyOrder != null ? onCancelBuyOrder : function () {},
|
|
46973
|
+
enableHotkeys: props.enableHotkeys,
|
|
46974
|
+
disableHotkeys: props.disableHotkeys
|
|
46849
46975
|
}), React.createElement(BlueprintSearchModal, {
|
|
46850
46976
|
isOpen: isBlueprintSearchOpen,
|
|
46851
46977
|
onClose: function onClose() {
|
|
46852
|
-
|
|
46978
|
+
setIsBlueprintSearchOpen(false);
|
|
46979
|
+
props.enableHotkeys == null ? void 0 : props.enableHotkeys();
|
|
46853
46980
|
},
|
|
46854
46981
|
onSelect: handleBlueprintSelect,
|
|
46855
46982
|
onSearch: onBlueprintSearch != null ? onBlueprintSearch : function () {},
|
|
@@ -46858,7 +46985,9 @@ var Marketplace = function Marketplace(props) {
|
|
|
46858
46985
|
currentPage: blueprintSearchCurrentPage,
|
|
46859
46986
|
isLoading: blueprintSearchIsLoading,
|
|
46860
46987
|
atlasJSON: props.atlasJSON,
|
|
46861
|
-
atlasIMG: props.atlasIMG
|
|
46988
|
+
atlasIMG: props.atlasIMG,
|
|
46989
|
+
enableHotkeys: props.enableHotkeys,
|
|
46990
|
+
disableHotkeys: props.disableHotkeys
|
|
46862
46991
|
})), activeTab === 'history' && React.createElement(HistoryPanel, {
|
|
46863
46992
|
transactions: historyTransactions,
|
|
46864
46993
|
totalCount: historyTotalCount,
|