@xen-orchestra/web-core 0.20.1 → 0.21.0
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/lib/components/backup-state/VtsBackupState.vue +20 -17
- package/lib/components/cell-object/VtsCellObject.vue +4 -1
- package/lib/components/console/VtsActionsConsole.vue +7 -4
- package/lib/components/console/VtsClipboardConsole.vue +9 -6
- package/lib/components/copy-button/VtsCopyButton.vue +7 -14
- package/lib/components/dropdown/DropdownTitle.vue +5 -2
- package/lib/components/icon/NewVtsIcon.vue +49 -0
- package/lib/components/input-group/VtsInputGroup.vue +41 -0
- package/lib/components/input-wrapper/VtsInputWrapper.vue +2 -2
- package/lib/components/layout/VtsLayoutSidebar.vue +6 -3
- package/lib/components/linear-chart/VtsLinearChart.vue +4 -0
- package/lib/components/object-icon/VtsObjectIcon.vue +22 -0
- package/lib/components/quick-info-card/VtsQuickInfoCard.vue +4 -1
- package/lib/components/select/VtsOption.vue +10 -6
- package/lib/components/select/VtsSelect.vue +74 -50
- package/lib/components/state-hero/VtsAllDoneHero.vue +4 -1
- package/lib/components/state-hero/VtsAllGoodHero.vue +4 -1
- package/lib/components/state-hero/VtsComingSoonHero.vue +4 -1
- package/lib/components/state-hero/VtsErrorNoDataHero.vue +4 -1
- package/lib/components/state-hero/VtsLoadingHero.vue +4 -1
- package/lib/components/state-hero/VtsNoDataHero.vue +4 -1
- package/lib/components/state-hero/VtsNoSelectionHero.vue +4 -1
- package/lib/components/state-hero/VtsObjectNotFoundHero.vue +4 -1
- package/lib/components/state-hero/VtsOfflineHero.vue +4 -1
- package/lib/components/state-hero/VtsPageNotFoundHero.vue +4 -1
- package/lib/components/table/ColumnTitle.vue +2 -2
- package/lib/components/task/VtsQuickTaskButton.vue +4 -1
- package/lib/components/task/VtsQuickTaskList.vue +5 -2
- package/lib/components/task/VtsQuickTaskTabBar.vue +8 -5
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +4 -1
- package/lib/components/ui/character-limit/UiCharacterLimit.vue +4 -1
- package/lib/components/ui/input/UiInput.vue +2 -2
- package/lib/components/ui/label/UiLabel.vue +4 -1
- package/lib/components/ui/progress-bar/UiProgressBar.vue +5 -2
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +9 -6
- package/lib/components/ui/quick-task-item/UiQuickTaskItem.vue +6 -3
- package/lib/components/ui/stacked-bar/StackedBarSegment.vue +4 -1
- package/lib/components/ui/table-pagination/UiTablePagination.vue +6 -3
- package/lib/components/ui/text-area/UiTextarea.vue +4 -1
- package/lib/components/ui/top-bottom-table/UiTopBottomTable.vue +6 -3
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +4 -1
- package/lib/composables/local-time-ago.composable.ts +53 -0
- package/lib/composables/locale-time-ago.composable.ts +53 -0
- package/lib/icons/fa-icons.ts +164 -0
- package/lib/icons/index.ts +15 -0
- package/lib/icons/legacy-icons.ts +80 -0
- package/lib/icons/object-icons.ts +187 -0
- package/lib/layouts/CoreLayout.vue +7 -3
- package/lib/locales/cs.json +0 -1
- package/lib/locales/de.json +1 -1
- package/lib/locales/en.json +32 -4
- package/lib/locales/es.json +1 -1
- package/lib/locales/fr.json +31 -3
- package/lib/locales/it.json +1 -1
- package/lib/locales/nl.json +1 -1
- package/lib/locales/ru.json +1 -1
- package/lib/locales/sv.json +1 -2
- package/lib/packages/collection/README.md +23 -18
- package/lib/packages/collection/create-collection.ts +22 -21
- package/lib/packages/collection/create-item.ts +21 -20
- package/lib/packages/collection/create-use-subset.ts +23 -0
- package/lib/packages/collection/guess-item-id.ts +26 -16
- package/lib/packages/collection/index.ts +4 -0
- package/lib/packages/collection/types.ts +65 -37
- package/lib/packages/collection/use-collection.ts +68 -18
- package/lib/packages/collection/use-flag-registry.ts +38 -17
- package/lib/packages/form-select/guess-label.ts +45 -0
- package/lib/packages/form-select/guess-value.ts +23 -0
- package/lib/packages/form-select/index.ts +6 -0
- package/lib/packages/form-select/normalize-search-term.ts +11 -0
- package/lib/packages/form-select/types.ts +90 -42
- package/lib/packages/form-select/use-form-option-controller.ts +7 -3
- package/lib/packages/form-select/use-form-select-controller.ts +38 -27
- package/lib/packages/form-select/use-form-select-keyboard-navigation.ts +1 -1
- package/lib/packages/form-select/use-form-select.ts +308 -130
- package/lib/packages/icon/DisplayIcon.vue +25 -0
- package/lib/packages/icon/DisplayIconAny.vue +16 -0
- package/lib/packages/icon/DisplayIconSingle.vue +35 -0
- package/lib/packages/icon/DisplayIconStack.vue +34 -0
- package/lib/packages/icon/README.md +286 -0
- package/lib/packages/icon/create-icon-bindings.ts +27 -0
- package/lib/packages/icon/define-icon-pack.ts +23 -0
- package/lib/packages/icon/define-icon-single.ts +17 -0
- package/lib/packages/icon/define-icon-stack.ts +20 -0
- package/lib/packages/icon/define-icon.ts +40 -0
- package/lib/packages/icon/generate-icon-variants.ts +17 -0
- package/lib/packages/icon/index.ts +8 -0
- package/lib/packages/icon/is-icon-stack.ts +5 -0
- package/lib/packages/icon/merge-icons.ts +25 -0
- package/lib/packages/icon/merge-transforms.ts +12 -0
- package/lib/packages/icon/normalize-icon.ts +25 -0
- package/lib/packages/icon/to-tuple.ts +7 -0
- package/lib/packages/icon/types.ts +72 -0
- package/lib/packages/job/README.md +2 -2
- package/lib/packages/mapper/README.md +166 -0
- package/lib/packages/mapper/convert-to-map.ts +5 -0
- package/lib/packages/mapper/create-mapper.ts +30 -0
- package/lib/packages/mapper/index.ts +4 -0
- package/lib/packages/mapper/types.ts +1 -0
- package/lib/packages/mapper/use-mapper.ts +31 -0
- package/lib/stores/sidebar.store.ts +1 -1
- package/lib/types/chart.ts +2 -2
- package/lib/types/utility.type.ts +9 -0
- package/lib/utils/object.util.ts +16 -0
- package/lib/utils/size.util.ts +4 -2
- package/package.json +2 -1
- package/lib/components/backup-item/VtsBackupItem.vue +0 -47
- package/lib/composables/mapper.composable.md +0 -74
- package/lib/composables/mapper.composable.ts +0 -18
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VtsStateHero :type class="vts-all-good-hero" image="all-good">
|
|
3
|
-
{{
|
|
3
|
+
{{ t('all-good') }}
|
|
4
4
|
</VtsStateHero>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
import { useI18n } from 'vue-i18n'
|
|
9
10
|
|
|
10
11
|
defineProps<{
|
|
11
12
|
type: StateHeroType
|
|
12
13
|
}>()
|
|
14
|
+
|
|
15
|
+
const { t } = useI18n()
|
|
13
16
|
</script>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VtsStateHero :type class="vts-coming-soon-hero" image="under-construction">
|
|
3
|
-
{{
|
|
3
|
+
{{ t('coming-soon') }}
|
|
4
4
|
</VtsStateHero>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
import { useI18n } from 'vue-i18n'
|
|
9
10
|
|
|
10
11
|
defineProps<{
|
|
11
12
|
type: StateHeroType
|
|
12
13
|
}>()
|
|
14
|
+
|
|
15
|
+
const { t } = useI18n()
|
|
13
16
|
</script>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<VtsStateHero class="vts-error-hero" image="error" :type>{{
|
|
2
|
+
<VtsStateHero class="vts-error-hero" image="error" :type>{{ t('error-no-data') }}</VtsStateHero>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
6
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
7
|
+
import { useI18n } from 'vue-i18n'
|
|
7
8
|
|
|
8
9
|
defineProps<{
|
|
9
10
|
type: StateHeroType
|
|
10
11
|
}>()
|
|
12
|
+
|
|
13
|
+
const { t } = useI18n()
|
|
11
14
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vts-loading-hero">
|
|
3
3
|
<VtsStateHero :type busy>
|
|
4
|
-
{{
|
|
4
|
+
{{ t('loading-in-progress') }}
|
|
5
5
|
</VtsStateHero>
|
|
6
6
|
<div v-if="slots.title || slots.text" class="content">
|
|
7
7
|
<div v-if="slots.title" class="title" :class="className">
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<script lang="ts" setup>
|
|
18
18
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
19
19
|
import { computed } from 'vue'
|
|
20
|
+
import { useI18n } from 'vue-i18n'
|
|
20
21
|
|
|
21
22
|
const { type } = defineProps<{
|
|
22
23
|
type: StateHeroType
|
|
@@ -27,6 +28,8 @@ const slots = defineSlots<{
|
|
|
27
28
|
text?(): any
|
|
28
29
|
}>()
|
|
29
30
|
|
|
31
|
+
const { t } = useI18n()
|
|
32
|
+
|
|
30
33
|
const className = computed(() => (type === 'page' ? 'typo-h1' : 'typo-h2'))
|
|
31
34
|
</script>
|
|
32
35
|
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<VtsStateHero class="vts-no-data-hero" image="no-data" :type>{{
|
|
2
|
+
<VtsStateHero class="vts-no-data-hero" image="no-data" :type>{{ t('no-data') }}</VtsStateHero>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
6
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
7
|
+
import { useI18n } from 'vue-i18n'
|
|
7
8
|
|
|
8
9
|
defineProps<{
|
|
9
10
|
type: StateHeroType
|
|
10
11
|
}>()
|
|
12
|
+
|
|
13
|
+
const { t } = useI18n()
|
|
11
14
|
</script>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VtsStateHero :type class="vts-no-selection-hero" image="no-selection">
|
|
3
|
-
{{
|
|
3
|
+
{{ t('select-to-see-details') }}
|
|
4
4
|
</VtsStateHero>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
import { useI18n } from 'vue-i18n'
|
|
9
10
|
|
|
10
11
|
defineProps<{
|
|
11
12
|
type: StateHeroType
|
|
12
13
|
}>()
|
|
14
|
+
|
|
15
|
+
const { t } = useI18n()
|
|
13
16
|
</script>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VtsStateHero class="vts-object-not-found-hero" image="no-result" :type>
|
|
3
|
-
{{
|
|
3
|
+
{{ t('object-not-found', { id }) }}
|
|
4
4
|
</VtsStateHero>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
import { useI18n } from 'vue-i18n'
|
|
9
10
|
|
|
10
11
|
defineProps<{
|
|
11
12
|
id: string
|
|
12
13
|
type: StateHeroType
|
|
13
14
|
}>()
|
|
15
|
+
|
|
16
|
+
const { t } = useI18n()
|
|
14
17
|
</script>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VtsStateHero :type class="vts-offline-hero" image="offline">
|
|
3
|
-
{{
|
|
3
|
+
{{ t('offline') }}
|
|
4
4
|
</VtsStateHero>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
import { useI18n } from 'vue-i18n'
|
|
9
10
|
|
|
10
11
|
defineProps<{
|
|
11
12
|
type: StateHeroType
|
|
12
13
|
}>()
|
|
14
|
+
|
|
15
|
+
const { t } = useI18n()
|
|
13
16
|
</script>
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VtsStateHero class="vts-page-not-found-hero" image="not-found" :type>
|
|
3
3
|
<span class="numeric">404</span><br />
|
|
4
|
-
{{
|
|
4
|
+
{{ t('page-not-found') }}
|
|
5
5
|
</VtsStateHero>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script lang="ts" setup>
|
|
9
9
|
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
10
|
+
import { useI18n } from 'vue-i18n'
|
|
10
11
|
|
|
11
12
|
defineProps<{
|
|
12
13
|
type: StateHeroType
|
|
13
14
|
}>()
|
|
15
|
+
|
|
16
|
+
const { t } = useI18n()
|
|
14
17
|
</script>
|
|
15
18
|
|
|
16
19
|
<style lang="postcss" scoped>
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
<MenuItem
|
|
20
20
|
v-for="interaction in interactions"
|
|
21
21
|
:key="interaction.id"
|
|
22
|
-
v-tooltip="
|
|
22
|
+
v-tooltip="t('coming-soon')"
|
|
23
23
|
:disabled="interaction.disabled"
|
|
24
24
|
:on-click="() => updateInteraction(interaction)"
|
|
25
25
|
>
|
|
26
26
|
<VtsIcon :icon="interaction.icon" accent="current" />
|
|
27
27
|
{{ interaction.label }}
|
|
28
28
|
<i v-if="currentInteraction?.id === interaction.id" class="current-interaction typo-body-regular-small">
|
|
29
|
-
{{
|
|
29
|
+
{{ t('core.current').toLowerCase() }}
|
|
30
30
|
</i>
|
|
31
31
|
</MenuItem>
|
|
32
32
|
</MenuList>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<UiButtonIcon
|
|
3
3
|
ref="buttonRef"
|
|
4
|
-
v-tooltip="{ content:
|
|
4
|
+
v-tooltip="{ content: t('tasks.quick-view'), placement: 'bottom-end' }"
|
|
5
5
|
accent="brand"
|
|
6
6
|
:dot="hasNewTask"
|
|
7
7
|
:icon="faBarsProgress"
|
|
@@ -24,12 +24,15 @@ import { faBarsProgress } from '@fortawesome/free-solid-svg-icons'
|
|
|
24
24
|
import { unrefElement, watchArray, whenever } from '@vueuse/core'
|
|
25
25
|
import placementJs from 'placement.js'
|
|
26
26
|
import { computed, nextTick, ref } from 'vue'
|
|
27
|
+
import { useI18n } from 'vue-i18n'
|
|
27
28
|
|
|
28
29
|
const props = defineProps<{
|
|
29
30
|
tasks: Task[]
|
|
30
31
|
loading?: boolean
|
|
31
32
|
}>()
|
|
32
33
|
|
|
34
|
+
const { t } = useI18n()
|
|
35
|
+
|
|
33
36
|
const ids = computed(() => props.tasks.map(task => task.id))
|
|
34
37
|
|
|
35
38
|
const isPanelOpen = ref(false)
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<li v-if="loading">
|
|
4
4
|
<div class="loading">
|
|
5
5
|
<UiLoader />
|
|
6
|
-
<div>{{
|
|
6
|
+
<div>{{ t('loading-in-progress') }}</div>
|
|
7
7
|
</div>
|
|
8
8
|
</li>
|
|
9
9
|
<template v-else>
|
|
10
|
-
<li v-if="tasks.length === 0" class="typo-body-bold">{{
|
|
10
|
+
<li v-if="tasks.length === 0" class="typo-body-bold">{{ t('tasks.no-tasks') }}</li>
|
|
11
11
|
<UiQuickTaskItem v-for="task of tasks" :key="task.id" :task />
|
|
12
12
|
</template>
|
|
13
13
|
</ul>
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
<script lang="ts" setup>
|
|
17
17
|
import UiLoader from '@core/components/ui/loader/UiLoader.vue'
|
|
18
18
|
import UiQuickTaskItem, { type Task } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
|
|
19
|
+
import { useI18n } from 'vue-i18n'
|
|
19
20
|
|
|
20
21
|
defineProps<{
|
|
21
22
|
tasks: Task[]
|
|
22
23
|
sublist?: boolean
|
|
23
24
|
loading?: boolean
|
|
24
25
|
}>()
|
|
26
|
+
|
|
27
|
+
const { t } = useI18n()
|
|
25
28
|
</script>
|
|
26
29
|
|
|
27
30
|
<style lang="postcss" scoped>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<TabList :disabled="loading">
|
|
3
3
|
<TabItem v-bind="tabs.pending.bindings">
|
|
4
|
-
{{
|
|
4
|
+
{{ t('tasks.quick-view.in-progress') }}
|
|
5
5
|
<UiCounter
|
|
6
6
|
v-if="pendingCount !== undefined"
|
|
7
7
|
:value="pendingCount"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/>
|
|
12
12
|
</TabItem>
|
|
13
13
|
<TabItem v-bind="tabs.success.bindings">
|
|
14
|
-
{{
|
|
14
|
+
{{ t('tasks.quick-view.done') }}
|
|
15
15
|
<UiCounter
|
|
16
16
|
v-if="successCount !== undefined"
|
|
17
17
|
:value="successCount"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
/>
|
|
22
22
|
</TabItem>
|
|
23
23
|
<TabItem v-bind="tabs.failure.bindings">
|
|
24
|
-
{{
|
|
24
|
+
{{ t('tasks.quick-view.failed') }}
|
|
25
25
|
<UiCounter
|
|
26
26
|
v-if="failureCount !== undefined"
|
|
27
27
|
:value="failureCount"
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
</TabItem>
|
|
33
33
|
<VtsDivider type="tab" />
|
|
34
34
|
<TabItem v-bind="tabs.all.bindings">
|
|
35
|
-
{{
|
|
35
|
+
{{ t('tasks.quick-view.all') }}
|
|
36
36
|
</TabItem>
|
|
37
37
|
<!--
|
|
38
38
|
TODO
|
|
39
39
|
<UiButton :right-icon="faAngleRight" class="see-all" level="tertiary" size="extra-small">
|
|
40
|
-
{{
|
|
40
|
+
{{ t('see-all') }}
|
|
41
41
|
</UiButton>
|
|
42
42
|
-->
|
|
43
43
|
</TabList>
|
|
@@ -50,6 +50,7 @@ import TabList from '@core/components/tab/TabList.vue'
|
|
|
50
50
|
import UiCounter from '@core/components/ui/counter/UiCounter.vue'
|
|
51
51
|
import type { TaskStatus } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
|
|
52
52
|
import { useTabList } from '@core/composables/tab-list.composable'
|
|
53
|
+
import { useI18n } from 'vue-i18n'
|
|
53
54
|
|
|
54
55
|
export type TaskTab = TaskStatus | 'all'
|
|
55
56
|
|
|
@@ -62,5 +63,7 @@ defineProps<{
|
|
|
62
63
|
|
|
63
64
|
const currentTab = defineModel<TaskTab>({ required: true })
|
|
64
65
|
|
|
66
|
+
const { t } = useI18n()
|
|
67
|
+
|
|
65
68
|
const { tabs } = useTabList<TaskTab>(['pending', 'success', 'failure', 'all'], currentTab)
|
|
66
69
|
</script>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<span class="label typo-caption-small">{{ label }}</span>
|
|
5
5
|
<div class="values" :class="fontClass">
|
|
6
6
|
<span v-if="percentValue !== undefined">
|
|
7
|
-
{{
|
|
7
|
+
{{ n(percentValue, 'percent') }}
|
|
8
8
|
</span>
|
|
9
9
|
<span>
|
|
10
10
|
{{ `${value ?? '-'} ${unit ?? ''}` }}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<script setup lang="ts">
|
|
17
17
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
18
18
|
import { computed } from 'vue'
|
|
19
|
+
import { useI18n } from 'vue-i18n'
|
|
19
20
|
|
|
20
21
|
const { size, value, max } = defineProps<{
|
|
21
22
|
label: string
|
|
@@ -25,6 +26,8 @@ const { size, value, max } = defineProps<{
|
|
|
25
26
|
max?: number
|
|
26
27
|
}>()
|
|
27
28
|
|
|
29
|
+
const { n } = useI18n()
|
|
30
|
+
|
|
28
31
|
const className = computed(() => toVariants({ size }))
|
|
29
32
|
const fontClass = computed(() => (size === 'medium' ? 'typo-h3' : 'typo-caption-small'))
|
|
30
33
|
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<!-- v1 -->
|
|
2
2
|
<template>
|
|
3
3
|
<span class="ui-character-limit" :class="classes">
|
|
4
|
-
{{
|
|
4
|
+
{{ t('core.character-limit', { count, max }) }}
|
|
5
5
|
</span>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script lang="ts" setup>
|
|
9
9
|
import { computed } from 'vue'
|
|
10
|
+
import { useI18n } from 'vue-i18n'
|
|
10
11
|
|
|
11
12
|
const { count, max } = defineProps<{
|
|
12
13
|
count: number
|
|
13
14
|
max: number
|
|
14
15
|
}>()
|
|
15
16
|
|
|
17
|
+
const { t } = useI18n()
|
|
18
|
+
|
|
16
19
|
const isTooLong = computed(() => count > max)
|
|
17
20
|
|
|
18
21
|
const classes = computed(() => {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
31
31
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
32
32
|
import type { LabelAccent } from '@core/components/ui/label/UiLabel.vue'
|
|
33
|
-
import { useMapper } from '@core/
|
|
33
|
+
import { useMapper } from '@core/packages/mapper/use-mapper.ts'
|
|
34
34
|
import { IK_INPUT_WRAPPER_CONTROLLER } from '@core/utils/injection-keys.util'
|
|
35
35
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
36
36
|
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
@@ -79,7 +79,7 @@ const accent = useMapper<LabelAccent, InputAccent>(
|
|
|
79
79
|
warning: 'warning',
|
|
80
80
|
danger: 'danger',
|
|
81
81
|
},
|
|
82
|
-
|
|
82
|
+
'neutral'
|
|
83
83
|
)
|
|
84
84
|
|
|
85
85
|
if (wrapperController) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<label :for="htmlFor" :class="{ required }" class="typo-caption label">
|
|
6
6
|
<slot />
|
|
7
7
|
</label>
|
|
8
|
-
<UiLink v-if="href" class="learn-more-link" size="small" :href>{{
|
|
8
|
+
<UiLink v-if="href" class="learn-more-link" size="small" :href>{{ t('learn-more') }}</UiLink>
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
@@ -14,6 +14,7 @@ import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
|
14
14
|
import UiLink from '@core/components/ui/link/UiLink.vue'
|
|
15
15
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
16
16
|
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
17
|
+
import { useI18n } from 'vue-i18n'
|
|
17
18
|
|
|
18
19
|
export type LabelAccent = 'neutral' | 'warning' | 'danger'
|
|
19
20
|
|
|
@@ -24,6 +25,8 @@ const { for: htmlFor } = defineProps<{
|
|
|
24
25
|
required?: boolean
|
|
25
26
|
href?: string
|
|
26
27
|
}>()
|
|
28
|
+
|
|
29
|
+
const { t } = useI18n()
|
|
27
30
|
</script>
|
|
28
31
|
|
|
29
32
|
<style lang="postcss" scoped>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<div class="fill" :style="{ width: `${fillWidth}%` }" />
|
|
6
6
|
</div>
|
|
7
7
|
<div v-if="shouldShowSteps" class="steps typo-body-regular-small">
|
|
8
|
-
<span>{{
|
|
9
|
-
<span v-for="step in steps" :key="step">{{
|
|
8
|
+
<span>{{ n(0, 'percent') }}</span>
|
|
9
|
+
<span v-for="step in steps" :key="step">{{ n(step, 'percent') }}</span>
|
|
10
10
|
</div>
|
|
11
11
|
<VtsLegendList class="legend">
|
|
12
12
|
<UiLegend :accent :value="Math.round(percentage)" unit="%">{{ legend }}</UiLegend>
|
|
@@ -20,6 +20,7 @@ import UiLegend from '@core/components/ui/legend/UiLegend.vue'
|
|
|
20
20
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
21
21
|
import { useClamp, useMax } from '@vueuse/math'
|
|
22
22
|
import { computed } from 'vue'
|
|
23
|
+
import { useI18n } from 'vue-i18n'
|
|
23
24
|
|
|
24
25
|
const {
|
|
25
26
|
value: _value,
|
|
@@ -32,6 +33,8 @@ const {
|
|
|
32
33
|
showSteps?: boolean
|
|
33
34
|
}>()
|
|
34
35
|
|
|
36
|
+
const { n } = useI18n()
|
|
37
|
+
|
|
35
38
|
const value = useMax(0, () => _value)
|
|
36
39
|
|
|
37
40
|
const percentage = computed(() => (max <= 0 ? 0 : (value.value / max) * 100))
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<form class="ui-query-search-bar" @submit.prevent="emit('search', value)">
|
|
4
4
|
<label v-if="uiStore.isDesktop" :for="id" class="typo-body-regular-small label">
|
|
5
|
-
{{
|
|
5
|
+
{{ t('core.query-search-bar.label') }}
|
|
6
6
|
</label>
|
|
7
7
|
<UiInput
|
|
8
8
|
:id
|
|
9
9
|
v-model="value"
|
|
10
10
|
type="text"
|
|
11
11
|
accent="brand"
|
|
12
|
-
:aria-label="uiStore.isMobile ?
|
|
12
|
+
:aria-label="uiStore.isMobile ? t('core.query-search-bar.label') : undefined"
|
|
13
13
|
:icon="uiStore.isDesktop ? faMagnifyingGlass : undefined"
|
|
14
|
-
:placeholder="
|
|
14
|
+
:placeholder="t('core.query-search-bar.placeholder')"
|
|
15
15
|
/>
|
|
16
16
|
<template v-if="uiStore.isDesktop">
|
|
17
|
-
<UiButton size="medium" accent="brand" variant="primary" type="submit">{{
|
|
17
|
+
<UiButton size="medium" accent="brand" variant="primary" type="submit">{{ t('core.search') }}</UiButton>
|
|
18
18
|
<VtsDivider type="stretch" />
|
|
19
19
|
<UiButton
|
|
20
|
-
v-tooltip="
|
|
20
|
+
v-tooltip="t('coming-soon')"
|
|
21
21
|
size="medium"
|
|
22
22
|
accent="brand"
|
|
23
23
|
variant="secondary"
|
|
24
24
|
:left-icon="faFilter"
|
|
25
25
|
disabled
|
|
26
26
|
>
|
|
27
|
-
{{
|
|
27
|
+
{{ t('core.query-search-bar.use-query-builder') }}
|
|
28
28
|
</UiButton>
|
|
29
29
|
</template>
|
|
30
30
|
<template v-else>
|
|
@@ -44,11 +44,14 @@ import { useUiStore } from '@core/stores/ui.store'
|
|
|
44
44
|
import { uniqueId } from '@core/utils/unique-id.util'
|
|
45
45
|
import { faFilter, faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons'
|
|
46
46
|
import { ref } from 'vue'
|
|
47
|
+
import { useI18n } from 'vue-i18n'
|
|
47
48
|
|
|
48
49
|
const emit = defineEmits<{
|
|
49
50
|
search: [value: string]
|
|
50
51
|
}>()
|
|
51
52
|
|
|
53
|
+
const { t } = useI18n()
|
|
54
|
+
|
|
52
55
|
const id = uniqueId('search-input-')
|
|
53
56
|
|
|
54
57
|
const uiStore = useUiStore()
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
<UiTag v-if="task.tag" accent="neutral" variant="primary">{{ task.tag }}</UiTag>
|
|
14
14
|
<div v-if="hasSubTasks" class="subtasks">
|
|
15
15
|
<VtsIcon :icon="faCircleNotch" accent="current" />
|
|
16
|
-
<span class="typo-body-regular-small">{{
|
|
16
|
+
<span class="typo-body-regular-small">{{ t('tasks.n-subtasks', { n: subTasksCount }) }}</span>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
<div v-if="task.start" class="line-2 typo-body-regular-small">
|
|
20
|
-
{{
|
|
20
|
+
{{ d(task.start, 'datetime_short') }}
|
|
21
21
|
<template v-if="task.end">
|
|
22
22
|
<VtsIcon :icon="faArrowRight" accent="current" />
|
|
23
|
-
{{
|
|
23
|
+
{{ d(new Date(task.end), 'datetime_short') }}
|
|
24
24
|
</template>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
@@ -37,6 +37,7 @@ import UiTag from '@core/components/ui/tag/UiTag.vue'
|
|
|
37
37
|
import { faAngleDown, faAngleRight, faArrowRight, faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
|
38
38
|
import { useToggle } from '@vueuse/core'
|
|
39
39
|
import { computed } from 'vue'
|
|
40
|
+
import { useI18n } from 'vue-i18n'
|
|
40
41
|
|
|
41
42
|
export type TaskStatus = 'pending' | 'success' | 'failure'
|
|
42
43
|
|
|
@@ -54,6 +55,8 @@ const props = defineProps<{
|
|
|
54
55
|
task: Task
|
|
55
56
|
}>()
|
|
56
57
|
|
|
58
|
+
const { t, d } = useI18n()
|
|
59
|
+
|
|
57
60
|
const [isExpanded, toggleExpand] = useToggle()
|
|
58
61
|
|
|
59
62
|
const subTasks = computed(() => props.task.subtasks ?? [])
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
class="stacked-bar-segment typo-caption-small"
|
|
8
8
|
>
|
|
9
9
|
<div ref="ellipsisElement" :class="{ hidden }" class="text-ellipsis">
|
|
10
|
-
{{
|
|
10
|
+
{{ n(percentage / 100, 'percent') }}
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
@@ -17,6 +17,7 @@ import { vTooltip } from '@core/directives/tooltip.directive'
|
|
|
17
17
|
import { hasEllipsis } from '@core/utils/has-ellipsis.util'
|
|
18
18
|
import { useResizeObserver } from '@vueuse/core'
|
|
19
19
|
import { ref } from 'vue'
|
|
20
|
+
import { useI18n } from 'vue-i18n'
|
|
20
21
|
|
|
21
22
|
export type StackedBarSegmentAccent = 'info' | 'success' | 'warning' | 'danger'
|
|
22
23
|
|
|
@@ -27,6 +28,8 @@ export type StackedBarSegmentProps = {
|
|
|
27
28
|
|
|
28
29
|
defineProps<StackedBarSegmentProps>()
|
|
29
30
|
|
|
31
|
+
const { n } = useI18n()
|
|
32
|
+
|
|
30
33
|
const hidden = ref(false)
|
|
31
34
|
const ellipsisElement = ref<HTMLElement | null>(null)
|
|
32
35
|
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
<PaginationButton :disabled="isLastPage" :icon="faAngleDoubleRight" @click="emit('last')" />
|
|
9
9
|
</div>
|
|
10
10
|
<span class="typo-body-regular-small label">
|
|
11
|
-
{{
|
|
11
|
+
{{ t('core.select.n-object-of', { from, to, total }) }}
|
|
12
12
|
</span>
|
|
13
|
-
<span class="typo-body-regular-small label show">{{
|
|
13
|
+
<span class="typo-body-regular-small label show">{{ t('core.pagination.show-by') }}</span>
|
|
14
14
|
<div class="dropdown-wrapper">
|
|
15
15
|
<select v-model="showBy" class="dropdown typo-body-regular-small">
|
|
16
16
|
<option v-for="option in [50, 100, 150, 200, -1]" :key="option" :value="option" class="typo-body-bold-small">
|
|
17
|
-
{{ option === -1 ?
|
|
17
|
+
{{ option === -1 ? t('core.pagination.all') : option }}
|
|
18
18
|
</option>
|
|
19
19
|
</select>
|
|
20
20
|
<VtsIcon :icon="faAngleDown" accent="current" class="icon" />
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
faAngleLeft,
|
|
33
33
|
faAngleRight,
|
|
34
34
|
} from '@fortawesome/free-solid-svg-icons'
|
|
35
|
+
import { useI18n } from 'vue-i18n'
|
|
35
36
|
|
|
36
37
|
defineProps<{
|
|
37
38
|
from: number
|
|
@@ -49,6 +50,8 @@ const emit = defineEmits<{
|
|
|
49
50
|
}>()
|
|
50
51
|
|
|
51
52
|
const showBy = defineModel<number>('showBy', { default: 50 })
|
|
53
|
+
|
|
54
|
+
const { t } = useI18n()
|
|
52
55
|
</script>
|
|
53
56
|
|
|
54
57
|
<style lang="postcss" scoped>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<textarea v-bind="attrs" :id ref="textarea" v-model="model" :disabled class="textarea" />
|
|
8
8
|
<UiCharacterLimit v-if="maxCharacters" :count="model.trim().length" :max="maxCharacters" />
|
|
9
9
|
<UiInfo v-if="isExceedingMaxCharacters" accent="danger">
|
|
10
|
-
{{
|
|
10
|
+
{{ t('core.textarea.exceeds-max-characters', { max: maxCharacters }) }}
|
|
11
11
|
</UiInfo>
|
|
12
12
|
<UiInfo v-if="slots.info" :accent="accent === 'brand' ? 'info' : accent">
|
|
13
13
|
<slot name="info" />
|
|
@@ -23,6 +23,7 @@ import { toVariants } from '@core/utils/to-variants.util'
|
|
|
23
23
|
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
24
24
|
import { useFocus } from '@vueuse/core'
|
|
25
25
|
import { computed, useAttrs, useId, useTemplateRef } from 'vue'
|
|
26
|
+
import { useI18n } from 'vue-i18n'
|
|
26
27
|
|
|
27
28
|
defineOptions({
|
|
28
29
|
inheritAttrs: false,
|
|
@@ -49,6 +50,8 @@ const slots = defineSlots<{
|
|
|
49
50
|
info?(): any
|
|
50
51
|
}>()
|
|
51
52
|
|
|
53
|
+
const { t } = useI18n()
|
|
54
|
+
|
|
52
55
|
const attrs = useAttrs()
|
|
53
56
|
|
|
54
57
|
const textAreaElement = useTemplateRef('textarea')
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="ui-top-bottom-table">
|
|
4
4
|
<div class="content">
|
|
5
5
|
<span class="typo-body-regular-small label">
|
|
6
|
-
{{
|
|
6
|
+
{{ t('core.select.n-selected-of', { count: selectedItems, total: totalItems }) }}
|
|
7
7
|
</span>
|
|
8
8
|
|
|
9
9
|
<UiButton
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
variant="tertiary"
|
|
14
14
|
@click="emit('toggleSelectAll', true)"
|
|
15
15
|
>
|
|
16
|
-
{{
|
|
16
|
+
{{ t('core.select.all') }}
|
|
17
17
|
</UiButton>
|
|
18
18
|
<UiButton
|
|
19
19
|
:disabled="selectedItems === 0"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
variant="tertiary"
|
|
23
23
|
@click="emit('toggleSelectAll', false)"
|
|
24
24
|
>
|
|
25
|
-
{{
|
|
25
|
+
{{ t('core.select.unselect') }}
|
|
26
26
|
</UiButton>
|
|
27
27
|
</div>
|
|
28
28
|
<slot />
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<script setup lang="ts">
|
|
33
33
|
import UiButton from '@core/components/ui/button/UiButton.vue'
|
|
34
|
+
import { useI18n } from 'vue-i18n'
|
|
34
35
|
|
|
35
36
|
defineProps<{
|
|
36
37
|
selectedItems: number
|
|
@@ -44,6 +45,8 @@ const emit = defineEmits<{
|
|
|
44
45
|
defineSlots<{
|
|
45
46
|
default(): any
|
|
46
47
|
}>()
|
|
48
|
+
|
|
49
|
+
const { t } = useI18n()
|
|
47
50
|
</script>
|
|
48
51
|
|
|
49
52
|
<style scoped lang="postcss">
|