@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.15.65",
4
+ "version": "1.15.69",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -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">Total</span>
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: 'Share', value: `${hoverArc.value.pct.toFixed(0)}%` }] : []))
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">
@@ -491,5 +491,9 @@
491
491
  "office365": "Office 365",
492
492
  "yahoo": "Yahoo Calendar",
493
493
  "ics": "Calendar (ICS file)"
494
+ },
495
+ "charts": {
496
+ "total": "Total",
497
+ "share": "Share"
494
498
  }
495
499
  }
@@ -512,5 +512,9 @@
512
512
  "office365": "Office 365",
513
513
  "yahoo": "יומן Yahoo",
514
514
  "ics": "יומן (קובץ ICS)"
515
+ },
516
+ "charts": {
517
+ "total": "סה״כ",
518
+ "share": "חלק"
515
519
  }
516
520
  }