Skip to content

Commit

Permalink
chore: linting/formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ctot-nondef committed Sep 9, 2024
1 parent d1a70ef commit 95797ae
Show file tree
Hide file tree
Showing 39 changed files with 132 additions and 134 deletions.
2 changes: 1 addition & 1 deletion src/components/CombinedMapChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const pieInfo: Array<PieInfo> = [
const pieInfoWithData: ComputedRef<Array<PieInfoWithData>> = computed(() => {
return dataByRegion.value.map((regionData) => {
const [region] = regionData;
let [_, ...values] = regionData;
const [_, ...values] = regionData;
values.pop();
const queryData = props.queries.map((query) => ({
color: query.color,
Expand Down
14 changes: 7 additions & 7 deletions src/components/CorpsumDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const t = useTranslations("Corpsum");
<TableHead v-for="header in headerGroup.headers" :key="header.id">
<FlexRender
v-if="!header.isPlaceholder"
:render="header.column.columnDef.header"
:props="header.getContext()"
:render="header.column.columnDef.header"
/>
</TableHead>
</TableRow>
Expand All @@ -58,13 +58,13 @@ const t = useTranslations("Corpsum");
:data-state="row.getIsSelected() ? 'selected' : undefined"
>
<TableCell v-for="cell in row.getVisibleCells()" :key="cell.id">
<FlexRender :render="cell.column.columnDef.cell" :props="cell.getContext()" />
<FlexRender :props="cell.getContext()" :render="cell.column.columnDef.cell" />
</TableCell>
</TableRow>
</template>
<template v-else>
<TableRow>
<TableCell :colspan="columns.length" class="h-24 text-center">
<TableCell class="h-24 text-center" :colspan="columns.length">
{{ t("No results.") }}
</TableCell>
</TableRow>
Expand All @@ -79,18 +79,18 @@ const t = useTranslations("Corpsum");
</div>
<div class="space-x-2">
<Button
variant="outline"
size="sm"
:disabled="!table.getCanPreviousPage()"
size="sm"
variant="outline"
@click="table.previousPage()"
>
{{ t("previous") }}
</Button>
<Button
variant="outline"
class="mr-2"
size="sm"
:disabled="!table.getCanNextPage()"
size="sm"
variant="outline"
@click="table.nextPage()"
>
{{ t("next") }}
Expand Down
12 changes: 6 additions & 6 deletions src/components/DataDisplay/DataDisplayCollocations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ function pointFormatter() {

<VCardText class="py-0">
<VBtnToggle v-model="mode" density="compact">
<VBtn variant="outlined" value="coll_freq">
<VBtn value="coll_freq" variant="outlined">
{{ t("coll_freq") }}
</VBtn>
<VBtn variant="outlined" value="freq">{{ t("freq") }}</VBtn>
<VBtn value="freq" variant="outlined">{{ t("freq") }}</VBtn>
</VBtnToggle>

<div v-for="(query, index) of queries" :key="query.id">
<QueryDisplay :query="query" :loading="collocationsLoading[index]" />
<QueryDisplay :loading="collocationsLoading[index]" :query="query" />
<HighCharts
v-if="!collocationsLoading[index]"
:options="{
Expand All @@ -195,17 +195,17 @@ function pointFormatter() {
<VExpandTransition v-if="expand">
<DataDisplaySourceTable
v-if="!loading"
:queries="queries"
:data="sortedCollocations"
:loading="collocationsLoading"
datatype="collocations"
:loading="collocationsLoading"
:queries="queries"
></DataDisplaySourceTable>
</VExpandTransition>

<VDivider></VDivider>

<VCardActions>
<VBtn variant="outlined" size="small" @click="expand = !expand">
<VBtn size="small" variant="outlined" @click="expand = !expand">
{{ !expand ? t("ShowData") : t("HideData") }}
</VBtn>
</VCardActions>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DataDisplay/DataDisplayKeywordInContext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const columns = getKWICColumns(t as unknown as (s: string) => string, open);
<VCheckbox v-model="showViewOptionsMode" :label="t('viewOptions')"></VCheckbox>
<KWICAttributeSelect v-if="showViewOptionsMode" :query="query" />
<div>
<QueryDisplay :query="query" :loading="KWICresultsLoading[index]" />
<QueryDisplay :loading="KWICresultsLoading[index]" :query="query" />

<CorpsumDataTable
v-if="!KWICresultsLoading[index]"
Expand All @@ -100,8 +100,8 @@ const columns = getKWICColumns(t as unknown as (s: string) => string, open);

<KWICDetailDialog
v-if="selectedKWIC"
:query="query"
:kwic="selectedKWIC"
:query="query"
@close="selectedKWIC = null"
/>
</div>
Expand Down
22 changes: 11 additions & 11 deletions src/components/DataDisplay/DataDisplayMediaSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,52 +80,52 @@ const isStacked = computed(() => chartMode.value === "stack");
<VCardText>
<div class="flex items-center gap-2">
<VBtnToggle v-model="chartMode" density="compact">
<VBtn variant="outlined" value="stack">
<VBtn value="stack" variant="outlined">
<VIcon icon="mdi-chart-bar-stacked" />
<VTooltip location="top" activator="parent">stacked bar chart</VTooltip>
<VTooltip activator="parent" location="top">stacked bar chart</VTooltip>
</VBtn>
<VBtn variant="outlined" value="seperate">
<VBtn value="seperate" variant="outlined">
<VIcon icon="mdi-poll" />
<VTooltip location="top" activator="parent">seperated bar chart</VTooltip>
<VTooltip activator="parent" location="top">seperated bar chart</VTooltip>
</VBtn>
</VBtnToggle>

<VBtnToggle v-model="mode" density="compact">
<VBtn variant="outlined" value="absolute">{{ t("absolute") }}</VBtn>
<VBtn variant="outlined" value="relative">{{ t("relative") }}</VBtn>
<VBtn value="absolute" variant="outlined">{{ t("absolute") }}</VBtn>
<VBtn value="relative" variant="outlined">{{ t("relative") }}</VBtn>
</VBtnToggle>
</div>
<div v-for="(query, index) of queries" :key="query.id">
<div v-if="sourceDistributionsLoading[index]">
<QueryDisplay :query="query" :loading="sourceDistributionsLoading[index]" />
<QueryDisplay :loading="sourceDistributionsLoading[index]" :query="query" />
</div>
</div>
<!-- {{ series }} -->
<!-- {{ chartMode }} -->

<template v-if="sourceDistributions && queries">
<MediaStackedBarChart
:mode="mode as 'absolute' | 'relative'"
:queries="queries"
:source-distributions="sourceDistributions"
:mode="mode as 'absolute' | 'relative'"
:stack="isStacked"
/>
</template>
</VCardText>

<VExpandTransition v-if="expand">
<DataDisplaySourceTable
:queries="queries"
datatype="mediaSources"
:data="sourceDistributions"
datatype="mediaSources"
:loading="sourceDistributionsLoading"
:queries="queries"
></DataDisplaySourceTable>
</VExpandTransition>

<VDivider></VDivider>

<VCardActions>
<VBtn variant="outlined" size="small" @click="expand = !expand">
<VBtn size="small" variant="outlined" @click="expand = !expand">
{{ !expand ? t("ShowData") : t("HideData") }}
</VBtn>
</VCardActions>
Expand Down
30 changes: 15 additions & 15 deletions src/components/DataDisplay/DataDisplayRegionalFrequencies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,57 +98,57 @@ const expand = ref(false);
<VCardText class="py-0">
<div class="flex items-center gap-2">
<VBtnToggle v-model="chartMode" density="compact">
<VBtn variant="outlined" value="combined">
<VBtn value="combined" variant="outlined">
<VIcon icon="mdi-map" />
<VIcon icon="mdi-chart-pie-outline" class="ml-[-0.3rem]" />
<VIcon class="ml-[-0.3rem]" icon="mdi-chart-pie-outline" />

<VTooltip location="top" activator="parent">combined map chart</VTooltip>
<VTooltip activator="parent" location="top">combined map chart</VTooltip>
</VBtn>
<VBtn variant="outlined" value="seperate">
<VIcon icon="mdi-map" class="z-30 bg-white" />
<VIcon icon="mdi-map" class="z-20 -mt-2 ml-[-0.80rem]" />
<VTooltip location="top" activator="parent">seperated map charts</VTooltip>
<VBtn value="seperate" variant="outlined">
<VIcon class="z-30 bg-white" icon="mdi-map" />
<VIcon class="z-20 -mt-2 ml-[-0.80rem]" icon="mdi-map" />
<VTooltip activator="parent" location="top">seperated map charts</VTooltip>
</VBtn>
</VBtnToggle>
<VBtnToggle v-model="mode" density="compact">
<VBtn variant="outlined" value="absolute">{{ t("absolute") }}</VBtn>
<VBtn variant="outlined" value="relative">{{ t("relative") }}</VBtn>
<VBtn value="absolute" variant="outlined">{{ t("absolute") }}</VBtn>
<VBtn value="relative" variant="outlined">{{ t("relative") }}</VBtn>
</VBtnToggle>
</div>
<!-- <JsonViewer boxed :value="regionalFrequencies" :expand-depth="5"></JsonViewer> -->

<div v-for="(query, index) of queries" :key="query.id">
<div class="mt-1">
<QueryDisplay :query="query" :loading="regionalFrequenciesLoading[index]" />
<QueryDisplay :loading="regionalFrequenciesLoading[index]" :query="query" />
<ClientOnly v-if="!regionalFrequenciesLoading[index] && regionalFrequencies[index]">
<MapChart
v-if="!isCombined"
:mode="mode"
:query="query"
:resdata="regionalFrequencies[index].data"
:mode="mode"
/>
</ClientOnly>
</div>
</div>
<div v-if="isCombined && !loading && queries.length > 0">
<CombinedMapChart :queries="queries" :resdata="regionalFrequencies" :mode="mode" />
<CombinedMapChart :mode="mode" :queries="queries" :resdata="regionalFrequencies" />
<!-- <DemoChart /> -->
</div>
</VCardText>

<VExpandTransition v-if="expand">
<DataDisplaySourceTable
:data="regionalFrequencies.map((a) => a.data)"
datatype="regionalFrequencies"
:queries="queries"
:loading="regionalFrequenciesLoading"
:data="regionalFrequencies.map((a) => a.data)"
:queries="queries"
></DataDisplaySourceTable>
</VExpandTransition>

<VDivider></VDivider>

<VCardActions>
<VBtn variant="outlined" size="small" @click="expand = !expand">
<VBtn size="small" variant="outlined" @click="expand = !expand">
{{ !expand ? t("ShowData") : t("HideData") }}
</VBtn>
</VCardActions>
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataDisplay/DataDisplaySourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const columns = computed(() => {
<div v-for="(query, index) of props.queries" :key="query.id">
<VWindowItem :value="query.id">
<div>
<QueryDisplay :query="query" :loading="loading[index]" />
<QueryDisplay :loading="loading[index]" :query="query" />
<CorpsumDataTable v-if="!loading[index]" :columns="columns" :data="data[index]!" />
</div>
</VWindowItem>
Expand Down
12 changes: 6 additions & 6 deletions src/components/DataDisplay/DataDisplayWordFormFrequencies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ const expand = ref(false);

<VCardText class="py-0">
<VBtnToggle v-model="mode" density="compact">
<VBtn variant="outlined" value="absolute">{{ t("absolute") }}</VBtn>
<VBtn variant="outlined" value="relative">{{ t("relative") }}</VBtn>
<VBtn value="absolute" variant="outlined">{{ t("absolute") }}</VBtn>
<VBtn value="relative" variant="outlined">{{ t("relative") }}</VBtn>
</VBtnToggle>
<div v-for="(query, index) of queries" :key="query.id">
<QueryDisplay :query="query" :loading="wordFormFrequenciesLoading[index]" />
<QueryDisplay :loading="wordFormFrequenciesLoading[index]" :query="query" />
<HighCharts
:options="{
chart: {
Expand Down Expand Up @@ -109,17 +109,17 @@ const expand = ref(false);

<VExpandTransition v-if="expand">
<DataDisplaySourceTable
:queries="queries"
:loading="wordFormFrequenciesLoading"
:data="wordFormFrequencies"
datatype="wordFormFrequencies"
:loading="wordFormFrequenciesLoading"
:queries="queries"
></DataDisplaySourceTable>
</VExpandTransition>

<VDivider></VDivider>

<VCardActions>
<VBtn variant="outlined" size="small" @click="expand = !expand">
<VBtn size="small" variant="outlined" @click="expand = !expand">
{{ !expand ? t("ShowData") : t("HideData") }}
</VBtn>
</VCardActions>
Expand Down
12 changes: 6 additions & 6 deletions src/components/DataDisplay/DataDisplayYearlyFrequencies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ const series = computed(() =>

<VCardText class="py-0">
<VBtnToggle v-model="mode" density="compact">
<VBtn variant="outlined" value="absolute">{{ t("absolute") }}</VBtn>
<VBtn variant="outlined" value="relative">{{ t("relative") }}</VBtn>
<VBtn value="absolute" variant="outlined">{{ t("absolute") }}</VBtn>
<VBtn value="relative" variant="outlined">{{ t("relative") }}</VBtn>
</VBtnToggle>
<div v-for="(query, index) of queries" :key="query.id">
<QueryDisplay :query="query" :loading="yearlyFrequenciesLoading[index]" />
<QueryDisplay :loading="yearlyFrequenciesLoading[index]" :query="query" />
</div>
<HighCharts
:options="{
Expand All @@ -115,17 +115,17 @@ const series = computed(() =>

<VExpandTransition v-if="expand">
<DataDisplaySourceTable
:queries="queries"
:data="yearlyFrequencies"
:loading="yearlyFrequenciesLoading"
datatype="yearlyFrequencies"
:loading="yearlyFrequenciesLoading"
:queries="queries"
></DataDisplaySourceTable>
</VExpandTransition>

<VDivider></VDivider>

<VCardActions>
<VBtn variant="outlined" size="small" @click="expand = !expand">
<VBtn size="small" variant="outlined" @click="expand = !expand">
{{ !expand ? t("ShowData") : t("HideData") }}
</VBtn>
</VCardActions>
Expand Down
Loading

0 comments on commit 95797ae

Please sign in to comment.