@rpg-engine/long-bow 0.8.72 → 0.8.74
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/DailyTasks/DailyTaskItem.d.ts +1 -0
- package/dist/hooks/useCharacterSkinNavigation.d.ts +7 -0
- package/dist/hooks/usePackFiltering.d.ts +7 -0
- package/dist/hooks/useQuantityControl.d.ts +10 -0
- package/dist/hooks/useStoreFiltering.d.ts +11 -0
- package/dist/long-bow.cjs.development.js +629 -272
- 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 +631 -274
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/DailyTasks/DailyRewardsTooltip.tsx +69 -38
- package/src/components/DailyTasks/DailyTaskItem.tsx +272 -76
- package/src/components/DailyTasks/DailyTasks.tsx +230 -46
- package/src/components/DailyTasks/GlobalDailyProgress.tsx +31 -24
- package/src/components/DailyTasks/TaskProgress.tsx +31 -20
- package/src/components/Store/StoreCharacterSkinRow.tsx +63 -45
- package/src/components/Store/StoreItemRow.tsx +51 -53
- package/src/components/Store/sections/StoreItemsSection.tsx +72 -21
- package/src/components/Store/sections/StorePacksSection.tsx +5 -10
- package/src/hooks/useCharacterSkinNavigation.ts +34 -0
- package/src/hooks/usePackFiltering.ts +20 -0
- package/src/hooks/useQuantityControl.ts +41 -0
- package/src/hooks/useStoreFiltering.ts +51 -0
- package/src/mocks/dailyTasks.mocks.ts +6 -6
- package/src/stories/Features/store/Store.stories.tsx +35 -8
|
@@ -29364,6 +29364,45 @@ var EmptyState = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29364
29364
|
componentId: "sc-19q95ue-15"
|
|
29365
29365
|
})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:", ";width:100%;padding:2rem;svg{font-size:3rem;margin-bottom:1rem;opacity:0.7;}p{font-family:'Press Start 2P',cursive;font-size:0.9rem;margin:0;}"], uiColors.lightGray);
|
|
29366
29366
|
|
|
29367
|
+
var SearchBar = function SearchBar(_ref) {
|
|
29368
|
+
var value = _ref.value,
|
|
29369
|
+
_onChange = _ref.onChange,
|
|
29370
|
+
placeholder = _ref.placeholder,
|
|
29371
|
+
className = _ref.className,
|
|
29372
|
+
rightElement = _ref.rightElement;
|
|
29373
|
+
var hasRightElement = Boolean(rightElement);
|
|
29374
|
+
return React__default.createElement(Container$g, {
|
|
29375
|
+
className: className
|
|
29376
|
+
}, React__default.createElement(Input$1, {
|
|
29377
|
+
type: "text",
|
|
29378
|
+
value: value,
|
|
29379
|
+
onChange: function onChange(e) {
|
|
29380
|
+
return _onChange(e.target.value);
|
|
29381
|
+
},
|
|
29382
|
+
placeholder: placeholder,
|
|
29383
|
+
className: "rpgui-input",
|
|
29384
|
+
"$hasRightElement": hasRightElement
|
|
29385
|
+
}), React__default.createElement(IconContainer, null, React__default.createElement(SearchIcon, null), rightElement));
|
|
29386
|
+
};
|
|
29387
|
+
var Container$g = /*#__PURE__*/styled__default.div.withConfig({
|
|
29388
|
+
displayName: "SearchBar__Container",
|
|
29389
|
+
componentId: "sc-13n8z02-0"
|
|
29390
|
+
})(["position:relative;width:100%;"]);
|
|
29391
|
+
var Input$1 = /*#__PURE__*/styled__default.input.withConfig({
|
|
29392
|
+
displayName: "SearchBar__Input",
|
|
29393
|
+
componentId: "sc-13n8z02-1"
|
|
29394
|
+
})(["width:100%;padding-right:", " !important;background:rgba(0,0,0,0.2) !important;border:2px solid #f59e0b !important;box-shadow:0 0 10px rgba(245,158,11,0.3);color:#ffffff !important;font-family:'Press Start 2P',cursive !important;font-size:0.875rem !important;&::placeholder{color:rgba(255,255,255,0.5) !important;}"], function (props) {
|
|
29395
|
+
return props.$hasRightElement ? '6rem' : '2.5rem';
|
|
29396
|
+
});
|
|
29397
|
+
var IconContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29398
|
+
displayName: "SearchBar__IconContainer",
|
|
29399
|
+
componentId: "sc-13n8z02-2"
|
|
29400
|
+
})(["position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:0.5rem;pointer-events:none;z-index:1;> *{pointer-events:auto;}"]);
|
|
29401
|
+
var SearchIcon = /*#__PURE__*/styled__default(fa.FaSearch).withConfig({
|
|
29402
|
+
displayName: "SearchBar__SearchIcon",
|
|
29403
|
+
componentId: "sc-13n8z02-3"
|
|
29404
|
+
})(["font-size:1rem;color:#f59e0b;filter:drop-shadow(0 0 2px rgba(245,158,11,0.3));"]);
|
|
29405
|
+
|
|
29367
29406
|
var formatTaskKey = function formatTaskKey(key) {
|
|
29368
29407
|
var formatted = key.replace(/[-_]/g, ' ');
|
|
29369
29408
|
formatted = formatted.replace(/([A-Z])/g, ' $1');
|
|
@@ -29448,6 +29487,7 @@ var DailyRewardsTooltip = function DailyRewardsTooltip(_ref) {
|
|
|
29448
29487
|
var _React$useState = React__default.useState(true),
|
|
29449
29488
|
isExpanded = _React$useState[0],
|
|
29450
29489
|
setIsExpanded = _React$useState[1];
|
|
29490
|
+
var isMobile = shared.isMobileOrTablet();
|
|
29451
29491
|
var sortedRewards = React__default.useMemo(function () {
|
|
29452
29492
|
var _REWARD_PRIORITY;
|
|
29453
29493
|
if (!rewards) return [];
|
|
@@ -29465,21 +29505,28 @@ var DailyRewardsTooltip = function DailyRewardsTooltip(_ref) {
|
|
|
29465
29505
|
};
|
|
29466
29506
|
return React__default.createElement(TooltipContainer$1, null, React__default.createElement(CollapsibleHeader, {
|
|
29467
29507
|
onClick: toggleExpand
|
|
29468
|
-
}, React__default.createElement(HeaderText, null, "Rewards?"), React__default.createElement(ExpandIcon, null, isExpanded ? '▼' : '▶')), isExpanded && React__default.createElement(CollapsibleContent, null, React__default.createElement(RewardsList,
|
|
29508
|
+
}, React__default.createElement(HeaderText, null, "Rewards?"), React__default.createElement(ExpandIcon, null, isExpanded ? '▼' : '▶')), isExpanded && React__default.createElement(CollapsibleContent, null, React__default.createElement(RewardsList, {
|
|
29509
|
+
isMobile: isMobile,
|
|
29510
|
+
rewardCount: sortedRewards.length
|
|
29511
|
+
}, sortedRewards.map(function (reward, index) {
|
|
29469
29512
|
var _reward$texturePath, _reward$key;
|
|
29470
29513
|
return React__default.createElement(RewardItem, {
|
|
29471
29514
|
key: index
|
|
29472
|
-
}, React__default.createElement(SpriteFromAtlas, {
|
|
29515
|
+
}, React__default.createElement(RewardIcon, null, React__default.createElement(SpriteFromAtlas, {
|
|
29473
29516
|
atlasJSON: itemsAtlasJSON,
|
|
29474
29517
|
atlasIMG: itemsAtlasIMG,
|
|
29475
29518
|
spriteKey: (_reward$texturePath = reward.texturePath) != null ? _reward$texturePath : 'check.png',
|
|
29476
|
-
width:
|
|
29477
|
-
height:
|
|
29478
|
-
imgScale: 1.
|
|
29479
|
-
}), React__default.createElement(
|
|
29519
|
+
width: isMobile ? 16 : 18,
|
|
29520
|
+
height: isMobile ? 16 : 18,
|
|
29521
|
+
imgScale: isMobile ? 1.5 : 1.5
|
|
29522
|
+
})), React__default.createElement(RewardContent, null, React__default.createElement(RewardLabel, {
|
|
29523
|
+
isMobile: isMobile
|
|
29524
|
+
}, React__default.createElement(Ellipsis, {
|
|
29480
29525
|
maxWidth: "100%",
|
|
29481
|
-
maxLines:
|
|
29482
|
-
}, formatTaskKey((_reward$key = reward.key) != null ? _reward$key : reward.type)
|
|
29526
|
+
maxLines: 1
|
|
29527
|
+
}, formatTaskKey((_reward$key = reward.key) != null ? _reward$key : reward.type))), React__default.createElement(RewardValue, {
|
|
29528
|
+
isMobile: isMobile
|
|
29529
|
+
}, "\xD7", reward.quantity)));
|
|
29483
29530
|
}))));
|
|
29484
29531
|
};
|
|
29485
29532
|
var TooltipContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -29489,7 +29536,13 @@ var TooltipContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29489
29536
|
var RewardsList = /*#__PURE__*/styled__default.div.withConfig({
|
|
29490
29537
|
displayName: "DailyRewardsTooltip__RewardsList",
|
|
29491
29538
|
componentId: "sc-wxzcu4-1"
|
|
29492
|
-
})(["display:
|
|
29539
|
+
})(["display:grid;grid-template-columns:", ";gap:", ";column-gap:", ";width:100%;"], function (props) {
|
|
29540
|
+
return props.rewardCount > 2 && !props.isMobile ? 'repeat(2, 1fr)' : '1fr';
|
|
29541
|
+
}, function (props) {
|
|
29542
|
+
return props.isMobile ? '6px' : '8px';
|
|
29543
|
+
}, function (props) {
|
|
29544
|
+
return props.rewardCount > 2 && !props.isMobile ? '16px' : '8px';
|
|
29545
|
+
});
|
|
29493
29546
|
var CollapsibleHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
29494
29547
|
displayName: "DailyRewardsTooltip__CollapsibleHeader",
|
|
29495
29548
|
componentId: "sc-wxzcu4-2"
|
|
@@ -29497,37 +29550,45 @@ var CollapsibleHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29497
29550
|
var HeaderText = /*#__PURE__*/styled__default.span.withConfig({
|
|
29498
29551
|
displayName: "DailyRewardsTooltip__HeaderText",
|
|
29499
29552
|
componentId: "sc-wxzcu4-3"
|
|
29500
|
-
})(["color:", " !important;"], uiColors.yellow);
|
|
29553
|
+
})(["color:", " !important;font-size:0.75rem;font-weight:500;"], uiColors.yellow);
|
|
29501
29554
|
var ExpandIcon = /*#__PURE__*/styled__default.span.withConfig({
|
|
29502
29555
|
displayName: "DailyRewardsTooltip__ExpandIcon",
|
|
29503
29556
|
componentId: "sc-wxzcu4-4"
|
|
29504
|
-
})(["color:", ";font-size:0.
|
|
29557
|
+
})(["color:", ";font-size:0.7rem;margin-left:8px;"], uiColors.yellow);
|
|
29505
29558
|
var CollapsibleContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
29506
29559
|
displayName: "DailyRewardsTooltip__CollapsibleContent",
|
|
29507
29560
|
componentId: "sc-wxzcu4-5"
|
|
29508
|
-
})(["display:block;padding-top:
|
|
29561
|
+
})(["display:block;padding-top:6px;width:100%;"]);
|
|
29509
29562
|
var RewardItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
29510
29563
|
displayName: "DailyRewardsTooltip__RewardItem",
|
|
29511
29564
|
componentId: "sc-wxzcu4-6"
|
|
29512
|
-
})(["display:flex;align-items:center;gap:
|
|
29513
|
-
var
|
|
29514
|
-
displayName: "
|
|
29565
|
+
})(["display:flex;align-items:center;gap:4px;width:100%;padding:2px;min-height:22px;"]);
|
|
29566
|
+
var RewardIcon = /*#__PURE__*/styled__default.div.withConfig({
|
|
29567
|
+
displayName: "DailyRewardsTooltip__RewardIcon",
|
|
29515
29568
|
componentId: "sc-wxzcu4-7"
|
|
29516
|
-
})(["display:flex;flex-
|
|
29569
|
+
})(["flex-shrink:0;width:20px;height:20px;display:flex;align-items:flex-start;justify-content:flex-start;font-style:normal;margin-right:4px;*{font-style:normal !important;}position:relative;left:-0.5rem;top:-0.4rem;"]);
|
|
29570
|
+
var RewardContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
29571
|
+
displayName: "DailyRewardsTooltip__RewardContent",
|
|
29572
|
+
componentId: "sc-wxzcu4-8"
|
|
29573
|
+
})(["display:flex;justify-content:space-between;align-items:center;flex:1;min-width:0;"]);
|
|
29517
29574
|
var RewardLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
29518
29575
|
displayName: "DailyRewardsTooltip__RewardLabel",
|
|
29519
|
-
componentId: "sc-wxzcu4-
|
|
29520
|
-
})(["color:", ";font-size:
|
|
29576
|
+
componentId: "sc-wxzcu4-9"
|
|
29577
|
+
})(["color:", ";font-size:", ";line-height:1.2;display:flex;align-items:center;flex:1;min-width:0;"], uiColors.yellow, function (props) {
|
|
29578
|
+
return props.isMobile ? '0.65rem' : '0.7rem';
|
|
29579
|
+
});
|
|
29521
29580
|
var RewardValue = /*#__PURE__*/styled__default.span.withConfig({
|
|
29522
29581
|
displayName: "DailyRewardsTooltip__RewardValue",
|
|
29523
|
-
componentId: "sc-wxzcu4-
|
|
29524
|
-
})(["color:", ";font-size:
|
|
29582
|
+
componentId: "sc-wxzcu4-10"
|
|
29583
|
+
})(["color:", ";font-size:", ";line-height:1.2;display:flex;align-items:center;font-weight:600;flex-shrink:0;margin-left:8px;"], uiColors.green, function (props) {
|
|
29584
|
+
return props.isMobile ? '0.6rem' : '0.65rem';
|
|
29585
|
+
});
|
|
29525
29586
|
|
|
29526
29587
|
var ReadOnlyCheckItem = function ReadOnlyCheckItem(_ref) {
|
|
29527
29588
|
var labelLeft = _ref.labelLeft,
|
|
29528
29589
|
labelRight = _ref.labelRight,
|
|
29529
29590
|
checked = _ref.checked;
|
|
29530
|
-
return React__default.createElement(Container$
|
|
29591
|
+
return React__default.createElement(Container$h, null, labelLeft && React__default.createElement(Label, null, labelLeft), React__default.createElement("div", {
|
|
29531
29592
|
className: "rpgui-checkbox-container"
|
|
29532
29593
|
}, React__default.createElement(CheckBox, {
|
|
29533
29594
|
className: "rpgui-checkbox",
|
|
@@ -29538,7 +29599,7 @@ var ReadOnlyCheckItem = function ReadOnlyCheckItem(_ref) {
|
|
|
29538
29599
|
isRight: true
|
|
29539
29600
|
}, labelRight));
|
|
29540
29601
|
};
|
|
29541
|
-
var Container$
|
|
29602
|
+
var Container$h = /*#__PURE__*/styled__default.div.withConfig({
|
|
29542
29603
|
displayName: "ReadOnlyCheckItem__Container",
|
|
29543
29604
|
componentId: "sc-1peplf9-0"
|
|
29544
29605
|
})(["display:flex;align-items:center;width:100%;height:20px;"]);
|
|
@@ -29625,56 +29686,6 @@ var CheckItemWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29625
29686
|
componentId: "sc-hm6sp1-3"
|
|
29626
29687
|
})(["display:flex;justify-content:center;width:100%;height:20px;input.rpgui-checkbox + label{margin:0 !important;padding-left:23px !important;}"]);
|
|
29627
29688
|
|
|
29628
|
-
var TaskProgress = function TaskProgress(_ref) {
|
|
29629
|
-
var task = _ref.task,
|
|
29630
|
-
itemsAtlasJSON = _ref.itemsAtlasJSON,
|
|
29631
|
-
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
29632
|
-
iconAtlasJSON = _ref.iconAtlasJSON,
|
|
29633
|
-
iconAtlasIMG = _ref.iconAtlasIMG;
|
|
29634
|
-
var difficulty = task.difficulty;
|
|
29635
|
-
return React__default.createElement(ProgressContainer, null, React__default.createElement(ProgressList$1, null, React__default.createElement(ProgressItem$1, null, React__default.createElement(ProgressLabel, null, "Difficulty:"), React__default.createElement(TaskDifficulty, {
|
|
29636
|
-
difficulty: difficulty
|
|
29637
|
-
}, formatDifficulty(difficulty))), React__default.createElement(ProgressItem$1, null, React__default.createElement(ProgressLabel, null, "Status:"), React__default.createElement(StatusText, {
|
|
29638
|
-
color: getStatusInfo(task).color
|
|
29639
|
-
}, getStatusInfo(task).text)), React__default.createElement(TaskProgressDetails, {
|
|
29640
|
-
task: task
|
|
29641
|
-
}), task.rewards && task.rewards.length > 0 && React__default.createElement(ProgressItem$1, null, React__default.createElement(DailyRewardsTooltip, {
|
|
29642
|
-
rewards: task.rewards,
|
|
29643
|
-
itemsAtlasJSON: itemsAtlasJSON,
|
|
29644
|
-
itemsAtlasIMG: itemsAtlasIMG,
|
|
29645
|
-
iconAtlasJSON: iconAtlasJSON,
|
|
29646
|
-
iconAtlasIMG: iconAtlasIMG
|
|
29647
|
-
}))));
|
|
29648
|
-
};
|
|
29649
|
-
var ProgressContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29650
|
-
displayName: "TaskProgress__ProgressContainer",
|
|
29651
|
-
componentId: "sc-1ejoyu-0"
|
|
29652
|
-
})(["width:100%;position:relative;"]);
|
|
29653
|
-
var ProgressList$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
29654
|
-
displayName: "TaskProgress__ProgressList",
|
|
29655
|
-
componentId: "sc-1ejoyu-1"
|
|
29656
|
-
})(["display:flex;flex-direction:column;gap:6px;"]);
|
|
29657
|
-
var ProgressItem$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
29658
|
-
displayName: "TaskProgress__ProgressItem",
|
|
29659
|
-
componentId: "sc-1ejoyu-2"
|
|
29660
|
-
})(["display:flex;justify-content:space-between;align-items:center;"]);
|
|
29661
|
-
var ProgressLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
29662
|
-
displayName: "TaskProgress__ProgressLabel",
|
|
29663
|
-
componentId: "sc-1ejoyu-3"
|
|
29664
|
-
})(["color:", " !important;"], uiColors.white);
|
|
29665
|
-
var TaskDifficulty = /*#__PURE__*/styled__default.span.withConfig({
|
|
29666
|
-
displayName: "TaskProgress__TaskDifficulty",
|
|
29667
|
-
componentId: "sc-1ejoyu-4"
|
|
29668
|
-
})(["color:", " !important;"], function (props) {
|
|
29669
|
-
return props.difficulty.toLowerCase() === 'challenge' ? uiColors.red : uiColors.lightGray;
|
|
29670
|
-
});
|
|
29671
|
-
var StatusText = /*#__PURE__*/styled__default.span.withConfig({
|
|
29672
|
-
displayName: "TaskProgress__StatusText",
|
|
29673
|
-
componentId: "sc-1ejoyu-5"
|
|
29674
|
-
})(["color:", " !important;font-weight:bold;"], function (props) {
|
|
29675
|
-
return props.color;
|
|
29676
|
-
});
|
|
29677
|
-
|
|
29678
29689
|
var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
29679
29690
|
var _task$name;
|
|
29680
29691
|
var task = _ref.task,
|
|
@@ -29687,69 +29698,170 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29687
29698
|
isRewardClaimed = _ref.isRewardClaimed;
|
|
29688
29699
|
var isMobile = shared.isMobileOrTablet();
|
|
29689
29700
|
var isCompleted = task.status === shared.TaskStatus.Completed;
|
|
29701
|
+
var isInProgress = task.status === shared.TaskStatus.InProgress;
|
|
29702
|
+
var isNotStarted = task.status === shared.TaskStatus.NotStarted;
|
|
29690
29703
|
var isClaimed = task.claimed || isRewardClaimed;
|
|
29691
29704
|
var handleClaimReward = function handleClaimReward() {
|
|
29692
29705
|
onClaimReward(task.key, task.type);
|
|
29693
29706
|
};
|
|
29694
|
-
return React__default.createElement(TaskContainer,
|
|
29707
|
+
return React__default.createElement(TaskContainer, {
|
|
29708
|
+
isMobile: isMobile,
|
|
29709
|
+
isCompleted: isCompleted,
|
|
29710
|
+
isInProgress: isInProgress,
|
|
29711
|
+
isNotStarted: isNotStarted
|
|
29712
|
+
}, React__default.createElement(TaskHeader, null, React__default.createElement(TaskHeaderLeft, null, iconAtlasJSON && iconAtlasIMG && React__default.createElement(IconWrapper, null, React__default.createElement(SpriteFromAtlas, {
|
|
29695
29713
|
atlasJSON: iconAtlasJSON,
|
|
29696
29714
|
atlasIMG: iconAtlasIMG,
|
|
29697
29715
|
spriteKey: spriteKey,
|
|
29698
|
-
width: 12,
|
|
29699
|
-
height: 12,
|
|
29700
|
-
imgScale: 2
|
|
29701
|
-
})), React__default.createElement(
|
|
29716
|
+
width: isMobile ? 10 : 12,
|
|
29717
|
+
height: isMobile ? 10 : 12,
|
|
29718
|
+
imgScale: 2
|
|
29719
|
+
})), React__default.createElement(TaskTitleSection, null, React__default.createElement(TaskTitle, {
|
|
29720
|
+
isMobile: isMobile
|
|
29721
|
+
}, React__default.createElement(Ellipsis, {
|
|
29702
29722
|
maxWidth: "100%",
|
|
29703
|
-
maxLines:
|
|
29704
|
-
}, (_task$name = task.name) != null ? _task$name : formatTaskKey(task.key))), React__default.createElement(
|
|
29723
|
+
maxLines: 1
|
|
29724
|
+
}, (_task$name = task.name) != null ? _task$name : formatTaskKey(task.key))), React__default.createElement(TaskMeta, {
|
|
29725
|
+
isMobile: isMobile
|
|
29726
|
+
}, React__default.createElement(MetaItem, null, React__default.createElement(MetaLabel, null, "Difficulty:"), React__default.createElement(TaskDifficulty, {
|
|
29727
|
+
difficulty: task.difficulty
|
|
29728
|
+
}, formatDifficulty(task.difficulty))), React__default.createElement(MetaDivider, null, "\u2022"), React__default.createElement(MetaItem, null, React__default.createElement(MetaLabel, null, "Status:"), React__default.createElement(StatusText, {
|
|
29729
|
+
color: getStatusInfo(task).color
|
|
29730
|
+
}, getStatusInfo(task).text))))), React__default.createElement(TaskHeaderRight, null, isClaimed && React__default.createElement(ClaimedBadge, {
|
|
29731
|
+
isMobile: isMobile
|
|
29732
|
+
}, "\u2713"))), React__default.createElement(TaskBody, null, React__default.createElement(TaskDescription, {
|
|
29733
|
+
isMobile: isMobile
|
|
29734
|
+
}, React__default.createElement(Ellipsis, {
|
|
29705
29735
|
maxWidth: "100%",
|
|
29706
|
-
maxLines: isMobile ?
|
|
29707
|
-
}, task.description))
|
|
29708
|
-
task: task
|
|
29736
|
+
maxLines: isMobile ? 2 : 1
|
|
29737
|
+
}, task.description)), React__default.createElement(TaskProgressDetails, {
|
|
29738
|
+
task: task
|
|
29739
|
+
}), task.rewards && task.rewards.length > 0 && React__default.createElement(RewardsSection, null, React__default.createElement(DailyRewardsTooltip, {
|
|
29740
|
+
rewards: task.rewards,
|
|
29709
29741
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
29710
|
-
itemsAtlasIMG: itemsAtlasIMG
|
|
29711
|
-
|
|
29742
|
+
itemsAtlasIMG: itemsAtlasIMG,
|
|
29743
|
+
iconAtlasJSON: iconAtlasJSON,
|
|
29744
|
+
iconAtlasIMG: iconAtlasIMG
|
|
29745
|
+
}))), isCompleted && !isClaimed && React__default.createElement(TaskFooter, null, React__default.createElement(Button, {
|
|
29712
29746
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29713
29747
|
onPointerDown: handleClaimReward
|
|
29714
|
-
},
|
|
29748
|
+
}, isMobile ? 'Collect Reward' : 'Collect Reward')));
|
|
29715
29749
|
};
|
|
29750
|
+
var pulseAnimation = /*#__PURE__*/styled.keyframes(["0%{box-shadow:0 1px 2px rgba(0,0,0,0.4);}50%{box-shadow:0 2px 8px rgba(255,215,0,0.3);}100%{box-shadow:0 1px 2px rgba(0,0,0,0.4);}"]);
|
|
29716
29751
|
var TaskContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29717
29752
|
displayName: "DailyTaskItem__TaskContainer",
|
|
29718
29753
|
componentId: "sc-45bxmt-0"
|
|
29719
|
-
})(["background:rgba(0,0,0,0.
|
|
29754
|
+
})(["background:rgba(0,0,0,0.6) !important;border:1px solid ", " !important;border-radius:", ";padding:", ";display:flex;flex-direction:column;gap:", ";box-shadow:0 1px 2px rgba(0,0,0,0.4);transition:all 0.2s ease;font-style:normal;width:100%;max-width:100%;box-sizing:border-box;opacity:", ";", " ", " *{font-style:normal !important;}&:hover{background:", " !important;border-color:", ";opacity:", ";}"], function (props) {
|
|
29755
|
+
return props.isCompleted ? uiColors.green : props.isInProgress ? uiColors.yellow : uiColors.darkGray;
|
|
29756
|
+
}, function (props) {
|
|
29757
|
+
return props.isMobile ? '4px' : '6px';
|
|
29758
|
+
}, function (props) {
|
|
29759
|
+
return props.isMobile ? '6px' : '8px';
|
|
29760
|
+
}, function (props) {
|
|
29761
|
+
return props.isMobile ? '4px' : '6px';
|
|
29762
|
+
}, function (props) {
|
|
29763
|
+
return props.isCompleted ? 1 : props.isInProgress ? 1 : 0.6;
|
|
29764
|
+
}, function (props) {
|
|
29765
|
+
return props.isNotStarted && "\n filter: grayscale(0.7);\n ";
|
|
29766
|
+
}, function (props) {
|
|
29767
|
+
return props.isInProgress && styled.css(["animation:", " 2s ease-in-out infinite;"], pulseAnimation);
|
|
29768
|
+
}, function (props) {
|
|
29769
|
+
return props.isPinned ? 'rgba(255, 215, 0, 0.25)' : 'rgba(0, 0, 0, 0.7)';
|
|
29770
|
+
}, function (props) {
|
|
29771
|
+
return props.isPinned ? uiColors.yellow : props.isCompleted ? uiColors.green : props.isInProgress ? uiColors.yellow : uiColors.yellow;
|
|
29772
|
+
}, function (props) {
|
|
29773
|
+
return props.isNotStarted ? 0.8 : 1;
|
|
29774
|
+
});
|
|
29720
29775
|
var TaskHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
29721
29776
|
displayName: "DailyTaskItem__TaskHeader",
|
|
29722
29777
|
componentId: "sc-45bxmt-1"
|
|
29723
|
-
})(["display:flex;width:100%;justify-content:
|
|
29724
|
-
var
|
|
29725
|
-
displayName: "
|
|
29778
|
+
})(["display:flex;width:100%;justify-content:space-between;align-items:flex-start;border-bottom:1px solid ", ";padding-bottom:6px;min-height:36px;"], uiColors.darkGray);
|
|
29779
|
+
var TaskHeaderLeft = /*#__PURE__*/styled__default.div.withConfig({
|
|
29780
|
+
displayName: "DailyTaskItem__TaskHeaderLeft",
|
|
29726
29781
|
componentId: "sc-45bxmt-2"
|
|
29727
|
-
})(["
|
|
29728
|
-
var
|
|
29729
|
-
displayName: "
|
|
29782
|
+
})(["display:flex;align-items:flex-start;gap:8px;flex:1;"]);
|
|
29783
|
+
var TaskHeaderRight = /*#__PURE__*/styled__default.div.withConfig({
|
|
29784
|
+
displayName: "DailyTaskItem__TaskHeaderRight",
|
|
29730
29785
|
componentId: "sc-45bxmt-3"
|
|
29731
|
-
})(["display:flex;
|
|
29732
|
-
var
|
|
29733
|
-
displayName: "
|
|
29786
|
+
})(["display:flex;align-items:center;flex-shrink:0;"]);
|
|
29787
|
+
var TaskTitleSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
29788
|
+
displayName: "DailyTaskItem__TaskTitleSection",
|
|
29734
29789
|
componentId: "sc-45bxmt-4"
|
|
29735
|
-
})(["
|
|
29736
|
-
var
|
|
29737
|
-
displayName: "
|
|
29790
|
+
})(["display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;"]);
|
|
29791
|
+
var TaskMeta = /*#__PURE__*/styled__default.div.withConfig({
|
|
29792
|
+
displayName: "DailyTaskItem__TaskMeta",
|
|
29738
29793
|
componentId: "sc-45bxmt-5"
|
|
29739
|
-
})(["
|
|
29740
|
-
|
|
29741
|
-
|
|
29794
|
+
})(["display:flex;align-items:center;gap:", ";flex-wrap:wrap;"], function (props) {
|
|
29795
|
+
return props.isMobile ? '6px' : '8px';
|
|
29796
|
+
});
|
|
29797
|
+
var MetaItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
29798
|
+
displayName: "DailyTaskItem__MetaItem",
|
|
29742
29799
|
componentId: "sc-45bxmt-6"
|
|
29743
|
-
})(["
|
|
29744
|
-
var
|
|
29745
|
-
displayName: "
|
|
29800
|
+
})(["display:flex;align-items:center;gap:4px;"]);
|
|
29801
|
+
var MetaLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
29802
|
+
displayName: "DailyTaskItem__MetaLabel",
|
|
29746
29803
|
componentId: "sc-45bxmt-7"
|
|
29747
|
-
})(["
|
|
29804
|
+
})(["color:", ";font-size:0.65rem;opacity:0.8;"], uiColors.lightGray);
|
|
29805
|
+
var MetaDivider = /*#__PURE__*/styled__default.span.withConfig({
|
|
29806
|
+
displayName: "DailyTaskItem__MetaDivider",
|
|
29807
|
+
componentId: "sc-45bxmt-8"
|
|
29808
|
+
})(["color:", ";font-size:0.7rem;"], uiColors.darkGray);
|
|
29809
|
+
var TaskDifficulty = /*#__PURE__*/styled__default.span.withConfig({
|
|
29810
|
+
displayName: "DailyTaskItem__TaskDifficulty",
|
|
29811
|
+
componentId: "sc-45bxmt-9"
|
|
29812
|
+
})(["color:", ";font-size:0.65rem;font-weight:500;"], function (props) {
|
|
29813
|
+
return props.difficulty.toLowerCase() === 'challenge' ? uiColors.red : uiColors.lightGray;
|
|
29814
|
+
});
|
|
29815
|
+
var StatusText = /*#__PURE__*/styled__default.span.withConfig({
|
|
29816
|
+
displayName: "DailyTaskItem__StatusText",
|
|
29817
|
+
componentId: "sc-45bxmt-10"
|
|
29818
|
+
})(["color:", ";font-size:0.65rem;font-weight:500;"], function (props) {
|
|
29819
|
+
return props.color;
|
|
29820
|
+
});
|
|
29821
|
+
var ClaimedBadge = /*#__PURE__*/styled__default.div.withConfig({
|
|
29822
|
+
displayName: "DailyTaskItem__ClaimedBadge",
|
|
29823
|
+
componentId: "sc-45bxmt-11"
|
|
29824
|
+
})(["background:", ";color:white;border-radius:50%;width:", ";height:", ";display:flex;align-items:center;justify-content:center;font-size:", ";font-weight:bold;"], uiColors.green, function (props) {
|
|
29825
|
+
return props.isMobile ? '18px' : '20px';
|
|
29826
|
+
}, function (props) {
|
|
29827
|
+
return props.isMobile ? '18px' : '20px';
|
|
29828
|
+
}, function (props) {
|
|
29829
|
+
return props.isMobile ? '10px' : '12px';
|
|
29830
|
+
});
|
|
29831
|
+
var TaskBody = /*#__PURE__*/styled__default.div.withConfig({
|
|
29832
|
+
displayName: "DailyTaskItem__TaskBody",
|
|
29833
|
+
componentId: "sc-45bxmt-12"
|
|
29834
|
+
})(["display:flex;flex-direction:column;gap:8px;padding:6px 0;"]);
|
|
29835
|
+
var RewardsSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
29836
|
+
displayName: "DailyTaskItem__RewardsSection",
|
|
29837
|
+
componentId: "sc-45bxmt-13"
|
|
29838
|
+
})(["margin-top:4px;"]);
|
|
29839
|
+
var TaskFooter = /*#__PURE__*/styled__default.div.withConfig({
|
|
29840
|
+
displayName: "DailyTaskItem__TaskFooter",
|
|
29841
|
+
componentId: "sc-45bxmt-14"
|
|
29842
|
+
})(["display:flex;justify-content:center;padding-top:6px;border-top:1px solid ", ";"], uiColors.darkGray);
|
|
29843
|
+
var IconWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
29844
|
+
displayName: "DailyTaskItem__IconWrapper",
|
|
29845
|
+
componentId: "sc-45bxmt-15"
|
|
29846
|
+
})(["pointer-events:none;user-select:none;flex-shrink:0;width:28px;height:28px;display:flex;align-items:flex-start;justify-content:flex-start;margin-top:2px;margin-left:2px;font-style:normal;*{font-style:normal !important;}"]);
|
|
29847
|
+
var TaskTitle = /*#__PURE__*/styled__default.h3.withConfig({
|
|
29848
|
+
displayName: "DailyTaskItem__TaskTitle",
|
|
29849
|
+
componentId: "sc-45bxmt-16"
|
|
29850
|
+
})(["&&{color:", ";margin:0;padding:0;text-align:left;font-size:", ";line-height:1.2;text-shadow:1px 1px 2px rgba(0,0,0,0.7);font-weight:600;word-wrap:break-word;overflow-wrap:break-word;span{color:inherit;}}"], uiColors.yellow, function (props) {
|
|
29851
|
+
return props.isMobile ? '0.85rem' : '0.9rem';
|
|
29852
|
+
});
|
|
29853
|
+
var TaskDescription = /*#__PURE__*/styled__default.div.withConfig({
|
|
29854
|
+
displayName: "DailyTaskItem__TaskDescription",
|
|
29855
|
+
componentId: "sc-45bxmt-17"
|
|
29856
|
+
})(["color:", ";font-size:", ";line-height:1.4;margin:0;opacity:0.9;word-wrap:break-word;overflow-wrap:break-word;"], uiColors.lightGray, function (props) {
|
|
29857
|
+
return props.isMobile ? '0.7rem' : '0.75rem';
|
|
29858
|
+
});
|
|
29748
29859
|
|
|
29749
29860
|
var GlobalDailyProgress = function GlobalDailyProgress(_ref) {
|
|
29750
29861
|
var tasks = _ref.tasks,
|
|
29751
29862
|
onClaimAllRewards = _ref.onClaimAllRewards,
|
|
29752
29863
|
globalRewardClaimed = _ref.globalRewardClaimed;
|
|
29864
|
+
var isMobile = shared.isMobileOrTablet();
|
|
29753
29865
|
var totalTasks = tasks.length;
|
|
29754
29866
|
var completedTasks = tasks.filter(function (task) {
|
|
29755
29867
|
return task.status === shared.TaskStatus.Completed;
|
|
@@ -29773,47 +29885,65 @@ var GlobalDailyProgress = function GlobalDailyProgress(_ref) {
|
|
|
29773
29885
|
tasks: taskIdentifiers
|
|
29774
29886
|
});
|
|
29775
29887
|
};
|
|
29776
|
-
return React__default.createElement(GlobalProgressContainer,
|
|
29888
|
+
return React__default.createElement(GlobalProgressContainer, {
|
|
29889
|
+
isMobile: isMobile
|
|
29890
|
+
}, React__default.createElement(HeaderContainer$1, null, React__default.createElement(GlobeIcon, null, "\uD83C\uDF0D"), React__default.createElement(ProgressText, {
|
|
29891
|
+
isMobile: isMobile
|
|
29892
|
+
}, isMobile ? completedTasks + "/" + totalTasks + " Complete" : "Global Tasks: " + completedTasks + "/" + totalTasks)), React__default.createElement(ProgressBar, null, React__default.createElement(ProgressFill, {
|
|
29777
29893
|
percentage: completedTasks / totalTasks * 100
|
|
29778
|
-
})), allCompleted && React__default.createElement(React__default.Fragment, null, shouldShowGlobalButton && React__default.createElement(CollectWrapper
|
|
29894
|
+
})), allCompleted && React__default.createElement(React__default.Fragment, null, shouldShowGlobalButton && React__default.createElement(CollectWrapper, null, React__default.createElement(Button, {
|
|
29779
29895
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29780
29896
|
onPointerDown: handleClaimAll
|
|
29781
|
-
},
|
|
29897
|
+
}, isMobile ? 'Global Rewards' : 'Collect Global Rewards')), shouldShowClaimedMessage && React__default.createElement(ClaimedText, {
|
|
29898
|
+
isMobile: isMobile
|
|
29899
|
+
}, "\u2713 Global Rewards Claimed")));
|
|
29782
29900
|
};
|
|
29783
29901
|
var GlobalProgressContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29784
29902
|
displayName: "GlobalDailyProgress__GlobalProgressContainer",
|
|
29785
29903
|
componentId: "sc-d7q4xm-0"
|
|
29786
|
-
})(["background:rgba(0,0,0,0.
|
|
29904
|
+
})(["background:rgba(0,0,0,0.6) !important;border:1px solid ", " !important;border-radius:", ";padding:", ";display:flex;flex-direction:column;gap:", ";box-shadow:0 1px 2px rgba(0,0,0,0.4);margin-bottom:", ";"], uiColors.blue, function (props) {
|
|
29905
|
+
return props.isMobile ? '4px' : '6px';
|
|
29906
|
+
}, function (props) {
|
|
29907
|
+
return props.isMobile ? '6px' : '8px';
|
|
29908
|
+
}, function (props) {
|
|
29909
|
+
return props.isMobile ? '6px' : '8px';
|
|
29910
|
+
}, function (props) {
|
|
29911
|
+
return props.isMobile ? '4px' : '6px';
|
|
29912
|
+
});
|
|
29787
29913
|
var HeaderContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
29788
29914
|
displayName: "GlobalDailyProgress__HeaderContainer",
|
|
29789
29915
|
componentId: "sc-d7q4xm-1"
|
|
29790
|
-
})(["display:flex;align-items:center;gap:
|
|
29916
|
+
})(["display:flex;align-items:center;gap:6px;margin-bottom:2px;"]);
|
|
29791
29917
|
var GlobeIcon = /*#__PURE__*/styled__default.span.withConfig({
|
|
29792
29918
|
displayName: "GlobalDailyProgress__GlobeIcon",
|
|
29793
29919
|
componentId: "sc-d7q4xm-2"
|
|
29794
|
-
})(["font-size:
|
|
29920
|
+
})(["font-size:1rem !important;line-height:1;color:", ";display:flex;align-items:center;justify-content:center;"], uiColors.blue);
|
|
29795
29921
|
var ProgressText = /*#__PURE__*/styled__default.div.withConfig({
|
|
29796
29922
|
displayName: "GlobalDailyProgress__ProgressText",
|
|
29797
29923
|
componentId: "sc-d7q4xm-3"
|
|
29798
|
-
})(["color:", ";
|
|
29924
|
+
})(["color:", ";font-size:", ";font-weight:500;flex:1;line-height:1.2;"], uiColors.white, function (props) {
|
|
29925
|
+
return props.isMobile ? '0.75rem' : '0.8rem';
|
|
29926
|
+
});
|
|
29799
29927
|
var ProgressBar = /*#__PURE__*/styled__default.div.withConfig({
|
|
29800
29928
|
displayName: "GlobalDailyProgress__ProgressBar",
|
|
29801
29929
|
componentId: "sc-d7q4xm-4"
|
|
29802
|
-
})(["width:100%;height:
|
|
29930
|
+
})(["width:100%;height:4px;background:", ";border-radius:2px;overflow:hidden;"], uiColors.darkGray);
|
|
29803
29931
|
var ProgressFill = /*#__PURE__*/styled__default.div.withConfig({
|
|
29804
29932
|
displayName: "GlobalDailyProgress__ProgressFill",
|
|
29805
29933
|
componentId: "sc-d7q4xm-5"
|
|
29806
29934
|
})(["width:", "%;height:100%;background:", ";transition:width 0.3s ease;"], function (props) {
|
|
29807
29935
|
return props.percentage;
|
|
29808
29936
|
}, uiColors.green);
|
|
29809
|
-
var ClaimedText
|
|
29937
|
+
var ClaimedText = /*#__PURE__*/styled__default.span.withConfig({
|
|
29810
29938
|
displayName: "GlobalDailyProgress__ClaimedText",
|
|
29811
29939
|
componentId: "sc-d7q4xm-6"
|
|
29812
|
-
})(["color:", ";font-size:
|
|
29813
|
-
|
|
29940
|
+
})(["color:", ";font-size:", ";text-align:center;font-weight:bold;display:flex;align-items:center;justify-content:center;gap:4px;"], uiColors.green, function (props) {
|
|
29941
|
+
return props.isMobile ? '0.8rem' : '0.9rem';
|
|
29942
|
+
});
|
|
29943
|
+
var CollectWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
29814
29944
|
displayName: "GlobalDailyProgress__CollectWrapper",
|
|
29815
29945
|
componentId: "sc-d7q4xm-7"
|
|
29816
|
-
})(["&&{width:100% !important;display:flex !important;justify-content:center !important;align-items:center !important;margin:
|
|
29946
|
+
})(["&&{width:100% !important;display:flex !important;justify-content:center !important;align-items:center !important;margin:4px 0 !important;}"]);
|
|
29817
29947
|
|
|
29818
29948
|
var DailyTasks = function DailyTasks(_ref) {
|
|
29819
29949
|
var tasks = _ref.tasks,
|
|
@@ -29830,13 +29960,23 @@ var DailyTasks = function DailyTasks(_ref) {
|
|
|
29830
29960
|
globalRewardClaimed = _ref$globalRewardClai === void 0 ? false : _ref$globalRewardClai;
|
|
29831
29961
|
var _React$useState = React__default.useState(tasks),
|
|
29832
29962
|
localTasks = _React$useState[0];
|
|
29833
|
-
var
|
|
29963
|
+
var isMobile = shared.isMobileOrTablet();
|
|
29834
29964
|
var _useState = React.useState([]),
|
|
29835
29965
|
claimedTasks = _useState[0],
|
|
29836
29966
|
setClaimedTasks = _useState[1];
|
|
29837
29967
|
var _useState2 = React.useState(false),
|
|
29838
29968
|
globalRewardClaimedLocal = _useState2[0],
|
|
29839
29969
|
setGlobalRewardClaimedLocal = _useState2[1];
|
|
29970
|
+
// Search and filter state
|
|
29971
|
+
var _useState3 = React.useState(''),
|
|
29972
|
+
searchQuery = _useState3[0],
|
|
29973
|
+
setSearchQuery = _useState3[1];
|
|
29974
|
+
var _useState4 = React.useState('all'),
|
|
29975
|
+
selectedStatus = _useState4[0],
|
|
29976
|
+
setSelectedStatus = _useState4[1];
|
|
29977
|
+
var _useLocalStorage = useLocalStorage('dailyTasks.pinned', []),
|
|
29978
|
+
pinnedTasks = _useLocalStorage[0],
|
|
29979
|
+
setPinnedTasks = _useLocalStorage[1];
|
|
29840
29980
|
var handleClaimReward = function handleClaimReward(taskKey, taskType) {
|
|
29841
29981
|
onClaimReward({
|
|
29842
29982
|
taskKey: taskKey,
|
|
@@ -29853,23 +29993,83 @@ var DailyTasks = function DailyTasks(_ref) {
|
|
|
29853
29993
|
var isTaskRewardClaimed = function isTaskRewardClaimed(taskKey) {
|
|
29854
29994
|
return claimedTasks.includes(taskKey);
|
|
29855
29995
|
};
|
|
29856
|
-
|
|
29996
|
+
var togglePinTask = function togglePinTask(taskKey) {
|
|
29997
|
+
setPinnedTasks(function (prev) {
|
|
29998
|
+
return prev.includes(taskKey) ? prev.filter(function (key) {
|
|
29999
|
+
return key !== taskKey;
|
|
30000
|
+
}) : [].concat(prev, [taskKey]);
|
|
30001
|
+
});
|
|
30002
|
+
};
|
|
30003
|
+
// Filter options using Store pattern
|
|
30004
|
+
var statusOptions = [{
|
|
30005
|
+
id: 0,
|
|
30006
|
+
value: 'all',
|
|
30007
|
+
option: 'All'
|
|
30008
|
+
}, {
|
|
30009
|
+
id: 1,
|
|
30010
|
+
value: 'pinned',
|
|
30011
|
+
option: 'Pinned'
|
|
30012
|
+
}, {
|
|
30013
|
+
id: 2,
|
|
30014
|
+
value: 'completed',
|
|
30015
|
+
option: 'Completed'
|
|
30016
|
+
}, {
|
|
30017
|
+
id: 3,
|
|
30018
|
+
value: 'inprogress',
|
|
30019
|
+
option: 'In Progress'
|
|
30020
|
+
}, {
|
|
30021
|
+
id: 4,
|
|
30022
|
+
value: 'notstarted',
|
|
30023
|
+
option: 'Not Started'
|
|
30024
|
+
}];
|
|
30025
|
+
// Filtered tasks using InformationCenter pattern
|
|
30026
|
+
var filteredTasks = React.useMemo(function () {
|
|
30027
|
+
var filtered = localTasks.filter(function (task) {
|
|
30028
|
+
var _task$name, _task$description;
|
|
30029
|
+
var matchesSearch = ((_task$name = task.name) == null ? void 0 : _task$name.toLowerCase().includes(searchQuery.toLowerCase())) || ((_task$description = task.description) == null ? void 0 : _task$description.toLowerCase().includes(searchQuery.toLowerCase())) || task.key.toLowerCase().includes(searchQuery.toLowerCase());
|
|
30030
|
+
var matchesStatus = selectedStatus === 'all' || selectedStatus === 'pinned' && pinnedTasks.includes(task.key) || selectedStatus === 'completed' && task.status === shared.TaskStatus.Completed || selectedStatus === 'inprogress' && task.status === shared.TaskStatus.InProgress || selectedStatus === 'notstarted' && task.status === shared.TaskStatus.NotStarted;
|
|
30031
|
+
return matchesSearch && matchesStatus;
|
|
30032
|
+
});
|
|
30033
|
+
// Sort with pinned tasks first
|
|
30034
|
+
return filtered.sort(function (a, b) {
|
|
30035
|
+
var aIsPinned = pinnedTasks.includes(a.key);
|
|
30036
|
+
var bIsPinned = pinnedTasks.includes(b.key);
|
|
30037
|
+
if (aIsPinned && !bIsPinned) return -1;
|
|
30038
|
+
if (!aIsPinned && bIsPinned) return 1;
|
|
30039
|
+
return 0;
|
|
30040
|
+
});
|
|
30041
|
+
}, [localTasks, searchQuery, selectedStatus, pinnedTasks]);
|
|
29857
30042
|
return React__default.createElement(TasksContainer, {
|
|
29858
30043
|
type: exports.RPGUIContainerTypes.Framed,
|
|
29859
30044
|
onCloseButton: onClose,
|
|
29860
30045
|
cancelDrag: ".tasks-container",
|
|
29861
30046
|
scale: scale,
|
|
29862
|
-
width:
|
|
29863
|
-
height:
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
30047
|
+
width: isMobile ? '100vw' : 'max(50vw, 900px)',
|
|
30048
|
+
height: isMobile ? '100vh' : 'min(85vh, 800px)',
|
|
30049
|
+
isMobile: isMobile
|
|
30050
|
+
}, React__default.createElement(TaskTitle$1, {
|
|
30051
|
+
isMobile: isMobile
|
|
30052
|
+
}, "Daily Tasks"), React__default.createElement(Container$i, {
|
|
30053
|
+
isMobile: isMobile
|
|
30054
|
+
}, React__default.createElement(GlobalProgressFixed, null, React__default.createElement(GlobalDailyProgress, {
|
|
29867
30055
|
tasks: localTasks,
|
|
29868
30056
|
onClaimAllRewards: handleClaimGlobalRewards,
|
|
29869
30057
|
globalRewardClaimed: globalRewardClaimed || globalRewardClaimedLocal
|
|
29870
|
-
}),
|
|
29871
|
-
|
|
29872
|
-
|
|
30058
|
+
})), React__default.createElement(SearchHeader, null, React__default.createElement(SearchBarContainer, null, React__default.createElement(SearchBar, {
|
|
30059
|
+
value: searchQuery,
|
|
30060
|
+
onChange: setSearchQuery,
|
|
30061
|
+
placeholder: "Search tasks..."
|
|
30062
|
+
})), React__default.createElement(DropdownContainer, null, React__default.createElement(Dropdown, {
|
|
30063
|
+
options: statusOptions,
|
|
30064
|
+
onChange: setSelectedStatus,
|
|
30065
|
+
width: "100%"
|
|
30066
|
+
}))), React__default.createElement(TasksList, {
|
|
30067
|
+
className: "tasks-container",
|
|
30068
|
+
isMobile: isMobile
|
|
30069
|
+
}, filteredTasks.length > 0 ? filteredTasks.map(function (task) {
|
|
30070
|
+
return React__default.createElement(TaskWrapper, {
|
|
30071
|
+
key: task.key
|
|
30072
|
+
}, React__default.createElement(DailyTaskItem, {
|
|
29873
30073
|
task: task,
|
|
29874
30074
|
spriteKey: getTaskIcon(task.type, task.difficulty),
|
|
29875
30075
|
onClaimReward: handleClaimReward,
|
|
@@ -29877,26 +30077,86 @@ var DailyTasks = function DailyTasks(_ref) {
|
|
|
29877
30077
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
29878
30078
|
iconAtlasJSON: iconAtlasJSON,
|
|
29879
30079
|
iconAtlasIMG: iconAtlasIMG,
|
|
29880
|
-
isRewardClaimed: task.claimed || isTaskRewardClaimed(task.key)
|
|
29881
|
-
|
|
29882
|
-
|
|
30080
|
+
isRewardClaimed: task.claimed || isTaskRewardClaimed(task.key),
|
|
30081
|
+
isPinned: pinnedTasks.includes(task.key)
|
|
30082
|
+
}), React__default.createElement(PinButton$1, {
|
|
30083
|
+
onClick: function onClick() {
|
|
30084
|
+
return togglePinTask(task.key);
|
|
30085
|
+
},
|
|
30086
|
+
isPinned: pinnedTasks.includes(task.key)
|
|
30087
|
+
}, React__default.createElement(fa.FaThumbtack, {
|
|
30088
|
+
size: 10
|
|
30089
|
+
})));
|
|
30090
|
+
}) : React__default.createElement(EmptyState$1, null, React__default.createElement(fa.FaClipboardList, {
|
|
30091
|
+
size: 48
|
|
30092
|
+
}), React__default.createElement("p", null, searchQuery || selectedStatus !== 'all' ? 'No tasks match your criteria.' : 'No daily tasks available.')))));
|
|
29883
30093
|
};
|
|
29884
30094
|
var TasksContainer = /*#__PURE__*/styled__default(DraggableContainer).withConfig({
|
|
29885
30095
|
displayName: "DailyTasks__TasksContainer",
|
|
29886
30096
|
componentId: "sc-ittn77-0"
|
|
29887
|
-
})(["
|
|
29888
|
-
|
|
30097
|
+
})(["", " .rpgui-container-title{width:100%;display:flex;justify-content:center;align-items:center;text-align:center;", "}.rpgui-container{padding:0 !important;overflow:hidden !important;background-color:rgba(30,30,30,0.98) !important;", "}"], function (props) {
|
|
30098
|
+
return props.isMobile ? "\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n margin: 0 !important;\n z-index: 1000 !important;\n " : "\n margin: 0 auto;\n min-width: 50vw;\n ";
|
|
30099
|
+
}, function (props) {
|
|
30100
|
+
return props.isMobile ? 'padding: 8px 0;' : '';
|
|
30101
|
+
}, function (props) {
|
|
30102
|
+
return props.isMobile ? "\n border-radius: 0 !important;\n height: 100vh !important;\n width: 100vw !important;\n " : '';
|
|
30103
|
+
});
|
|
30104
|
+
var Container$i = /*#__PURE__*/styled__default.div.withConfig({
|
|
29889
30105
|
displayName: "DailyTasks__Container",
|
|
29890
30106
|
componentId: "sc-ittn77-1"
|
|
29891
|
-
})(["width:100%;
|
|
30107
|
+
})(["width:100%;height:100%;margin:0;padding:0;overflow:hidden;box-sizing:border-box;background-color:transparent;display:flex;flex-direction:column;"]);
|
|
29892
30108
|
var TasksList = /*#__PURE__*/styled__default.div.withConfig({
|
|
29893
30109
|
displayName: "DailyTasks__TasksList",
|
|
29894
30110
|
componentId: "sc-ittn77-2"
|
|
29895
|
-
})(["display:flex;flex-direction:column;gap:
|
|
30111
|
+
})(["display:flex;flex-direction:column;gap:", ";padding:", ";overflow-y:auto;flex:1;background-color:transparent;", ""], function (props) {
|
|
30112
|
+
return props.isMobile ? '8px' : '12px';
|
|
30113
|
+
}, function (props) {
|
|
30114
|
+
return props.isMobile ? '8px' : '12px';
|
|
30115
|
+
}, function (props) {
|
|
30116
|
+
return props.isMobile ? "\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n " : '';
|
|
30117
|
+
});
|
|
30118
|
+
var GlobalProgressFixed = /*#__PURE__*/styled__default.div.withConfig({
|
|
30119
|
+
displayName: "DailyTasks__GlobalProgressFixed",
|
|
30120
|
+
componentId: "sc-ittn77-3"
|
|
30121
|
+
})(["flex-shrink:0;padding:8px 12px;background-color:transparent;"]);
|
|
30122
|
+
var SearchHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
30123
|
+
displayName: "DailyTasks__SearchHeader",
|
|
30124
|
+
componentId: "sc-ittn77-4"
|
|
30125
|
+
})(["display:flex;gap:12px;padding:12px 12px 8px 12px;border-bottom:1px solid ", ";background:rgba(0,0,0,0.3);"], uiColors.darkGray);
|
|
30126
|
+
var SearchBarContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
30127
|
+
displayName: "DailyTasks__SearchBarContainer",
|
|
30128
|
+
componentId: "sc-ittn77-5"
|
|
30129
|
+
})(["flex:3;"]);
|
|
30130
|
+
var DropdownContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
30131
|
+
displayName: "DailyTasks__DropdownContainer",
|
|
30132
|
+
componentId: "sc-ittn77-6"
|
|
30133
|
+
})(["flex:1;min-width:120px;"]);
|
|
30134
|
+
var TaskWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
30135
|
+
displayName: "DailyTasks__TaskWrapper",
|
|
30136
|
+
componentId: "sc-ittn77-7"
|
|
30137
|
+
})(["position:relative;width:100%;"]);
|
|
30138
|
+
var PinButton$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
30139
|
+
displayName: "DailyTasks__PinButton",
|
|
30140
|
+
componentId: "sc-ittn77-8"
|
|
30141
|
+
})(["position:absolute;top:8px;right:8px;background:rgba(0,0,0,0.7);color:", ";border:1px solid ", ";cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all 0.2s ease;z-index:10;width:20px;height:20px;&:hover{color:", ";background:rgba(0,0,0,0.9);border-color:", ";}", ""], function (props) {
|
|
30142
|
+
return props.isPinned ? uiColors.yellow : uiColors.lightGray;
|
|
30143
|
+
}, function (props) {
|
|
30144
|
+
return props.isPinned ? uiColors.yellow : 'transparent';
|
|
30145
|
+
}, uiColors.yellow, uiColors.yellow, function (props) {
|
|
30146
|
+
return props.isPinned && "\n transform: rotate(45deg);\n ";
|
|
30147
|
+
});
|
|
30148
|
+
var EmptyState$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
30149
|
+
displayName: "DailyTasks__EmptyState",
|
|
30150
|
+
componentId: "sc-ittn77-9"
|
|
30151
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center;color:", ";opacity:0.7;gap:16px;p{margin:0;font-size:0.9rem;line-height:1.4;}"], uiColors.lightGray);
|
|
29896
30152
|
var TaskTitle$1 = /*#__PURE__*/styled__default.h2.withConfig({
|
|
29897
30153
|
displayName: "DailyTasks__TaskTitle",
|
|
29898
|
-
componentId: "sc-ittn77-
|
|
29899
|
-
})(["color:", " !important;text-align:center;padding-right:30px !important;font-size:
|
|
30154
|
+
componentId: "sc-ittn77-10"
|
|
30155
|
+
})(["color:", " !important;text-align:center;padding-right:30px !important;font-size:", " !important;width:100%;margin:", " !important;font-weight:600;"], uiColors.yellow, function (props) {
|
|
30156
|
+
return props.isMobile ? '1rem' : '1.2rem';
|
|
30157
|
+
}, function (props) {
|
|
30158
|
+
return props.isMobile ? '4px 0' : '8px 0';
|
|
30159
|
+
});
|
|
29900
30160
|
|
|
29901
30161
|
// Memoize the styled components since they don't depend on props that change frequently
|
|
29902
30162
|
var DPadButton = /*#__PURE__*/React.memo( /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -30257,7 +30517,7 @@ var DraggedItem = function DraggedItem(_ref) {
|
|
|
30257
30517
|
var centeredX = x - OFFSET$1;
|
|
30258
30518
|
var centeredY = y - OFFSET$1;
|
|
30259
30519
|
var stackInfo = onRenderStackInfo((_item$_id = item == null ? void 0 : item._id) != null ? _item$_id : '', (_item$stackQty = item == null ? void 0 : item.stackQty) != null ? _item$stackQty : 0);
|
|
30260
|
-
return React__default.createElement(Container$
|
|
30520
|
+
return React__default.createElement(Container$j, null, React__default.createElement(SpriteContainer, {
|
|
30261
30521
|
x: centeredX,
|
|
30262
30522
|
y: centeredY
|
|
30263
30523
|
}, React__default.createElement(SpriteFromAtlas, {
|
|
@@ -30275,7 +30535,7 @@ var DraggedItem = function DraggedItem(_ref) {
|
|
|
30275
30535
|
}), stackInfo));
|
|
30276
30536
|
};
|
|
30277
30537
|
var pulse = "\n @keyframes pulse {\n 0%, 100% {\n transform: scale(1) rotate(-3deg);\n }\n 50% {\n transform: scale(0.95) rotate(-3deg);\n }\n }\n";
|
|
30278
|
-
var Container$
|
|
30538
|
+
var Container$j = /*#__PURE__*/styled__default.div.withConfig({
|
|
30279
30539
|
displayName: "DraggedItem__Container",
|
|
30280
30540
|
componentId: "sc-mlzzcp-0"
|
|
30281
30541
|
})(["position:relative;"]);
|
|
@@ -30313,7 +30573,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
30313
30573
|
document.removeEventListener('clickOutside', function (_e) {});
|
|
30314
30574
|
};
|
|
30315
30575
|
}, []);
|
|
30316
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
30576
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$k, Object.assign({
|
|
30317
30577
|
fontSize: fontSize,
|
|
30318
30578
|
ref: ref
|
|
30319
30579
|
}, pos), React__default.createElement("ul", {
|
|
@@ -30330,7 +30590,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
30330
30590
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
30331
30591
|
}))));
|
|
30332
30592
|
};
|
|
30333
|
-
var Container$
|
|
30593
|
+
var Container$k = /*#__PURE__*/styled__default.div.withConfig({
|
|
30334
30594
|
displayName: "RelativeListMenu__Container",
|
|
30335
30595
|
componentId: "sc-7hohf-0"
|
|
30336
30596
|
})(["position:absolute;top:", "px;left:", "px;display:flex;flex-direction:column;width:max-content;justify-content:start;align-items:flex-start;li{font-size:", "em;}"], function (props) {
|
|
@@ -30604,7 +30864,7 @@ var SearchFriend = function SearchFriend(_ref) {
|
|
|
30604
30864
|
title: "Requests (" + friendRequests.length + ")",
|
|
30605
30865
|
content: requestsTabContent
|
|
30606
30866
|
}];
|
|
30607
|
-
return React__default.createElement(Container$
|
|
30867
|
+
return React__default.createElement(Container$l, null, React__default.createElement(InternalTabs, {
|
|
30608
30868
|
tabs: tabs,
|
|
30609
30869
|
activeTextColor: "#000",
|
|
30610
30870
|
inactiveColor: "#777",
|
|
@@ -30646,7 +30906,7 @@ var FriendRequestSection = function FriendRequestSection(_ref3) {
|
|
|
30646
30906
|
}, "Reject")));
|
|
30647
30907
|
})));
|
|
30648
30908
|
};
|
|
30649
|
-
var Container$
|
|
30909
|
+
var Container$l = /*#__PURE__*/styled__default.div.withConfig({
|
|
30650
30910
|
displayName: "SearchFriend__Container",
|
|
30651
30911
|
componentId: "sc-1lt1ols-0"
|
|
30652
30912
|
})(["display:flex;flex-direction:column;gap:1rem;"]);
|
|
@@ -30849,7 +31109,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
30849
31109
|
var _useState2 = React.useState(false),
|
|
30850
31110
|
showGoNextIndicator = _useState2[0],
|
|
30851
31111
|
setShowGoNextIndicator = _useState2[1];
|
|
30852
|
-
return React__default.createElement(Container$
|
|
31112
|
+
return React__default.createElement(Container$m, null, React__default.createElement(DynamicText, {
|
|
30853
31113
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
30854
31114
|
onFinish: function onFinish() {
|
|
30855
31115
|
setShowGoNextIndicator(true);
|
|
@@ -30867,7 +31127,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
30867
31127
|
}
|
|
30868
31128
|
}));
|
|
30869
31129
|
};
|
|
30870
|
-
var Container$
|
|
31130
|
+
var Container$m = /*#__PURE__*/styled__default.div.withConfig({
|
|
30871
31131
|
displayName: "NPCDialogText__Container",
|
|
30872
31132
|
componentId: "sc-1cxkdh9-0"
|
|
30873
31133
|
})([""]);
|
|
@@ -31019,7 +31279,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
31019
31279
|
return null;
|
|
31020
31280
|
});
|
|
31021
31281
|
};
|
|
31022
|
-
return React__default.createElement(Container$
|
|
31282
|
+
return React__default.createElement(Container$n, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
|
|
31023
31283
|
text: currentQuestion.text,
|
|
31024
31284
|
onStart: function onStart() {
|
|
31025
31285
|
return setCanShowAnswers(false);
|
|
@@ -31029,7 +31289,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
31029
31289
|
}
|
|
31030
31290
|
})), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
31031
31291
|
};
|
|
31032
|
-
var Container$
|
|
31292
|
+
var Container$n = /*#__PURE__*/styled__default.div.withConfig({
|
|
31033
31293
|
displayName: "QuestionDialog__Container",
|
|
31034
31294
|
componentId: "sc-bxc5u0-0"
|
|
31035
31295
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -31089,7 +31349,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
31089
31349
|
}
|
|
31090
31350
|
})), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer, null, React__default.createElement(NPCThumbnail, {
|
|
31091
31351
|
src: imagePath || img$7
|
|
31092
|
-
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
31352
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$o, null, React__default.createElement(CloseIcon, {
|
|
31093
31353
|
onPointerDown: _onClose
|
|
31094
31354
|
}, "X"), React__default.createElement(TextContainer$1, {
|
|
31095
31355
|
flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
@@ -31105,7 +31365,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
31105
31365
|
src: imagePath || img$7
|
|
31106
31366
|
})))));
|
|
31107
31367
|
};
|
|
31108
|
-
var Container$
|
|
31368
|
+
var Container$o = /*#__PURE__*/styled__default.div.withConfig({
|
|
31109
31369
|
displayName: "NPCDialog__Container",
|
|
31110
31370
|
componentId: "sc-1b4aw74-0"
|
|
31111
31371
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -31165,7 +31425,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
31165
31425
|
type: exports.RPGUIContainerTypes.FramedGold,
|
|
31166
31426
|
width: '50%',
|
|
31167
31427
|
height: '180px'
|
|
31168
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
31428
|
+
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$p, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer$2, {
|
|
31169
31429
|
flex: '70%'
|
|
31170
31430
|
}, React__default.createElement(NPCDialogText, {
|
|
31171
31431
|
onStartStep: function onStartStep() {
|
|
@@ -31207,7 +31467,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
31207
31467
|
src: img$6
|
|
31208
31468
|
}))), ")"));
|
|
31209
31469
|
};
|
|
31210
|
-
var Container$
|
|
31470
|
+
var Container$p = /*#__PURE__*/styled__default.div.withConfig({
|
|
31211
31471
|
displayName: "NPCMultiDialog__Container",
|
|
31212
31472
|
componentId: "sc-rvu5wg-0"
|
|
31213
31473
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -31639,7 +31899,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
31639
31899
|
totalPages = _ref.totalPages,
|
|
31640
31900
|
onPageChange = _ref.onPageChange,
|
|
31641
31901
|
className = _ref.className;
|
|
31642
|
-
return React__default.createElement(Container$
|
|
31902
|
+
return React__default.createElement(Container$q, {
|
|
31643
31903
|
className: className
|
|
31644
31904
|
}, React__default.createElement(PaginationButton$1, {
|
|
31645
31905
|
onClick: function onClick() {
|
|
@@ -31657,7 +31917,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
31657
31917
|
size: 12
|
|
31658
31918
|
})));
|
|
31659
31919
|
};
|
|
31660
|
-
var Container$
|
|
31920
|
+
var Container$q = /*#__PURE__*/styled__default.div.withConfig({
|
|
31661
31921
|
displayName: "Pagination__Container",
|
|
31662
31922
|
componentId: "sc-3k4m4u-0"
|
|
31663
31923
|
})(["display:flex;align-items:center;justify-content:center;gap:16px;padding:8px;"]);
|
|
@@ -31676,46 +31936,7 @@ var PageInfo$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
31676
31936
|
componentId: "sc-3k4m4u-2"
|
|
31677
31937
|
})(["color:", ";font-size:0.8rem;font-family:'Press Start 2P',cursive;"], uiColors.lightGray);
|
|
31678
31938
|
|
|
31679
|
-
var
|
|
31680
|
-
var value = _ref.value,
|
|
31681
|
-
_onChange = _ref.onChange,
|
|
31682
|
-
placeholder = _ref.placeholder,
|
|
31683
|
-
className = _ref.className,
|
|
31684
|
-
rightElement = _ref.rightElement;
|
|
31685
|
-
var hasRightElement = Boolean(rightElement);
|
|
31686
|
-
return React__default.createElement(Container$q, {
|
|
31687
|
-
className: className
|
|
31688
|
-
}, React__default.createElement(Input$1, {
|
|
31689
|
-
type: "text",
|
|
31690
|
-
value: value,
|
|
31691
|
-
onChange: function onChange(e) {
|
|
31692
|
-
return _onChange(e.target.value);
|
|
31693
|
-
},
|
|
31694
|
-
placeholder: placeholder,
|
|
31695
|
-
className: "rpgui-input",
|
|
31696
|
-
"$hasRightElement": hasRightElement
|
|
31697
|
-
}), React__default.createElement(IconContainer, null, React__default.createElement(SearchIcon, null), rightElement));
|
|
31698
|
-
};
|
|
31699
|
-
var Container$q = /*#__PURE__*/styled__default.div.withConfig({
|
|
31700
|
-
displayName: "SearchBar__Container",
|
|
31701
|
-
componentId: "sc-13n8z02-0"
|
|
31702
|
-
})(["position:relative;width:100%;"]);
|
|
31703
|
-
var Input$1 = /*#__PURE__*/styled__default.input.withConfig({
|
|
31704
|
-
displayName: "SearchBar__Input",
|
|
31705
|
-
componentId: "sc-13n8z02-1"
|
|
31706
|
-
})(["width:100%;padding-right:", " !important;background:rgba(0,0,0,0.2) !important;border:2px solid #f59e0b !important;box-shadow:0 0 10px rgba(245,158,11,0.3);color:#ffffff !important;font-family:'Press Start 2P',cursive !important;font-size:0.875rem !important;&::placeholder{color:rgba(255,255,255,0.5) !important;}"], function (props) {
|
|
31707
|
-
return props.$hasRightElement ? '6rem' : '2.5rem';
|
|
31708
|
-
});
|
|
31709
|
-
var IconContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31710
|
-
displayName: "SearchBar__IconContainer",
|
|
31711
|
-
componentId: "sc-13n8z02-2"
|
|
31712
|
-
})(["position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:0.5rem;pointer-events:none;z-index:1;> *{pointer-events:auto;}"]);
|
|
31713
|
-
var SearchIcon = /*#__PURE__*/styled__default(fa.FaSearch).withConfig({
|
|
31714
|
-
displayName: "SearchBar__SearchIcon",
|
|
31715
|
-
componentId: "sc-13n8z02-3"
|
|
31716
|
-
})(["font-size:1rem;color:#f59e0b;filter:drop-shadow(0 0 2px rgba(245,158,11,0.3));"]);
|
|
31717
|
-
|
|
31718
|
-
var SearchHeader = function SearchHeader(_ref) {
|
|
31939
|
+
var SearchHeader$1 = function SearchHeader(_ref) {
|
|
31719
31940
|
var searchOptions = _ref.searchOptions,
|
|
31720
31941
|
filterOptions = _ref.filterOptions,
|
|
31721
31942
|
className = _ref.className;
|
|
@@ -31806,7 +32027,7 @@ var PaginatedContent = function PaginatedContent(_ref) {
|
|
|
31806
32027
|
totalPages = _usePagination.totalPages;
|
|
31807
32028
|
return React__default.createElement(Container$r, {
|
|
31808
32029
|
className: className
|
|
31809
|
-
}, (searchOptions || filterOptions) && React__default.createElement(SearchHeader, {
|
|
32030
|
+
}, (searchOptions || filterOptions) && React__default.createElement(SearchHeader$1, {
|
|
31810
32031
|
searchOptions: searchOptions,
|
|
31811
32032
|
filterOptions: filterOptions
|
|
31812
32033
|
}), items.length === 0 ? React__default.createElement(EmptyMessage, null, emptyMessage) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Content, {
|
|
@@ -36590,7 +36811,7 @@ var SocialModal = function SocialModal(_ref) {
|
|
|
36590
36811
|
onClick: handleRedditClick
|
|
36591
36812
|
}, React__default.createElement(fa.FaReddit, null), " Reddit")), React__default.createElement(Divider, {
|
|
36592
36813
|
margin: "8px 0"
|
|
36593
|
-
}), React__default.createElement(DropdownContainer, null, React__default.createElement(Dropdown, {
|
|
36814
|
+
}), React__default.createElement(DropdownContainer$1, null, React__default.createElement(Dropdown, {
|
|
36594
36815
|
options: whatsAppGroups,
|
|
36595
36816
|
onChange: handleLanguageChange,
|
|
36596
36817
|
width: "100%",
|
|
@@ -36623,7 +36844,7 @@ var WhatsAppButton = /*#__PURE__*/styled__default(SocialButton$1).withConfig({
|
|
|
36623
36844
|
displayName: "SocialModal__WhatsAppButton",
|
|
36624
36845
|
componentId: "sc-tbjhp9-5"
|
|
36625
36846
|
})(["width:100%;background-color:#0f1f0f;border:1px solid #1a2f1a;padding:14px;&:hover{background-color:#162716;}margin-top:8px;"]);
|
|
36626
|
-
var DropdownContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
36847
|
+
var DropdownContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
36627
36848
|
displayName: "SocialModal__DropdownContainer",
|
|
36628
36849
|
componentId: "sc-tbjhp9-6"
|
|
36629
36850
|
})(["background-color:rgba(0,0,0,0.2);padding:8px;border-radius:4px;border:1px solid rgba(0,0,0,0.3);"]);
|
|
@@ -57395,7 +57616,7 @@ var CTAButton = function CTAButton(_ref) {
|
|
|
57395
57616
|
"$fullWidth": fullWidth,
|
|
57396
57617
|
"$disabled": disabled,
|
|
57397
57618
|
"$color": textColor
|
|
57398
|
-
}, React__default.createElement(ButtonContent, null, React__default.createElement(IconWrapper, {
|
|
57619
|
+
}, React__default.createElement(ButtonContent, null, React__default.createElement(IconWrapper$1, {
|
|
57399
57620
|
"$color": iconColor,
|
|
57400
57621
|
"$disabled": disabled
|
|
57401
57622
|
}, icon), label && React__default.createElement(ButtonLabel, {
|
|
@@ -57429,7 +57650,7 @@ var ButtonContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
57429
57650
|
displayName: "CTAButton__ButtonContent",
|
|
57430
57651
|
componentId: "sc-1azvwn5-1"
|
|
57431
57652
|
})(["display:flex;align-items:center;gap:0.75rem;"]);
|
|
57432
|
-
var IconWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
57653
|
+
var IconWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
57433
57654
|
displayName: "CTAButton__IconWrapper",
|
|
57434
57655
|
componentId: "sc-1azvwn5-2"
|
|
57435
57656
|
})(["svg{font-size:1.25rem;color:", ";filter:drop-shadow(0 0 2px rgba(245,158,11,0.5));opacity:", ";}"], function (props) {
|
|
@@ -57966,25 +58187,13 @@ var EmptyMessage$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
57966
58187
|
componentId: "sc-xhh2um-8"
|
|
57967
58188
|
})(["text-align:center;color:#9ca3af;padding:2rem;flex:1;display:flex;align-items:center;justify-content:center;"]);
|
|
57968
58189
|
|
|
57969
|
-
var
|
|
57970
|
-
var _item$metadataConfig, _item$metadataConfig2, _item$metadataConfig3, _item$requiredAccount;
|
|
57971
|
-
var item = _ref.item,
|
|
57972
|
-
atlasJSON = _ref.atlasJSON,
|
|
57973
|
-
atlasIMG = _ref.atlasIMG,
|
|
57974
|
-
onAddToCart = _ref.onAddToCart,
|
|
57975
|
-
userAccountType = _ref.userAccountType;
|
|
58190
|
+
var useCharacterSkinNavigation = function useCharacterSkinNavigation(availableCharacters, itemKey) {
|
|
57976
58191
|
var _useState = React.useState(0),
|
|
57977
58192
|
currentIndex = _useState[0],
|
|
57978
58193
|
setCurrentIndex = _useState[1];
|
|
57979
|
-
// Get available characters from metadata
|
|
57980
|
-
var availableCharacters = item.metadataType === shared.MetadataType.CharacterSkin && ((_item$metadataConfig = item.metadataConfig) == null ? void 0 : _item$metadataConfig.availableCharacters) || [];
|
|
57981
|
-
// Get the active character entity atlas info
|
|
57982
|
-
var entityAtlasJSON = (_item$metadataConfig2 = item.metadataConfig) == null ? void 0 : _item$metadataConfig2.atlasJSON;
|
|
57983
|
-
var entityAtlasIMG = (_item$metadataConfig3 = item.metadataConfig) == null ? void 0 : _item$metadataConfig3.atlasIMG;
|
|
57984
|
-
// Effect to reset currentIndex when switching items
|
|
57985
58194
|
React.useEffect(function () {
|
|
57986
58195
|
setCurrentIndex(0);
|
|
57987
|
-
}, [
|
|
58196
|
+
}, [itemKey]);
|
|
57988
58197
|
var handlePreviousSkin = function handlePreviousSkin() {
|
|
57989
58198
|
setCurrentIndex(function (prevIndex) {
|
|
57990
58199
|
return prevIndex === 0 ? availableCharacters.length - 1 : prevIndex - 1;
|
|
@@ -57995,6 +58204,31 @@ var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
|
57995
58204
|
return prevIndex === availableCharacters.length - 1 ? 0 : prevIndex + 1;
|
|
57996
58205
|
});
|
|
57997
58206
|
};
|
|
58207
|
+
var currentCharacter = availableCharacters[currentIndex];
|
|
58208
|
+
return {
|
|
58209
|
+
currentIndex: currentIndex,
|
|
58210
|
+
currentCharacter: currentCharacter,
|
|
58211
|
+
handlePreviousSkin: handlePreviousSkin,
|
|
58212
|
+
handleNextSkin: handleNextSkin
|
|
58213
|
+
};
|
|
58214
|
+
};
|
|
58215
|
+
|
|
58216
|
+
var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
58217
|
+
var _item$metadataConfig, _item$metadataConfig2, _item$metadataConfig3, _item$requiredAccount, _item$store;
|
|
58218
|
+
var item = _ref.item,
|
|
58219
|
+
atlasJSON = _ref.atlasJSON,
|
|
58220
|
+
atlasIMG = _ref.atlasIMG,
|
|
58221
|
+
onAddToCart = _ref.onAddToCart,
|
|
58222
|
+
userAccountType = _ref.userAccountType;
|
|
58223
|
+
// Get available characters from metadata
|
|
58224
|
+
var availableCharacters = item.metadataType === shared.MetadataType.CharacterSkin && ((_item$metadataConfig = item.metadataConfig) == null ? void 0 : _item$metadataConfig.availableCharacters) || [];
|
|
58225
|
+
// Get the active character entity atlas info
|
|
58226
|
+
var entityAtlasJSON = (_item$metadataConfig2 = item.metadataConfig) == null ? void 0 : _item$metadataConfig2.atlasJSON;
|
|
58227
|
+
var entityAtlasIMG = (_item$metadataConfig3 = item.metadataConfig) == null ? void 0 : _item$metadataConfig3.atlasIMG;
|
|
58228
|
+
var _useCharacterSkinNavi = useCharacterSkinNavigation(availableCharacters, item.key),
|
|
58229
|
+
currentCharacter = _useCharacterSkinNavi.currentCharacter,
|
|
58230
|
+
handlePreviousSkin = _useCharacterSkinNavi.handlePreviousSkin,
|
|
58231
|
+
handleNextSkin = _useCharacterSkinNavi.handleNextSkin;
|
|
57998
58232
|
var hasRequiredAccount = !((_item$requiredAccount = item.requiredAccountType) != null && _item$requiredAccount.length) || item.requiredAccountType.includes(userAccountType);
|
|
57999
58233
|
var handleAddToCart = function handleAddToCart() {
|
|
58000
58234
|
if (!hasRequiredAccount) return;
|
|
@@ -58011,8 +58245,9 @@ var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
|
58011
58245
|
var getSpriteKey = function getSpriteKey(textureKey) {
|
|
58012
58246
|
return textureKey + '/down/standing/0.png';
|
|
58013
58247
|
};
|
|
58014
|
-
|
|
58015
|
-
|
|
58248
|
+
return React__default.createElement(ItemWrapper, {
|
|
58249
|
+
"$isHighlighted": ((_item$store = item.store) == null ? void 0 : _item$store.isHighlighted) || false
|
|
58250
|
+
}, React__default.createElement(ItemIconContainer$2, null, entityAtlasJSON && entityAtlasIMG && currentCharacter ? React__default.createElement(SpriteFromAtlas, {
|
|
58016
58251
|
atlasJSON: entityAtlasJSON,
|
|
58017
58252
|
atlasIMG: entityAtlasIMG,
|
|
58018
58253
|
spriteKey: getSpriteKey(currentCharacter.textureKey),
|
|
@@ -58020,7 +58255,7 @@ var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
|
58020
58255
|
height: 32,
|
|
58021
58256
|
imgScale: 2,
|
|
58022
58257
|
centered: true
|
|
58023
|
-
}) : React__default.createElement(SpriteFromAtlas, {
|
|
58258
|
+
}) : item.texturePath ? React__default.createElement(SpriteFromAtlas, {
|
|
58024
58259
|
atlasJSON: atlasJSON,
|
|
58025
58260
|
atlasIMG: atlasIMG,
|
|
58026
58261
|
spriteKey: item.texturePath,
|
|
@@ -58028,7 +58263,7 @@ var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
|
58028
58263
|
height: 32,
|
|
58029
58264
|
imgScale: 2,
|
|
58030
58265
|
centered: true
|
|
58031
|
-
})), React__default.createElement(ItemDetails$1, null, React__default.createElement(Header$8, null, React__default.createElement(ItemName$1, null, item.name)), availableCharacters.length > 0 && currentCharacter && React__default.createElement(SelectedSkinNav, null, React__default.createElement(SelectedSkin, null, "Selected:"), React__default.createElement(SkinNavArrow, {
|
|
58266
|
+
}) : React__default.createElement(DefaultIcon, null, "\uD83D\uDC64")), React__default.createElement(ItemDetails$1, null, React__default.createElement(Header$8, null, React__default.createElement(ItemName$1, null, item.name)), availableCharacters.length > 0 && currentCharacter && React__default.createElement(SelectedSkinNav, null, React__default.createElement(SelectedSkin, null, "Selected:"), React__default.createElement(SkinNavArrow, {
|
|
58032
58267
|
direction: "left",
|
|
58033
58268
|
onPointerDown: handlePreviousSkin,
|
|
58034
58269
|
size: 24
|
|
@@ -58046,7 +58281,11 @@ var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
|
58046
58281
|
var ItemWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
58047
58282
|
displayName: "StoreCharacterSkinRow__ItemWrapper",
|
|
58048
58283
|
componentId: "sc-81xqsx-0"
|
|
58049
|
-
})(["display:flex;align-items:center;gap:
|
|
58284
|
+
})(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 1rem;border-bottom:1px solid rgba(255,255,255,0.1);background:", ";border-left:", ";&:last-child{border-bottom:none;}"], function (props) {
|
|
58285
|
+
return props.$isHighlighted ? 'rgba(255, 215, 0, 0.1)' : 'transparent';
|
|
58286
|
+
}, function (props) {
|
|
58287
|
+
return props.$isHighlighted ? '3px solid #ffd700' : '3px solid transparent';
|
|
58288
|
+
});
|
|
58050
58289
|
var ItemIconContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58051
58290
|
displayName: "StoreCharacterSkinRow__ItemIconContainer",
|
|
58052
58291
|
componentId: "sc-81xqsx-1"
|
|
@@ -58054,23 +58293,23 @@ var ItemIconContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
58054
58293
|
var ItemDetails$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58055
58294
|
displayName: "StoreCharacterSkinRow__ItemDetails",
|
|
58056
58295
|
componentId: "sc-81xqsx-2"
|
|
58057
|
-
})(["flex:1;display:flex;flex-direction:column;gap:0.
|
|
58296
|
+
})(["flex:1;display:flex;flex-direction:column;gap:0.25rem;"]);
|
|
58058
58297
|
var ItemName$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58059
58298
|
displayName: "StoreCharacterSkinRow__ItemName",
|
|
58060
58299
|
componentId: "sc-81xqsx-3"
|
|
58061
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.
|
|
58300
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
|
|
58062
58301
|
var SelectedSkin = /*#__PURE__*/styled__default.div.withConfig({
|
|
58063
58302
|
displayName: "StoreCharacterSkinRow__SelectedSkin",
|
|
58064
58303
|
componentId: "sc-81xqsx-4"
|
|
58065
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.
|
|
58304
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:#fef08a;"]);
|
|
58066
58305
|
var ItemPrice = /*#__PURE__*/styled__default.div.withConfig({
|
|
58067
58306
|
displayName: "StoreCharacterSkinRow__ItemPrice",
|
|
58068
58307
|
componentId: "sc-81xqsx-5"
|
|
58069
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.
|
|
58308
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
|
|
58070
58309
|
var Controls = /*#__PURE__*/styled__default.div.withConfig({
|
|
58071
58310
|
displayName: "StoreCharacterSkinRow__Controls",
|
|
58072
58311
|
componentId: "sc-81xqsx-6"
|
|
58073
|
-
})(["display:flex;align-items:center;gap:
|
|
58312
|
+
})(["display:flex;align-items:center;gap:0.5rem;min-width:fit-content;"]);
|
|
58074
58313
|
// Styled arrow override for inline nav arrows
|
|
58075
58314
|
var SkinNavArrow = /*#__PURE__*/styled__default(SelectArrow).withConfig({
|
|
58076
58315
|
displayName: "StoreCharacterSkinRow__SkinNavArrow",
|
|
@@ -58084,42 +58323,77 @@ var SelectedSkinNav = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
58084
58323
|
displayName: "StoreCharacterSkinRow__SelectedSkinNav",
|
|
58085
58324
|
componentId: "sc-81xqsx-9"
|
|
58086
58325
|
})(["display:flex;align-items:center;gap:0.5rem;"]);
|
|
58326
|
+
var DefaultIcon = /*#__PURE__*/styled__default.div.withConfig({
|
|
58327
|
+
displayName: "StoreCharacterSkinRow__DefaultIcon",
|
|
58328
|
+
componentId: "sc-81xqsx-10"
|
|
58329
|
+
})(["font-size:1.5rem;display:flex;align-items:center;justify-content:center;width:32px;height:32px;"]);
|
|
58087
58330
|
|
|
58088
|
-
var
|
|
58089
|
-
|
|
58090
|
-
|
|
58091
|
-
|
|
58092
|
-
|
|
58093
|
-
|
|
58094
|
-
|
|
58095
|
-
|
|
58096
|
-
|
|
58097
|
-
|
|
58098
|
-
|
|
58099
|
-
var _useState = React.useState(1),
|
|
58331
|
+
var useQuantityControl = function useQuantityControl(initialQuantity, min, max) {
|
|
58332
|
+
if (initialQuantity === void 0) {
|
|
58333
|
+
initialQuantity = 1;
|
|
58334
|
+
}
|
|
58335
|
+
if (min === void 0) {
|
|
58336
|
+
min = 1;
|
|
58337
|
+
}
|
|
58338
|
+
if (max === void 0) {
|
|
58339
|
+
max = 99;
|
|
58340
|
+
}
|
|
58341
|
+
var _useState = React.useState(initialQuantity),
|
|
58100
58342
|
quantity = _useState[0],
|
|
58101
58343
|
setQuantity = _useState[1];
|
|
58102
|
-
var _useState2 = React.useState(''),
|
|
58103
|
-
textInputValue = _useState2[0],
|
|
58104
|
-
setTextInputValue = _useState2[1];
|
|
58105
58344
|
var handleQuantityChange = function handleQuantityChange(e) {
|
|
58106
|
-
var value = parseInt(e.target.value) ||
|
|
58107
|
-
setQuantity(Math.min(Math.max(
|
|
58345
|
+
var value = parseInt(e.target.value) || min;
|
|
58346
|
+
setQuantity(Math.min(Math.max(min, value), max));
|
|
58108
58347
|
};
|
|
58109
58348
|
var handleBlur = function handleBlur() {
|
|
58110
|
-
if (quantity <
|
|
58111
|
-
if (quantity >
|
|
58349
|
+
if (quantity < min) setQuantity(min);
|
|
58350
|
+
if (quantity > max) setQuantity(max);
|
|
58112
58351
|
};
|
|
58113
58352
|
var incrementQuantity = function incrementQuantity() {
|
|
58114
58353
|
setQuantity(function (prev) {
|
|
58115
|
-
return Math.min(prev + 1,
|
|
58354
|
+
return Math.min(prev + 1, max);
|
|
58116
58355
|
});
|
|
58117
58356
|
};
|
|
58118
58357
|
var decrementQuantity = function decrementQuantity() {
|
|
58119
58358
|
setQuantity(function (prev) {
|
|
58120
|
-
return Math.max(
|
|
58359
|
+
return Math.max(min, prev - 1);
|
|
58121
58360
|
});
|
|
58122
58361
|
};
|
|
58362
|
+
var resetQuantity = function resetQuantity() {
|
|
58363
|
+
setQuantity(initialQuantity);
|
|
58364
|
+
};
|
|
58365
|
+
return {
|
|
58366
|
+
quantity: quantity,
|
|
58367
|
+
setQuantity: setQuantity,
|
|
58368
|
+
handleQuantityChange: handleQuantityChange,
|
|
58369
|
+
handleBlur: handleBlur,
|
|
58370
|
+
incrementQuantity: incrementQuantity,
|
|
58371
|
+
decrementQuantity: decrementQuantity,
|
|
58372
|
+
resetQuantity: resetQuantity
|
|
58373
|
+
};
|
|
58374
|
+
};
|
|
58375
|
+
|
|
58376
|
+
var StoreItemRow = function StoreItemRow(_ref) {
|
|
58377
|
+
var _item$requiredAccount, _item$store;
|
|
58378
|
+
var item = _ref.item,
|
|
58379
|
+
atlasJSON = _ref.atlasJSON,
|
|
58380
|
+
atlasIMG = _ref.atlasIMG,
|
|
58381
|
+
onAddToCart = _ref.onAddToCart,
|
|
58382
|
+
userAccountType = _ref.userAccountType,
|
|
58383
|
+
_ref$showTextInput = _ref.showTextInput,
|
|
58384
|
+
showTextInput = _ref$showTextInput === void 0 ? false : _ref$showTextInput,
|
|
58385
|
+
_ref$textInputPlaceho = _ref.textInputPlaceholder,
|
|
58386
|
+
textInputPlaceholder = _ref$textInputPlaceho === void 0 ? item.inputPlaceholder : _ref$textInputPlaceho;
|
|
58387
|
+
var _useState = React.useState(''),
|
|
58388
|
+
textInputValue = _useState[0],
|
|
58389
|
+
setTextInputValue = _useState[1];
|
|
58390
|
+
var _useQuantityControl = useQuantityControl(),
|
|
58391
|
+
quantity = _useQuantityControl.quantity,
|
|
58392
|
+
handleQuantityChange = _useQuantityControl.handleQuantityChange,
|
|
58393
|
+
handleBlur = _useQuantityControl.handleBlur,
|
|
58394
|
+
incrementQuantity = _useQuantityControl.incrementQuantity,
|
|
58395
|
+
decrementQuantity = _useQuantityControl.decrementQuantity,
|
|
58396
|
+
resetQuantity = _useQuantityControl.resetQuantity;
|
|
58123
58397
|
var hasRequiredAccount = !((_item$requiredAccount = item.requiredAccountType) != null && _item$requiredAccount.length) || item.requiredAccountType.includes(userAccountType);
|
|
58124
58398
|
var handleAddToCartInternal = function handleAddToCartInternal() {
|
|
58125
58399
|
if (!hasRequiredAccount) return;
|
|
@@ -58130,10 +58404,12 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
58130
58404
|
setTextInputValue('');
|
|
58131
58405
|
} else {
|
|
58132
58406
|
onAddToCart(item, quantity);
|
|
58133
|
-
|
|
58407
|
+
resetQuantity();
|
|
58134
58408
|
}
|
|
58135
58409
|
};
|
|
58136
|
-
return React__default.createElement(ItemWrapper$1,
|
|
58410
|
+
return React__default.createElement(ItemWrapper$1, {
|
|
58411
|
+
"$isHighlighted": ((_item$store = item.store) == null ? void 0 : _item$store.isHighlighted) || false
|
|
58412
|
+
}, React__default.createElement(ItemIconContainer$3, null, React__default.createElement(SpriteFromAtlas, {
|
|
58137
58413
|
atlasJSON: atlasJSON,
|
|
58138
58414
|
atlasIMG: atlasIMG,
|
|
58139
58415
|
spriteKey: item.texturePath,
|
|
@@ -58175,7 +58451,11 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
58175
58451
|
var ItemWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58176
58452
|
displayName: "StoreItemRow__ItemWrapper",
|
|
58177
58453
|
componentId: "sc-ptotuo-0"
|
|
58178
|
-
})(["display:flex;align-items:center;gap:
|
|
58454
|
+
})(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 1rem;border-bottom:1px solid rgba(255,255,255,0.1);background:", ";border-left:", ";&:last-child{border-bottom:none;}"], function (props) {
|
|
58455
|
+
return props.$isHighlighted ? 'rgba(255, 215, 0, 0.1)' : 'transparent';
|
|
58456
|
+
}, function (props) {
|
|
58457
|
+
return props.$isHighlighted ? '3px solid #ffd700' : '3px solid transparent';
|
|
58458
|
+
});
|
|
58179
58459
|
var ItemIconContainer$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58180
58460
|
displayName: "StoreItemRow__ItemIconContainer",
|
|
58181
58461
|
componentId: "sc-ptotuo-1"
|
|
@@ -58183,15 +58463,15 @@ var ItemIconContainer$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
58183
58463
|
var ItemDetails$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58184
58464
|
displayName: "StoreItemRow__ItemDetails",
|
|
58185
58465
|
componentId: "sc-ptotuo-2"
|
|
58186
|
-
})(["flex:1;display:flex;flex-direction:column;gap:0.
|
|
58466
|
+
})(["flex:1;display:flex;flex-direction:column;gap:0.25rem;"]);
|
|
58187
58467
|
var ItemName$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58188
58468
|
displayName: "StoreItemRow__ItemName",
|
|
58189
58469
|
componentId: "sc-ptotuo-3"
|
|
58190
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.
|
|
58470
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
|
|
58191
58471
|
var ItemPrice$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58192
58472
|
displayName: "StoreItemRow__ItemPrice",
|
|
58193
58473
|
componentId: "sc-ptotuo-4"
|
|
58194
|
-
})(["font-family:'Press Start 2P',cursive;font-size:0.
|
|
58474
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
|
|
58195
58475
|
var ItemDescription = /*#__PURE__*/styled__default.div.withConfig({
|
|
58196
58476
|
displayName: "StoreItemRow__ItemDescription",
|
|
58197
58477
|
componentId: "sc-ptotuo-5"
|
|
@@ -58199,7 +58479,7 @@ var ItemDescription = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
58199
58479
|
var Controls$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58200
58480
|
displayName: "StoreItemRow__Controls",
|
|
58201
58481
|
componentId: "sc-ptotuo-6"
|
|
58202
|
-
})(["display:flex;align-items:center;gap:
|
|
58482
|
+
})(["display:flex;align-items:center;gap:0.5rem;min-width:fit-content;"]);
|
|
58203
58483
|
var ArrowsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
58204
58484
|
displayName: "StoreItemRow__ArrowsContainer",
|
|
58205
58485
|
componentId: "sc-ptotuo-7"
|
|
@@ -58213,6 +58493,50 @@ var TextInput = /*#__PURE__*/styled__default.input.withConfig({
|
|
|
58213
58493
|
componentId: "sc-ptotuo-9"
|
|
58214
58494
|
})(["width:120px;text-align:center;margin:0 auto;font-size:0.875rem;background:rgba(0,0,0,0.2);color:#ffffff;border:none;padding:0.25rem;"]);
|
|
58215
58495
|
|
|
58496
|
+
var useStoreFiltering = function useStoreFiltering(items) {
|
|
58497
|
+
var _useState = React.useState(''),
|
|
58498
|
+
searchQuery = _useState[0],
|
|
58499
|
+
setSearchQuery = _useState[1];
|
|
58500
|
+
var _useState2 = React.useState('all'),
|
|
58501
|
+
selectedCategory = _useState2[0],
|
|
58502
|
+
setSelectedCategory = _useState2[1];
|
|
58503
|
+
var categoryOptions = React.useMemo(function () {
|
|
58504
|
+
var uniqueCategories = Array.from(new Set(items.map(function (item) {
|
|
58505
|
+
return item.itemType;
|
|
58506
|
+
})));
|
|
58507
|
+
var allCategories = ['all'].concat(uniqueCategories);
|
|
58508
|
+
return allCategories.map(function (category, index) {
|
|
58509
|
+
return {
|
|
58510
|
+
id: index,
|
|
58511
|
+
value: category,
|
|
58512
|
+
option: category === 'all' ? 'All' : category
|
|
58513
|
+
};
|
|
58514
|
+
});
|
|
58515
|
+
}, [items]);
|
|
58516
|
+
var filteredItems = React.useMemo(function () {
|
|
58517
|
+
return items.filter(function (item) {
|
|
58518
|
+
var matchesSearch = item.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
58519
|
+
var matchesCategory = selectedCategory === 'all' || item.itemType === selectedCategory;
|
|
58520
|
+
return matchesSearch && matchesCategory;
|
|
58521
|
+
}).sort(function (a, b) {
|
|
58522
|
+
var _a$store, _b$store;
|
|
58523
|
+
var aHighlighted = ((_a$store = a.store) == null ? void 0 : _a$store.isHighlighted) || false;
|
|
58524
|
+
var bHighlighted = ((_b$store = b.store) == null ? void 0 : _b$store.isHighlighted) || false;
|
|
58525
|
+
if (aHighlighted && !bHighlighted) return -1;
|
|
58526
|
+
if (!aHighlighted && bHighlighted) return 1;
|
|
58527
|
+
return 0;
|
|
58528
|
+
});
|
|
58529
|
+
}, [items, searchQuery, selectedCategory]);
|
|
58530
|
+
return {
|
|
58531
|
+
searchQuery: searchQuery,
|
|
58532
|
+
setSearchQuery: setSearchQuery,
|
|
58533
|
+
selectedCategory: selectedCategory,
|
|
58534
|
+
setSelectedCategory: setSelectedCategory,
|
|
58535
|
+
categoryOptions: categoryOptions,
|
|
58536
|
+
filteredItems: filteredItems
|
|
58537
|
+
};
|
|
58538
|
+
};
|
|
58539
|
+
|
|
58216
58540
|
var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
58217
58541
|
var items = _ref.items,
|
|
58218
58542
|
onAddToCart = _ref.onAddToCart,
|
|
@@ -58221,12 +58545,12 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
58221
58545
|
userAccountType = _ref.userAccountType,
|
|
58222
58546
|
_ref$textInputItemKey = _ref.textInputItemKeys,
|
|
58223
58547
|
textInputItemKeys = _ref$textInputItemKey === void 0 ? [] : _ref$textInputItemKey;
|
|
58224
|
-
var
|
|
58225
|
-
searchQuery =
|
|
58226
|
-
setSearchQuery =
|
|
58227
|
-
|
|
58228
|
-
|
|
58229
|
-
|
|
58548
|
+
var _useStoreFiltering = useStoreFiltering(items),
|
|
58549
|
+
searchQuery = _useStoreFiltering.searchQuery,
|
|
58550
|
+
setSearchQuery = _useStoreFiltering.setSearchQuery,
|
|
58551
|
+
setSelectedCategory = _useStoreFiltering.setSelectedCategory,
|
|
58552
|
+
categoryOptions = _useStoreFiltering.categoryOptions,
|
|
58553
|
+
filteredItems = _useStoreFiltering.filteredItems;
|
|
58230
58554
|
var renderStoreItem = function renderStoreItem(item) {
|
|
58231
58555
|
// Prefer a specialized character skin row when needed
|
|
58232
58556
|
if (item.metadataType === shared.MetadataType.CharacterSkin) {
|
|
@@ -58261,19 +58585,40 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
58261
58585
|
userAccountType: userAccountType || shared.UserAccountTypes.Free
|
|
58262
58586
|
});
|
|
58263
58587
|
};
|
|
58264
|
-
return React__default.createElement(
|
|
58588
|
+
return React__default.createElement(StoreContainer, null, React__default.createElement(SearchHeader$2, null, React__default.createElement(SearchBarContainer$1, null, React__default.createElement(SearchBar, {
|
|
58589
|
+
value: searchQuery,
|
|
58590
|
+
onChange: setSearchQuery,
|
|
58591
|
+
placeholder: "Search items..."
|
|
58592
|
+
})), React__default.createElement(DropdownContainer$2, null, React__default.createElement(Dropdown, {
|
|
58593
|
+
options: categoryOptions,
|
|
58594
|
+
onChange: function onChange(value) {
|
|
58595
|
+
return setSelectedCategory(value);
|
|
58596
|
+
},
|
|
58597
|
+
width: "100%"
|
|
58598
|
+
}))), React__default.createElement(ScrollableContent, {
|
|
58265
58599
|
items: filteredItems,
|
|
58266
58600
|
renderItem: renderStoreItem,
|
|
58267
|
-
emptyMessage: "No items
|
|
58268
|
-
searchOptions: {
|
|
58269
|
-
value: searchQuery,
|
|
58270
|
-
onChange: setSearchQuery,
|
|
58271
|
-
placeholder: 'Search items...'
|
|
58272
|
-
},
|
|
58601
|
+
emptyMessage: "No items match your filters.",
|
|
58273
58602
|
layout: "list",
|
|
58274
|
-
maxHeight: "
|
|
58275
|
-
});
|
|
58603
|
+
maxHeight: "350px"
|
|
58604
|
+
}));
|
|
58276
58605
|
};
|
|
58606
|
+
var StoreContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
58607
|
+
displayName: "StoreItemsSection__StoreContainer",
|
|
58608
|
+
componentId: "sc-l6f466-0"
|
|
58609
|
+
})(["display:flex;flex-direction:column;height:100%;gap:0.5rem;"]);
|
|
58610
|
+
var SearchHeader$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58611
|
+
displayName: "StoreItemsSection__SearchHeader",
|
|
58612
|
+
componentId: "sc-l6f466-1"
|
|
58613
|
+
})(["display:flex;gap:0.5rem;align-items:center;padding-top:0.25rem;"]);
|
|
58614
|
+
var SearchBarContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58615
|
+
displayName: "StoreItemsSection__SearchBarContainer",
|
|
58616
|
+
componentId: "sc-l6f466-2"
|
|
58617
|
+
})(["flex:0.75;"]);
|
|
58618
|
+
var DropdownContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58619
|
+
displayName: "StoreItemsSection__DropdownContainer",
|
|
58620
|
+
componentId: "sc-l6f466-3"
|
|
58621
|
+
})(["flex:0.25;min-width:140px;"]);
|
|
58277
58622
|
|
|
58278
58623
|
var ShoppingCardHorizontal = function ShoppingCardHorizontal(_ref) {
|
|
58279
58624
|
var title = _ref.title,
|
|
@@ -58338,13 +58683,30 @@ var CardFooter = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
58338
58683
|
componentId: "sc-ngkh06-6"
|
|
58339
58684
|
})(["margin-top:auto;padding-top:8px;border-top:1px solid rgba(255,255,255,0.1);"]);
|
|
58340
58685
|
|
|
58686
|
+
var usePackFiltering = function usePackFiltering(packs) {
|
|
58687
|
+
var _useState = React.useState(''),
|
|
58688
|
+
searchQuery = _useState[0],
|
|
58689
|
+
setSearchQuery = _useState[1];
|
|
58690
|
+
var filteredPacks = React.useMemo(function () {
|
|
58691
|
+
return packs.filter(function (pack) {
|
|
58692
|
+
return pack.title.toLowerCase().includes(searchQuery.toLowerCase());
|
|
58693
|
+
});
|
|
58694
|
+
}, [packs, searchQuery]);
|
|
58695
|
+
return {
|
|
58696
|
+
searchQuery: searchQuery,
|
|
58697
|
+
setSearchQuery: setSearchQuery,
|
|
58698
|
+
filteredPacks: filteredPacks
|
|
58699
|
+
};
|
|
58700
|
+
};
|
|
58701
|
+
|
|
58341
58702
|
var StorePacksSection = function StorePacksSection(_ref) {
|
|
58342
58703
|
var packs = _ref.packs,
|
|
58343
58704
|
onAddToCart = _ref.onAddToCart,
|
|
58344
58705
|
onSelectPack = _ref.onSelectPack;
|
|
58345
|
-
var
|
|
58346
|
-
searchQuery =
|
|
58347
|
-
setSearchQuery =
|
|
58706
|
+
var _usePackFiltering = usePackFiltering(packs),
|
|
58707
|
+
searchQuery = _usePackFiltering.searchQuery,
|
|
58708
|
+
setSearchQuery = _usePackFiltering.setSearchQuery,
|
|
58709
|
+
filteredPacks = _usePackFiltering.filteredPacks;
|
|
58348
58710
|
var renderPackFooter = React.useCallback(function (pack) {
|
|
58349
58711
|
return React__default.createElement(FooterContainer, null, React__default.createElement(Price, null, "$", pack.priceUSD), React__default.createElement(CTAButton, {
|
|
58350
58712
|
icon: React__default.createElement(fa.FaCartPlus, null),
|
|
@@ -58367,11 +58729,6 @@ var StorePacksSection = function StorePacksSection(_ref) {
|
|
|
58367
58729
|
}
|
|
58368
58730
|
});
|
|
58369
58731
|
}, [onSelectPack, renderPackFooter]);
|
|
58370
|
-
var filteredPacks = React.useMemo(function () {
|
|
58371
|
-
return packs.filter(function (pack) {
|
|
58372
|
-
return pack.title.toLowerCase().includes(searchQuery.toLowerCase());
|
|
58373
|
-
});
|
|
58374
|
-
}, [packs, searchQuery]);
|
|
58375
58732
|
return React__default.createElement(ScrollableContent, {
|
|
58376
58733
|
items: filteredPacks,
|
|
58377
58734
|
renderItem: renderPack,
|