Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lua/wikis/ageofempires/MatchSummary/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Custom')
local SummaryHelper = Lua.import('Module:MatchSummary/Base/Ffa')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local WidgetUtil = Lua.import('Module:Widget/Util')

---@param props {bracketId: string, matchId: string}
---@return Widget
---@return Renderable
function CustomMatchSummary.getByMatchId(props)
---@class FFAMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match FFAMatchGroupUtilMatch
SummaryHelper.updateMatchOpponents(match)
local scoringData = SummaryHelper.createScoringData(match)

return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Header{matchId = match.matchId, games = match.games},
MatchSummaryWidgets.Tab{
matchId = match.matchId,
Expand Down
8 changes: 4 additions & 4 deletions lua/wikis/apexlegends/MatchSummary/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Custom')
local SummaryHelper = Lua.import('Module:MatchSummary/Base/Ffa')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local WidgetUtil = Lua.import('Module:Widget/Util')

---@param props {bracketId: string, matchId: string}
---@return Widget
---@return Renderable
function CustomMatchSummary.getByMatchId(props)
---@class FFAMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match FFAMatchGroupUtilMatch
SummaryHelper.updateMatchOpponents(match)
local scoringData = SummaryHelper.createScoringData(match)

return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Header{matchId = match.matchId, games = match.games},
MatchSummaryWidgets.Tab{
matchId = match.matchId,
Expand Down
8 changes: 4 additions & 4 deletions lua/wikis/arenafps/MatchSummary/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Custom')
local SummaryHelper = Lua.import('Module:MatchSummary/Base/Ffa')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local WidgetUtil = Lua.import('Module:Widget/Util')

---@param props {bracketId: string, matchId: string}
---@return Widget
---@return Renderable
function CustomMatchSummary.getByMatchId(props)
---@class FFAMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match FFAMatchGroupUtilMatch
SummaryHelper.updateMatchOpponents(match)
local scoringData = SummaryHelper.createScoringData(match)

return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Header{matchId = match.matchId, games = match.games},
MatchSummaryWidgets.Tab{
matchId = match.matchId,
Expand Down
8 changes: 4 additions & 4 deletions lua/wikis/autochess/MatchSummary/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Custom')
local SummaryHelper = Lua.import('Module:MatchSummary/Base/Ffa')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local WidgetUtil = Lua.import('Module:Widget/Util')

---@param props {bracketId: string, matchId: string}
---@return Widget
---@return Renderable
function CustomMatchSummary.getByMatchId(props)
---@class FFAMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match FFAMatchGroupUtilMatch
SummaryHelper.updateMatchOpponents(match)
local scoringData = SummaryHelper.createScoringData(match)

return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Header{matchId = match.matchId, games = match.games},
MatchSummaryWidgets.Tab{
matchId = match.matchId,
Expand Down
8 changes: 4 additions & 4 deletions lua/wikis/callofduty/MatchSummary/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Custom')
local SummaryHelper = Lua.import('Module:MatchSummary/Base/Ffa')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local WidgetUtil = Lua.import('Module:Widget/Util')

---@param props {bracketId: string, matchId: string}
---@return Widget
---@return Renderable
function CustomMatchSummary.getByMatchId(props)
---@class FFAMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match FFAMatchGroupUtilMatch
SummaryHelper.updateMatchOpponents(match)
local scoringData = SummaryHelper.createScoringData(match)

return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Header{matchId = match.matchId, games = match.games},
MatchSummaryWidgets.Tab{
matchId = match.matchId,
Expand Down
2 changes: 1 addition & 1 deletion lua/wikis/commons/GameSummary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
---@param props {bracketId: string, matchId: string, gameIdx: integer}
---@return Html
function CustomGameSummary.getGameByMatchId(props)
---@class FFAMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match FFAMatchGroupUtilMatch

local game = match.games[props.gameIdx]
assert(game, 'Error Game ID ' .. tostring(props.gameIdx) .. ' not found')
Expand Down
36 changes: 18 additions & 18 deletions lua/wikis/commons/MatchSummary/Base/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ local OpponentDisplay = Lua.import('Module:OpponentDisplay/Custom')
local MatchUtil = Lua.import('Module:Match/Util')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local IconWidget = Lua.import('Module:Widget/Image/Icon/Fontawesome')

local MatchSummaryFfa = {}
Expand Down Expand Up @@ -87,9 +87,9 @@ local MATCH_OVERVIEW_COLUMNS = {
value = function (opponent, idx)
local place = opponent.placement ~= -1 and opponent.placement or idx
local placementDisplay = tostring(MatchSummaryWidgets.RankRange{rankStart = place})
return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Trophy{place = place, additionalClasses = {'panel-table__cell-icon'}},
HtmlWidgets.Span{children = placementDisplay},
Html.Span{children = placementDisplay},
}}
end,
},
Expand Down Expand Up @@ -187,9 +187,9 @@ local GAME_OVERVIEW_COLUMNS = {
else
placementDisplay = tostring(MatchSummaryWidgets.RankRange{rankStart = opponent.placement})
end
return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Trophy{place = opponent.placement, additionalClasses = {'panel-table__cell-icon'}},
HtmlWidgets.Span{
Html.Span{
classes = {'panel-table__cell-game__text'},
children = placementDisplay,
}
Expand Down Expand Up @@ -262,9 +262,9 @@ local GAME_STANDINGS_COLUMNS = {
else
placementDisplay = tostring(MatchSummaryWidgets.RankRange{rankStart = place})
end
return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Trophy{place = place, additionalClasses = {'panel-table__cell-icon'}},
HtmlWidgets.Span{children = placementDisplay},
Html.Span{children = placementDisplay},
}}
end,
},
Expand Down Expand Up @@ -418,7 +418,7 @@ end

---@param match table
---@param Parser FfaMatchSummaryParser?
---@return MatchSummaryFfaTable
---@return VNode
function MatchSummaryFfa.standardMatch(match, Parser)
Parser = Parser or {}
local matchColumns = Parser.adjustMatchColumns
Expand All @@ -442,13 +442,13 @@ function MatchSummaryFfa.standardMatch(match, Parser)
}
end)

local gameRowContainer = HtmlWidgets.Div{
local gameRowContainer = Html.Div{
classes = {'panel-table__cell', 'cell--game-container'},
attributes = {
['data-js-battle-royale'] = 'game-container'
},
children = Array.map(opponent.games, function(gameOpponent)
local gameRow = HtmlWidgets.Div{
local gameRow = Html.Div{
classes = {'panel-table__cell', 'cell--game'},
children = Array.map(gameOverviewColumns, function(column)
if column.show and not column.show(match) then
Expand Down Expand Up @@ -485,29 +485,29 @@ function MatchSummaryFfa.standardMatch(match, Parser)
local dates = Array.map(match.games, Operator.property('date'))
local gamesHaveDifferentDates = Array.any(dates, function(date) return date ~= match.date end)

table.insert(cells, HtmlWidgets.Div{
table.insert(cells, Html.Div{
classes = {'panel-table__cell', 'cell--game-container-nav-holder'},
attributes = {
['data-js-battle-royale'] = 'game-nav-holder'
},
children = {
HtmlWidgets.Div{
Html.Div{
classes = {'panel-table__cell', 'cell--game-container'},
attributes = {
['data-js-battle-royale'] = 'game-container'
},
children = Array.map(match.games, function(game, idx)
return HtmlWidgets.Div{
return Html.Div{
classes = {'panel-table__cell', 'cell--game'},
children = {
HtmlWidgets.Div{
Html.Div{
classes = {'panel-table__cell__game-head'},
children = {
HtmlWidgets.Div{
Html.Div{
classes = {'panel-table__cell__game-title'},
children = {
MatchSummaryWidgets.CountdownIcon{game = game, additionalClasses = {'panel-table__cell-icon'}},
HtmlWidgets.Span{
Html.Span{
classes = {'panel-table__cell-text'},
children = 'Game ' .. idx
}
Expand All @@ -516,7 +516,7 @@ function MatchSummaryFfa.standardMatch(match, Parser)
gamesHaveDifferentDates and MatchSummaryWidgets.GameCountdown{game = game} or nil,
}
},
HtmlWidgets.Div{
Html.Div{
classes = {'panel-table__cell__game-details'},
children = Array.map(gameOverviewColumns, function(column)
if column.show and not column.show(match) then
Expand Down Expand Up @@ -549,7 +549,7 @@ end

---@param game table
---@param Parser FfaGameSummaryParser?
---@return MatchSummaryFfaTable
---@return VNode
function MatchSummaryFfa.standardGame(game, Parser)
Parser = Parser or {}
local gameStandingsColumns = Parser.adjustGameStandingsColumns
Expand Down
10 changes: 5 additions & 5 deletions lua/wikis/commons/MatchSummary/Starcraft/Ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Custom')
local BaseMatchSummary = Lua.import('Module:MatchSummary/Base/Ffa')

local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Html = Lua.import('Module:Widget/Html')
local WidgetUtil = Lua.import('Module:Widget/Util')

---@type FfaMatchSummaryParser
---@class StarcraftFfaMatchSummaryParser: FfaMatchSummaryParser
local Parser = {}

---@param props {bracketId: string, matchId: string}
---@return Widget
---@return Renderable
function StarcraftMatchSummaryFfa.getByMatchId(props)
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
---@cast match StarcraftMatchGroupUtilMatch
---@cast match FFAMatchGroupUtilMatch

BaseMatchSummary.updateMatchOpponents(match)

return HtmlWidgets.Fragment{children = {
return Html.Fragment{children = {
MatchSummaryWidgets.Header{matchId = match.matchId, games = match.games},
MatchSummaryWidgets.Tab{
matchId = match.matchId,
Expand Down
2 changes: 1 addition & 1 deletion lua/wikis/commons/Widget/GeneralCollapsible/Toggle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local Span = Html.Span
---@field hideButtonChildren? Renderable|Renderable[]

---@param props CollapsibleToggleProps
---@return HtmlNode
---@return VNode
local function CollapsibleToggle(props)
local showButton = Button{
classes = {'general-collapsible-expand-button'},
Expand Down
2 changes: 1 addition & 1 deletion lua/wikis/commons/Widget/Match/Page/Comment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local Component = Lua.import('Module:Widget/Component')
local Html = Lua.import('Module:Widget/Html')

---@param props {children: Renderable|Renderable[]?}
---@return HtmlNode
---@return VNode
local function MatchPageComment(props)
return Html.Div{
classes = { 'match-bm-match-additional-comment' },
Expand Down
Loading
Loading