@geotab/zenith 1.26.3 → 1.26.4-beta.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.
Files changed (99) hide show
  1. package/README.md +6 -0
  2. package/dist/chart/accessibleChart/accessibleChart.d.ts +4 -0
  3. package/dist/chart/accessibleChart/accessibleChart.js +9 -0
  4. package/dist/chart/accessibleChart/accessibleChartNarrative.d.ts +7 -0
  5. package/dist/chart/accessibleChart/accessibleChartNarrative.js +605 -0
  6. package/dist/chart/accessibleChart/accessibleChartTable.d.ts +3 -0
  7. package/dist/chart/accessibleChart/accessibleChartTable.js +107 -0
  8. package/dist/chart/accessibleChart/interfaces.d.ts +48 -0
  9. package/dist/chart/accessibleChart/interfaces.js +2 -0
  10. package/dist/chart/barChart/getDefaultDatasetStyle.d.ts +5 -5
  11. package/dist/chart/barChart.js +2 -1
  12. package/dist/chart/chart.d.ts +8 -5
  13. package/dist/chart/chart.js +8 -7
  14. package/dist/chart/lineChart/getDefaultDatasetStyle.d.ts +9 -9
  15. package/dist/chart/lineChart/interfaces.d.ts +1 -1
  16. package/dist/chart/lineChart.js +2 -1
  17. package/dist/chart/pieChart/getDefaultDatasetStyle.d.ts +7 -7
  18. package/dist/chart/pieChart.js +2 -1
  19. package/dist/chart/utils/calculateMinTruncationPrecision.d.ts +1 -0
  20. package/dist/chart/utils/calculateMinTruncationPrecision.js +25 -0
  21. package/dist/chart/utils/convertDates.d.ts +1 -1
  22. package/dist/chart/utils/getFormattedLabel.d.ts +3 -0
  23. package/dist/chart/utils/getFormattedLabel.js +20 -0
  24. package/dist/chart/utils/removeTrendDataFromDatasets.d.ts +2 -0
  25. package/dist/chart/utils/removeTrendDataFromDatasets.js +11 -0
  26. package/dist/chart/utils/resampleArrayEvenly.d.ts +1 -0
  27. package/dist/chart/utils/resampleArrayEvenly.js +23 -0
  28. package/dist/dataFeed/dataFeed.d.ts +2 -1
  29. package/dist/dataFeed/dataFeed.js +3 -3
  30. package/dist/dataFeed/dataFeedColumnsItems.d.ts +2 -1
  31. package/dist/dataFeed/dataFeedColumnsItems.js +23 -4
  32. package/dist/dataGrid/columns/actionsColumn/actionsColumn.d.ts +1 -0
  33. package/dist/dataGrid/columns/actionsColumn/actionsColumn.js +3 -0
  34. package/dist/index.css +25 -6
  35. package/dist/index.d.ts +7 -1
  36. package/dist/index.js +29 -15
  37. package/dist/lineChart/utils.d.ts +9 -9
  38. package/dist/lineChartMini/lineChartMini.js +2 -1
  39. package/dist/list/hooks/useVirtualScroll.js +3 -0
  40. package/dist/menu/components/menuErrorItem.d.ts +7 -0
  41. package/dist/menu/components/menuErrorItem.js +12 -0
  42. package/dist/nav/navHeader/navHeader.d.ts +3 -3
  43. package/dist/nav/navHeader/navHeader.js +8 -3
  44. package/dist/nav/navItem/navItem.d.ts +3 -2
  45. package/dist/nav/navItem/navItem.js +3 -3
  46. package/dist/nav/navSection/navSection.js +1 -4
  47. package/dist/nav/utils/navUtils.d.ts +2 -0
  48. package/dist/nav/utils/navUtils.js +15 -1
  49. package/dist/stepperRaw/utils/calculateWithPrecision.js +1 -1
  50. package/dist/table/actions/actionsMenu.d.ts +2 -1
  51. package/dist/table/actions/actionsMenu.js +42 -28
  52. package/dist/table/actions/useActions.d.ts +6 -0
  53. package/dist/table/actions/useActions.js +3 -1
  54. package/dist/table/table.js +2 -2
  55. package/dist/textIconButton/textIconButton.d.ts +1 -0
  56. package/dist/utils/localization/translations/cs-json.d.ts +3 -0
  57. package/dist/utils/localization/translations/cs-json.js +3 -0
  58. package/dist/utils/localization/translations/de-json.d.ts +3 -0
  59. package/dist/utils/localization/translations/de-json.js +3 -0
  60. package/dist/utils/localization/translations/en-json.d.ts +18 -0
  61. package/dist/utils/localization/translations/en-json.js +19 -1
  62. package/dist/utils/localization/translations/es-json.d.ts +3 -0
  63. package/dist/utils/localization/translations/es-json.js +3 -0
  64. package/dist/utils/localization/translations/fr-FR-json.d.ts +3 -0
  65. package/dist/utils/localization/translations/fr-FR-json.js +3 -0
  66. package/dist/utils/localization/translations/fr-json.d.ts +3 -0
  67. package/dist/utils/localization/translations/fr-json.js +3 -0
  68. package/dist/utils/localization/translations/id-json.d.ts +3 -0
  69. package/dist/utils/localization/translations/id-json.js +3 -0
  70. package/dist/utils/localization/translations/it-json.d.ts +3 -0
  71. package/dist/utils/localization/translations/it-json.js +3 -0
  72. package/dist/utils/localization/translations/ja-json.d.ts +3 -0
  73. package/dist/utils/localization/translations/ja-json.js +3 -0
  74. package/dist/utils/localization/translations/ko-KR-json.d.ts +3 -0
  75. package/dist/utils/localization/translations/ko-KR-json.js +3 -0
  76. package/dist/utils/localization/translations/ms-json.d.ts +3 -0
  77. package/dist/utils/localization/translations/ms-json.js +3 -0
  78. package/dist/utils/localization/translations/nl-json.d.ts +3 -0
  79. package/dist/utils/localization/translations/nl-json.js +3 -0
  80. package/dist/utils/localization/translations/pl-json.d.ts +3 -0
  81. package/dist/utils/localization/translations/pl-json.js +3 -0
  82. package/dist/utils/localization/translations/pt-BR-json.d.ts +3 -0
  83. package/dist/utils/localization/translations/pt-BR-json.js +3 -0
  84. package/dist/utils/localization/translations/sv-json.d.ts +3 -0
  85. package/dist/utils/localization/translations/sv-json.js +3 -0
  86. package/dist/utils/localization/translations/th-json.d.ts +3 -0
  87. package/dist/utils/localization/translations/th-json.js +3 -0
  88. package/dist/utils/localization/translations/tr-json.d.ts +3 -0
  89. package/dist/utils/localization/translations/tr-json.js +3 -0
  90. package/dist/utils/localization/translations/zh-Hans-json.d.ts +3 -0
  91. package/dist/utils/localization/translations/zh-Hans-json.js +3 -0
  92. package/dist/utils/localization/translations/zh-TW-json.d.ts +1 -0
  93. package/dist/utils/localization/translations/zh-TW-json.js +1 -0
  94. package/dist/utils/positioningUtils/calculatePosition.js +2 -1
  95. package/dist/utils/truncateDecimals.d.ts +1 -0
  96. package/dist/utils/truncateDecimals.js +12 -0
  97. package/package.json +4 -4
  98. /package/dist/{stepperRaw/utils → utils}/countDecimals.d.ts +0 -0
  99. /package/dist/{stepperRaw/utils → utils}/countDecimals.js +0 -0
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "Alle filters",
223
223
  "Loading": "Laden",
