@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
|
@@ -44510,7 +44510,79 @@ var TabButton$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
|
44510
44510
|
return $active ? '#ffffff' : '#888888';
|
|
44511
44511
|
});
|
|
44512
44512
|
|
|
44513
|
+
var BlueprintTable = function BlueprintTable(_ref) {
|
|
44514
|
+
var blueprints = _ref.blueprints,
|
|
44515
|
+
atlasJSON = _ref.atlasJSON,
|
|
44516
|
+
atlasIMG = _ref.atlasIMG,
|
|
44517
|
+
onSelect = _ref.onSelect;
|
|
44518
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ResultsHeader, null, React__default.createElement("span", null), React__default.createElement(ColName, null, "Name"), React__default.createElement(ColType, null, "Type"), React__default.createElement(ColTier, null, "Tier")), blueprints.map(function (blueprint) {
|
|
44519
|
+
return React__default.createElement(ResultRow, {
|
|
44520
|
+
key: blueprint.key,
|
|
44521
|
+
"$selectable": !!onSelect,
|
|
44522
|
+
onPointerDown: onSelect ? function () {
|
|
44523
|
+
return onSelect(blueprint);
|
|
44524
|
+
} : undefined
|
|
44525
|
+
}, React__default.createElement(SpriteWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
44526
|
+
atlasJSON: atlasJSON,
|
|
44527
|
+
atlasIMG: atlasIMG,
|
|
44528
|
+
spriteKey: blueprint.texturePath || blueprint.key,
|
|
44529
|
+
width: 32,
|
|
44530
|
+
height: 32,
|
|
44531
|
+
imgScale: 2,
|
|
44532
|
+
centered: true
|
|
44533
|
+
})), React__default.createElement(ColName, null, React__default.createElement(BlueprintName, null, blueprint.name), (blueprint.type || blueprint.subType) && React__default.createElement(BlueprintMeta, null, [blueprint.type, blueprint.subType].filter(Boolean).filter(function (v, i, arr) {
|
|
44534
|
+
return arr.indexOf(v) === i;
|
|
44535
|
+
}).join(' · '))), React__default.createElement(ColType, null, React__default.createElement(TypeText, null, blueprint.type), blueprint.subType && blueprint.subType !== blueprint.type && React__default.createElement(SubTypeText, null, blueprint.subType)), React__default.createElement(ColTier, null, "T", blueprint.tier));
|
|
44536
|
+
}));
|
|
44537
|
+
};
|
|
44538
|
+
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";
|
|
44539
|
+
var ResultsHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
44540
|
+
displayName: "BlueprintTable__ResultsHeader",
|
|
44541
|
+
componentId: "sc-1ysxhx2-0"
|
|
44542
|
+
})(["", " 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);
|
|
44543
|
+
var ResultRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
44544
|
+
displayName: "BlueprintTable__ResultRow",
|
|
44545
|
+
componentId: "sc-1ysxhx2-1"
|
|
44546
|
+
})(["", " 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) {
|
|
44547
|
+
return p.$selectable ? 'pointer' : 'default';
|
|
44548
|
+
}, function (p) {
|
|
44549
|
+
return p.$selectable ? 'rgba(245, 158, 11, 0.08)' : 'none';
|
|
44550
|
+
});
|
|
44551
|
+
var SpriteWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44552
|
+
displayName: "BlueprintTable__SpriteWrapper",
|
|
44553
|
+
componentId: "sc-1ysxhx2-2"
|
|
44554
|
+
})(["display:flex;align-items:center;justify-content:center;width:40px;height:32px;"]);
|
|
44555
|
+
var ColName = /*#__PURE__*/styled__default.div.withConfig({
|
|
44556
|
+
displayName: "BlueprintTable__ColName",
|
|
44557
|
+
componentId: "sc-1ysxhx2-3"
|
|
44558
|
+
})(["display:flex;flex-direction:column;gap:2px;overflow:hidden;"]);
|
|
44559
|
+
var BlueprintName = /*#__PURE__*/styled__default.span.withConfig({
|
|
44560
|
+
displayName: "BlueprintTable__BlueprintName",
|
|
44561
|
+
componentId: "sc-1ysxhx2-4"
|
|
44562
|
+
})(["font-size:0.5rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44563
|
+
var BlueprintMeta = /*#__PURE__*/styled__default.span.withConfig({
|
|
44564
|
+
displayName: "BlueprintTable__BlueprintMeta",
|
|
44565
|
+
componentId: "sc-1ysxhx2-5"
|
|
44566
|
+
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44567
|
+
var ColType = /*#__PURE__*/styled__default.div.withConfig({
|
|
44568
|
+
displayName: "BlueprintTable__ColType",
|
|
44569
|
+
componentId: "sc-1ysxhx2-6"
|
|
44570
|
+
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
44571
|
+
var TypeText = /*#__PURE__*/styled__default.span.withConfig({
|
|
44572
|
+
displayName: "BlueprintTable__TypeText",
|
|
44573
|
+
componentId: "sc-1ysxhx2-7"
|
|
44574
|
+
})(["font-size:0.45rem;color:#aaa;"]);
|
|
44575
|
+
var SubTypeText = /*#__PURE__*/styled__default.span.withConfig({
|
|
44576
|
+
displayName: "BlueprintTable__SubTypeText",
|
|
44577
|
+
componentId: "sc-1ysxhx2-8"
|
|
44578
|
+
})(["font-size:0.4rem;color:#666;"]);
|
|
44579
|
+
var ColTier = /*#__PURE__*/styled__default.div.withConfig({
|
|
44580
|
+
displayName: "BlueprintTable__ColTier",
|
|
44581
|
+
componentId: "sc-1ysxhx2-9"
|
|
44582
|
+
})(["font-size:0.5rem;color:#f59e0b;text-align:center;"]);
|
|
44583
|
+
|
|
44513
44584
|
var BLUEPRINTS_PER_PAGE = 10;
|
|
44585
|
+
var scaleIn = /*#__PURE__*/styled.keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
44514
44586
|
var typeOptions = /*#__PURE__*/[{
|
|
44515
44587
|
id: 1,
|
|
44516
44588
|
value: '',
|
|
@@ -44547,7 +44619,9 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44547
44619
|
currentPage = _ref.currentPage,
|
|
44548
44620
|
isLoading = _ref.isLoading,
|
|
44549
44621
|
atlasJSON = _ref.atlasJSON,
|
|
44550
|
-
atlasIMG = _ref.atlasIMG
|
|
44622
|
+
atlasIMG = _ref.atlasIMG,
|
|
44623
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
44624
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
44551
44625
|
var _useState = React.useState(''),
|
|
44552
44626
|
searchName = _useState[0],
|
|
44553
44627
|
setSearchName = _useState[1];
|
|
@@ -44557,24 +44631,40 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44557
44631
|
var _useState3 = React.useState(''),
|
|
44558
44632
|
selectedSubType = _useState3[0],
|
|
44559
44633
|
setSelectedSubType = _useState3[1];
|
|
44560
|
-
|
|
44561
|
-
var
|
|
44634
|
+
var searchNameRef = React.useRef(searchName);
|
|
44635
|
+
var selectedTypeRef = React.useRef(selectedType);
|
|
44636
|
+
var selectedSubTypeRef = React.useRef(selectedSubType);
|
|
44637
|
+
searchNameRef.current = searchName;
|
|
44638
|
+
selectedTypeRef.current = selectedType;
|
|
44639
|
+
selectedSubTypeRef.current = selectedSubType;
|
|
44640
|
+
var triggerSearch = React.useCallback(function (overrides) {
|
|
44562
44641
|
var _overrides$name, _overrides$itemType, _overrides$itemSubTyp, _overrides$page;
|
|
44563
44642
|
onSearch({
|
|
44564
44643
|
npcId: '',
|
|
44565
|
-
name: (_overrides$name = overrides == null ? void 0 : overrides.name) != null ? _overrides$name :
|
|
44566
|
-
itemType: (_overrides$itemType = overrides == null ? void 0 : overrides.itemType) != null ? _overrides$itemType :
|
|
44567
|
-
itemSubType: (_overrides$itemSubTyp = overrides == null ? void 0 : overrides.itemSubType) != null ? _overrides$itemSubTyp :
|
|
44644
|
+
name: (_overrides$name = overrides == null ? void 0 : overrides.name) != null ? _overrides$name : searchNameRef.current,
|
|
44645
|
+
itemType: (_overrides$itemType = overrides == null ? void 0 : overrides.itemType) != null ? _overrides$itemType : selectedTypeRef.current,
|
|
44646
|
+
itemSubType: (_overrides$itemSubTyp = overrides == null ? void 0 : overrides.itemSubType) != null ? _overrides$itemSubTyp : selectedSubTypeRef.current,
|
|
44568
44647
|
page: (_overrides$page = overrides == null ? void 0 : overrides.page) != null ? _overrides$page : 1,
|
|
44569
44648
|
limit: BLUEPRINTS_PER_PAGE
|
|
44570
44649
|
});
|
|
44571
|
-
};
|
|
44650
|
+
}, [onSearch]);
|
|
44651
|
+
var debouncedNameSearch = React.useMemo(function () {
|
|
44652
|
+
return lodash.debounce(function (name) {
|
|
44653
|
+
return triggerSearch({
|
|
44654
|
+
name: name,
|
|
44655
|
+
page: 1
|
|
44656
|
+
});
|
|
44657
|
+
}, 300);
|
|
44658
|
+
}, [triggerSearch]);
|
|
44659
|
+
React.useEffect(function () {
|
|
44660
|
+
return function () {
|
|
44661
|
+
debouncedNameSearch.cancel();
|
|
44662
|
+
};
|
|
44663
|
+
}, [debouncedNameSearch]);
|
|
44664
|
+
if (!isOpen) return null;
|
|
44572
44665
|
var handleNameChange = function handleNameChange(e) {
|
|
44573
44666
|
setSearchName(e.target.value);
|
|
44574
|
-
|
|
44575
|
-
name: e.target.value,
|
|
44576
|
-
page: 1
|
|
44577
|
-
});
|
|
44667
|
+
debouncedNameSearch(e.target.value);
|
|
44578
44668
|
};
|
|
44579
44669
|
var handleTypeChange = function handleTypeChange(value) {
|
|
44580
44670
|
setSelectedType(value);
|
|
@@ -44614,7 +44704,9 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44614
44704
|
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(InputWrapper, null, React__default.createElement("p", null, "SEARCH"), React__default.createElement(StyledInput$2, {
|
|
44615
44705
|
value: searchName,
|
|
44616
44706
|
onChange: handleNameChange,
|
|
44617
|
-
placeholder: "Search by name..."
|
|
44707
|
+
placeholder: "Search by name...",
|
|
44708
|
+
onFocus: disableHotkeys,
|
|
44709
|
+
onBlur: enableHotkeys
|
|
44618
44710
|
})), React__default.createElement(FiltersRow, null, React__default.createElement(StyledDropdown$2, {
|
|
44619
44711
|
key: "type-" + selectedType,
|
|
44620
44712
|
options: typeOptions,
|
|
@@ -44625,22 +44717,14 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44625
44717
|
options: subTypeOptions,
|
|
44626
44718
|
onChange: handleSubTypeChange,
|
|
44627
44719
|
width: "100%"
|
|
44628
|
-
})), React__default.createElement(ResultsWrapper, null,
|
|
44629
|
-
|
|
44630
|
-
|
|
44631
|
-
|
|
44632
|
-
|
|
44633
|
-
|
|
44634
|
-
|
|
44635
|
-
|
|
44636
|
-
atlasIMG: atlasIMG,
|
|
44637
|
-
spriteKey: blueprint.texturePath || blueprint.key,
|
|
44638
|
-
width: 32,
|
|
44639
|
-
height: 32,
|
|
44640
|
-
imgScale: 2,
|
|
44641
|
-
centered: true
|
|
44642
|
-
})), React__default.createElement(ColName, null, React__default.createElement(BlueprintName, null, blueprint.name), React__default.createElement(BlueprintKey, null, blueprint.key)), React__default.createElement(ColType, null, React__default.createElement(TypeText, null, blueprint.type), blueprint.subType && blueprint.subType !== blueprint.type && React__default.createElement(SubTypeText, null, blueprint.subType)), React__default.createElement(ColTier, null, "T", blueprint.tier));
|
|
44643
|
-
}))), React__default.createElement(PagerContainer$1, null, React__default.createElement(Pager, {
|
|
44720
|
+
})), React__default.createElement(ResultsWrapper, null, blueprints.length === 0 && !isLoading ? React__default.createElement(EmptyState$2, null, "No items found") : React__default.createElement(ResultsContent, {
|
|
44721
|
+
"$dimmed": isLoading
|
|
44722
|
+
}, React__default.createElement(BlueprintTable, {
|
|
44723
|
+
blueprints: blueprints,
|
|
44724
|
+
atlasJSON: atlasJSON,
|
|
44725
|
+
atlasIMG: atlasIMG,
|
|
44726
|
+
onSelect: onSelect
|
|
44727
|
+
})), isLoading && React__default.createElement(LoadingOverlay, null, React__default.createElement(LoadingText, null, "Loading..."))), React__default.createElement(PagerContainer$1, null, React__default.createElement(Pager, {
|
|
44644
44728
|
totalItems: totalCount,
|
|
44645
44729
|
currentPage: currentPage,
|
|
44646
44730
|
itemsPerPage: BLUEPRINTS_PER_PAGE,
|
|
@@ -44658,7 +44742,7 @@ var ModalContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
44658
44742
|
var ModalContent$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44659
44743
|
displayName: "BlueprintSearchModal__ModalContent",
|
|
44660
44744
|
componentId: "sc-i7bssq-2"
|
|
44661
|
-
})(["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:
|
|
44745
|
+
})(["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);
|
|
44662
44746
|
var Header$8 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44663
44747
|
displayName: "BlueprintSearchModal__Header",
|
|
44664
44748
|
componentId: "sc-i7bssq-3"
|
|
@@ -44678,7 +44762,7 @@ var InputWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
44678
44762
|
var StyledInput$2 = /*#__PURE__*/styled__default(Input).withConfig({
|
|
44679
44763
|
displayName: "BlueprintSearchModal__StyledInput",
|
|
44680
44764
|
componentId: "sc-i7bssq-7"
|
|
44681
|
-
})(["flex:1;
|
|
44765
|
+
})(["flex:1;"]);
|
|
44682
44766
|
var FiltersRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
44683
44767
|
displayName: "BlueprintSearchModal__FiltersRow",
|
|
44684
44768
|
componentId: "sc-i7bssq-8"
|
|
@@ -44690,57 +44774,67 @@ var StyledDropdown$2 = /*#__PURE__*/styled__default(Dropdown).withConfig({
|
|
|
44690
44774
|
var ResultsWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
44691
44775
|
displayName: "BlueprintSearchModal__ResultsWrapper",
|
|
44692
44776
|
componentId: "sc-i7bssq-10"
|
|
44693
|
-
})(["overflow-y:auto;
|
|
44694
|
-
var
|
|
44695
|
-
|
|
44696
|
-
displayName: "BlueprintSearchModal__ResultsHeader",
|
|
44777
|
+
})(["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;"]);
|
|
44778
|
+
var ResultsContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
44779
|
+
displayName: "BlueprintSearchModal__ResultsContent",
|
|
44697
44780
|
componentId: "sc-i7bssq-11"
|
|
44698
|
-
})(["", "
|
|
44699
|
-
|
|
44700
|
-
|
|
44781
|
+
})(["opacity:", ";transition:opacity 0.15s ease;"], function (p) {
|
|
44782
|
+
return p.$dimmed ? 0.4 : 1;
|
|
44783
|
+
});
|
|
44784
|
+
var LoadingOverlay = /*#__PURE__*/styled__default.div.withConfig({
|
|
44785
|
+
displayName: "BlueprintSearchModal__LoadingOverlay",
|
|
44701
44786
|
componentId: "sc-i7bssq-12"
|
|
44702
|
-
})(["
|
|
44703
|
-
var
|
|
44704
|
-
displayName: "
|
|
44787
|
+
})(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;"]);
|
|
44788
|
+
var LoadingText = /*#__PURE__*/styled__default.span.withConfig({
|
|
44789
|
+
displayName: "BlueprintSearchModal__LoadingText",
|
|
44705
44790
|
componentId: "sc-i7bssq-13"
|
|
44706
|
-
})(["
|
|
44707
|
-
var ColName = /*#__PURE__*/styled__default.div.withConfig({
|
|
44708
|
-
displayName: "BlueprintSearchModal__ColName",
|
|
44709
|
-
componentId: "sc-i7bssq-14"
|
|
44710
|
-
})(["display:flex;flex-direction:column;gap:2px;overflow:hidden;"]);
|
|
44711
|
-
var BlueprintName = /*#__PURE__*/styled__default.span.withConfig({
|
|
44712
|
-
displayName: "BlueprintSearchModal__BlueprintName",
|
|
44713
|
-
componentId: "sc-i7bssq-15"
|
|
44714
|
-
})(["font-size:0.5rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44715
|
-
var BlueprintKey = /*#__PURE__*/styled__default.span.withConfig({
|
|
44716
|
-
displayName: "BlueprintSearchModal__BlueprintKey",
|
|
44717
|
-
componentId: "sc-i7bssq-16"
|
|
44718
|
-
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44719
|
-
var ColType = /*#__PURE__*/styled__default.div.withConfig({
|
|
44720
|
-
displayName: "BlueprintSearchModal__ColType",
|
|
44721
|
-
componentId: "sc-i7bssq-17"
|
|
44722
|
-
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
44723
|
-
var TypeText = /*#__PURE__*/styled__default.span.withConfig({
|
|
44724
|
-
displayName: "BlueprintSearchModal__TypeText",
|
|
44725
|
-
componentId: "sc-i7bssq-18"
|
|
44726
|
-
})(["font-size:0.45rem;color:#aaa;"]);
|
|
44727
|
-
var SubTypeText = /*#__PURE__*/styled__default.span.withConfig({
|
|
44728
|
-
displayName: "BlueprintSearchModal__SubTypeText",
|
|
44729
|
-
componentId: "sc-i7bssq-19"
|
|
44730
|
-
})(["font-size:0.4rem;color:#666;"]);
|
|
44731
|
-
var ColTier = /*#__PURE__*/styled__default.div.withConfig({
|
|
44732
|
-
displayName: "BlueprintSearchModal__ColTier",
|
|
44733
|
-
componentId: "sc-i7bssq-20"
|
|
44734
|
-
})(["font-size:0.5rem;color:#f59e0b;text-align:center;"]);
|
|
44791
|
+
})(["font-size:0.55rem;color:#f59e0b;text-transform:uppercase;letter-spacing:1px;"]);
|
|
44735
44792
|
var EmptyState$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44736
44793
|
displayName: "BlueprintSearchModal__EmptyState",
|
|
44737
|
-
componentId: "sc-i7bssq-
|
|
44738
|
-
})(["display:flex;align-items:center;justify-content:center;height:
|
|
44794
|
+
componentId: "sc-i7bssq-14"
|
|
44795
|
+
})(["display:flex;align-items:center;justify-content:center;height:100%;font-size:0.55rem;color:#666;text-transform:uppercase;letter-spacing:1px;"]);
|
|
44739
44796
|
var PagerContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44740
44797
|
displayName: "BlueprintSearchModal__PagerContainer",
|
|
44741
|
-
componentId: "sc-i7bssq-
|
|
44798
|
+
componentId: "sc-i7bssq-15"
|
|
44742
44799
|
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
44743
44800
|
|
|
44801
|
+
var SegmentedToggle = function SegmentedToggle(_ref) {
|
|
44802
|
+
var options = _ref.options,
|
|
44803
|
+
activeId = _ref.activeId,
|
|
44804
|
+
onChange = _ref.onChange,
|
|
44805
|
+
className = _ref.className;
|
|
44806
|
+
return React__default.createElement(Container$B, {
|
|
44807
|
+
className: className
|
|
44808
|
+
}, options.map(function (option) {
|
|
44809
|
+
return React__default.createElement(OptionButton, {
|
|
44810
|
+
key: option.id,
|
|
44811
|
+
type: "button",
|
|
44812
|
+
"$active": option.id === activeId,
|
|
44813
|
+
onClick: function onClick() {
|
|
44814
|
+
return onChange(option.id);
|
|
44815
|
+
}
|
|
44816
|
+
}, option.label);
|
|
44817
|
+
}));
|
|
44818
|
+
};
|
|
44819
|
+
var Container$B = /*#__PURE__*/styled__default.div.withConfig({
|
|
44820
|
+
displayName: "SegmentedToggle__Container",
|
|
44821
|
+
componentId: "sc-1itx2kn-0"
|
|
44822
|
+
})(["display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;"]);
|
|
44823
|
+
var OptionButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
44824
|
+
displayName: "SegmentedToggle__OptionButton",
|
|
44825
|
+
componentId: "sc-1itx2kn-1"
|
|
44826
|
+
})(["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) {
|
|
44827
|
+
var $active = _ref2.$active;
|
|
44828
|
+
return $active ? 'rgba(245, 158, 11, 0.75)' : 'rgba(255, 255, 255, 0.08)';
|
|
44829
|
+
}, function (_ref3) {
|
|
44830
|
+
var $active = _ref3.$active;
|
|
44831
|
+
return $active ? 'rgba(245, 158, 11, 0.16)' : 'rgba(0, 0, 0, 0.18)';
|
|
44832
|
+
}, function (_ref4) {
|
|
44833
|
+
var $active = _ref4.$active;
|
|
44834
|
+
return $active ? '#fde68a' : '#cfcfcf';
|
|
44835
|
+
});
|
|
44836
|
+
|
|
44837
|
+
var scaleIn$1 = /*#__PURE__*/styled.keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
44744
44838
|
var rarityOptions = [{
|
|
44745
44839
|
id: 1,
|
|
44746
44840
|
value: 'Common',
|
|
@@ -44774,7 +44868,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44774
44868
|
onRarityChange = _ref.onRarityChange,
|
|
44775
44869
|
onConfirm = _ref.onConfirm,
|
|
44776
44870
|
atlasJSON = _ref.atlasJSON,
|
|
44777
|
-
atlasIMG = _ref.atlasIMG
|
|
44871
|
+
atlasIMG = _ref.atlasIMG,
|
|
44872
|
+
enableHotkeys = _ref.enableHotkeys,
|
|
44873
|
+
disableHotkeys = _ref.disableHotkeys;
|
|
44778
44874
|
if (!isOpen || !blueprint) return null;
|
|
44779
44875
|
var stopPropagation = function stopPropagation(e) {
|
|
44780
44876
|
e.stopPropagation();
|
|
@@ -44799,14 +44895,18 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44799
44895
|
width: 32,
|
|
44800
44896
|
height: 32,
|
|
44801
44897
|
imgScale: 2
|
|
44802
|
-
})), React__default.createElement(ItemInfo$1, null, React__default.createElement(ItemName, null, blueprint.name), React__default.createElement(
|
|
44898
|
+
})), React__default.createElement(ItemInfo$1, null, React__default.createElement(ItemName, null, blueprint.name), React__default.createElement(ItemMeta, null, [blueprint.type, blueprint.subType].filter(Boolean).filter(function (v, i, arr) {
|
|
44899
|
+
return arr.indexOf(v) === i;
|
|
44900
|
+
}).join(' · '), " \xB7 T", blueprint.tier))), React__default.createElement(FormSection, null, React__default.createElement(FieldRow, null, React__default.createElement(Label$4, null, "Quantity"), React__default.createElement(StyledInput$3, {
|
|
44803
44901
|
value: quantity || '',
|
|
44804
44902
|
onChange: function onChange(e) {
|
|
44805
44903
|
return onQuantityChange(Number(e.target.value));
|
|
44806
44904
|
},
|
|
44807
44905
|
placeholder: "Qty",
|
|
44808
44906
|
type: "number",
|
|
44809
|
-
min: 1
|
|
44907
|
+
min: 1,
|
|
44908
|
+
onFocus: disableHotkeys,
|
|
44909
|
+
onBlur: enableHotkeys
|
|
44810
44910
|
})), React__default.createElement(FieldRow, null, React__default.createElement(Label$4, null, "Max Gold"), React__default.createElement(StyledInput$3, {
|
|
44811
44911
|
value: maxPrice || '',
|
|
44812
44912
|
onChange: function onChange(e) {
|
|
@@ -44814,7 +44914,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44814
44914
|
},
|
|
44815
44915
|
placeholder: "Max gold",
|
|
44816
44916
|
type: "number",
|
|
44817
|
-
min: 1
|
|
44917
|
+
min: 1,
|
|
44918
|
+
onFocus: disableHotkeys,
|
|
44919
|
+
onBlur: enableHotkeys
|
|
44818
44920
|
})), React__default.createElement(FieldRow, null, React__default.createElement(Label$4, null, "Rarity"), React__default.createElement(StyledDropdown$3, {
|
|
44819
44921
|
key: rarity,
|
|
44820
44922
|
options: rarityOptions,
|
|
@@ -44843,7 +44945,7 @@ var ModalContainer$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
44843
44945
|
var ModalContent$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44844
44946
|
displayName: "BuyOrderDetailsModal__ModalContent",
|
|
44845
44947
|
componentId: "sc-6bghe9-2"
|
|
44846
|
-
})(["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:
|
|
44948
|
+
})(["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);
|
|
44847
44949
|
var Header$9 = /*#__PURE__*/styled__default.div.withConfig({
|
|
44848
44950
|
displayName: "BuyOrderDetailsModal__Header",
|
|
44849
44951
|
componentId: "sc-6bghe9-3"
|
|
@@ -44872,8 +44974,8 @@ var ItemName = /*#__PURE__*/styled__default.span.withConfig({
|
|
|
44872
44974
|
displayName: "BuyOrderDetailsModal__ItemName",
|
|
44873
44975
|
componentId: "sc-6bghe9-9"
|
|
44874
44976
|
})(["font-size:0.55rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44875
|
-
var
|
|
44876
|
-
displayName: "
|
|
44977
|
+
var ItemMeta = /*#__PURE__*/styled__default.span.withConfig({
|
|
44978
|
+
displayName: "BuyOrderDetailsModal__ItemMeta",
|
|
44877
44979
|
componentId: "sc-6bghe9-10"
|
|
44878
44980
|
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44879
44981
|
var FormSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -44891,7 +44993,7 @@ var Label$4 = /*#__PURE__*/styled__default.label.withConfig({
|
|
|
44891
44993
|
var StyledInput$3 = /*#__PURE__*/styled__default(Input).withConfig({
|
|
44892
44994
|
displayName: "BuyOrderDetailsModal__StyledInput",
|
|
44893
44995
|
componentId: "sc-6bghe9-14"
|
|
44894
|
-
})(["
|
|
44996
|
+
})(["width:100%;"]);
|
|
44895
44997
|
var StyledDropdown$3 = /*#__PURE__*/styled__default(Dropdown).withConfig({
|
|
44896
44998
|
displayName: "BuyOrderDetailsModal__StyledDropdown",
|
|
44897
44999
|
componentId: "sc-6bghe9-15"
|
|
@@ -44937,9 +45039,9 @@ var Pill = /*#__PURE__*/styled__default.span.withConfig({
|
|
|
44937
45039
|
|
|
44938
45040
|
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
44939
45041
|
var children = _ref.children;
|
|
44940
|
-
return React__default.createElement(Container$
|
|
45042
|
+
return React__default.createElement(Container$C, null, children);
|
|
44941
45043
|
};
|
|
44942
|
-
var Container$
|
|
45044
|
+
var Container$C = /*#__PURE__*/styled__default.div.withConfig({
|
|
44943
45045
|
displayName: "RPGUIScrollbar__Container",
|
|
44944
45046
|
componentId: "sc-p3msmb-0"
|
|
44945
45047
|
})([".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;}"]);
|
|
@@ -45268,18 +45370,45 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45268
45370
|
yourBuyOrdersTotal = props.yourBuyOrdersTotal,
|
|
45269
45371
|
yourBuyOrdersPage = props.yourBuyOrdersPage,
|
|
45270
45372
|
onYourBuyOrdersPageChange = props.onYourBuyOrdersPageChange,
|
|
45271
|
-
onCancelBuyOrder = props.onCancelBuyOrder
|
|
45373
|
+
onCancelBuyOrder = props.onCancelBuyOrder,
|
|
45374
|
+
enableHotkeys = props.enableHotkeys,
|
|
45375
|
+
disableHotkeys = props.disableHotkeys;
|
|
45376
|
+
// Local blueprint display: cleared immediately on Place Request so the
|
|
45377
|
+
// panel returns to "Select Item" without waiting for the consumer to update
|
|
45378
|
+
// the prop. Cancel keeps it shown so the user can reopen the modal.
|
|
45379
|
+
var _useState = React.useState(selectedBlueprint),
|
|
45380
|
+
displayedBlueprint = _useState[0],
|
|
45381
|
+
setDisplayedBlueprint = _useState[1];
|
|
45382
|
+
var _useState2 = React.useState(!!selectedBlueprint),
|
|
45383
|
+
isDetailsOpen = _useState2[0],
|
|
45384
|
+
setIsDetailsOpen = _useState2[1];
|
|
45385
|
+
var _useState3 = React.useState('Active'),
|
|
45386
|
+
statusFilter = _useState3[0],
|
|
45387
|
+
setStatusFilter = _useState3[1];
|
|
45388
|
+
// Sync when consumer provides a new blueprint (e.g. after search selection)
|
|
45389
|
+
React.useEffect(function () {
|
|
45390
|
+
if (selectedBlueprint) {
|
|
45391
|
+
setDisplayedBlueprint(selectedBlueprint);
|
|
45392
|
+
setIsDetailsOpen(true);
|
|
45393
|
+
}
|
|
45394
|
+
}, [selectedBlueprint]);
|
|
45395
|
+
// Place request: clear display + close modal, then notify consumer
|
|
45272
45396
|
var handleConfirm = function handleConfirm() {
|
|
45273
45397
|
onPlaceBuyOrder();
|
|
45398
|
+
setDisplayedBlueprint(undefined);
|
|
45399
|
+
setIsDetailsOpen(false);
|
|
45274
45400
|
onCloseDetails == null ? void 0 : onCloseDetails();
|
|
45401
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
45275
45402
|
};
|
|
45403
|
+
// Cancel: just close the modal, keep blueprint displayed for reopening
|
|
45276
45404
|
var handleCloseDetails = function handleCloseDetails() {
|
|
45277
|
-
|
|
45405
|
+
setIsDetailsOpen(false);
|
|
45406
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
45278
45407
|
};
|
|
45279
|
-
return React__default.createElement(PanelWrapper, null,
|
|
45408
|
+
return React__default.createElement(PanelWrapper, null, displayedBlueprint && isDetailsOpen && React__default.createElement(BuyOrderDetailsModal, {
|
|
45280
45409
|
isOpen: true,
|
|
45281
45410
|
onClose: handleCloseDetails,
|
|
45282
|
-
blueprint:
|
|
45411
|
+
blueprint: displayedBlueprint,
|
|
45283
45412
|
quantity: currentQuantity,
|
|
45284
45413
|
maxPrice: currentMaxPrice,
|
|
45285
45414
|
rarity: selectedRarity,
|
|
@@ -45288,20 +45417,22 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45288
45417
|
onRarityChange: onRarityChange,
|
|
45289
45418
|
onConfirm: handleConfirm,
|
|
45290
45419
|
atlasJSON: atlasJSON,
|
|
45291
|
-
atlasIMG: atlasIMG
|
|
45292
|
-
|
|
45420
|
+
atlasIMG: atlasIMG,
|
|
45421
|
+
enableHotkeys: enableHotkeys,
|
|
45422
|
+
disableHotkeys: disableHotkeys
|
|
45423
|
+
}), React__default.createElement(FormRow, null, displayedBlueprint ? React__default.createElement(SelectedBlueprintDisplay, {
|
|
45293
45424
|
onPointerDown: onOpenBlueprintSearch
|
|
45294
45425
|
}, React__default.createElement(RarityContainer, {
|
|
45295
45426
|
"$rarity": selectedRarity
|
|
45296
45427
|
}, React__default.createElement(SpriteFromAtlas, {
|
|
45297
45428
|
atlasIMG: atlasIMG,
|
|
45298
45429
|
atlasJSON: atlasJSON,
|
|
45299
|
-
spriteKey:
|
|
45430
|
+
spriteKey: displayedBlueprint.texturePath || displayedBlueprint.key,
|
|
45300
45431
|
width: 32,
|
|
45301
45432
|
height: 32,
|
|
45302
45433
|
imgScale: 2,
|
|
45303
45434
|
centered: true
|
|
45304
|
-
})), React__default.createElement(ChangeTextWrapper, null, React__default.createElement(BlueprintName$1, null,
|
|
45435
|
+
})), React__default.createElement(ChangeTextWrapper, null, React__default.createElement(BlueprintName$1, null, displayedBlueprint.name), React__default.createElement(ChangeText, null, "change"))) : React__default.createElement(CTAButton, {
|
|
45305
45436
|
icon: React__default.createElement(Search.Search, {
|
|
45306
45437
|
width: 18,
|
|
45307
45438
|
height: 18
|
|
@@ -45309,18 +45440,41 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45309
45440
|
label: "Select Item",
|
|
45310
45441
|
iconColor: "#f59e0b",
|
|
45311
45442
|
onClick: onOpenBlueprintSearch
|
|
45443
|
+
})), React__default.createElement(FilterRow$1, null, React__default.createElement(SectionTitle$1, null, "Your Buy Requests"), React__default.createElement(SegmentedToggle, {
|
|
45444
|
+
options: [{
|
|
45445
|
+
id: 'Active',
|
|
45446
|
+
label: 'Active'
|
|
45447
|
+
}, {
|
|
45448
|
+
id: 'Fulfilled',
|
|
45449
|
+
label: 'Fulfilled'
|
|
45450
|
+
}, {
|
|
45451
|
+
id: 'Expired',
|
|
45452
|
+
label: 'Expired'
|
|
45453
|
+
}, {
|
|
45454
|
+
id: 'All',
|
|
45455
|
+
label: 'All'
|
|
45456
|
+
}],
|
|
45457
|
+
activeId: statusFilter,
|
|
45458
|
+
onChange: function onChange(id) {
|
|
45459
|
+
return setStatusFilter(id);
|
|
45460
|
+
}
|
|
45312
45461
|
})), React__default.createElement(ScrollArea, {
|
|
45313
45462
|
id: "MarketContainer"
|
|
45314
|
-
}, React__default.createElement(Section$1, null,
|
|
45315
|
-
|
|
45316
|
-
|
|
45317
|
-
buyOrder: order,
|
|
45318
|
-
atlasJSON: atlasJSON,
|
|
45319
|
-
atlasIMG: atlasIMG,
|
|
45320
|
-
isOwn: true,
|
|
45321
|
-
onCancel: onCancelBuyOrder
|
|
45463
|
+
}, React__default.createElement(Section$1, null, function () {
|
|
45464
|
+
var filtered = statusFilter === 'All' ? yourBuyOrders : yourBuyOrders.filter(function (o) {
|
|
45465
|
+
return o.status === shared.MarketplaceBuyOrderStatus[statusFilter];
|
|
45322
45466
|
});
|
|
45323
|
-
|
|
45467
|
+
return filtered.length === 0 ? React__default.createElement(EmptyState$3, null, "No requests yet") : filtered.map(function (order) {
|
|
45468
|
+
return React__default.createElement(BuyOrderRow, {
|
|
45469
|
+
key: order._id,
|
|
45470
|
+
buyOrder: order,
|
|
45471
|
+
atlasJSON: atlasJSON,
|
|
45472
|
+
atlasIMG: atlasIMG,
|
|
45473
|
+
isOwn: true,
|
|
45474
|
+
onCancel: onCancelBuyOrder
|
|
45475
|
+
});
|
|
45476
|
+
});
|
|
45477
|
+
}(), yourBuyOrdersTotal > BUY_ORDERS_PER_PAGE && React__default.createElement(PagerRow, null, React__default.createElement(Pager, {
|
|
45324
45478
|
totalItems: yourBuyOrdersTotal,
|
|
45325
45479
|
currentPage: yourBuyOrdersPage,
|
|
45326
45480
|
itemsPerPage: BUY_ORDERS_PER_PAGE,
|
|
@@ -45335,25 +45489,29 @@ var FormRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
45335
45489
|
displayName: "BuyOrderPanel__FormRow",
|
|
45336
45490
|
componentId: "sc-1eb11ct-1"
|
|
45337
45491
|
})(["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;"]);
|
|
45492
|
+
var FilterRow$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
45493
|
+
displayName: "BuyOrderPanel__FilterRow",
|
|
45494
|
+
componentId: "sc-1eb11ct-2"
|
|
45495
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:0 4px;"]);
|
|
45338
45496
|
var ScrollArea = /*#__PURE__*/styled__default.div.withConfig({
|
|
45339
45497
|
displayName: "BuyOrderPanel__ScrollArea",
|
|
45340
|
-
componentId: "sc-1eb11ct-
|
|
45498
|
+
componentId: "sc-1eb11ct-3"
|
|
45341
45499
|
})(["display:flex;flex-direction:column;gap:6px;overflow-y:scroll;max-height:420px;"]);
|
|
45342
45500
|
var Section$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
45343
45501
|
displayName: "BuyOrderPanel__Section",
|
|
45344
|
-
componentId: "sc-1eb11ct-
|
|
45502
|
+
componentId: "sc-1eb11ct-4"
|
|
45345
45503
|
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
45346
45504
|
var SectionTitle$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
45347
45505
|
displayName: "BuyOrderPanel__SectionTitle",
|
|
45348
|
-
componentId: "sc-1eb11ct-
|
|
45506
|
+
componentId: "sc-1eb11ct-5"
|
|
45349
45507
|
})(["margin:0 0 2px 0;font-size:0.45rem;color:#666;text-transform:uppercase;letter-spacing:1px;"]);
|
|
45350
45508
|
var SelectedBlueprintDisplay = /*#__PURE__*/styled__default.button.withConfig({
|
|
45351
45509
|
displayName: "BuyOrderPanel__SelectedBlueprintDisplay",
|
|
45352
|
-
componentId: "sc-1eb11ct-
|
|
45510
|
+
componentId: "sc-1eb11ct-6"
|
|
45353
45511
|
})(["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);}"]);
|
|
45354
45512
|
var RarityContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
45355
45513
|
displayName: "BuyOrderPanel__RarityContainer",
|
|
45356
|
-
componentId: "sc-1eb11ct-
|
|
45514
|
+
componentId: "sc-1eb11ct-7"
|
|
45357
45515
|
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref) {
|
|
45358
45516
|
var $rarity = _ref.$rarity;
|
|
45359
45517
|
return rarityColor({
|
|
@@ -45372,61 +45530,25 @@ var RarityContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
45372
45530
|
});
|
|
45373
45531
|
var ChangeTextWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
45374
45532
|
displayName: "BuyOrderPanel__ChangeTextWrapper",
|
|
45375
|
-
componentId: "sc-1eb11ct-
|
|
45533
|
+
componentId: "sc-1eb11ct-8"
|
|
45376
45534
|
})(["display:flex;flex-direction:column;gap:2px;min-width:0;"]);
|
|
45377
45535
|
var BlueprintName$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
45378
45536
|
displayName: "BuyOrderPanel__BlueprintName",
|
|
45379
|
-
componentId: "sc-1eb11ct-
|
|
45537
|
+
componentId: "sc-1eb11ct-9"
|
|
45380
45538
|
})(["font-size:0.5rem;color:#ddd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]);
|
|
45381
45539
|
var ChangeText = /*#__PURE__*/styled__default.span.withConfig({
|
|
45382
45540
|
displayName: "BuyOrderPanel__ChangeText",
|
|
45383
|
-
componentId: "sc-1eb11ct-
|
|
45541
|
+
componentId: "sc-1eb11ct-10"
|
|
45384
45542
|
})(["font-size:0.4rem;color:#f59e0b;"]);
|
|
45385
45543
|
var EmptyState$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
45386
45544
|
displayName: "BuyOrderPanel__EmptyState",
|
|
45387
|
-
componentId: "sc-1eb11ct-
|
|
45545
|
+
componentId: "sc-1eb11ct-11"
|
|
45388
45546
|
})(["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;"]);
|
|
45389
45547
|
var PagerRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
45390
45548
|
displayName: "BuyOrderPanel__PagerRow",
|
|
45391
|
-
componentId: "sc-1eb11ct-
|
|
45549
|
+
componentId: "sc-1eb11ct-12"
|
|
45392
45550
|
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
45393
45551
|
|
|
45394
|
-
var SegmentedToggle = function SegmentedToggle(_ref) {
|
|
45395
|
-
var options = _ref.options,
|
|
45396
|
-
activeId = _ref.activeId,
|
|
45397
|
-
onChange = _ref.onChange,
|
|
45398
|
-
className = _ref.className;
|
|
45399
|
-
return React__default.createElement(Container$C, {
|
|
45400
|
-
className: className
|
|
45401
|
-
}, options.map(function (option) {
|
|
45402
|
-
return React__default.createElement(OptionButton, {
|
|
45403
|
-
key: option.id,
|
|
45404
|
-
type: "button",
|
|
45405
|
-
"$active": option.id === activeId,
|
|
45406
|
-
onClick: function onClick() {
|
|
45407
|
-
return onChange(option.id);
|
|
45408
|
-
}
|
|
45409
|
-
}, option.label);
|
|
45410
|
-
}));
|
|
45411
|
-
};
|
|
45412
|
-
var Container$C = /*#__PURE__*/styled__default.div.withConfig({
|
|
45413
|
-
displayName: "SegmentedToggle__Container",
|
|
45414
|
-
componentId: "sc-1itx2kn-0"
|
|
45415
|
-
})(["display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;"]);
|
|
45416
|
-
var OptionButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
45417
|
-
displayName: "SegmentedToggle__OptionButton",
|
|
45418
|
-
componentId: "sc-1itx2kn-1"
|
|
45419
|
-
})(["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) {
|
|
45420
|
-
var $active = _ref2.$active;
|
|
45421
|
-
return $active ? 'rgba(245, 158, 11, 0.75)' : 'rgba(255, 255, 255, 0.08)';
|
|
45422
|
-
}, function (_ref3) {
|
|
45423
|
-
var $active = _ref3.$active;
|
|
45424
|
-
return $active ? 'rgba(245, 158, 11, 0.16)' : 'rgba(0, 0, 0, 0.18)';
|
|
45425
|
-
}, function (_ref4) {
|
|
45426
|
-
var $active = _ref4.$active;
|
|
45427
|
-
return $active ? '#fde68a' : '#cfcfcf';
|
|
45428
|
-
});
|
|
45429
|
-
|
|
45430
45552
|
var MarketplaceBuyModal = function MarketplaceBuyModal(_ref) {
|
|
45431
45553
|
var goldPrice = _ref.goldPrice,
|
|
45432
45554
|
dcEquivalentPrice = _ref.dcEquivalentPrice,
|
|
@@ -46270,7 +46392,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46270
46392
|
var getDCEquivalentPrice = function getDCEquivalentPrice(goldPrice) {
|
|
46271
46393
|
return dcToGoldSwapRate > 0 ? shared.goldToDC(goldPrice) : 0;
|
|
46272
46394
|
};
|
|
46273
|
-
return React__default.createElement(PanelWrapper$1, null, React__default.createElement(FilterRow$
|
|
46395
|
+
return React__default.createElement(PanelWrapper$1, null, React__default.createElement(FilterRow$2, null, React__default.createElement(FilterLabel$1, null, "FILTER BY TYPE"), React__default.createElement(StyledDropdown$5, {
|
|
46274
46396
|
key: selectedType,
|
|
46275
46397
|
options: transactionTypeOptions,
|
|
46276
46398
|
onChange: onTypeChange,
|
|
@@ -46278,6 +46400,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46278
46400
|
})), React__default.createElement(ScrollArea$1, {
|
|
46279
46401
|
id: "MarketContainer"
|
|
46280
46402
|
}, transactions.length === 0 ? React__default.createElement(EmptyState$5, null, "No transactions yet") : transactions.map(function (tx, index) {
|
|
46403
|
+
var _tx$metadata;
|
|
46281
46404
|
return React__default.createElement(RowWrapper$1, {
|
|
46282
46405
|
key: index,
|
|
46283
46406
|
"$even": index % 2 === 0,
|
|
@@ -46288,7 +46411,7 @@ var HistoryPanel = function HistoryPanel(_ref) {
|
|
|
46288
46411
|
fontSize: "10px"
|
|
46289
46412
|
}, tx.itemName)) : React__default.createElement(ItemName$3, null, React__default.createElement(NoItemText, null, tx.type === shared.MarketplaceTransactionType.Withdrawal ? 'Gold Withdrawal' : '--')), React__default.createElement(MetaRow$1, null, React__default.createElement(Label$5, {
|
|
46290
46413
|
"$bg": TRANSACTION_TYPE_COLORS$1[tx.type]
|
|
46291
|
-
}, formatTransactionLabel(tx.type)), React__default.createElement(SecondaryText, null, formatDate(tx.createdAt)), tx.counterpartName && React__default.createElement(SecondaryText, null, "w/ ", tx.counterpartName)))), tx.goldAmount > 0 && React__default.createElement(PriceSection, null, tx.currency === 'dc' ?
|
|
46414
|
+
}, formatTransactionLabel(tx.type)), React__default.createElement(SecondaryText, null, formatDate(tx.createdAt)), tx.counterpartName && React__default.createElement(SecondaryText, null, "w/ ", tx.counterpartName)))), tx.goldAmount > 0 && React__default.createElement(PriceSection, null, ((_tx$metadata = tx.metadata) == null ? void 0 : _tx$metadata['currency']) === 'dc' ?
|
|
46292
46415
|
// Show DC only
|
|
46293
46416
|
React__default.createElement(DCPriceRow$1, null, atlasIMG && atlasJSON && React__default.createElement(DCCoinWrapper$1, null, React__default.createElement(SimpleTooltip, {
|
|
46294
46417
|
content: "Definya Coin",
|
|
@@ -46325,7 +46448,7 @@ var PanelWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
46325
46448
|
displayName: "HistoryPanel__PanelWrapper",
|
|
46326
46449
|
componentId: "sc-74mioa-0"
|
|
46327
46450
|
})(["display:flex;flex-direction:column;gap:8px;padding:0 2.5%;width:100%;box-sizing:border-box;"]);
|
|
46328
|
-
var FilterRow$
|
|
46451
|
+
var FilterRow$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
46329
46452
|
displayName: "HistoryPanel__FilterRow",
|
|
46330
46453
|
componentId: "sc-74mioa-1"
|
|
46331
46454
|
})(["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;"]);
|
|
@@ -46777,6 +46900,7 @@ var Marketplace = function Marketplace(props) {
|
|
|
46777
46900
|
};
|
|
46778
46901
|
var handleBlueprintSelect = function handleBlueprintSelect(blueprint) {
|
|
46779
46902
|
setIsBlueprintSearchOpen(false);
|
|
46903
|
+
props.enableHotkeys == null ? void 0 : props.enableHotkeys();
|
|
46780
46904
|
onBlueprintSelect == null ? void 0 : onBlueprintSelect(blueprint);
|
|
46781
46905
|
};
|
|
46782
46906
|
var showSharedPager = activeTab === 'sell';
|
|
@@ -46848,11 +46972,14 @@ var Marketplace = function Marketplace(props) {
|
|
|
46848
46972
|
yourBuyOrdersTotal: yourBuyOrdersTotal,
|
|
46849
46973
|
yourBuyOrdersPage: yourBuyOrdersPage,
|
|
46850
46974
|
onYourBuyOrdersPageChange: onYourBuyOrdersPageChange != null ? onYourBuyOrdersPageChange : function () {},
|
|
46851
|
-
onCancelBuyOrder: onCancelBuyOrder != null ? onCancelBuyOrder : function () {}
|
|
46975
|
+
onCancelBuyOrder: onCancelBuyOrder != null ? onCancelBuyOrder : function () {},
|
|
46976
|
+
enableHotkeys: props.enableHotkeys,
|
|
46977
|
+
disableHotkeys: props.disableHotkeys
|
|
46852
46978
|
}), React__default.createElement(BlueprintSearchModal, {
|
|
46853
46979
|
isOpen: isBlueprintSearchOpen,
|
|
46854
46980
|
onClose: function onClose() {
|
|
46855
|
-
|
|
46981
|
+
setIsBlueprintSearchOpen(false);
|
|
46982
|
+
props.enableHotkeys == null ? void 0 : props.enableHotkeys();
|
|
46856
46983
|
},
|
|
46857
46984
|
onSelect: handleBlueprintSelect,
|
|
46858
46985
|
onSearch: onBlueprintSearch != null ? onBlueprintSearch : function () {},
|
|
@@ -46861,7 +46988,9 @@ var Marketplace = function Marketplace(props) {
|
|
|
46861
46988
|
currentPage: blueprintSearchCurrentPage,
|
|
46862
46989
|
isLoading: blueprintSearchIsLoading,
|
|
46863
46990
|
atlasJSON: props.atlasJSON,
|
|
46864
|
-
atlasIMG: props.atlasIMG
|
|
46991
|
+
atlasIMG: props.atlasIMG,
|
|
46992
|
+
enableHotkeys: props.enableHotkeys,
|
|
46993
|
+
disableHotkeys: props.disableHotkeys
|
|
46865
46994
|
})), activeTab === 'history' && React__default.createElement(HistoryPanel, {
|
|
46866
46995
|
transactions: historyTransactions,
|
|
46867
46996
|
totalCount: historyTotalCount,
|