title: $:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/PageLayout/VisualizationDashboardLayout
name: <<lingo VisualizationDashboardLayout/Caption $:/plugins/linonetwo/visualization-dashboard/language/>>
description: <<lingo VisualizationDashboardLayout/Description $:/plugins/linonetwo/visualization-dashboard/language/>>
tags: $:/tags/Layout
icon: $:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/Icon/VisualizationDashboard

\whitespace trim
\define containerClasses()
tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$ visualization-dashboard-layout-container
\end
\import [subfilter{$:/core/config/GlobalImportFilter}]
\import [[$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/PageLayout/GaugeListItem]] [[$:/plugins/linonetwo/visualization-dashboard/ViewTemplate/WeekJournalSelect]]

\procedure list-grid-draggable-drop-actions()
<$macrocall $name="list-tagged-draggable-drop-actions" tag="$:/Tags/VisualizationDashboard/Gauge"/>
\end
\procedure redirected-navigate-actions()
  <$action-setfield $tiddler="$:/layout" text="" />
  <$action-navigate $to=<<event-navigateTo>> />
\end

<div class=<<containerClasses>>>
	<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
		<$messagecatcher $tm-navigate=<<redirected-navigate-actions>>>
			{{$:/core/ui/CommandPaletteTemplate}}
			<main class="visualization-dashboard-layout-main-area">
				{{$:/plugins/linonetwo/visualization-dashboard/ViewTemplate/WeekJournalSelect}}
				<div class="visualization-dashboard-layout-gauge-list-container">
					<$let 
						currentDateWeekOffset={{{ [<currentWeekIndexTiddler>get[text]else[0]] }}}
						currentDate={{{ [weekstart<currentDateWeekOffset>addweekday[]] }}}
						weekStartDate={{{ [weekstart<currentDateWeekOffset>,<currentDay>] }}}
						weekEndDate={{{ [weekend<currentDateWeekOffset>,<currentDay>] }}}
					>
						<$list filter="[all[shadows+tiddlers]tag[$:/Tags/VisualizationDashboard/Gauge]!is[draft]]">
							<$droppable
								actions=<<list-grid-draggable-drop-actions>>
								tag="div"
								class="visualization-dashboard-layout-gauge-item-container"
								style.grid-column=`span ${[{!!grid-column-span}]}$`
								style.grid-row=`span ${[{!!grid-row-span}]}$`
								enable=<<tv-enable-drag-and-drop>>
							>
								<<list-item>>
							</$droppable>
						</$list>
					</$let>
				</div>
			</main>
		</$messagecatcher>
	</$navigator>
</div>
</div>
