@geotab/zenith 3.3.0 → 3.4.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 (287) hide show
  1. package/README.md +18 -0
  2. package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +1 -1
  3. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +0 -39
  4. package/dist/alertRaw/components/alertAnimation.js +8 -4
  5. package/dist/card/card.d.ts +1 -1
  6. package/dist/card/card.js +1 -3
  7. package/dist/card/components/status.js +2 -2
  8. package/dist/chart/barChart/getBarTooltipItems.js +31 -2
  9. package/dist/chart/barChart.js +2 -1
  10. package/dist/chart/utils/getYAxisMeta.d.ts +1 -1
  11. package/dist/chart/utils/getYAxisMeta.js +44 -1
  12. package/dist/checkbox/checkbox.js +3 -3
  13. package/dist/dataGrid/emptySearchList/emptySearchList.d.ts +6 -7
  14. package/dist/dataGrid/emptySearchList/emptySearchList.js +15 -23
  15. package/dist/dateInputRaw/dateInputRaw.d.ts +1 -1
  16. package/dist/dateRangeRaw/dateRangeRaw.d.ts +1 -1
  17. package/dist/dateRangeRaw/utils/dateRangeUtils.d.ts +1 -0
  18. package/dist/dateRangeRaw/utils/dateRangeUtils.js +39 -1
  19. package/dist/dropdownRaw/dropdownRaw.d.ts +1 -1
  20. package/dist/emptyState/emptyState.d.ts +9 -0
  21. package/dist/emptyState/emptyState.js +14 -0
  22. package/dist/emptyState/hooks/useIcon.d.ts +2 -0
  23. package/dist/emptyState/hooks/useIcon.js +17 -0
  24. package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.d.ts +1 -0
  25. package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +28 -3
  26. package/dist/formField/components/formFieldAdditionalInfo.d.ts +12 -0
  27. package/dist/formField/components/formFieldAdditionalInfo.js +10 -0
  28. package/dist/formField/components/formFieldAssistiveError.d.ts +10 -0
  29. package/dist/formField/components/formFieldAssistiveError.js +12 -0
  30. package/dist/formField/components/formFieldCounter.d.ts +6 -0
  31. package/dist/formField/components/formFieldCounter.js +7 -0
  32. package/dist/formField/components/formFieldLoading.d.ts +12 -0
  33. package/dist/formField/components/formFieldLoading.js +16 -0
  34. package/dist/formField/components/formFieldWithLabel.d.ts +8 -11
  35. package/dist/formField/components/formFieldWithLabel.js +21 -3
  36. package/dist/formField/components/formFieldWithoutLabel.d.ts +8 -9
  37. package/dist/formField/components/formFieldWithoutLabel.js +6 -1
  38. package/dist/formField/components/isOldFormFieldComponent.d.ts +2 -0
  39. package/dist/formField/components/isOldFormFieldComponent.js +12 -0
  40. package/dist/formField/components/trailingComponent.d.ts +2 -1
  41. package/dist/formField/components/trailingComponent.js +7 -1
  42. package/dist/formField/formField.d.ts +17 -35
  43. package/dist/formField/formField.js +4 -71
  44. package/dist/formField/hooks/useContainer.d.ts +2 -0
  45. package/dist/formField/hooks/useContainer.js +47 -0
  46. package/dist/formField/hooks/useError.d.ts +1 -1
  47. package/dist/formField/hooks/useFormFieldClasses.d.ts +2 -0
  48. package/dist/formField/hooks/useFormFieldClasses.js +30 -0
  49. package/dist/formField/hooks/useFormFieldProps.d.ts +17 -0
  50. package/dist/formField/hooks/useFormFieldProps.js +37 -0
  51. package/dist/formField/hooks/useTrailing.d.ts +1 -1
  52. package/dist/formField/hooks/useTrailing.js +1 -1
  53. package/dist/formField/hooks/useWidth.d.ts +1 -1
  54. package/dist/formField/types.d.ts +35 -0
  55. package/dist/formField/types.js +2 -0
  56. package/dist/formGroup/components/formGroupList.d.ts +1 -1
  57. package/dist/formGroup/components/formGroupToggle.d.ts +1 -1
  58. package/dist/formGroup/formGroup.d.ts +1 -1
  59. package/dist/formGroup/hooks/useLabelAlign.d.ts +1 -1
  60. package/dist/formGroup/types.d.ts +1 -1
  61. package/dist/formGroup/utils/applyCustomControlClasses.d.ts +1 -1
  62. package/dist/formGroup/utils/applyCustomLabelClasses.d.ts +1 -1
  63. package/dist/formGroup/utils/getControlClasses/getControlClasses.d.ts +1 -1
  64. package/dist/formGroup/utils/getControlClasses/getOneLabelOneControlClasses.d.ts +1 -1
  65. package/dist/formGroup/utils/getControlClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
  66. package/dist/formGroup/utils/getControlClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
  67. package/dist/formGroup/utils/getControlClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
  68. package/dist/formGroup/utils/getLabelClasses/getLabelClasses.d.ts +1 -1
  69. package/dist/formGroup/utils/getLabelClasses/getOneLabelOneControlClasses.d.ts +1 -1
  70. package/dist/formGroup/utils/getLabelClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
  71. package/dist/formGroup/utils/getLabelClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
  72. package/dist/formGroup/utils/getLabelClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
  73. package/dist/formGroup/utils/getListClasses.d.ts +1 -1
  74. package/dist/formGroup/utils/getToggleClasses.d.ts +1 -1
  75. package/dist/formGroup/utils/initializeState.d.ts +1 -1
  76. package/dist/formGroup/utils/isTopAlign.d.ts +1 -1
  77. package/dist/formLayout/types.d.ts +1 -1
  78. package/dist/formSection/types.d.ts +1 -1
  79. package/dist/formSection/utils/formSectionProvider.d.ts +1 -1
  80. package/dist/groupButtonRaw/groupButtonRaw.d.ts +1 -1
  81. package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -1
  82. package/dist/groupsFilterRaw/groupsHelper.js +2 -2
  83. package/dist/headerTitle/headerTitle.js +1 -1
  84. package/dist/images/imageAdjustFilter.d.ts +4 -0
  85. package/dist/images/imageAdjustFilter.js +16 -0
  86. package/dist/images/imageNoMatchingAssets.d.ts +4 -0
  87. package/dist/images/imageNoMatchingAssets.js +16 -0
  88. package/dist/index.css +619 -524
  89. package/dist/index.d.ts +6 -2
  90. package/dist/index.js +23 -16
  91. package/dist/inputAdornments/inputAdornments.d.ts +2 -1
  92. package/dist/inputAdornments/inputAdornments.js +2 -2
  93. package/dist/layout/layout.js +11 -7
  94. package/dist/list/itemData/itemData.d.ts +1 -0
  95. package/dist/list/itemData/itemDataInternal.d.ts +2 -1
  96. package/dist/list/itemData/itemDataInternal.js +4 -2
  97. package/dist/list/itemData/itemDataWaiting.d.ts +2 -1
  98. package/dist/list/itemData/itemDataWaiting.js +4 -1
  99. package/dist/list/list.d.ts +13 -4
  100. package/dist/list/list.js +29 -12
  101. package/dist/list/utils/getLoadingItems.d.ts +1 -1
  102. package/dist/list/utils/getLoadingItems.js +4 -4
  103. package/dist/modal/modal.js +7 -0
  104. package/dist/pillExpandable/pillExpandable.d.ts +1 -0
  105. package/dist/pillExpandable/pillExpandable.js +74 -33
  106. package/dist/radioGroupRaw/radioGroupRaw.d.ts +1 -1
  107. package/dist/rangeRaw/rangeRaw.d.ts +1 -1
  108. package/dist/stepperRaw/stepperRaw.d.ts +4 -1
  109. package/dist/stepperRaw/stepperRaw.js +2 -1
  110. package/dist/summary/summary.js +0 -1
  111. package/dist/summaryTile/summaryTile.js +2 -2
  112. package/dist/table/children/tableEmpty.d.ts +1 -1
  113. package/dist/table/children/useTableChildren.js +1 -1
  114. package/dist/textInputRaw/textInputRaw.d.ts +4 -1
  115. package/dist/textInputRaw/textInputRaw.js +1 -0
  116. package/dist/timePickerRaw/timePickerRaw.d.ts +1 -1
  117. package/dist/tooltip/tooltip.d.ts +24 -4
  118. package/dist/tooltip/tooltip.js +421 -158
  119. package/dist/utils/localization/translations/cs.json +2 -1
  120. package/dist/utils/localization/translations/da-DK.json +2 -1
  121. package/dist/utils/localization/translations/de.json +2 -1
  122. package/dist/utils/localization/translations/en.json +2 -1
  123. package/dist/utils/localization/translations/es.json +3 -2
  124. package/dist/utils/localization/translations/fi-FI.json +2 -1
  125. package/dist/utils/localization/translations/fr-FR.json +2 -1
  126. package/dist/utils/localization/translations/fr.json +3 -2
  127. package/dist/utils/localization/translations/hu-HU.json +2 -1
  128. package/dist/utils/localization/translations/id.json +2 -1
  129. package/dist/utils/localization/translations/it.json +2 -1
  130. package/dist/utils/localization/translations/ja.json +2 -1
  131. package/dist/utils/localization/translations/ko-KR.json +2 -1
  132. package/dist/utils/localization/translations/ms.json +2 -1
  133. package/dist/utils/localization/translations/nb-NO.json +2 -1
  134. package/dist/utils/localization/translations/nl.json +2 -1
  135. package/dist/utils/localization/translations/pl.json +2 -1
  136. package/dist/utils/localization/translations/pt-BR.json +2 -1
  137. package/dist/utils/localization/translations/sk-SK.json +2 -1
  138. package/dist/utils/localization/translations/sv.json +2 -1
  139. package/dist/utils/localization/translations/th.json +2 -1
  140. package/dist/utils/localization/translations/tr.json +2 -1
  141. package/dist/utils/localization/translations/zh-Hans.json +2 -1
  142. package/dist/utils/localization/translations/zh-TW.json +2 -1
  143. package/dist/utils/positioningUtils/calculatePosition.d.ts +1 -1
  144. package/dist/utils/positioningUtils/calculatePosition.js +11 -1
  145. package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +1 -1
  146. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +0 -39
  147. package/esm/alertRaw/components/alertAnimation.js +8 -4
  148. package/esm/card/card.d.ts +1 -1
  149. package/esm/card/card.js +1 -3
  150. package/esm/card/components/status.js +2 -2
  151. package/esm/chart/barChart/getBarTooltipItems.js +31 -2
  152. package/esm/chart/barChart.js +2 -1
  153. package/esm/chart/utils/getYAxisMeta.d.ts +1 -1
  154. package/esm/chart/utils/getYAxisMeta.js +44 -1
  155. package/esm/checkbox/checkbox.js +3 -3
  156. package/esm/dataGrid/emptySearchList/emptySearchList.d.ts +6 -7
  157. package/esm/dataGrid/emptySearchList/emptySearchList.js +16 -24
  158. package/esm/dateInputRaw/dateInputRaw.d.ts +1 -1
  159. package/esm/dateRangeRaw/dateRangeRaw.d.ts +1 -1
  160. package/esm/dateRangeRaw/utils/dateRangeUtils.d.ts +1 -0
  161. package/esm/dateRangeRaw/utils/dateRangeUtils.js +37 -0
  162. package/esm/dropdownRaw/dropdownRaw.d.ts +1 -1
  163. package/esm/emptyState/emptyState.d.ts +9 -0
  164. package/esm/emptyState/emptyState.js +10 -0
  165. package/esm/emptyState/hooks/useIcon.d.ts +2 -0
  166. package/esm/emptyState/hooks/useIcon.js +10 -0
  167. package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.d.ts +1 -0
  168. package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +29 -4
  169. package/esm/formField/components/formFieldAdditionalInfo.d.ts +12 -0
  170. package/esm/formField/components/formFieldAdditionalInfo.js +6 -0
  171. package/esm/formField/components/formFieldAssistiveError.d.ts +10 -0
  172. package/esm/formField/components/formFieldAssistiveError.js +8 -0
  173. package/esm/formField/components/formFieldCounter.d.ts +6 -0
  174. package/esm/formField/components/formFieldCounter.js +3 -0
  175. package/esm/formField/components/formFieldLoading.d.ts +12 -0
  176. package/esm/formField/components/formFieldLoading.js +12 -0
  177. package/esm/formField/components/formFieldWithLabel.d.ts +8 -11
  178. package/esm/formField/components/formFieldWithLabel.js +21 -3
  179. package/esm/formField/components/formFieldWithoutLabel.d.ts +8 -9
  180. package/esm/formField/components/formFieldWithoutLabel.js +6 -1
  181. package/esm/formField/components/isOldFormFieldComponent.d.ts +2 -0
  182. package/esm/formField/components/isOldFormFieldComponent.js +8 -0
  183. package/esm/formField/components/trailingComponent.d.ts +2 -1
  184. package/esm/formField/components/trailingComponent.js +7 -1
  185. package/esm/formField/formField.d.ts +17 -35
  186. package/esm/formField/formField.js +5 -72
  187. package/esm/formField/hooks/useContainer.d.ts +2 -0
  188. package/esm/formField/hooks/useContainer.js +43 -0
  189. package/esm/formField/hooks/useError.d.ts +1 -1
  190. package/esm/formField/hooks/useFormFieldClasses.d.ts +2 -0
  191. package/esm/formField/hooks/useFormFieldClasses.js +26 -0
  192. package/esm/formField/hooks/useFormFieldProps.d.ts +17 -0
  193. package/esm/formField/hooks/useFormFieldProps.js +33 -0
  194. package/esm/formField/hooks/useTrailing.d.ts +1 -1
  195. package/esm/formField/hooks/useTrailing.js +1 -1
  196. package/esm/formField/hooks/useWidth.d.ts +1 -1
  197. package/esm/formField/types.d.ts +35 -0
  198. package/esm/formField/types.js +1 -0
  199. package/esm/formGroup/components/formGroupList.d.ts +1 -1
  200. package/esm/formGroup/components/formGroupToggle.d.ts +1 -1
  201. package/esm/formGroup/formGroup.d.ts +1 -1
  202. package/esm/formGroup/hooks/useLabelAlign.d.ts +1 -1
  203. package/esm/formGroup/types.d.ts +1 -1
  204. package/esm/formGroup/utils/applyCustomControlClasses.d.ts +1 -1
  205. package/esm/formGroup/utils/applyCustomLabelClasses.d.ts +1 -1
  206. package/esm/formGroup/utils/getControlClasses/getControlClasses.d.ts +1 -1
  207. package/esm/formGroup/utils/getControlClasses/getOneLabelOneControlClasses.d.ts +1 -1
  208. package/esm/formGroup/utils/getControlClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
  209. package/esm/formGroup/utils/getControlClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
  210. package/esm/formGroup/utils/getControlClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
  211. package/esm/formGroup/utils/getLabelClasses/getLabelClasses.d.ts +1 -1
  212. package/esm/formGroup/utils/getLabelClasses/getOneLabelOneControlClasses.d.ts +1 -1
  213. package/esm/formGroup/utils/getLabelClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
  214. package/esm/formGroup/utils/getLabelClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
  215. package/esm/formGroup/utils/getLabelClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
  216. package/esm/formGroup/utils/getListClasses.d.ts +1 -1
  217. package/esm/formGroup/utils/getToggleClasses.d.ts +1 -1
  218. package/esm/formGroup/utils/initializeState.d.ts +1 -1
  219. package/esm/formGroup/utils/isTopAlign.d.ts +1 -1
  220. package/esm/formLayout/types.d.ts +1 -1
  221. package/esm/formSection/types.d.ts +1 -1
  222. package/esm/formSection/utils/formSectionProvider.d.ts +1 -1
  223. package/esm/groupButtonRaw/groupButtonRaw.d.ts +1 -1
  224. package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -1
  225. package/esm/groupsFilterRaw/groupsHelper.js +2 -2
  226. package/esm/headerTitle/headerTitle.js +1 -1
  227. package/esm/images/imageAdjustFilter.d.ts +4 -0
  228. package/esm/images/imageAdjustFilter.js +12 -0
  229. package/esm/images/imageNoMatchingAssets.d.ts +4 -0
  230. package/esm/images/imageNoMatchingAssets.js +12 -0
  231. package/esm/index.d.ts +6 -2
  232. package/esm/index.js +4 -1
  233. package/esm/inputAdornments/inputAdornments.d.ts +2 -1
  234. package/esm/inputAdornments/inputAdornments.js +2 -2
  235. package/esm/layout/layout.js +11 -7
  236. package/esm/list/itemData/itemData.d.ts +1 -0
  237. package/esm/list/itemData/itemDataInternal.d.ts +2 -1
  238. package/esm/list/itemData/itemDataInternal.js +4 -2
  239. package/esm/list/itemData/itemDataWaiting.d.ts +2 -1
  240. package/esm/list/itemData/itemDataWaiting.js +4 -1
  241. package/esm/list/list.d.ts +13 -4
  242. package/esm/list/list.js +29 -12
  243. package/esm/list/utils/getLoadingItems.d.ts +1 -1
  244. package/esm/list/utils/getLoadingItems.js +4 -4
  245. package/esm/modal/modal.js +7 -0
  246. package/esm/pillExpandable/pillExpandable.d.ts +1 -0
  247. package/esm/pillExpandable/pillExpandable.js +74 -33
  248. package/esm/radioGroupRaw/radioGroupRaw.d.ts +1 -1
  249. package/esm/rangeRaw/rangeRaw.d.ts +1 -1
  250. package/esm/stepperRaw/stepperRaw.d.ts +4 -1
  251. package/esm/stepperRaw/stepperRaw.js +2 -1
  252. package/esm/summary/summary.js +0 -1
  253. package/esm/summaryTile/summaryTile.js +2 -2
  254. package/esm/table/children/tableEmpty.d.ts +1 -1
  255. package/esm/table/children/useTableChildren.js +1 -1
  256. package/esm/textInputRaw/textInputRaw.d.ts +4 -1
  257. package/esm/textInputRaw/textInputRaw.js +1 -0
  258. package/esm/timePickerRaw/timePickerRaw.d.ts +1 -1
  259. package/esm/tooltip/tooltip.d.ts +24 -4
  260. package/esm/tooltip/tooltip.js +388 -138
  261. package/esm/utils/localization/translations/cs.json +2 -1
  262. package/esm/utils/localization/translations/da-DK.json +2 -1
  263. package/esm/utils/localization/translations/de.json +2 -1
  264. package/esm/utils/localization/translations/en.json +2 -1
  265. package/esm/utils/localization/translations/es.json +3 -2
  266. package/esm/utils/localization/translations/fi-FI.json +2 -1
  267. package/esm/utils/localization/translations/fr-FR.json +2 -1
  268. package/esm/utils/localization/translations/fr.json +3 -2
  269. package/esm/utils/localization/translations/hu-HU.json +2 -1
  270. package/esm/utils/localization/translations/id.json +2 -1
  271. package/esm/utils/localization/translations/it.json +2 -1
  272. package/esm/utils/localization/translations/ja.json +2 -1
  273. package/esm/utils/localization/translations/ko-KR.json +2 -1
  274. package/esm/utils/localization/translations/ms.json +2 -1
  275. package/esm/utils/localization/translations/nb-NO.json +2 -1
  276. package/esm/utils/localization/translations/nl.json +2 -1
  277. package/esm/utils/localization/translations/pl.json +2 -1
  278. package/esm/utils/localization/translations/pt-BR.json +2 -1
  279. package/esm/utils/localization/translations/sk-SK.json +2 -1
  280. package/esm/utils/localization/translations/sv.json +2 -1
  281. package/esm/utils/localization/translations/th.json +2 -1
  282. package/esm/utils/localization/translations/tr.json +2 -1
  283. package/esm/utils/localization/translations/zh-Hans.json +2 -1
  284. package/esm/utils/localization/translations/zh-TW.json +2 -1
  285. package/esm/utils/positioningUtils/calculatePosition.d.ts +1 -1
  286. package/esm/utils/positioningUtils/calculatePosition.js +11 -1
  287. package/package.json +1 -1
