-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 1.2.0
- Loading branch information
Showing
45 changed files
with
3,723 additions
and
3,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
<template> | ||
<GModal small :show="show" @hide="$emit('hide')" headless> | ||
<GTable compact showHelp :columns :items="items" sortedByField="occurrences" :sortDesc="true"> | ||
<template #title> | ||
Types of lemma <i>{{ variantsToDisplay?.lemma }}</i> and part-of-speech <i>{{ variantsToDisplay?.pos | ||
}}</i> | ||
</template> | ||
<template #help> | ||
This is an overview of all types belonging to the chosen lemma, part-of-speech pair. | ||
</template> | ||
</GTable> | ||
</GModal> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
// Libraries & stores | ||
import { computed } from 'vue' | ||
// Types & API | ||
import { Field } from '@/types/table' | ||
import { Distribution } from '@/types/evaluation' | ||
// Components | ||
import { GModal, GTable } from '@/components' | ||
// Custom types | ||
type DistEntry = { variant: string, occurrences: number } | ||
// Props | ||
const props = defineProps<{ | ||
show: boolean | ||
variantsToDisplay: Distribution | ||
}>(); | ||
// Fields | ||
const columns: Field[] = [ | ||
{ key: 'variant', label: 'Type', sortOn: (x: DistEntry) => x.variant }, | ||
{ key: 'occurrences', label: 'Occurrences', sortOn: (x: DistEntry) => x.occurrences } | ||
] | ||
const items: DistEntry[] = computed(() => { | ||
return Object.entries(props.variantsToDisplay.literals.literals).map(([variant, occurrences]) => ({ variant, occurrences })) | ||
}) | ||
</script> | ||
<style scoped> | ||
:deep(.my-small) { | ||
padding: 1em; | ||
} | ||
<template> | ||
<GModal small :show="show" @hide="$emit('hide')" headless> | ||
<GTable compact showHelp :columns :items="items" sortedByColumn="occurrences" :sortDesc="true"> | ||
<template #title> | ||
Types of lemma <i>{{ variantsToDisplay?.lemma }}</i> and part-of-speech <i>{{ variantsToDisplay?.pos | ||
}}</i> | ||
</template> | ||
<template #help> | ||
This is an overview of all types belonging to the chosen lemma, part-of-speech pair. | ||
</template> | ||
</GTable> | ||
</GModal> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
// Libraries & stores | ||
import { computed } from 'vue' | ||
// Types & API | ||
import { Field } from '@/types/table' | ||
import { Distribution } from '@/types/evaluation' | ||
// Components | ||
import { GModal, GTable } from '@/components' | ||
// Custom types | ||
type DistEntry = { variant: string, occurrences: number } | ||
// Props | ||
const props = defineProps<{ | ||
show: boolean | ||
variantsToDisplay: Distribution | ||
}>(); | ||
// Fields | ||
const columns: Field[] = [ | ||
{ key: 'variant', label: 'Type', sortOn: (x: DistEntry) => x.variant }, | ||
{ key: 'occurrences', label: 'Occurrences', sortOn: (x: DistEntry) => x.occurrences } | ||
] | ||
const items: DistEntry[] = computed(() => { | ||
return Object.entries(props.variantsToDisplay.literals.literals).map(([variant, occurrences]) => ({ variant, occurrences })) | ||
}) | ||
</script> | ||
<style scoped> | ||
:deep(.my-small) { | ||
padding: 1em; | ||
} | ||
</style> |
Oops, something went wrong.