224
224
  "Select option": "Selecteer optie",
225
+ "Value": "Waarde",
226
+ "Data": "Gegevens",
225
227
  "Previous step": "Vorige stap",
226
228
  "Continue": "Doorgaan",
227
229
  "Submit": "Verzenden",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "Stap {0} van {1}",
230
232
  "Y-axis": "Y-as",
231
233
  "X-axis": "X-as",
234
+ "No data available": "Geen gegevens beschikbaar",
232
235
  "Choose dates": "Kies datum",
233
236
  "Date range not available": "Datumbereik niet beschikbaar",
234
237
  "Choose your date range": "Kies het datumbereik",
@@ -219,6 +219,8 @@ export declare const translations: {
219
219
  "All Filters": string;
220
220
  Loading: string;
221
221
  "Select option": string;
222
+ Value: string;
223
+ Data: string;
222
224
  "Previous step": string;
223
225
  Continue: string;
224
226
  Submit: string;
@@ -226,6 +228,7 @@ export declare const translations: {
226
228
  "Step {0} of {1}": string;
227
229
  "Y-axis": string;
228
230
  "X-axis": string;
231
+ "No data available": string;
229
232
  "Choose dates": string;
230
233
  "Date range not available": string;
231
234
  "Choose your date range": string;
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "Wszystkie filtry",
223
223
  "Loading": "Ładowanie",
224
224
  "Select option": "Wybierz opcję",
225
+ "Value": "Wartość",
226
+ "Data": "Dane",
225
227
  "Previous step": "Poprzedni krok",
226
228
  "Continue": "Kontynuuj",
227
229
  "Submit": "Wyślij",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "Etap {0} z {1}",
230
232
  "Y-axis": "Oś Y",
231
233
  "X-axis": "Oś X",
234
+ "No data available": "Brak dostępnych danych",
232
235
  "Choose dates": "Wybierz daty",
233
236
  "Date range not available": "Zakres dat jest niedostępny",
234
237
  "Choose your date range": "Wybierz zakres dat",
@@ -219,6 +219,8 @@ export declare const translations: {
219
219
  "All Filters": string;
220
220
  Loading: string;
221
221
  "Select option": string;
222
+ Value: string;
223
+ Data: string;
222
224
  "Previous step": string;
223
225
  Continue: string;
224
226
  Submit: string;
@@ -226,6 +228,7 @@ export declare const translations: {
226
228
  "Step {0} of {1}": string;
227
229
  "Y-axis": string;
228
230
  "X-axis": string;
231
+ "No data available": string;
229
232
  "Choose dates": string;
230
233
  "Date range not available": string;
231
234
  "Choose your date range": string;
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "Todos os filtros",
223
223
  "Loading": "Carregando",
224
224
  "Select option": "Selecionar opção",
225
+ "Value": "Valor",
226
+ "Data": "Dados",
225
227
  "Previous step": "Etapa anterior",
226
228
  "Continue": "Continuar",
227
229
  "Submit": "Enviar",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "Etapa {0} de {1}",
230
232
  "Y-axis": "Eixo Y",
231
233
  "X-axis": "Eixo X",
234
+ "No data available": "Nenhum dado disponível",
232
235
  "Choose dates": "Escolher datas",
233
236
  "Date range not available": "Intervalo de datas indisponível",
234
237
  "Choose your date range": "Escolha seu intervalo de datas",
@@ -219,6 +219,8 @@ export declare const translations: {
219
219
  "All Filters": string;
220
220
  Loading: string;
221
221
  "Select option": string;
222
+ Value: string;
223
+ Data: string;
222
224
  "Previous step": string;
223
225
  Continue: string;
224
226
  Submit: string;
@@ -226,6 +228,7 @@ export declare const translations: {
226
228
  "Step {0} of {1}": string;
227
229
  "Y-axis": string;
228
230
  "X-axis": string;
231
+ "No data available": string;
229
232
  "Choose dates": string;
230
233
  "Date range not available": string;
231
234
  "Choose your date range": string;
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "Alla filter",
223
223
  "Loading": "Laddar",
224
224
  "Select option": "Välj alternativ",
225
+ "Value": "Värde",
226
+ "Data": "Data",
225
227
  "Previous step": "Föregående steg",
226
228
  "Continue": "Fortsätt",
227
229
  "Submit": "Skicka",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "Steg {0} av {1}",
230
232
  "Y-axis": "Y-axel",
231
233
  "X-axis": "X-axel",
234
+ "No data available": "Det finns inga tillgängliga data",
232
235
  "Choose dates": "Välj datum",
233
236
  "Date range not available": "Datumintervallet är inte tillgängligt",
234
237
  "Choose your date range": "Välj datumintervall",
@@ -219,6 +219,8 @@ export declare const translations: {
219
219
  "All Filters": string;
220
220
  Loading: string;
221
221
  "Select option": string;
222
+ Value: string;
223
+ Data: string;
222
224
  "Previous step": string;
223
225
  Continue: string;
224
226
  Submit: string;
@@ -226,6 +228,7 @@ export declare const translations: {
226
228
  "Step {0} of {1}": string;
227
229
  "Y-axis": string;
228
230
  "X-axis": string;
231
+ "No data available": string;
229
232
  "Choose dates": string;
230
233
  "Date range not available": string;
231
234
  "Choose your date range": string;
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "ตัวกรองทั้งหมด",
223
223
  "Loading": "กำลังโหลด",
224
224
  "Select option": "เลือกตัวเลือก",
225
+ "Value": "ค่า",
226
+ "Data": "ข้อมูล",
225
227
  "Previous step": "ขั้นตอนก่อนหน้า",
226
228
  "Continue": "ดำเนินการต่อ",
227
229
  "Submit": "ส่ง",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "ขั้นตอนที่ {0} จาก {1}",
230
232
  "Y-axis": "แกน Y",
231
233
  "X-axis": "แกน X",
234
+ "No data available": "ไม่มีข้อมูล",
232
235
  "Choose dates": "เลือกวันที่",
233
236
  "Date range not available": "ช่วงวันที่ไม่พร้อมใช้งาน",
234
237
  "Choose your date range": "เลือกช่วงวันที่ของคุณ",
@@ -219,6 +219,8 @@ export declare const translations: {
219
219
  "All Filters": string;
220
220
  Loading: string;
221
221
  "Select option": string;
222
+ Value: string;
223
+ Data: string;
222
224
  "Previous step": string;
223
225
  Continue: string;
224
226
  Submit: string;
@@ -226,6 +228,7 @@ export declare const translations: {
226
228
  "Step {0} of {1}": string;
227
229
  "Y-axis": string;
228
230
  "X-axis": string;
231
+ "No data available": string;
229
232
  "Choose dates": string;
230
233
  "Date range not available": string;
231
234
  "Choose your date range": string;
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "Tüm Filtreler",
223
223
  "Loading": "Yükleniyor",
224
224
  "Select option": "Seçenek belirleyin",
225
+ "Value": "Değer",
226
+ "Data": "Veri",
225
227
  "Previous step": "Önceki adım",
226
228
  "Continue": "Devam",
227
229
  "Submit": "Gönder",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "Adım {0} / {1}",
230
232
  "Y-axis": "Y ekseni",
231
233
  "X-axis": "X ekseni",
234
+ "No data available": "Mevcut veri yok",
232
235
  "Choose dates": "Tarih seç",
233
236
  "Date range not available": "Tarih aralığı mevcut değil",
234
237
  "Choose your date range": "Tarih aralığı seçin",
@@ -219,6 +219,8 @@ export declare const translations: {
219
219
  "All Filters": string;
220
220
  Loading: string;
221
221
  "Select option": string;
222
+ Value: string;
223
+ Data: string;
222
224
  "Previous step": string;
223
225
  Continue: string;
224
226
  Submit: string;
@@ -226,6 +228,7 @@ export declare const translations: {
226
228
  "Step {0} of {1}": string;
227
229
  "Y-axis": string;
228
230
  "X-axis": string;
231
+ "No data available": string;
229
232
  "Choose dates": string;
230
233
  "Date range not available": string;
231
234
  "Choose your date range": string;
@@ -222,6 +222,8 @@ exports.translations = {
222
222
  "All Filters": "所有筛选器",
223
223
  "Loading": "正在加载",
224
224
  "Select option": "选择选项",
225
+ "Value": "值",
226
+ "Data": "数据",
225
227
  "Previous step": "前一步",
226
228
  "Continue": "继续",
227
229
  "Submit": "提交",
@@ -229,6 +231,7 @@ exports.translations = {
229
231
  "Step {0} of {1}": "步骤 {0} / {1} ",
230
232
  "Y-axis": "Y 轴",
231
233
  "X-axis": "X 轴",
234
+ "No data available": "无可用数据",
232
235
  "Choose dates": "选择日期",
233
236
  "Date range not available": "日期范围不可用",
234
237
  "Choose your date range": "选择日期范围",
@@ -249,6 +249,7 @@ export declare const translations: {
249
249
  Submit: string;
250
250
  Optional: string;
251
251
  "Step {0} of {1}": string;
252
+ "No data available": string;
252
253
  "Choose dates": string;
253
254
  "Date range not available": string;
254
255
  "Choose your date range": string;
@@ -252,6 +252,7 @@ exports.translations = {
252
252
  "Submit": "提交",
253
253
  "Optional": "選填",
254
254
  "Step {0} of {1}": "步驟 {0} (共 {1} 個)",
255
+ "No data available": "沒有可用資料",
255
256
  "Choose dates": "選擇日期",
256
257
  "Date range not available": "日期範圍無法使用",
257
258
  "Choose your date range": "選擇您的日期範圍",
@@ -50,10 +50,11 @@ const calculatePosition = (triggerRef, popupRef, paddingX, paddingY, inline, ali
50
50
  else if (triggerRect.top + triggerRect.height < 0 && triggerRect.top > ((scrollParentRect === null || scrollParentRect === void 0 ? void 0 : scrollParentRect.top) || 0)) {
51
51
  position.top = window.scrollY;
52
52
  }
53
+ const isTopsideAlignment = alignment === null || alignment === void 0 ? void 0 : alignment.startsWith("top");
53
54
  if (scrollParentRect && triggerRect.bottom > scrollParentRect.bottom) {
54
55
  position.top = (scrollParentRect.bottom + popupRect.height) <= (window.innerHeight + window.scrollY) ? scrollParentRect.bottom : (window.innerHeight + window.scrollY) - popupRect.height;
55
56
  }
56
- else if (triggerRect.y + triggerRect.height + popupRect.height > window.innerHeight) {
57
+ else if (!isTopsideAlignment && triggerRect.y + triggerRect.height + popupRect.height > window.innerHeight) {
57
58
  const newTopPosition = window.innerHeight + window.scrollY - popupRect.height;
58
59
  position.top = newTopPosition < 0 ? 0 : newTopPosition;
59
60
  }
@@ -0,0 +1 @@
1
+ export declare const truncateDecimals: (value: number, decimalPlaces: number) => number;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.truncateDecimals = void 0;
4
+ const countDecimals_1 = require("./countDecimals");
5
+ const truncateDecimals = function (value, decimalPlaces) {
6
+ if ((0, countDecimals_1.countDecimals)(value) > decimalPlaces) {
7
+ const multiplier = Math.pow(10, decimalPlaces);
8
+ return Math.trunc(value * multiplier) / multiplier;
9
+ }
10
+ return value;
11
+ };
12
+ exports.truncateDecimals = truncateDecimals;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geotab/zenith",
3
- "version": "1.26.3",
3
+ "version": "1.26.4-beta.0",
4
4
  "description": "Zenith components library on React",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,9 +9,6 @@
9
9
  "**/*.less",
10
10
  "**/react-chartjs/dateAdapter.ts"
11
11
  ],
12
- "publishConfig": {
13
- "access": "public"
14
- },
15
12
  "module": "dist/index.js",
16
13
  "scripts": {
17
14
  "test": "npm run clean && npm run test-build && jest",
@@ -101,5 +98,8 @@
101
98
  "last 1 firefox version",
102
99
  "last 1 safari version"
103
100
  ]
101
+ },
102
+ "publishConfig": {
103
+ "access": "public"
104
104
  }
105
105
  }