package/README.md CHANGED
@@ -40,6 +40,24 @@ Zenith library provides components defined in Zenith Design System. It includes
40
40
 
41
41
  ## Change log
42
42
 
43
+ ### 3.4.0
44
+
45
+ * Integrate Tooltip with Zenith components
46
+ * Add `tall` list variation
47
+ * Fix Layout min-height issue
48
+ * Add EmptyState component
49
+ * Update fr and es trantions
50
+ * Add ExpandablePill `autoExpandChildren` property
51
+ * Mobile Table alignment fix
52
+ * Modal close button style fix
53
+ * Accessibility issues fixes
54
+ * Add year to date option to daterange
55
+ * FormField refactoring
56
+ * Update documentation for images
57
+ * Zenith stacked bar chart calculation fix
58
+ * Update Alerts animation
59
+ * FormField build fixes
60
+
43
61
  ### 3.3.0
44
62
 
45
63
  **🎉 Introducing Detail Panel in Table**
@@ -187,7 +187,7 @@ injectString("cs", "GroupCompanyId", "Skupina spole\u010Dnosti");
187
187
  injectString("da-DK", "GroupCompanyId", "Virksomhedsgruppe");
188
188
  injectString("de", "GroupCompanyId", "Unternehmensgruppe");
189
189
  injectString("en", "GroupCompanyId", "Company group");
