@bagelink/vue 1.15.65 → 1.15.69
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/dist/components/charts/ChartTooltip.vue.d.ts +0 -8
- package/dist/components/charts/ChartTooltip.vue.d.ts.map +1 -1
- package/dist/components/charts/Donut.vue.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +8 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/index.cjs +31 -31
- package/dist/index.mjs +3288 -3279
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/charts/ChartTooltip.vue +5 -1
- package/src/components/charts/Donut.vue +3 -1
- package/src/components/layout/SidebarNavItem.vue +1 -1
- package/src/i18n/locales/en.json +4 -0
- package/src/i18n/locales/he.json +4 -0
package/package.json
CHANGED
|
@@ -7,11 +7,15 @@
|
|
|
7
7
|
* Positioned by the host via `style` (absolute left/top); the host owns
|
|
8
8
|
* mouse tracking. Non-interactive (pointer-events: none).
|
|
9
9
|
*/
|
|
10
|
+
import { useI18n } from '@bagelink/vue'
|
|
11
|
+
|
|
10
12
|
export interface TipRow { name: string; color?: string; value: string }
|
|
11
13
|
export interface TipStat { label: string; value: string }
|
|
12
14
|
|
|
13
15
|
defineOptions({ name: 'BglChartTooltip' })
|
|
14
16
|
|
|
17
|
+
const { $t } = useI18n()
|
|
18
|
+
|
|
15
19
|
withDefaults(defineProps<{
|
|
16
20
|
label?: string
|
|
17
21
|
/** Big focal number (used by single-value charts like the funnel). */
|
|
@@ -39,7 +43,7 @@ withDefaults(defineProps<{
|
|
|
39
43
|
</p>
|
|
40
44
|
|
|
41
45
|
<p v-if="total" class="bgl-tip__row bgl-tip__total flex align-items-center m-0">
|
|
42
|
-
<span class="bgl-tip__name">
|
|
46
|
+
<span class="bgl-tip__name">{{ $t('charts.total') }}</span>
|
|
43
47
|
<span class="bgl-tip__val tabular-nums">{{ total }}</span>
|
|
44
48
|
</p>
|
|
45
49
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* <Donut :data="segments" :legend-value="false" /> // legend shows only %
|
|
11
11
|
*/
|
|
12
12
|
import { computed, ref } from 'vue'
|
|
13
|
+
import { useI18n } from '@bagelink/vue'
|
|
13
14
|
import { ramp, resolveColor } from './core/palette'
|
|
14
15
|
import { formatValue, type ValueFormat } from './core/format'
|
|
15
16
|
import { useChartAnim } from './core/useChartAnim'
|
|
@@ -63,6 +64,7 @@ const props = withDefaults(defineProps<{
|
|
|
63
64
|
animated: true,
|
|
64
65
|
})
|
|
65
66
|
|
|
67
|
+
const { $t } = useI18n()
|
|
66
68
|
const el = ref<HTMLElement>()
|
|
67
69
|
const { progress } = useChartAnim({ el, enabled: props.animated, duration: 800 })
|
|
68
70
|
|
|
@@ -153,7 +155,7 @@ function onMove(e: MouseEvent) {
|
|
|
153
155
|
}
|
|
154
156
|
const hoverArc = computed(() => (hoverIdx.value == null ? null : arcs.value[hoverIdx.value]))
|
|
155
157
|
const hoverValue = computed(() => (hoverArc.value ? fmtValue(hoverArc.value.value) : ''))
|
|
156
|
-
const hoverStats = computed(() => (hoverArc.value ? [{ label: '
|
|
158
|
+
const hoverStats = computed(() => (hoverArc.value ? [{ label: $t('charts.share'), value: `${hoverArc.value.pct.toFixed(0)}%` }] : []))
|
|
157
159
|
const tooltipStyle = computed(() => ({ left: `${tipX.value}px`, top: `${tipY.value}px` }))
|
|
158
160
|
</script>
|
|
159
161
|
|
|
@@ -92,7 +92,7 @@ function onParentClick() {
|
|
|
92
92
|
>
|
|
93
93
|
<Icon :name="link.icon" size="1.2" />
|
|
94
94
|
<span class="nav-text flex-grow">{{ resolveI18n(link.label) }}</span>
|
|
95
|
-
<Icon name="expand_more" size="1.1" class="nav-text sidebar-chevron" :class="{ 'sidebar-chevron-open': expanded }" />
|
|
95
|
+
<Icon name="expand_more" size="1.1" class="nav-text sidebar-chevron line-height-1" :class="{ 'sidebar-chevron-open': expanded }" />
|
|
96
96
|
</Btn>
|
|
97
97
|
<div class="sidebar-children" :class="{ 'sidebar-children-open': expanded }">
|
|
98
98
|
<div class="sidebar-children-inner ps-1">
|
package/src/i18n/locales/en.json
CHANGED