@rpg-engine/long-bow 0.8.145 → 0.8.146
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/BlueprintTable.d.ts +9 -0
- package/dist/long-bow.cjs.development.js +116 -72
- 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 +116 -72
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Marketplace/BlueprintSearchModal.tsx +14 -137
- package/src/components/Marketplace/BlueprintTable.tsx +158 -0
- package/src/components/Marketplace/BuyOrderDetailsModal.tsx +9 -10
- package/src/components/Marketplace/BuyOrderPanel.tsx +25 -7
- package/src/stories/Features/marketplace/BuyOrderPanel.stories.tsx +197 -81
- package/src/stories/Features/trading/Marketplace.stories.tsx +27 -4
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: '',
|
|
@@ -44622,22 +44694,12 @@ var BlueprintSearchModal = function BlueprintSearchModal(_ref) {
|
|
|
44622
44694
|
options: subTypeOptions,
|
|
44623
44695
|
onChange: handleSubTypeChange,
|
|
44624
44696
|
width: "100%"
|
|
44625
|
-
})), React.createElement(ResultsWrapper, null, isLoading ? React.createElement(EmptyState$2, null, "Loading...") : blueprints.length === 0 ? React.createElement(EmptyState$2, null, "No blueprints found") : React.createElement(
|
|
44626
|
-
|
|
44627
|
-
|
|
44628
|
-
|
|
44629
|
-
|
|
44630
|
-
|
|
44631
|
-
}, React.createElement(SpriteWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
44632
|
-
atlasJSON: atlasJSON,
|
|
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, {
|
|
44697
|
+
})), React.createElement(ResultsWrapper, null, isLoading ? React.createElement(EmptyState$2, null, "Loading...") : blueprints.length === 0 ? React.createElement(EmptyState$2, null, "No blueprints found") : React.createElement(BlueprintTable, {
|
|
44698
|
+
blueprints: blueprints,
|
|
44699
|
+
atlasJSON: atlasJSON,
|
|
44700
|
+
atlasIMG: atlasIMG,
|
|
44701
|
+
onSelect: onSelect
|
|
44702
|
+
})), React.createElement(PagerContainer$1, null, React.createElement(Pager, {
|
|
44641
44703
|
totalItems: totalCount,
|
|
44642
44704
|
currentPage: currentPage,
|
|
44643
44705
|
itemsPerPage: BLUEPRINTS_PER_PAGE,
|
|
@@ -44655,7 +44717,7 @@ var ModalContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
44655
44717
|
var ModalContent$2 = /*#__PURE__*/styled.div.withConfig({
|
|
44656
44718
|
displayName: "BlueprintSearchModal__ModalContent",
|
|
44657
44719
|
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:
|
|
44720
|
+
})(["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
44721
|
var Header$8 = /*#__PURE__*/styled.div.withConfig({
|
|
44660
44722
|
displayName: "BlueprintSearchModal__Header",
|
|
44661
44723
|
componentId: "sc-i7bssq-3"
|
|
@@ -44675,7 +44737,7 @@ var InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
44675
44737
|
var StyledInput$2 = /*#__PURE__*/styled(Input).withConfig({
|
|
44676
44738
|
displayName: "BlueprintSearchModal__StyledInput",
|
|
44677
44739
|
componentId: "sc-i7bssq-7"
|
|
44678
|
-
})(["flex:1;
|
|
44740
|
+
})(["flex:1;"]);
|
|
44679
44741
|
var FiltersRow = /*#__PURE__*/styled.div.withConfig({
|
|
44680
44742
|
displayName: "BlueprintSearchModal__FiltersRow",
|
|
44681
44743
|
componentId: "sc-i7bssq-8"
|
|
@@ -44688,56 +44750,16 @@ var ResultsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
44688
44750
|
displayName: "BlueprintSearchModal__ResultsWrapper",
|
|
44689
44751
|
componentId: "sc-i7bssq-10"
|
|
44690
44752
|
})(["overflow-y:auto;max-height:320px;background:rgba(0,0,0,0.2);border:1px solid rgba(255,255,255,0.05);border-radius:4px;"]);
|
|
44691
|
-
var tableRowBase = "\n display: grid;\n grid-template-columns: 32px 1fr 120px 60px;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n";
|
|
44692
|
-
var ResultsHeader = /*#__PURE__*/styled.div.withConfig({
|
|
44693
|
-
displayName: "BlueprintSearchModal__ResultsHeader",
|
|
44694
|
-
componentId: "sc-i7bssq-11"
|
|
44695
|
-
})(["", " 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);
|
|
44696
|
-
var ResultRow = /*#__PURE__*/styled.div.withConfig({
|
|
44697
|
-
displayName: "BlueprintSearchModal__ResultRow",
|
|
44698
|
-
componentId: "sc-i7bssq-12"
|
|
44699
|
-
})(["", " border-bottom:1px solid rgba(255,255,255,0.04);cursor:pointer;transition:background 0.1s;&:hover{background:rgba(245,158,11,0.08);}&:last-child{border-bottom:none;}"], tableRowBase);
|
|
44700
|
-
var SpriteWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
44701
|
-
displayName: "BlueprintSearchModal__SpriteWrapper",
|
|
44702
|
-
componentId: "sc-i7bssq-13"
|
|
44703
|
-
})(["display:flex;align-items:center;justify-content:center;width:32px;height:32px;"]);
|
|
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;"]);
|
|
44732
44753
|
var EmptyState$2 = /*#__PURE__*/styled.div.withConfig({
|
|
44733
44754
|
displayName: "BlueprintSearchModal__EmptyState",
|
|
44734
|
-
componentId: "sc-i7bssq-
|
|
44755
|
+
componentId: "sc-i7bssq-11"
|
|
44735
44756
|
})(["display:flex;align-items:center;justify-content:center;height:100px;font-size:0.55rem;color:#666;text-transform:uppercase;letter-spacing:1px;"]);
|
|
44736
44757
|
var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
44737
44758
|
displayName: "BlueprintSearchModal__PagerContainer",
|
|
44738
|
-
componentId: "sc-i7bssq-
|
|
44759
|
+
componentId: "sc-i7bssq-12"
|
|
44739
44760
|
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
44740
44761
|
|
|
44762
|
+
var scaleIn$1 = /*#__PURE__*/keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
44741
44763
|
var rarityOptions = [{
|
|
44742
44764
|
id: 1,
|
|
44743
44765
|
value: 'Common',
|
|
@@ -44796,7 +44818,9 @@ var BuyOrderDetailsModal = function BuyOrderDetailsModal(_ref) {
|
|
|
44796
44818
|
width: 32,
|
|
44797
44819
|
height: 32,
|
|
44798
44820
|
imgScale: 2
|
|
44799
|
-
})), React.createElement(ItemInfo$1, null, React.createElement(ItemName, null, blueprint.name), React.createElement(
|
|
44821
|
+
})), 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) {
|
|
44822
|
+
return arr.indexOf(v) === i;
|
|
44823
|
+
}).join(' · '), " \xB7 T", blueprint.tier))), React.createElement(FormSection, null, React.createElement(FieldRow, null, React.createElement(Label$4, null, "Quantity"), React.createElement(StyledInput$3, {
|
|
44800
44824
|
value: quantity || '',
|
|
44801
44825
|
onChange: function onChange(e) {
|
|
44802
44826
|
return onQuantityChange(Number(e.target.value));
|
|
@@ -44840,7 +44864,7 @@ var ModalContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
44840
44864
|
var ModalContent$3 = /*#__PURE__*/styled.div.withConfig({
|
|
44841
44865
|
displayName: "BuyOrderDetailsModal__ModalContent",
|
|
44842
44866
|
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:
|
|
44867
|
+
})(["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
44868
|
var Header$9 = /*#__PURE__*/styled.div.withConfig({
|
|
44845
44869
|
displayName: "BuyOrderDetailsModal__Header",
|
|
44846
44870
|
componentId: "sc-6bghe9-3"
|
|
@@ -44869,8 +44893,8 @@ var ItemName = /*#__PURE__*/styled.span.withConfig({
|
|
|
44869
44893
|
displayName: "BuyOrderDetailsModal__ItemName",
|
|
44870
44894
|
componentId: "sc-6bghe9-9"
|
|
44871
44895
|
})(["font-size:0.55rem;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44872
|
-
var
|
|
44873
|
-
displayName: "
|
|
44896
|
+
var ItemMeta = /*#__PURE__*/styled.span.withConfig({
|
|
44897
|
+
displayName: "BuyOrderDetailsModal__ItemMeta",
|
|
44874
44898
|
componentId: "sc-6bghe9-10"
|
|
44875
44899
|
})(["font-size:0.4rem;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
44876
44900
|
var FormSection = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -44888,7 +44912,7 @@ var Label$4 = /*#__PURE__*/styled.label.withConfig({
|
|
|
44888
44912
|
var StyledInput$3 = /*#__PURE__*/styled(Input).withConfig({
|
|
44889
44913
|
displayName: "BuyOrderDetailsModal__StyledInput",
|
|
44890
44914
|
componentId: "sc-6bghe9-14"
|
|
44891
|
-
})(["
|
|
44915
|
+
})(["width:100%;"]);
|
|
44892
44916
|
var StyledDropdown$3 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
44893
44917
|
displayName: "BuyOrderDetailsModal__StyledDropdown",
|
|
44894
44918
|
componentId: "sc-6bghe9-15"
|
|
@@ -45266,17 +45290,37 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45266
45290
|
yourBuyOrdersPage = props.yourBuyOrdersPage,
|
|
45267
45291
|
onYourBuyOrdersPageChange = props.onYourBuyOrdersPageChange,
|
|
45268
45292
|
onCancelBuyOrder = props.onCancelBuyOrder;
|
|
45293
|
+
// Local blueprint display: cleared immediately on Place Request so the
|
|
45294
|
+
// panel returns to "Select Item" without waiting for the consumer to update
|
|
45295
|
+
// the prop. Cancel keeps it shown so the user can reopen the modal.
|
|
45296
|
+
var _useState = useState(selectedBlueprint),
|
|
45297
|
+
displayedBlueprint = _useState[0],
|
|
45298
|
+
setDisplayedBlueprint = _useState[1];
|
|
45299
|
+
var _useState2 = useState(!!selectedBlueprint),
|
|
45300
|
+
isDetailsOpen = _useState2[0],
|
|
45301
|
+
setIsDetailsOpen = _useState2[1];
|
|
45302
|
+
// Sync when consumer provides a new blueprint (e.g. after search selection)
|
|
45303
|
+
useEffect(function () {
|
|
45304
|
+
if (selectedBlueprint) {
|
|
45305
|
+
setDisplayedBlueprint(selectedBlueprint);
|
|
45306
|
+
setIsDetailsOpen(true);
|
|
45307
|
+
}
|
|
45308
|
+
}, [selectedBlueprint]);
|
|
45309
|
+
// Place request: clear display + close modal, then notify consumer
|
|
45269
45310
|
var handleConfirm = function handleConfirm() {
|
|
45270
45311
|
onPlaceBuyOrder();
|
|
45312
|
+
setDisplayedBlueprint(undefined);
|
|
45313
|
+
setIsDetailsOpen(false);
|
|
45271
45314
|
onCloseDetails == null ? void 0 : onCloseDetails();
|
|
45272
45315
|
};
|
|
45316
|
+
// Cancel: just close the modal, keep blueprint displayed for reopening
|
|
45273
45317
|
var handleCloseDetails = function handleCloseDetails() {
|
|
45274
|
-
|
|
45318
|
+
setIsDetailsOpen(false);
|
|
45275
45319
|
};
|
|
45276
|
-
return React.createElement(PanelWrapper, null,
|
|
45320
|
+
return React.createElement(PanelWrapper, null, displayedBlueprint && isDetailsOpen && React.createElement(BuyOrderDetailsModal, {
|
|
45277
45321
|
isOpen: true,
|
|
45278
45322
|
onClose: handleCloseDetails,
|
|
45279
|
-
blueprint:
|
|
45323
|
+
blueprint: displayedBlueprint,
|
|
45280
45324
|
quantity: currentQuantity,
|
|
45281
45325
|
maxPrice: currentMaxPrice,
|
|
45282
45326
|
rarity: selectedRarity,
|
|
@@ -45286,19 +45330,19 @@ var BuyOrderPanel = function BuyOrderPanel(props) {
|
|
|
45286
45330
|
onConfirm: handleConfirm,
|
|
45287
45331
|
atlasJSON: atlasJSON,
|
|
45288
45332
|
atlasIMG: atlasIMG
|
|
45289
|
-
}), React.createElement(FormRow, null,
|
|
45333
|
+
}), React.createElement(FormRow, null, displayedBlueprint ? React.createElement(SelectedBlueprintDisplay, {
|
|
45290
45334
|
onPointerDown: onOpenBlueprintSearch
|
|
45291
45335
|
}, React.createElement(RarityContainer, {
|
|
45292
45336
|
"$rarity": selectedRarity
|
|
45293
45337
|
}, React.createElement(SpriteFromAtlas, {
|
|
45294
45338
|
atlasIMG: atlasIMG,
|
|
45295
45339
|
atlasJSON: atlasJSON,
|
|
45296
|
-
spriteKey:
|
|
45340
|
+
spriteKey: displayedBlueprint.texturePath || displayedBlueprint.key,
|
|
45297
45341
|
width: 32,
|
|
45298
45342
|
height: 32,
|
|
45299
45343
|
imgScale: 2,
|
|
45300
45344
|
centered: true
|
|
45301
|
-
})), React.createElement(ChangeTextWrapper, null, React.createElement(BlueprintName$1, null,
|
|
45345
|
+
})), React.createElement(ChangeTextWrapper, null, React.createElement(BlueprintName$1, null, displayedBlueprint.name), React.createElement(ChangeText, null, "change"))) : React.createElement(CTAButton, {
|
|
45302
45346
|
icon: React.createElement(Search, {
|
|
45303
45347
|
width: 18,
|
|
45304
45348
|
height: 18
|