190
- injectString("es", "GroupCompanyId", "Grupo Compa\xF1\xEDa");
190
+ injectString("es", "GroupCompanyId", "Grupo Empresa");
191
191
  injectString("fi-FI", "GroupCompanyId", "Yritysryhm\xE4");
192
192
  injectString("fr", "GroupCompanyId", "Groupe Entreprise");
193
193
  injectString("fr-FR", "GroupCompanyId", "Groupe Entreprise");
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  });
9
9
  exports.TRANSLATIONS = exports.AdvancedGroupsFilterSectionTooltip = void 0;
10
10
  const jsx_runtime_1 = require("react/jsx-runtime");
11
- const react_1 = require("react");
12
11
  const tooltip_1 = require("../tooltip/tooltip");
13
12
  injectString("cs", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "P\u0159i hled\xE1n\xED konkr\xE9tn\xED skupiny pou\u017Eijte v\xEDce oper\xE1tor\u016F. Nap\u0159\xEDklad p\u0159i filtrov\xE1n\xED prost\u0159edk\u016F, kter\xE9 spadaj\xED do skupiny Traktory, skupina Toronto zobraz\xED seznam traktor\u016F, kter\xE9 pat\u0159\xED do pobo\u010Dky v Torontu.");
14
13
  injectString("da-DK", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "Brug flere operatorer, n\xE5r du s\xF8ger efter en bestemt gruppe. Hvis du f.eks. filtrerer efter aktiver, der tilh\xF8rer gruppen Traktor og Toronto-gruppen, vises en liste over traktorer, der tilh\xF8rer Toronto-grenen.");
