@geotab/zenith 3.9.0-beta.3 → 3.9.0-beta.4
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/README.md +29 -0
- package/dist/chart/pieChart/centerTextPlugin.js +1 -2
- package/dist/chart/pieChart.js +10 -3
- package/dist/commonStyles/pillStyles/pillContent.less +3 -2
- package/dist/commonStyles/pillStyles/pillStyles.less +2 -1
- package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
- package/dist/commonStyles/typography/typography.less +251 -613
- package/dist/index.css +2738 -2499
- package/dist/utils/localization/translations/ar.json +0 -1
- package/dist/utils/localization/translations/cs.json +0 -1
- package/dist/utils/localization/translations/da-DK.json +0 -1
- package/dist/utils/localization/translations/de.json +0 -1
- package/dist/utils/localization/translations/en.json +0 -1
- package/dist/utils/localization/translations/es.json +0 -1
- package/dist/utils/localization/translations/fi-FI.json +0 -1
- package/dist/utils/localization/translations/fr-FR.json +0 -1
- package/dist/utils/localization/translations/fr.json +0 -1
- package/dist/utils/localization/translations/hu-HU.json +0 -1
- package/dist/utils/localization/translations/id.json +0 -1
- package/dist/utils/localization/translations/it.json +0 -1
- package/dist/utils/localization/translations/ja.json +0 -1
- package/dist/utils/localization/translations/ko-KR.json +0 -1
- package/dist/utils/localization/translations/ms.json +0 -1
- package/dist/utils/localization/translations/nb-NO.json +0 -1
- package/dist/utils/localization/translations/nl.json +0 -1
- package/dist/utils/localization/translations/pl.json +0 -1
- package/dist/utils/localization/translations/pt-BR.json +0 -1
- package/dist/utils/localization/translations/pt-PT.json +0 -1
- package/dist/utils/localization/translations/ro-RO.json +0 -1
- package/dist/utils/localization/translations/sk-SK.json +0 -1
- package/dist/utils/localization/translations/sv.json +0 -1
- package/dist/utils/localization/translations/th.json +0 -1
- package/dist/utils/localization/translations/tr.json +0 -1
- package/dist/utils/localization/translations/zh-Hans.json +0 -1
- package/dist/utils/localization/translations/zh-TW.json +0 -1
- package/esm/chart/pieChart/centerTextPlugin.js +1 -2
- package/esm/chart/pieChart.js +11 -4
- package/esm/utils/localization/translations/ar.json +0 -1
- package/esm/utils/localization/translations/cs.json +0 -1
- package/esm/utils/localization/translations/da-DK.json +0 -1
- package/esm/utils/localization/translations/de.json +0 -1
- package/esm/utils/localization/translations/en.json +0 -1
- package/esm/utils/localization/translations/es.json +0 -1
- package/esm/utils/localization/translations/fi-FI.json +0 -1
- package/esm/utils/localization/translations/fr-FR.json +0 -1
- package/esm/utils/localization/translations/fr.json +0 -1
- package/esm/utils/localization/translations/hu-HU.json +0 -1
- package/esm/utils/localization/translations/id.json +0 -1
- package/esm/utils/localization/translations/it.json +0 -1
- package/esm/utils/localization/translations/ja.json +0 -1
- package/esm/utils/localization/translations/ko-KR.json +0 -1
- package/esm/utils/localization/translations/ms.json +0 -1
- package/esm/utils/localization/translations/nb-NO.json +0 -1
- package/esm/utils/localization/translations/nl.json +0 -1
- package/esm/utils/localization/translations/pl.json +0 -1
- package/esm/utils/localization/translations/pt-BR.json +0 -1
- package/esm/utils/localization/translations/pt-PT.json +0 -1
- package/esm/utils/localization/translations/ro-RO.json +0 -1
- package/esm/utils/localization/translations/sk-SK.json +0 -1
- package/esm/utils/localization/translations/sv.json +0 -1
- package/esm/utils/localization/translations/th.json +0 -1
- package/esm/utils/localization/translations/tr.json +0 -1
- package/esm/utils/localization/translations/zh-Hans.json +0 -1
- package/esm/utils/localization/translations/zh-TW.json +0 -1
- package/package.json +1 -1
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "هذه الميزة لا تزال قيد الاختبار وغير مدعومة بالكامل بعد. ملاحظاتك قيمة للمساعدة في توجيه التحسينات المستقبلية.",
|
|
204
204
|
"Send feedback": "إرسال ملاحظات",
|
|
205
205
|
"Manage beta option": "إدارة الخيار التجريبي",
|
|
206
|
-
"Ma": "مايو",
|
|
207
206
|
"Y-axis": "المحور ص",
|
|
208
207
|
"X-axis": "المحور س",
|
|
209
208
|
"Previous": "السابق",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Funktionen er stadig under test og virker ikke helt endnu. Din feedback er guld værd og hjælper os med fremtidige forbedringer.",
|
|
202
202
|
"Send feedback": "Send feedback",
|
|
203
203
|
"Manage beta option": "Styr beta-indstillingen",
|
|
204
|
-
"Ma": "Maj",
|
|
205
204
|
"Y-axis": "Y-akse",
|
|
206
205
|
"X-axis": "X-akse",
|
|
207
206
|
"Previous": "Forrige",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.",
|
|
204
204
|
"Send feedback": "Send feedback",
|
|
205
205
|
"Manage beta option": "Manage beta option",
|
|
206
|
-
"Ma": "May",
|
|
207
206
|
"Y-axis": "Y-axis",
|
|
208
207
|
"X-axis": "X-axis",
|
|
209
208
|
"Previous": "Previous",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Tämä ominaisuus on vielä testausvaiheessa eikä ole täysin tuettu. Palautteesi on tärkeää, sillä sen avulla voimme kehittää asioita entistä paremmin.",
|
|
202
202
|
"Send feedback": "Lähetä palautetta",
|
|
203
203
|
"Manage beta option": "Hallitse beta-vaihtoehtoa",
|
|
204
|
-
"Ma": "Tou.",
|
|
205
204
|
"Y-axis": "Y-akseli",
|
|
206
205
|
"X-axis": "X-akseli",
|
|
207
206
|
"Previous": "Edellinen",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Ez a funkció még tesztelés alatt áll, és még nem támogatott teljes mértékben. A visszajelzésed értékes, segít a jövőbeli fejlesztésekben.",
|
|
202
202
|
"Send feedback": "Küldj visszajelzést.",
|
|
203
203
|
"Manage beta option": "Béta-opció kezelése",
|
|
204
|
-
"Ma": "Május",
|
|
205
204
|
"Y-axis": "Y tengely",
|
|
206
205
|
"X-axis": "X tengely",
|
|
207
206
|
"Previous": "Előző",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "이 기능은 여전히 테스트 중이며 아직 완전히 지원되지 않습니다. 귀하의 피드백은 향후 개선 방향을 제시하는 데 매우 중요합니다.",
|
|
202
202
|
"Send feedback": "피드백 보내기",
|
|
203
203
|
"Manage beta option": "베타 옵션 관리",
|
|
204
|
-
"Ma": "5월",
|
|
205
204
|
"Y-axis": "Y축",
|
|
206
205
|
"X-axis": "X축",
|
|
207
206
|
"Open": "열려 있는",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Denne funksjonen er fortsatt under testing, og støttes ikke fullt ut ennå. Tilbakemeldingen din er viktig for at vi skal kunne forbedre tjenesten.",
|
|
202
202
|
"Send feedback": "Send tilbakemelding",
|
|
203
203
|
"Manage beta option": "Administrer beta-alternativ",
|
|
204
|
-
"Ma": "Mai",
|
|
205
204
|
"Y-axis": "Y-akse",
|
|
206
205
|
"X-axis": "X-akse",
|
|
207
206
|
"Previous": "Tidligere",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Esta funcionalidade ainda está em testes e ainda não é totalmente suportada. O seu feedback é valioso para ajudar a orientar melhorias futuras.",
|
|
204
204
|
"Send feedback": "Enviar feedback",
|
|
205
205
|
"Manage beta option": "Gerenciar opção beta",
|
|
206
|
-
"Ma": "Mai",
|
|
207
206
|
"Y-axis": "Eixo Y",
|
|
208
207
|
"X-axis": "Eixo X",
|
|
209
208
|
"Previous": "Anterior",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Această funcție este în testare și încă nu este complet compatibilă. Feedbackul dvs. este important și ne va ajuta la îmbunătățirile viitoare.",
|
|
204
204
|
"Send feedback": "Trimiteți feedback",
|
|
205
205
|
"Manage beta option": "Administrați opțiunea beta",
|
|
206
|
-
"Ma": "Ma",
|
|
207
206
|
"Y-axis": "Axa Y",
|
|
208
207
|
"X-axis": "Axa X",
|
|
209
208
|
"Previous": "Înapoi",
|
|
@@ -215,7 +215,6 @@
|
|
|
215
215
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "此功能仍在測試階段,尚未完全支援。您的意見回饋對我們來說非常重要,能協助我們確認未來改進的方向。",
|
|
216
216
|
"Send feedback": "傳送意見回饋",
|
|
217
217
|
"Manage beta option": "管理測試版選項",
|
|
218
|
-
"Ma": "五月",
|
|
219
218
|
"Next": "下一步",
|
|
220
219
|
"Previous": "上一個",
|
|
221
220
|
"Open": "開啟",
|
|
@@ -3,7 +3,6 @@ const getCssVar = (el, name) => { var _a, _b; return (_b = (_a = zen.getComputed
|
|
|
3
3
|
export const centerTextPlugin = (centerText) => ({
|
|
4
4
|
id: "zenithPieCenterText",
|
|
5
5
|
afterDraw(chart) {
|
|
6
|
-
var _a;
|
|
7
6
|
if (!centerText || centerText.value === undefined) {
|
|
8
7
|
return;
|
|
9
8
|
}
|
|
@@ -12,7 +11,7 @@ export const centerTextPlugin = (centerText) => ({
|
|
|
12
11
|
const centerX = left + width / 2;
|
|
13
12
|
const centerY = top + height / 2;
|
|
14
13
|
const css = (name) => getCssVar(chart.canvas, name);
|
|
15
|
-
const fontFamily = (
|
|
14
|
+
const fontFamily = css("--main-font");
|
|
16
15
|
const hasLabel = !!centerText.label;
|
|
17
16
|
const meta = chart.getDatasetMeta(0);
|
|
18
17
|
const controllerRadius = meta.controller.innerRadius;
|
package/esm/chart/pieChart.js
CHANGED
|
@@ -10,11 +10,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useCallback, useContext, useEffect, useId, useMemo } from "react";
|
|
13
|
+
import { useCallback, useContext, useEffect, useId, useMemo, useRef } from "react";
|
|
14
14
|
import { Pie } from "../react-chartjs/typedCharts";
|
|
15
15
|
import { Chart as ChartJS, PieController, ArcElement } from "chart.js/auto";
|
|
16
16
|
import "../react-chartjs/dateAdapter";
|
|
17
17
|
import { deepMerge } from "../commonHelpers/utils";
|
|
18
|
+
import { zen } from "../utils/zen";
|
|
18
19
|
import { useDrive } from "../utils/theme/useDrive";
|
|
19
20
|
import { useMobile } from "../commonHelpers/hooks/useMobile";
|
|
20
21
|
import { themeContext } from "../utils/theme/themeContext";
|
|
@@ -40,12 +41,18 @@ export const PieChart = (_a) => {
|
|
|
40
41
|
const { dark } = useContext(themeContext);
|
|
41
42
|
const legendId = useId();
|
|
42
43
|
const tooltipId = useId();
|
|
44
|
+
const containerRef = useRef(null);
|
|
43
45
|
useEffect(() => {
|
|
46
|
+
var _a;
|
|
47
|
+
const el = containerRef.current;
|
|
48
|
+
const styles = el ? (_a = zen.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(zen, el) : undefined;
|
|
49
|
+
const fontFamily = (styles === null || styles === void 0 ? void 0 : styles.getPropertyValue("--main-font").trim()) || "Roboto";
|
|
50
|
+
const color = (styles === null || styles === void 0 ? void 0 : styles.getPropertyValue("--text-primary").trim()) || "";
|
|
44
51
|
ChartJS.defaults.font = {
|
|
45
|
-
family:
|
|
52
|
+
family: fontFamily,
|
|
46
53
|
size: fontSize
|
|
47
54
|
};
|
|
48
|
-
ChartJS.defaults.color =
|
|
55
|
+
ChartJS.defaults.color = color;
|
|
49
56
|
}, [fontSize, dark]);
|
|
50
57
|
const defOptions = useMemo(() => getDefaultOptions(), []);
|
|
51
58
|
const chartOptions = deepMerge(defOptions, options);
|
|
@@ -88,5 +95,5 @@ export const PieChart = (_a) => {
|
|
|
88
95
|
const chartPlugins = useMemo(() => [...(plugins || []), chartLegend, chartTooltip, chartCenterText], [chartLegend, chartTooltip, chartCenterText, plugins]);
|
|
89
96
|
const intSummary = useSummary(summary, chartData);
|
|
90
97
|
const legendRight = isHorizontal;
|
|
91
|
-
return (_jsxs("div", { className: classNames(["zen-chart", legendRight ? "zen-chart--legend-right" : "", className || ""]), children: [insight ? _jsx(ChartInsight, Object.assign({}, insight)) : null, summary ? _jsx(Summary, Object.assign({}, intSummary)) : null, _jsx("div", { className: "zen-chart__chart", children: _jsx(Pie, Object.assign({ options: chartOptions, data: chartData, plugins: chartPlugins }, rest, { "aria-hidden": true })) }), _jsx("div", { className: "zen-chart__legend", id: legendId }), _jsx(AccessibleChart, { type: "pie", data: chartData })] }));
|
|
98
|
+
return (_jsxs("div", { ref: containerRef, className: classNames(["zen-chart", legendRight ? "zen-chart--legend-right" : "", className || ""]), children: [insight ? _jsx(ChartInsight, Object.assign({}, insight)) : null, summary ? _jsx(Summary, Object.assign({}, intSummary)) : null, _jsx("div", { className: "zen-chart__chart", children: _jsx(Pie, Object.assign({ options: chartOptions, data: chartData, plugins: chartPlugins }, rest, { "aria-hidden": true })) }), _jsx("div", { className: "zen-chart__legend", id: legendId }), _jsx(AccessibleChart, { type: "pie", data: chartData })] }));
|
|
92
99
|
};
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "هذه الميزة لا تزال قيد الاختبار وغير مدعومة بالكامل بعد. ملاحظاتك قيمة للمساعدة في توجيه التحسينات المستقبلية.",
|
|
204
204
|
"Send feedback": "إرسال ملاحظات",
|
|
205
205
|
"Manage beta option": "إدارة الخيار التجريبي",
|
|
206
|
-
"Ma": "مايو",
|
|
207
206
|
"Y-axis": "المحور ص",
|
|
208
207
|
"X-axis": "المحور س",
|
|
209
208
|
"Previous": "السابق",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Funktionen er stadig under test og virker ikke helt endnu. Din feedback er guld værd og hjælper os med fremtidige forbedringer.",
|
|
202
202
|
"Send feedback": "Send feedback",
|
|
203
203
|
"Manage beta option": "Styr beta-indstillingen",
|
|
204
|
-
"Ma": "Maj",
|
|
205
204
|
"Y-axis": "Y-akse",
|
|
206
205
|
"X-axis": "X-akse",
|
|
207
206
|
"Previous": "Forrige",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.",
|
|
204
204
|
"Send feedback": "Send feedback",
|
|
205
205
|
"Manage beta option": "Manage beta option",
|
|
206
|
-
"Ma": "May",
|
|
207
206
|
"Y-axis": "Y-axis",
|
|
208
207
|
"X-axis": "X-axis",
|
|
209
208
|
"Previous": "Previous",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Tämä ominaisuus on vielä testausvaiheessa eikä ole täysin tuettu. Palautteesi on tärkeää, sillä sen avulla voimme kehittää asioita entistä paremmin.",
|
|
202
202
|
"Send feedback": "Lähetä palautetta",
|
|
203
203
|
"Manage beta option": "Hallitse beta-vaihtoehtoa",
|
|
204
|
-
"Ma": "Tou.",
|
|
205
204
|
"Y-axis": "Y-akseli",
|
|
206
205
|
"X-axis": "X-akseli",
|
|
207
206
|
"Previous": "Edellinen",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Ez a funkció még tesztelés alatt áll, és még nem támogatott teljes mértékben. A visszajelzésed értékes, segít a jövőbeli fejlesztésekben.",
|
|
202
202
|
"Send feedback": "Küldj visszajelzést.",
|
|
203
203
|
"Manage beta option": "Béta-opció kezelése",
|
|
204
|
-
"Ma": "Május",
|
|
205
204
|
"Y-axis": "Y tengely",
|
|
206
205
|
"X-axis": "X tengely",
|
|
207
206
|
"Previous": "Előző",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "이 기능은 여전히 테스트 중이며 아직 완전히 지원되지 않습니다. 귀하의 피드백은 향후 개선 방향을 제시하는 데 매우 중요합니다.",
|
|
202
202
|
"Send feedback": "피드백 보내기",
|
|
203
203
|
"Manage beta option": "베타 옵션 관리",
|
|
204
|
-
"Ma": "5월",
|
|
205
204
|
"Y-axis": "Y축",
|
|
206
205
|
"X-axis": "X축",
|
|
207
206
|
"Open": "열려 있는",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Denne funksjonen er fortsatt under testing, og støttes ikke fullt ut ennå. Tilbakemeldingen din er viktig for at vi skal kunne forbedre tjenesten.",
|
|
202
202
|
"Send feedback": "Send tilbakemelding",
|
|
203
203
|
"Manage beta option": "Administrer beta-alternativ",
|
|
204
|
-
"Ma": "Mai",
|
|
205
204
|
"Y-axis": "Y-akse",
|
|
206
205
|
"X-axis": "X-akse",
|
|
207
206
|
"Previous": "Tidligere",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Esta funcionalidade ainda está em testes e ainda não é totalmente suportada. O seu feedback é valioso para ajudar a orientar melhorias futuras.",
|
|
204
204
|
"Send feedback": "Enviar feedback",
|
|
205
205
|
"Manage beta option": "Gerenciar opção beta",
|
|
206
|
-
"Ma": "Mai",
|
|
207
206
|
"Y-axis": "Eixo Y",
|
|
208
207
|
"X-axis": "Eixo X",
|
|
209
208
|
"Previous": "Anterior",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Această funcție este în testare și încă nu este complet compatibilă. Feedbackul dvs. este important și ne va ajuta la îmbunătățirile viitoare.",
|
|
204
204
|
"Send feedback": "Trimiteți feedback",
|
|
205
205
|
"Manage beta option": "Administrați opțiunea beta",
|
|
206
|
-
"Ma": "Ma",
|
|
207
206
|
"Y-axis": "Axa Y",
|
|
208
207
|
"X-axis": "Axa X",
|
|
209
208
|
"Previous": "Înapoi",
|
|
@@ -215,7 +215,6 @@
|
|
|
215
215
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "此功能仍在測試階段,尚未完全支援。您的意見回饋對我們來說非常重要,能協助我們確認未來改進的方向。",
|
|
216
216
|
"Send feedback": "傳送意見回饋",
|
|
217
217
|
"Manage beta option": "管理測試版選項",
|
|
218
|
-
"Ma": "五月",
|
|
219
218
|
"Next": "下一步",
|
|
220
219
|
"Previous": "上一個",
|
|
221
220
|
"Open": "開啟",
|