@@ -34,58 +33,20 @@ injectString("th", "Use multiple operators when searching for a specific group.
34
33
  injectString("tr", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "Belirli bir grubu ararken birden \xE7ok operat\xF6r kullan\u0131n. \xD6rne\u011Fin, Trakt\xF6r grubuna ve Toronto grubuna ait varl\u0131klar i\xE7in filtreleme yap\u0131l\u0131rken Toronto \u015Fubesine ait trakt\xF6rlerin listesi g\xF6r\xFCnt\xFClenir.");
35
34
  injectString("zh-Hans", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "\u641C\u7D22\u7279\u5B9A\u7EC4\u65F6\uFF0C\u53EF\u4EE5\u4F7F\u7528\u591A\u4E2A\u8FD0\u7B97\u7B26\u3002\u4F8B\u5982\uFF0C\u7B5B\u9009\u5C5E\u4E8E\u201C\u7275\u5F15\u8F66\u201D\u7EC4\u548C\u201C\u591A\u4F26\u591A\u201D\u7EC4\u7684\u8D44\u4EA7\uFF0C\u5C31\u4F1A\u663E\u793A\u5C5E\u4E8E\u591A\u4F26\u591A\u5206\u652F\u7684\u7275\u5F15\u8F66\u5217\u8868\u3002");
36
35
  injectString("zh-TW", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "\u641C\u5C0B\u7279\u5B9A\u7FA4\u7D44\u6642\uFF0C\u8ACB\u4F7F\u7528\u591A\u500B\u904B\u7B97\u5B50\u3002\u4F8B\u5982\uFF0C\u82E5\u7BE9\u9078\u5C6C\u65BC\u727D\u5F15\u6A5F\u7FA4\u7D44\u548C\u591A\u502B\u591A\u7FA4\u7D44\u7684\u8CC7\u7522\uFF0C\u5247\u6703\u986F\u793A\u5C6C\u65BC\u591A\u502B\u591A\u5206\u516C\u53F8\u7684\u727D\u5F15\u6A5F\u6E05\u55AE\u3002");
37
- injectString("cs", "Information", "Informace");
38
- injectString("da-DK", "Information", "Information");
39
- injectString("de", "Information", "Information");
40
- injectString("en", "Information", "Information");
41
- injectString("es", "Information", "Informaci\xF3n");
42
- injectString("fi-FI", "Information", "Tiedot");
43
- injectString("fr", "Information", "Renseignements");
44
- injectString("fr-FR", "Information", "Informations");
45
- injectString("hu-HU", "Information", "Inform\xE1ci\xF3");
46
- injectString("id", "Information", "Informasi");
47
- injectString("it", "Information", "Informazioni");
48
- injectString("ja", "Information", "\u60C5\u5831");
49
- injectString("ko-KR", "Information", "\uC815\uBCF4");
50
- injectString("ms", "Information", "Maklumat");
51
- injectString("nb-NO", "Information", "Informasjon");
52
- injectString("nl", "Information", "Informatie");
53
- injectString("pl", "Information", "Informacje");
54
- injectString("pt-BR", "Information", "Informa\xE7\xF5es");
55
- injectString("sk-SK", "Information", "Inform\xE1cie");
56
- injectString("sv", "Information", "Information");
57
- injectString("th", "Information", "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25");
58
- injectString("tr", "Information", "Bilgi");
59
- injectString("zh-Hans", "Information", "\u4FE1\u606F");
60
- injectString("zh-TW", "Information", "\u8CC7\u8A0A");
61
- const iconInfoCircle_1 = require("../icons/iconInfoCircle");
62
36
  const useLanguage_1 = require("../utils/localization/useLanguage");
63
37
  const classNames_1 = require("../commonHelpers/classNames/classNames");
64
38
  const AdvancedGroupsFilterSectionTooltip = ({
65
39
  className = "",
66
- size = "auto",
67
40
  alignment = "top",
68
41
  text
69
42
  }) => {
70
43
  const {
71
44
  translate
72
45
  } = (0, useLanguage_1.useLanguage)();
73
- const triggerRef = (0, react_1.useRef)(null);
74
46
  const defaultTooltipText = translate("Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.");
75
47
  return (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, {
76
48
  className: (0, classNames_1.classNames)(["zen-advanced-groups-filter-section-tooltip__item", className || ""]),
77
- size: size,
78
49
  alignment: alignment,
79
- trigger: (0, jsx_runtime_1.jsx)("button", {
80
- type: "button",
81
- "aria-label": translate("Information"),
82
- className: "zen-advanced-groups-filter-section-tooltip__trigger",
83
- ref: triggerRef,
84
- children: (0, jsx_runtime_1.jsx)(iconInfoCircle_1.IconInfoCircle, {
85
- className: "zen-advanced-groups-filter-section-tooltip__trigger-icon",
86
- size: "large"
87
- })
88
- }),
89
50
  children: text || defaultTooltipText
90
51
  });
91
52
  };
@@ -19,7 +19,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
19
19
  ], {
20
20
  duration: 300,
21
21
  iterations: 1,
22
- delay: 0
22
+ delay: 0,
23
+ easing: "ease-in-out"
23
24
  }).onfinish = () => {
24
25
  finishAlertAnimation(id);
25
26
  };
@@ -32,7 +33,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
32
33
  ], {
33
34
  duration: 300,
34
35
  iterations: 1,
35
- delay: 0
36
+ delay: 0,
37
+ easing: "ease-in-out"
36
38
  }).onfinish = () => {
37
39
  finishAlertAnimation(id);
38
40
  };
@@ -46,7 +48,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
46
48
  duration: 300,
47
49
  iterations: 1,
48
50
  delay: 0,
49
- fill: "forwards"
51
+ fill: "forwards",
52
+ easing: "ease-in-out"
50
53
  }).onfinish = () => {
51
54
  finishAlertAnimation(id);
52
55
  };
@@ -58,7 +61,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
58
61
  ], {
59
62
  duration: 300,
60
63
  iterations: 1,
61
- delay: 0
64
+ delay: 0,
65
+ easing: "ease-in-out"
62
66
  }).onfinish = () => {
63
67
  finishAlertAnimation(id);
64
68
  };
@@ -6,10 +6,10 @@ import { IActions } from "./components/actions";
6
6
  import { IContent } from "./components/content";
7
7
  import "./card.less";
8
8
  import { TAlignment } from "../absolute/absolute";
9
- import { TooltipSize } from "../tooltip/tooltip";
10
9
  import { IZenComponentProps, IZenFormLayoutItem, IZenGridItem } from "../commonHelpers/zenComponent";
11
10
  import { ICardButton } from "./components/cardButton/cardButton";
12
11
  import { IIcon } from "../icons/icon";
12
+ import { TooltipSize } from "../tooltip/tooltip";
13
13
  import { IToggleButton } from "../toggleButton/toggleButton";
14
14
  export declare const DEFAULT_CARD_SIZE: TContainerSize;
15
15
  export interface ICard extends IZenComponentProps, IZenGridItem, IZenFormLayoutItem {
package/dist/card/card.js CHANGED
@@ -116,7 +116,6 @@ props => {
116
116
  onClick,
117
117
  cardContentClasses = "",
118
118
  tooltipAlignment,
119
- tooltipSize,
120
119
  fullWidth,
121
120
  scrollableContent = true,
122
121
  autoHeight = false,
@@ -290,8 +289,7 @@ props => {
290
289
  status: status,
291
290
  isMobile: isMobile,
292
291
  tooltip: tooltip,
293
- tooltipAlignment: tooltipAlignment,
294
- tooltipSize: tooltipSize
292
+ tooltipAlignment: tooltipAlignment
295
293
  }), toggle ? (0, jsx_runtime_1.jsx)(toggleButton_1.ToggleButton, Object.assign({}, toggle.props)) : null, !!menuActions.length && (0, jsx_runtime_1.jsx)(menu_1.Menu, {
296
294
  trigger: menuTrigger,
297
295
  title: title || translate("Actions"),
@@ -9,7 +9,7 @@ const textIconButton_1 = require("../../textIconButton/textIconButton");
9
9
  const tooltip_1 = require("../../tooltip/tooltip");
10
10
  const useDrive_1 = require("../../utils/theme/useDrive");
11
11
  const iconInfoCircle_1 = require("../../icons/iconInfoCircle");
12
- const Status = ({ status, isMobile, tooltip, className = "", tooltipAlignment, tooltipSize, title }) => {
12
+ const Status = ({ status, isMobile, tooltip, className = "", tooltipAlignment, title }) => {
13
13
  const ref = (0, react_1.useRef)(null);
14
14
  const isDrive = (0, useDrive_1.useDrive)();
15
15
  const renderButton = () => {
@@ -17,7 +17,7 @@ const Status = ({ status, isMobile, tooltip, className = "", tooltipAlignment, t
17
17
  return "";
18
18
  }
19
19
  const statusButton = (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { ref: ref, iconPosition: textIconButton_1.ButtonIconPosition.Start, className: (0, classNames_1.classNames)(["zen-card-status", isMobile ? "zen-card-status--mobile" : "", "zen-card-status-button", status ? `zen-card-status--${status}` : "", className]), icon: iconInfoCircle_1.IconInfoCircle, iconSize: isDrive ? svgIconSize_1.SvgIconSize.Huge : svgIconSize_1.SvgIconSize.Large, "aria-label": tooltip, htmlType: "button" });
20
- return (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { mobileView: "mobileSheet", mobileSheetTitle: title, size: tooltipSize, alignment: tooltipAlignment, trigger: statusButton, children: tooltip });
20
+ return (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { mobileTitle: title, alignment: tooltipAlignment, trigger: statusButton, children: tooltip });
21
21
  };
22
22
  return tooltip ? renderButton() : null;
23
23
  };
@@ -9,6 +9,26 @@ const getBarTooltipItems = (data, datasetIndex, index, options, isHidden) => {
9
9
  if (datasetIndex === undefined || index === undefined) {
10
10
  return [];
11
11
  }
12
+ // Get the x-value from the hovered dataset to match against other datasets
13
+ // If the hovered dataset is empty, find the first non-empty dataset to get the x-value
14
+ const hoveredDataset = data.datasets[datasetIndex];
15
+ let hoveredDataItem = index < hoveredDataset.data.length
16
+ ? hoveredDataset.data[index]
17
+ : undefined;
18
+ // If the hovered dataset doesn't have data at this index, find another dataset that does
19
+ if (hoveredDataItem === undefined) {
20
+ for (const dataset of data.datasets) {
21
+ if (dataset.data.length > index) {
22
+ hoveredDataItem = dataset.data[index];
23
+ break;
24
+ }
25
+ }
26
+ // If still no data found, return empty
27
+ if (hoveredDataItem === undefined) {
28
+ return [];
29
+ }
30
+ }
31
+ const hoveredXValue = typeof hoveredDataItem === "number" ? undefined : hoveredDataItem.x;
12
32
  return data.datasets.map((dataset, dsIndex) => {
13
33
  if (dataset.data.length === 0) {
14
34
  return undefined;
@@ -16,12 +36,21 @@ const getBarTooltipItems = (data, datasetIndex, index, options, isHidden) => {
16
36
  if (isHidden(dsIndex)) {
17
37
  return undefined;
18
38
  }
19
- const dataItem = dataset.data[index];
39
+ // Find the data item in this dataset that matches the hovered x-value
40
+ const dataItem = hoveredXValue !== undefined
41
+ ? dataset.data.find(item => typeof item !== "number" && item.x === hoveredXValue)
42
+ : dataset.data[index];
43
+ // If no matching data point exists for this dataset, skip it
44
+ if (!dataItem) {
45
+ return undefined;
46
+ }
20
47
  const itemValue = typeof dataItem === "number" ? dataItem : dataItem.y;
21
48
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
22
49
  const value = itemValue !== undefined ? (0, formatValue_1.formatValue)(itemValue.toFixed(2), dsIndex, options === null || options === void 0 ? void 0 : options.unit) : undefined;
23
50
  const label = dataset.label || "";
24
- const color = Array.isArray(dataset.backgroundColor) && dataset.backgroundColor[index] ? dataset.backgroundColor[index] :
51
+ // For color, find the correct index in the original dataset
52
+ const dataItemIndex = dataset.data.indexOf(dataItem);
53
+ const color = Array.isArray(dataset.backgroundColor) && dataset.backgroundColor[dataItemIndex] ? dataset.backgroundColor[dataItemIndex] :
25
54
  typeof dataset.borderColor === "string" ? dataset.borderColor : "";
26
55
  return { label, value, color };
27
56
  }).filter(item => item !== undefined);
@@ -58,7 +58,8 @@ const BarChart = (_a) => {
58
58
  const tooltipId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
59
59
  const { toLocalDateTime } = (0, react_1.useContext)(userFormatContext_1.userFormatContext);
60
60
  const isTimedData = (0, react_1.useMemo)(() => (0, isDateRange_1.isDateRange)(data, false), [data]);
61
- const yAxisMeta = (0, react_1.useMemo)(() => (0, getYAxisMeta_1.getYAxisMeta)(data), [data]);
61
+ const isStacked = (0, react_1.useMemo)(() => { var _a, _b; return ((_b = (_a = options.scales) === null || _a === void 0 ? void 0 : _a.y) === null || _b === void 0 ? void 0 : _b.stacked) === true; }, [options]);
62
+ const yAxisMeta = (0, react_1.useMemo)(() => (0, getYAxisMeta_1.getYAxisMeta)(data, isStacked), [data, isStacked]);
62
63
  const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(yAxisMeta, isTimedData, dark, translate), [yAxisMeta, isTimedData, dark, translate]);
63
64
  const chartOptions = (0, utils_1.deepMerge)(defOptions, options);
64
65
  const { isHidden, toggleHidden } = (0, useHidden_1.useHidden)();
@@ -1,6 +1,6 @@
1
1
  import { ILineChartData } from "../lineChart/interfaces";
2
2
  import { IBarChartData } from "../barChart/interfaces";
3
- export declare const getYAxisMeta: (data: ILineChartData | IBarChartData) => {
3
+ export declare const getYAxisMeta: (data: ILineChartData | IBarChartData, stacked?: boolean) => {
4
4
  min: number;
5
5
  max: number;
6
6
  name: string;
@@ -4,10 +4,53 @@ exports.getYAxisMeta = void 0;
4
4
  const getRange_1 = require("./getRange");
5
5
  const mergeRanges_1 = require("./mergeRanges");
6
6
  const normalizeRange_1 = require("./normalizeRange");
7
- const getYAxisMeta = (data) => {
7
+ const getYAxisMeta = (data, stacked = false) => {
8
8
  if (data.datasets.length === 0) {
9
9
  return [Object.assign({ name: "y" }, (0, getRange_1.getRange)({ data: [] }))];
10
10
  }
11
+ if (stacked) {
12
+ const axisMap = {};
13
+ data.datasets.forEach((ds) => {
14
+ const name = ds.yAxisID ? ds.yAxisID : "y";
15
+ if (!axisMap.hasOwnProperty(name)) {
16
+ axisMap[name] = {
17
+ name: name,
18
+ valuesByX: new Map()
19
+ };
20
+ }
21
+ const valuesByX = axisMap[name].valuesByX;
22
+ ds.data.forEach((point) => {
23
+ const xKey = typeof point === "object" && "x" in point ? point.x : "";
24
+ const yValue = typeof point === "object" && "y" in point ? point.y : (typeof point === "number" ? point : 0);
25
+ const existing = valuesByX.get(xKey) || { positive: 0, negative: 0 };
26
+ if (yValue !== null && yValue >= 0) {
27
+ existing.positive += yValue;
28
+ }
29
+ else if (yValue !== null && yValue < 0) {
30
+ existing.negative += yValue;
31
+ }
32
+ valuesByX.set(xKey, existing);
33
+ });
34
+ });
35
+ return Object.values(axisMap).map(axis => {
36
+ const stackedValues = [];
37
+ axis.valuesByX.forEach((value) => {
38
+ // Always include 0 as the baseline for stacked charts
39
+ if (value.positive > 0) {
40
+ stackedValues.push(value.positive);
41
+ }
42
+ if (value.negative < 0) {
43
+ stackedValues.push(value.negative);
44
+ }
45
+ });
46
+ // Add 0 to ensure the axis includes the baseline
47
+ stackedValues.push(0);
48
+ const stackedData = stackedValues.map(y => ({ x: 0, y }));
49
+ const range = (0, getRange_1.getRange)({ data: stackedData });
50
+ const normalized = (0, normalizeRange_1.normalizeRange)(range);
51
+ return Object.assign({ name: axis.name }, normalized);
52
+ });
53
+ }
11
54
  const axisMap = data.datasets.reduce((acc, ds) => {
12
55
  const name = ds.yAxisID ? ds.yAxisID : "y";
13
56
  const range = (0, getRange_1.getRange)({ data: ds.data });
@@ -51,14 +51,14 @@ const Checkbox = (_a) => {
51
51
  const intId = id || generatedId;
52
52
  const driveClasses = (0, useDriveClassName_1.useDriveClassName)("zen-checkbox");
53
53
  const checkboxIconClasses = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(["zen-checkbox__icon", disabled ? "zen-checkbox__icon--disabled" : ""]), [disabled]);
54
- const checkbox = (0, jsx_runtime_1.jsx)(triStateCheckbox_1.TriStateCheckbox, Object.assign({ className: "zen-checkbox__input", id: intId, checked: checked, indeterminate: indeterminate, disabled: disabled }, rest));
54
+ const checkbox = (0, jsx_runtime_1.jsx)(triStateCheckbox_1.TriStateCheckbox, Object.assign({ className: "zen-checkbox__input", id: intId, checked: checked, indeterminate: indeterminate, disabled: disabled, "aria-label": title }, rest));
55
55
  const iconAndLabel = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-checkbox__box", children: state === checkboxState_1.CheckboxState.Indeterminate ? (0, jsx_runtime_1.jsx)(checkboxIconMinus_1.CheckboxIconMinus, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" }) :
56
56
  state === checkboxState_1.CheckboxState.On ? (0, jsx_runtime_1.jsx)(checkboxIconCheckmark_1.CheckboxIconCheckmark, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" }) : null }), children
57
57
  ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label-text", fullWidth ? "zen-checkbox__label-text--full-width" : ""]), children: children })
58
58
  : null] });
59
59
  if (wrapped) {
60
- return (0, jsx_runtime_1.jsxs)("label", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), title: title, "aria-label": title, children: [checkbox, (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), children: iconAndLabel })] });
60
+ return (0, jsx_runtime_1.jsxs)("label", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), title: title, children: [checkbox, (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), children: iconAndLabel })] });
61
61
  }
62
- return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), children: [checkbox, (0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), htmlFor: intId, title: title, "aria-label": title, children: iconAndLabel })] });
62
+ return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), children: [checkbox, (0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), htmlFor: intId, title: title, children: iconAndLabel })] });
63
63
  };
64
64
  exports.Checkbox = Checkbox;
@@ -1,11 +1,10 @@
1
- import { ReactNode } from "react";
2
- import { IZenComponentProps } from "../../commonHelpers/zenComponent";
3
- import "./emptySearchList.less";
4
- export interface IEmptySearchList extends IZenComponentProps {
5
- description?: string;
6
- image?: ReactNode;
1
+ /// <reference types="react" />
2
+ import { IEmptyState } from "../../emptyState/emptyState";
3
+ export interface IEmptySearchList extends Omit<IEmptyState, "children"> {
4
+ image?: React.ReactNode;
5
+ children?: React.ReactNode;
7
6
  }
8
7
  export declare const EmptySearchList: {
9
- ({ className, children, description, image }: IEmptySearchList): import("react/jsx-runtime").JSX.Element;
8
+ ({ ...props }: IEmptySearchList): import("react/jsx-runtime").JSX.Element;
10
9
  translations: string[];
11
10
  };
@@ -3,13 +3,20 @@
3
3
  const {
4
4
  injectString
5
5
  } = require("../../utils/localization/translationsDictionary");
6
+ var __rest = this && this.__rest || function (s, e) {
7
+ var t = {};
8
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
9
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
11
+ }
12
+ return t;
13
+ };
6
14
  Object.defineProperty(exports, "__esModule", {
7
15
  value: true
8
16
  });
9
17
  exports.EmptySearchList = void 0;
10
18
  const jsx_runtime_1 = require("react/jsx-runtime");
11
- const classNames_1 = require("../../commonHelpers/classNames/classNames");
12
- const imageNothingFound_1 = require("../../images/imageNothingFound");
19
+ const emptyState_1 = require("../../emptyState/emptyState");
13
20
  const useLanguage_1 = require("../../utils/localization/useLanguage");
14
21
  injectString("cs", "Try adjusting your search or filter.", "Zkuste upravit sv\xE9 vyhled\xE1v\xE1n\xED nebo filtr.");
15
22
  injectString("da-DK", "Try adjusting your search or filter.", "Pr\xF8v at justere din s\xF8gning eller dit filter.");
@@ -35,30 +42,15 @@ injectString("th", "Try adjusting your search or filter.", "\u0E25\u0E2D\u0E07\u
35
42
  injectString("tr", "Try adjusting your search or filter.", "Araman\u0131z\u0131 veya filtrenizi ayarlamay\u0131 deneyin.");
36
43
  injectString("zh-Hans", "Try adjusting your search or filter.", "\u5C1D\u8BD5\u8C03\u6574\u60A8\u7684\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6\u3002");
37
44
  injectString("zh-TW", "Try adjusting your search or filter.", "\u8ACB\u5617\u8A66\u8ABF\u6574\u60A8\u7684\u641C\u5C0B\u6216\u7BE9\u9078\u689D\u4EF6\u3002");
38
- const EmptySearchList = ({
39
- className,
40
- children,
41
- description,
42
- image
43
- }) => {
45
+ const EmptySearchList = _a => {
46
+ var props = __rest(_a, []);
44
47
  const {
45
48
  translate
46
49
  } = (0, useLanguage_1.useLanguage)();
47
- return (0, jsx_runtime_1.jsxs)("div", {
48
- className: (0, classNames_1.classNames)(["zen-empty-list-search", className || ""]),
49
- children: [image ? (0, jsx_runtime_1.jsx)("div", {
50
- className: "zen-empty-list-search__image",
51
- children: image
52
- }) : (0, jsx_runtime_1.jsx)(imageNothingFound_1.ImageNothingFound, {
53
- className: "zen-empty-list-search__image"
54
- }), (0, jsx_runtime_1.jsx)("h2", {
55
- className: "zen-empty-list-search__header",
56
- children: children
57
- }), (0, jsx_runtime_1.jsx)("div", {
58
- className: "zen-empty-list-search__description",
59
- children: description || translate("Try adjusting your search or filter.")
60
- })]
61
- });
50
+ return (0, jsx_runtime_1.jsx)(emptyState_1.EmptyState, Object.assign({}, props, {
51
+ description: props.description || translate("Try adjusting your search or filter."),
52
+ children: props.children
53
+ }));
62
54
  };
63
55
  exports.EmptySearchList = EmptySearchList;
64
56
  exports.EmptySearchList.translations = ["Try adjusting your search or filter."];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import "./dateInputRaw.less";
3
- import { IFormFieldComponent } from "../formField/formField";
3
+ import { IFormFieldComponent } from "../formField/types";
4
4
  import { IDateInputRawDefault, TDateInputRaw } from "./types";
5
5
  import { IChipsParent } from "../chip/chip";
6
6
  export interface IDateInputRaw extends IDateInputRawDefault, IChipsParent {
@@ -2,7 +2,7 @@
2
2
  import "./dateRangeRaw.less";
3
3
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
4
4
  import { TButton } from "../button/buttonType";
5
- import { IFormFieldComponent } from "../formField/formField";
5
+ import { IFormFieldComponent } from "../formField/types";
6
6
  import { IChipsParent } from "../chip/chip";
7
7
  import { TDateRangeOption, IDateRangeValue, IDateRangeValueOptionalLabel } from "./utils/dateRangeUtils";
8
8
  import { TDateRangeRaw } from "./types";
@@ -28,6 +28,7 @@ export declare const GET_NEXT_MONTH_OPTION: (toLocalDateTime?: TToLocalDateTime,
28
28
  export declare const GET_LAST_MONTH_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
29
29
  export declare const GET_LAST_SEVEN_DAYS_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
30
30
  export declare const GET_LAST_THIRTY_DAYS_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
31
+ export declare const GET_YEAR_TO_DATE_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
31
32
  export declare const GET_LAST_TWELVE_MONTHS_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
32
33
  export declare const GET_LAST_THREE_MONTH_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
33
34
  export declare const GET_LAST_QUARTER_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
@@ -6,7 +6,7 @@ const {
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
- exports.GET_DEFAULT_DATE_OPTIONS = exports.GET_THIS_YEAR_OPTION = exports.GET_LAST_YEAR_OPTION = exports.GET_THIS_QUARTER_OPTION = exports.GET_LAST_QUARTER_OPTION = exports.GET_LAST_THREE_MONTH_OPTION = exports.GET_LAST_TWELVE_MONTHS_OPTION = exports.GET_LAST_THIRTY_DAYS_OPTION = exports.GET_LAST_SEVEN_DAYS_OPTION = exports.GET_LAST_MONTH_OPTION = exports.GET_NEXT_MONTH_OPTION = exports.GET_THIS_MONTH_OPTION = exports.GET_LAST_WEEK_OPTION = exports.GET_NEXT_WEEK_OPTION = exports.GET_THIS_WEEK_OPTION = exports.GET_YESTERDAY_OPTION = exports.GET_TODAY_OPTION = void 0;
9
+ exports.GET_DEFAULT_DATE_OPTIONS = exports.GET_THIS_YEAR_OPTION = exports.GET_LAST_YEAR_OPTION = exports.GET_THIS_QUARTER_OPTION = exports.GET_LAST_QUARTER_OPTION = exports.GET_LAST_THREE_MONTH_OPTION = exports.GET_LAST_TWELVE_MONTHS_OPTION = exports.GET_YEAR_TO_DATE_OPTION = exports.GET_LAST_THIRTY_DAYS_OPTION = exports.GET_LAST_SEVEN_DAYS_OPTION = exports.GET_LAST_MONTH_OPTION = exports.GET_NEXT_MONTH_OPTION = exports.GET_THIS_MONTH_OPTION = exports.GET_LAST_WEEK_OPTION = exports.GET_NEXT_WEEK_OPTION = exports.GET_THIS_WEEK_OPTION = exports.GET_YESTERDAY_OPTION = exports.GET_TODAY_OPTION = void 0;
10
10
  const dateUtils_1 = require("../../calendar/dateUtils");
11
11
  injectString("cs", "Today", "Dnes");
12
12
  injectString("da-DK", "Today", "I dag");
@@ -248,6 +248,30 @@ injectString("th", "Last 30 days", "30 \u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E1
248
248
  injectString("tr", "Last 30 days", "Son 30 g\xFCn");
249
249
  injectString("zh-Hans", "Last 30 days", "\u6700\u8FD1 30 \u5929");
250
250
  injectString("zh-TW", "Last 30 days", "\u904E\u53BB 30 \u5929");
251
+ injectString("cs", "Year to date", "Od za\u010D\xE1tku roku");
252
+ injectString("da-DK", "Year to date", "\xC5r til dato");
253
+ injectString("de", "Year to date", "Seit Jahresbeginn");
254
+ injectString("en", "Year to date", "Year to date");
255
+ injectString("es", "Year to date", "A\xF1o a la fecha");
256
+ injectString("fi-FI", "Year to date", "Vuoden alusta");
257
+ injectString("fr", "Year to date", "Cumul jusqu\u2019\xE0 ce jour");
258
+ injectString("fr-FR", "Year to date", "L\u2019ann\xE9e pass\xE9e");
259
+ injectString("hu-HU", "Year to date", "\xC9v a mai napig");
260
+ injectString("id", "Year to date", "Tahun hingga saat ini");
261
+ injectString("it", "Year to date", "Dall'inizio dell'anno");
262
+ injectString("ja", "Year to date", "\u7D2F\u8A08");
263
+ injectString("ko-KR", "Year to date", "\uC62C\uD574 \uD604\uC7AC\uAE4C\uC9C0");
264
+ injectString("ms", "Year to date", "Tahun ini hingga tarikh ini");
265
+ injectString("nb-NO", "Year to date", "\xC5r til dato");
266
+ injectString("nl", "Year to date", "Jaar tot heden");
267
+ injectString("pl", "Year to date", "Od pocz\u0105tku roku");
268
+ injectString("pt-BR", "Year to date", "Acumulado no ano");
269
+ injectString("sk-SK", "Year to date", "Rok od za\u010Diatku");
270
+ injectString("sv", "Year to date", "\xC5r till dagens datum");
271
+ injectString("th", "Year to date", "\u0E15\u0E49\u0E19\u0E1B\u0E35\u0E16\u0E36\u0E07\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19");
272
+ injectString("tr", "Year to date", "Y\u0131lba\u015F\u0131ndan bug\xFCne kadar");
273
+ injectString("zh-Hans", "Year to date", "\u5E74\u521D\u81F3\u4ECA");
274
+ injectString("zh-TW", "Year to date", "\u5E74\u521D\u81F3\u4ECA");
251
275
  injectString("cs", "Last 12 months", "Posledn\xEDch 12 m\u011Bs\xEDc\u016F");
252
276
  injectString("da-DK", "Last 12 months", "Sidste 12 m\xE5neder");
253
277
  injectString("de", "Last 12 months", "Letzte 12 Monate");
@@ -552,6 +576,20 @@ const GET_LAST_THIRTY_DAYS_OPTION = (toLocalDateTime = defaultToLocalDateTime, t
552
576
  };
553
577
  };
554
578
  exports.GET_LAST_THIRTY_DAYS_OPTION = GET_LAST_THIRTY_DAYS_OPTION;
579
+ const GET_YEAR_TO_DATE_OPTION = (toLocalDateTime = defaultToLocalDateTime, translate = defaultTranslate, toReverseOffsetDateTime = defaultToReverseOffsetDateTime) => {
580
+ const startDate = new Date((0, dateUtils_1.getNewStartDate)(toLocalDateTime).getFullYear(), 0, 1);
581
+ const endDate = (0, dateUtils_1.getNewEndDate)(toLocalDateTime);
582
+ const from = toReverseOffsetDateTime(startDate);
583
+ const to = toReverseOffsetDateTime(endDate);
584
+ return {
585
+ label: translate("Year to date"),
586
+ getRange: () => ({
587
+ from,
588
+ to
589
+ })
590
+ };
591
+ };
592
+ exports.GET_YEAR_TO_DATE_OPTION = GET_YEAR_TO_DATE_OPTION;
555
593
  const GET_LAST_TWELVE_MONTHS_OPTION = (toLocalDateTime = defaultToLocalDateTime, translate = defaultTranslate, toReverseOffsetDateTime = defaultToReverseOffsetDateTime) => {
556
594
  const startDate = (0, dateUtils_1.addMonths)((0, dateUtils_1.getNewStartDate)(toLocalDateTime), -12);
557
595
  const endDate = (0, dateUtils_1.getNewEndDate)(toLocalDateTime);
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./dropdownRaw.less";
3
- import { IFormFieldComponent } from "../formField/formField";
3
+ import { IFormFieldComponent } from "../formField/types";
4
4
  import { TDropdownRaw } from "./types";
5
5
  export declare const DropdownRaw: React.FC<TDropdownRaw & IFormFieldComponent>;
6
6
  export declare const TRANSLATIONS: string[];
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from "react";
2
+ import "./emptyState.less";
3
+ import { IZenComponentProps } from "../commonHelpers/zenComponent";
4
+ export interface IEmptyState extends IZenComponentProps {
5
+ description?: string;
6
+ image?: ReactNode | React.FC;
7
+ children: ReactNode;
8
+ }
9
+ export declare const EmptyState: ({ className, children, description, image }: IEmptyState) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmptyState = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const classNames_1 = require("../commonHelpers/classNames/classNames");
6
+ const imageNothingFound_1 = require("../images/imageNothingFound");
7
+ const useIcon_1 = require("./hooks/useIcon");
8
+ const EmptyState = ({ className, children, description, image }) => {
9
+ const icon = (0, useIcon_1.useIcon)(image);
10
+ return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-empty-state", className || ""]), children: [icon
11
+ ? (0, jsx_runtime_1.jsx)("div", { className: "zen-empty-state__image", children: icon })
12
+ : (0, jsx_runtime_1.jsx)(imageNothingFound_1.ImageNothingFound, { className: "zen-empty-state__image" }), children && (0, jsx_runtime_1.jsx)("h2", { className: "zen-empty-state__header", children: children }), description && (0, jsx_runtime_1.jsx)("div", { className: "zen-empty-state__description", children: description })] });
13
+ };
14
+ exports.EmptyState = EmptyState;
@@ -0,0 +1,2 @@
1
+ import React, { ReactNode } from "react";
2
+ export declare const useIcon: (icon: ReactNode | React.FC) => string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.FunctionComponentElement<{}> | null | undefined;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useIcon = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const useIcon = (icon) => {
9
+ const svgIcon = react_1.default.useMemo(() => {
10
+ if (typeof icon === "function") {
11
+ return react_1.default.createElement(icon, {});
12
+ }
13
+ return icon;
14
+ }, [icon]);
15
+ return svgIcon;
16
+ };
17
+ exports.useIcon = useIcon;
@@ -24,6 +24,7 @@ declare const options: {
24
24
  LastQuarter: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
25
25
  LastYear: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
26
26
  ThisYear: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
27
+ YearToDate: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
27
28
  };
28
29
  export type TDateRangeName = keyof typeof options | "Custom";
29
30
  export declare function getRangeOption(option: TDateRangeOption, translate: (s: string) => string, toLocalDateTime?: (date: Date | string) => Date, firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date): IDateRangeOptionId | undefined;