@geotab/zenith 3.1.1-beta.6 → 3.2.0-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 (430) hide show
  1. package/README.md +20 -0
  2. package/dist/advancedGroupsFilter/advancedGroupsFilter.js +136 -30
  3. package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +139 -34
  4. package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +352 -87
  5. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
  6. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +83 -9
  7. package/dist/alertRaw/alertRaw.js +175 -54
  8. package/dist/banner/bannerMultipLine.js +131 -23
  9. package/dist/banner/bannerSingleLine.js +110 -16
  10. package/dist/betaPill/betaPill.js +111 -20
  11. package/dist/bookmark/bookmark.js +95 -28
  12. package/dist/bulkEditControl/bulkEditControl.js +167 -34
  13. package/dist/calendar/calendar.js +943 -273
  14. package/dist/calendar/calendarUtils.js +157 -85
  15. package/dist/card/card.js +268 -123
  16. package/dist/chart/accessibleChart/accessibleChartNarrative.js +648 -555
  17. package/dist/chart/accessibleChart/accessibleChartTable.js +245 -86
  18. package/dist/chart/chart.js +36 -21
  19. package/dist/chart/chartAxis/chartAxis.js +85 -7
  20. package/dist/checkboxListWithAction/checkboxListWithAction.js +224 -69
  21. package/dist/chip/chip.js +195 -91
  22. package/dist/columnsSelector/columnsSelector.js +97 -12
  23. package/dist/columnsSelector/columnsTab/columnsTab.js +59 -15
  24. package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +81 -34
  25. package/dist/comboboxSelected/comboboxSelected.js +1 -3
  26. package/dist/dataFeed/feedExpandControl/feedExpandControl.js +25 -10
  27. package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +92 -11
  28. package/dist/dataGrid/dataGrid.js +227 -117
  29. package/dist/dataGrid/emptySearchList/emptySearchList.js +56 -9
  30. package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +51 -7
  31. package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +64 -18
  32. package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +84 -10
  33. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +48 -16
  34. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +223 -32
  35. package/dist/dataGrid/withSelectableRows/withSelectableRows.js +286 -213
  36. package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +178 -95
  37. package/dist/dateInputInner/dateInputInner.js +791 -476
  38. package/dist/dateInputInner/dateInputInnerControlBlock.js +125 -22
  39. package/dist/dateInputRaw/dateInputRaw.js +315 -104
  40. package/dist/dateInputRaw/utils/getLabel.js +38 -7
  41. package/dist/dateRangeInner/dateRangeInner.js +172 -58
  42. package/dist/dateRangeRaw/dateRangeRaw.js +601 -239
  43. package/dist/dateRangeRaw/utils/dateRangeUtils.js +629 -241
  44. package/dist/dateSelectionWrapper/dateSelectionWrapper.js +152 -14
  45. package/dist/dialog/dialogContent.js +123 -40
  46. package/dist/dropdownRaw/dropdownHelper.d.ts +2 -2
  47. package/dist/dropdownRaw/dropdownHelper.js +9 -9
  48. package/dist/dropdownRaw/dropdownList.js +447 -78
  49. package/dist/dropdownRaw/dropdownPopup.js +218 -20
  50. package/dist/dropdownRaw/dropdownRaw.js +866 -506
  51. package/dist/dropdownRaw/dropdownSearchableTrigger.js +223 -46
  52. package/dist/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
  53. package/dist/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
  54. package/dist/dropdownRaw/stateReducer/stateActionType.js +1 -0
  55. package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
  56. package/dist/dropdownRaw/stateReducer/stateReducer.js +24 -12
  57. package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
  58. package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +20 -1
  59. package/dist/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
  60. package/dist/dropdownRaw/stateReducer/stateReducerTestData.js +74 -0
  61. package/dist/dropdownRaw/types.d.ts +1 -0
  62. package/dist/favoriteButton/favoriteButton.js +59 -10
  63. package/dist/filters/components/filtersContainer.js +151 -64
  64. package/dist/filters/components/filtersEmptySelectedList.js +30 -4
  65. package/dist/filters/components/filtersSaveModal.js +140 -42
  66. package/dist/filters/components/filtersSavedChipComponent.js +318 -108
  67. package/dist/filters/components/filtersSearchItemData.js +127 -47
  68. package/dist/filters/components/filtersSearchList.js +381 -179
  69. package/dist/filters/components/filtersSelect.js +128 -61
  70. package/dist/filters/components/filtersSelectListItem.js +125 -13
  71. package/dist/filters/components/filtersSidePanel.js +510 -178
  72. package/dist/filters/filters.js +445 -268
  73. package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +729 -272
  74. package/dist/filtersBar/components/resetComponentButton.js +45 -5
  75. package/dist/filtersBar/filtersBarActions/filtersBarActions.js +126 -15
  76. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +155 -49
  77. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +360 -104
  78. package/dist/filtersBar/filtersContainer/filtersContainer.js +204 -134
  79. package/dist/formField/components/formFieldWithLabel.d.ts +2 -1
  80. package/dist/formField/components/formFieldWithLabel.js +3 -2
  81. package/dist/formField/components/formFieldWithoutLabel.d.ts +2 -1
  82. package/dist/formField/components/formFieldWithoutLabel.js +3 -3
  83. package/dist/formField/components/trailingComponent.d.ts +8 -0
  84. package/dist/formField/components/trailingComponent.js +11 -0
  85. package/dist/formField/formField.js +12 -11
  86. package/dist/formField/hooks/useError.js +100 -36
  87. package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +72 -7
  88. package/dist/formGroup/hooks/useToggle.js +37 -11
  89. package/dist/formGroup/utils/getControls.js +8 -7
  90. package/dist/formLayout/hooks/useError.js +55 -15
  91. package/dist/formLayout/hooks/useFormButtons.js +128 -27
  92. package/dist/formSection/components/formSectionModal.js +1 -1
  93. package/dist/formSection/formSection.js +1 -1
  94. package/dist/formSection/hooks/useError.js +70 -22
  95. package/dist/formStepper/components/formStep.js +65 -10
  96. package/dist/formStepper/formStepper.js +129 -33
  97. package/dist/formStepperButtons/formStepperButtons.js +184 -38
  98. package/dist/groupsFilter/groupsHelper.d.ts +1 -1
  99. package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +162 -17
  100. package/dist/groupsFilterRaw/groupsFilterBox.js +137 -32
  101. package/dist/groupsFilterRaw/groupsFilterCommon.js +75 -8
  102. package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +184 -25
  103. package/dist/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
  104. package/dist/groupsFilterRaw/groupsFilterHelper.js +284 -168
  105. package/dist/groupsFilterRaw/groupsFilterInitialState.js +266 -18
  106. package/dist/groupsFilterRaw/groupsFilterMenu.js +124 -9
  107. package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
  108. package/dist/groupsFilterRaw/groupsFilterRaw.js +816 -308
  109. package/dist/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
  110. package/dist/groupsFilterRaw/groupsFilterTestData.js +153 -58
  111. package/dist/groupsFilterRaw/groupsFilterTrigger.js +139 -35
  112. package/dist/groupsFilterRaw/groupsHelper.js +739 -208
  113. package/dist/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
  114. package/dist/groupsFilterRaw/types.d.ts +1 -0
  115. package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +107 -52
  116. package/dist/header/components/mobileFilterControl/mobileFilterControl.js +62 -9
  117. package/dist/header/components/mobileSearchControl/mobileSearchControl.js +119 -14
  118. package/dist/header/headerBack.js +64 -20
  119. package/dist/index.css +110 -71
  120. package/dist/index.d.ts +1 -0
  121. package/dist/index.js +4 -1
  122. package/dist/list/itemData/itemDataInternal.js +216 -51
  123. package/dist/list/listItem/listItem.js +168 -55
  124. package/dist/menu/components/menuErrorItem.js +33 -5
  125. package/dist/mobileSheet/mobileSheet.js +195 -69
  126. package/dist/modal/modal.js +300 -142
  127. package/dist/nav/nav.js +1 -1
  128. package/dist/nav/navFooter/navFooter.js +82 -39
  129. package/dist/nav/navFooter/navFooterAction/navFooterAction.js +52 -13
  130. package/dist/nav/navHeader/navHeader.js +86 -36
  131. package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +88 -29
  132. package/dist/nav/navItem/navItem.d.ts +3 -3
  133. package/dist/nav/navItem/navItem.js +35 -33
  134. package/dist/nav/navMobileBar/navMobileBar.js +67 -21
  135. package/dist/notification/notification.js +124 -21
  136. package/dist/pagination/paginationArrow.js +81 -11
  137. package/dist/pagination/paginationText/paginationText.js +45 -11
  138. package/dist/pill/components/pillNonActionable/pillNonActionable.js +93 -24
  139. package/dist/pillBox/components/pillBoxItem.js +52 -9
  140. package/dist/pillBox/pillBox.js +121 -20
  141. package/dist/pillExpandable/pillExpandable.js +333 -139
  142. package/dist/rangeRaw/rangeRaw.js +486 -141
  143. package/dist/rangeRaw/utils/rangeHelper.js +209 -39
  144. package/dist/searchInputRaw/searchInputRaw.js +180 -65
  145. package/dist/skeleton/skeleton.js +51 -6
  146. package/dist/sortControl/sortControl.js +152 -42
  147. package/dist/stepperRaw/stepperRaw.js +116 -42
  148. package/dist/summary/summary.js +94 -8
  149. package/dist/table/actions/actionsMenu.js +171 -78
  150. package/dist/table/flexible/columnSettings.js +80 -10
  151. package/dist/table/flexible/columnsList.js +110 -43
  152. package/dist/table/flexible/columnsPopup.js +77 -20
  153. package/dist/table/nested/useNestedRows.js +167 -77
  154. package/dist/table/selectable/selectableHeader.js +180 -41
  155. package/dist/table/selectable/useSelectableRows.js +270 -191
  156. package/dist/table/sortable/sortableHeader.js +153 -75
  157. package/dist/tabs/tabs.js +227 -118
  158. package/dist/timePickerRaw/timePickerRaw.js +278 -58
  159. package/dist/toastRaw/toastRaw.js +138 -32
  160. package/dist/toggleButton/toggleButton.d.ts +0 -1
  161. package/dist/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
  162. package/dist/toggleButtonRaw/toggleButtonRaw.js +146 -40
  163. package/dist/utils/formatDate.js +1001 -117
  164. package/{esm/utils/localization/translations/cs-json.js → dist/utils/localization/translations/cs.json} +11 -12
  165. package/{esm/utils/localization/translations/da-DK-json.js → dist/utils/localization/translations/da-DK.json} +31 -23
  166. package/{esm/utils/localization/translations/de-json.js → dist/utils/localization/translations/de.json} +12 -13
  167. package/dist/utils/localization/translations/en.json +308 -0
  168. package/{esm/utils/localization/translations/es-json.js → dist/utils/localization/translations/es.json} +11 -12
  169. package/{esm/utils/localization/translations/fi-FI-json.js → dist/utils/localization/translations/fi-FI.json} +31 -23
  170. package/{esm/utils/localization/translations/fr-FR-json.js → dist/utils/localization/translations/fr-FR.json} +12 -12
  171. package/{esm/utils/localization/translations/fr-json.js → dist/utils/localization/translations/fr.json} +11 -12
  172. package/{esm/utils/localization/translations/hu-HU-json.js → dist/utils/localization/translations/hu-HU.json} +31 -23
  173. package/{esm/utils/localization/translations/id-json.js → dist/utils/localization/translations/id.json} +11 -13
  174. package/{esm/utils/localization/translations/it-json.js → dist/utils/localization/translations/it.json} +11 -12
  175. package/{esm/utils/localization/translations/ja-json.js → dist/utils/localization/translations/ja.json} +11 -12
  176. package/{esm/utils/localization/translations/ko-KR-json.js → dist/utils/localization/translations/ko-KR.json} +24 -23
  177. package/{esm/utils/localization/translations/ms-json.js → dist/utils/localization/translations/ms.json} +11 -12
  178. package/{esm/utils/localization/translations/nb-NO-json.js → dist/utils/localization/translations/nb-NO.json} +31 -23
  179. package/{esm/utils/localization/translations/nl-json.js → dist/utils/localization/translations/nl.json} +11 -12
  180. package/{esm/utils/localization/translations/pl-json.js → dist/utils/localization/translations/pl.json} +11 -12
  181. package/{esm/utils/localization/translations/pt-BR-json.js → dist/utils/localization/translations/pt-BR.json} +11 -12
  182. package/{esm/utils/localization/translations/sk-SK-json.js → dist/utils/localization/translations/sk-SK.json} +31 -23
  183. package/{esm/utils/localization/translations/sv-json.js → dist/utils/localization/translations/sv.json} +11 -12
  184. package/{esm/utils/localization/translations/th-json.js → dist/utils/localization/translations/th.json} +11 -12
  185. package/{esm/utils/localization/translations/tr-json.js → dist/utils/localization/translations/tr.json} +11 -12
  186. package/{esm/utils/localization/translations/zh-Hans-json.js → dist/utils/localization/translations/zh-Hans.json} +11 -12
  187. package/{esm/utils/localization/translations/zh-TW-json.js → dist/utils/localization/translations/zh-TW.json} +11 -23
  188. package/dist/utils/localization/translationsDictionary.d.ts +2 -0
  189. package/dist/utils/localization/translationsDictionary.js +63 -0
  190. package/dist/utils/localization/useLanguage.js +2 -74
  191. package/esm/advancedGroupsFilter/advancedGroupsFilter.js +130 -29
  192. package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +133 -33
  193. package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +317 -65
  194. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
  195. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +77 -8
  196. package/esm/alertRaw/alertRaw.js +165 -51
  197. package/esm/banner/bannerMultipLine.js +121 -20
  198. package/esm/banner/bannerSingleLine.js +100 -13
  199. package/esm/betaPill/betaPill.js +105 -19
  200. package/esm/bookmark/bookmark.js +89 -27
  201. package/esm/bulkEditControl/bulkEditControl.js +161 -33
  202. package/esm/calendar/calendar.js +937 -272
  203. package/esm/calendar/calendarUtils.js +151 -84
  204. package/esm/card/card.js +233 -101
  205. package/esm/chart/accessibleChart/accessibleChartNarrative.js +642 -554
  206. package/esm/chart/accessibleChart/accessibleChartTable.js +239 -85
  207. package/esm/chart/chart.js +30 -20
  208. package/esm/chart/chartAxis/chartAxis.js +79 -6
  209. package/esm/checkboxListWithAction/checkboxListWithAction.js +218 -68
  210. package/esm/chip/chip.js +189 -90
  211. package/esm/columnsSelector/columnsSelector.js +91 -11
  212. package/esm/columnsSelector/columnsTab/columnsTab.js +53 -14
  213. package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +75 -33
  214. package/esm/comboboxSelected/comboboxSelected.js +1 -3
  215. package/esm/dataFeed/feedExpandControl/feedExpandControl.js +21 -9
  216. package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +86 -10
  217. package/esm/dataGrid/dataGrid.js +221 -116
  218. package/esm/dataGrid/emptySearchList/emptySearchList.js +50 -8
  219. package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +45 -6
  220. package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +58 -17
  221. package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +78 -9
  222. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +44 -15
  223. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +217 -31
  224. package/esm/dataGrid/withSelectableRows/withSelectableRows.js +280 -212
  225. package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +172 -94
  226. package/esm/dateInputInner/dateInputInner.js +785 -475
  227. package/esm/dateInputInner/dateInputInnerControlBlock.js +119 -21
  228. package/esm/dateInputRaw/dateInputRaw.js +309 -103
  229. package/esm/dateInputRaw/utils/getLabel.js +32 -6
  230. package/esm/dateRangeInner/dateRangeInner.js +166 -57
  231. package/esm/dateRangeRaw/dateRangeRaw.js +595 -238
  232. package/esm/dateRangeRaw/utils/dateRangeUtils.js +622 -239
  233. package/esm/dateSelectionWrapper/dateSelectionWrapper.js +146 -13
  234. package/esm/dialog/dialogContent.js +117 -39
  235. package/esm/dropdownRaw/dropdownHelper.d.ts +2 -2
  236. package/esm/dropdownRaw/dropdownHelper.js +10 -10
  237. package/esm/dropdownRaw/dropdownList.js +412 -56
  238. package/esm/dropdownRaw/dropdownPopup.js +212 -19
  239. package/esm/dropdownRaw/dropdownRaw.js +862 -507
  240. package/esm/dropdownRaw/dropdownSearchableTrigger.js +217 -45
  241. package/esm/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
  242. package/esm/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
  243. package/esm/dropdownRaw/stateReducer/stateActionType.js +1 -0
  244. package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
  245. package/esm/dropdownRaw/stateReducer/stateReducer.js +24 -12
  246. package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
  247. package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +18 -0
  248. package/esm/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
  249. package/esm/dropdownRaw/stateReducer/stateReducerTestData.js +71 -0
  250. package/esm/dropdownRaw/types.d.ts +1 -0
  251. package/esm/favoriteButton/favoriteButton.js +53 -9
  252. package/esm/filters/components/filtersContainer.js +141 -61
  253. package/esm/filters/components/filtersEmptySelectedList.js +24 -3
  254. package/esm/filters/components/filtersSaveModal.js +134 -41
  255. package/esm/filters/components/filtersSavedChipComponent.js +312 -107
  256. package/esm/filters/components/filtersSearchItemData.js +121 -46
  257. package/esm/filters/components/filtersSearchList.js +375 -178
  258. package/esm/filters/components/filtersSelect.js +122 -60
  259. package/esm/filters/components/filtersSelectListItem.js +119 -12
  260. package/esm/filters/components/filtersSidePanel.js +504 -177
  261. package/esm/filters/filters.js +435 -265
  262. package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +722 -270
  263. package/esm/filtersBar/components/resetComponentButton.js +39 -4
  264. package/esm/filtersBar/filtersBarActions/filtersBarActions.js +120 -14
  265. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +149 -48
  266. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +354 -103
  267. package/esm/filtersBar/filtersContainer/filtersContainer.js +198 -133
  268. package/esm/formField/components/formFieldWithLabel.d.ts +2 -1
  269. package/esm/formField/components/formFieldWithLabel.js +3 -2
  270. package/esm/formField/components/formFieldWithoutLabel.d.ts +2 -1
  271. package/esm/formField/components/formFieldWithoutLabel.js +3 -3
  272. package/esm/formField/components/trailingComponent.d.ts +8 -0
  273. package/esm/formField/components/trailingComponent.js +7 -0
  274. package/esm/formField/formField.js +12 -11
  275. package/esm/formField/hooks/useError.js +94 -35
  276. package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +66 -6
  277. package/esm/formGroup/hooks/useToggle.js +31 -10
  278. package/esm/formGroup/utils/getControls.js +8 -7
  279. package/esm/formLayout/hooks/useError.js +49 -14
  280. package/esm/formLayout/hooks/useFormButtons.js +122 -26
  281. package/esm/formSection/components/formSectionModal.js +1 -1
  282. package/esm/formSection/formSection.js +1 -1
  283. package/esm/formSection/hooks/useError.js +64 -21
  284. package/esm/formStepper/components/formStep.js +59 -9
  285. package/esm/formStepper/formStepper.js +123 -32
  286. package/esm/formStepperButtons/formStepperButtons.js +178 -37
  287. package/esm/groupsFilter/groupsHelper.d.ts +1 -1
  288. package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +152 -14
  289. package/esm/groupsFilterRaw/groupsFilterBox.js +131 -31
  290. package/esm/groupsFilterRaw/groupsFilterCommon.js +69 -7
  291. package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +178 -24
  292. package/esm/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
  293. package/esm/groupsFilterRaw/groupsFilterHelper.js +279 -168
  294. package/esm/groupsFilterRaw/groupsFilterInitialState.js +260 -17
  295. package/esm/groupsFilterRaw/groupsFilterMenu.js +118 -8
  296. package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
  297. package/esm/groupsFilterRaw/groupsFilterRaw.js +811 -308
  298. package/esm/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
  299. package/esm/groupsFilterRaw/groupsFilterTestData.js +152 -57
  300. package/esm/groupsFilterRaw/groupsFilterTrigger.js +133 -34
  301. package/esm/groupsFilterRaw/groupsHelper.js +733 -207
  302. package/esm/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
  303. package/esm/groupsFilterRaw/types.d.ts +1 -0
  304. package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +101 -51
  305. package/esm/header/components/mobileFilterControl/mobileFilterControl.js +56 -8
  306. package/esm/header/components/mobileSearchControl/mobileSearchControl.js +113 -13
  307. package/esm/header/headerBack.js +58 -19
  308. package/esm/index.d.ts +1 -0
  309. package/esm/index.js +1 -0
  310. package/esm/list/itemData/itemDataInternal.js +210 -50
  311. package/esm/list/listItem/listItem.js +162 -54
  312. package/esm/menu/components/menuErrorItem.js +27 -4
  313. package/esm/mobileSheet/mobileSheet.js +189 -68
  314. package/esm/modal/modal.js +265 -120
  315. package/esm/nav/nav.js +1 -1
  316. package/esm/nav/navFooter/navFooter.js +76 -38
  317. package/esm/nav/navFooter/navFooterAction/navFooterAction.js +46 -12
  318. package/esm/nav/navHeader/navHeader.js +80 -35
  319. package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +82 -28
  320. package/esm/nav/navItem/navItem.d.ts +3 -3
  321. package/esm/nav/navItem/navItem.js +35 -33
  322. package/esm/nav/navMobileBar/navMobileBar.js +61 -20
  323. package/esm/notification/notification.js +114 -18
  324. package/esm/pagination/paginationArrow.js +75 -10
  325. package/esm/pagination/paginationText/paginationText.js +39 -10
  326. package/esm/pill/components/pillNonActionable/pillNonActionable.js +87 -23
  327. package/esm/pillBox/components/pillBoxItem.js +46 -8
  328. package/esm/pillBox/pillBox.js +115 -19
  329. package/esm/pillExpandable/pillExpandable.js +327 -138
  330. package/esm/rangeRaw/rangeRaw.js +480 -140
  331. package/esm/rangeRaw/utils/rangeHelper.js +203 -38
  332. package/esm/searchInputRaw/searchInputRaw.js +145 -43
  333. package/esm/skeleton/skeleton.js +45 -5
  334. package/esm/sortControl/sortControl.js +146 -41
  335. package/esm/stepperRaw/stepperRaw.js +112 -41
  336. package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.js +178 -19
  337. package/esm/summary/summary.js +88 -7
  338. package/esm/table/actions/actionsMenu.js +165 -77
  339. package/esm/table/flexible/columnSettings.js +74 -9
  340. package/esm/table/flexible/columnsList.js +104 -42
  341. package/esm/table/flexible/columnsPopup.js +71 -19
  342. package/esm/table/nested/useNestedRows.js +161 -76
  343. package/esm/table/selectable/selectableHeader.js +174 -40
  344. package/esm/table/selectable/useSelectableRows.js +264 -190
  345. package/esm/table/sortable/sortableHeader.js +147 -74
  346. package/esm/tabs/tabs.js +221 -117
  347. package/esm/timePickerRaw/timePickerRaw.js +272 -57
  348. package/esm/toastRaw/toastRaw.js +132 -31
  349. package/esm/toggleButton/toggleButton.d.ts +0 -1
  350. package/esm/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
  351. package/esm/toggleButtonRaw/toggleButtonRaw.js +111 -18
  352. package/esm/utils/formatDate.js +995 -116
  353. package/{dist/utils/localization/translations/cs-json.js → esm/utils/localization/translations/cs.json} +11 -15
  354. package/{dist/utils/localization/translations/da-DK-json.js → esm/utils/localization/translations/da-DK.json} +31 -26
  355. package/{dist/utils/localization/translations/de-json.js → esm/utils/localization/translations/de.json} +12 -16
  356. package/esm/utils/localization/translations/en.json +308 -0
  357. package/{dist/utils/localization/translations/es-json.js → esm/utils/localization/translations/es.json} +11 -15
  358. package/{dist/utils/localization/translations/fi-FI-json.js → esm/utils/localization/translations/fi-FI.json} +31 -26
  359. package/{dist/utils/localization/translations/fr-FR-json.js → esm/utils/localization/translations/fr-FR.json} +12 -15
  360. package/{dist/utils/localization/translations/fr-json.js → esm/utils/localization/translations/fr.json} +11 -15
  361. package/{dist/utils/localization/translations/hu-HU-json.js → esm/utils/localization/translations/hu-HU.json} +31 -26
  362. package/{dist/utils/localization/translations/id-json.js → esm/utils/localization/translations/id.json} +11 -16
  363. package/{dist/utils/localization/translations/it-json.js → esm/utils/localization/translations/it.json} +11 -15
  364. package/{dist/utils/localization/translations/ja-json.js → esm/utils/localization/translations/ja.json} +11 -15
  365. package/{dist/utils/localization/translations/ko-KR-json.js → esm/utils/localization/translations/ko-KR.json} +24 -26
  366. package/{dist/utils/localization/translations/ms-json.js → esm/utils/localization/translations/ms.json} +11 -15
  367. package/{dist/utils/localization/translations/nb-NO-json.js → esm/utils/localization/translations/nb-NO.json} +31 -26
  368. package/{dist/utils/localization/translations/nl-json.js → esm/utils/localization/translations/nl.json} +11 -15
  369. package/{dist/utils/localization/translations/pl-json.js → esm/utils/localization/translations/pl.json} +11 -15
  370. package/{dist/utils/localization/translations/pt-BR-json.js → esm/utils/localization/translations/pt-BR.json} +11 -15
  371. package/{dist/utils/localization/translations/sk-SK-json.js → esm/utils/localization/translations/sk-SK.json} +31 -26
  372. package/{dist/utils/localization/translations/sv-json.js → esm/utils/localization/translations/sv.json} +11 -15
  373. package/{dist/utils/localization/translations/th-json.js → esm/utils/localization/translations/th.json} +11 -15
  374. package/{dist/utils/localization/translations/tr-json.js → esm/utils/localization/translations/tr.json} +11 -15
  375. package/{dist/utils/localization/translations/zh-Hans-json.js → esm/utils/localization/translations/zh-Hans.json} +11 -15
  376. package/{dist/utils/localization/translations/zh-TW-json.js → esm/utils/localization/translations/zh-TW.json} +11 -26
  377. package/esm/utils/localization/translationsDictionary.d.ts +2 -0
  378. package/esm/utils/localization/translationsDictionary.js +59 -0
  379. package/esm/utils/localization/useLanguage.js +1 -50
  380. package/package.json +17 -10
  381. package/dist/utils/localization/translations/cs-json.d.ts +0 -251
  382. package/dist/utils/localization/translations/da-DK-json.d.ts +0 -252
  383. package/dist/utils/localization/translations/de-json.d.ts +0 -251
  384. package/dist/utils/localization/translations/en-json.d.ts +0 -314
  385. package/dist/utils/localization/translations/en-json.js +0 -317
  386. package/dist/utils/localization/translations/es-json.d.ts +0 -251
  387. package/dist/utils/localization/translations/fi-FI-json.d.ts +0 -252
  388. package/dist/utils/localization/translations/fr-FR-json.d.ts +0 -250
  389. package/dist/utils/localization/translations/fr-json.d.ts +0 -251
  390. package/dist/utils/localization/translations/hu-HU-json.d.ts +0 -252
  391. package/dist/utils/localization/translations/id-json.d.ts +0 -252
  392. package/dist/utils/localization/translations/it-json.d.ts +0 -251
  393. package/dist/utils/localization/translations/ja-json.d.ts +0 -251
  394. package/dist/utils/localization/translations/ko-KR-json.d.ts +0 -258
  395. package/dist/utils/localization/translations/ms-json.d.ts +0 -251
  396. package/dist/utils/localization/translations/nb-NO-json.d.ts +0 -252
  397. package/dist/utils/localization/translations/nl-json.d.ts +0 -251
  398. package/dist/utils/localization/translations/pl-json.d.ts +0 -251
  399. package/dist/utils/localization/translations/pt-BR-json.d.ts +0 -251
  400. package/dist/utils/localization/translations/sk-SK-json.d.ts +0 -251
  401. package/dist/utils/localization/translations/sv-json.d.ts +0 -251
  402. package/dist/utils/localization/translations/th-json.d.ts +0 -251
  403. package/dist/utils/localization/translations/tr-json.d.ts +0 -251
  404. package/dist/utils/localization/translations/zh-Hans-json.d.ts +0 -251
  405. package/dist/utils/localization/translations/zh-TW-json.d.ts +0 -271
  406. package/esm/utils/localization/translations/cs-json.d.ts +0 -251
  407. package/esm/utils/localization/translations/da-DK-json.d.ts +0 -252
  408. package/esm/utils/localization/translations/de-json.d.ts +0 -251
  409. package/esm/utils/localization/translations/en-json.d.ts +0 -314
  410. package/esm/utils/localization/translations/en-json.js +0 -314
  411. package/esm/utils/localization/translations/es-json.d.ts +0 -251
  412. package/esm/utils/localization/translations/fi-FI-json.d.ts +0 -252
  413. package/esm/utils/localization/translations/fr-FR-json.d.ts +0 -250
  414. package/esm/utils/localization/translations/fr-json.d.ts +0 -251
  415. package/esm/utils/localization/translations/hu-HU-json.d.ts +0 -252
  416. package/esm/utils/localization/translations/id-json.d.ts +0 -252
  417. package/esm/utils/localization/translations/it-json.d.ts +0 -251
  418. package/esm/utils/localization/translations/ja-json.d.ts +0 -251
  419. package/esm/utils/localization/translations/ko-KR-json.d.ts +0 -258
  420. package/esm/utils/localization/translations/ms-json.d.ts +0 -251
  421. package/esm/utils/localization/translations/nb-NO-json.d.ts +0 -252
  422. package/esm/utils/localization/translations/nl-json.d.ts +0 -251
  423. package/esm/utils/localization/translations/pl-json.d.ts +0 -251
  424. package/esm/utils/localization/translations/pt-BR-json.d.ts +0 -251
  425. package/esm/utils/localization/translations/sk-SK-json.d.ts +0 -251
  426. package/esm/utils/localization/translations/sv-json.d.ts +0 -251
  427. package/esm/utils/localization/translations/th-json.d.ts +0 -251
  428. package/esm/utils/localization/translations/tr-json.d.ts +0 -251
  429. package/esm/utils/localization/translations/zh-Hans-json.d.ts +0 -251
  430. package/esm/utils/localization/translations/zh-TW-json.d.ts +0 -271
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ const {
4
+ injectString
5
+ } = require("../../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
3
9
  exports.FiltersSavedChipComponent = void 0;
4
10
  const jsx_runtime_1 = require("react/jsx-runtime");
5
11
  const react_1 = require("react");
@@ -12,117 +18,321 @@ const iconClose_1 = require("../../icons/iconClose");
12
18
  const useLanguage_1 = require("../../utils/localization/useLanguage");
13
19
  const modal_1 = require("../../modal/modal");
14
20
  const filtersSavedItemsProvider_1 = require("./filtersSavedItemsProvider");
21
+ injectString("en", "Save new filters", "Save new filters");
22
+ injectString("cs", "Save", "Ulo\u017Eit");
23
+ injectString("da-DK", "Save", "Spare");
24
+ injectString("de", "Save", "Speichern");
25
+ injectString("en", "Save", "Save");
26
+ injectString("es", "Save", "Guardar");
27
+ injectString("fi-FI", "Save", "S\xE4\xE4st\xE4\xE4");
28
+ injectString("fr", "Save", "Enregistrer");
29
+ injectString("fr-FR", "Save", "Enregistrer");
30
+ injectString("hu-HU", "Save", "Ment\xE9s");
31
+ injectString("id", "Save", "Simpan");
32
+ injectString("it", "Save", "Salvare");
33
+ injectString("ja", "Save", "\u4FDD\u5B58");
34
+ injectString("ko-KR", "Save", "\uC800\uC7A5");
35
+ injectString("ms", "Save", "Simpan");
36
+ injectString("nb-NO", "Save", "Lagre");
37
+ injectString("nl", "Save", "Opslaan");
38
+ injectString("pl", "Save", "Zapisz");
39
+ injectString("pt-BR", "Save", "Salvar");
40
+ injectString("sk-SK", "Save", "Ulo\u017Ei\u0165");
41
+ injectString("sv", "Save", "Spara");
42
+ injectString("th", "Save", "\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01");
43
+ injectString("tr", "Save", "Kaydet");
44
+ injectString("zh-Hans", "Save", "\u4FDD\u5B58");
45
+ injectString("zh-TW", "Save", "\u5132\u5B58");
46
+ injectString("en", "Save new", "Save new");
47
+ injectString("cs", "Remove", "Odebrat");
48
+ injectString("da-DK", "Remove", "Fjerne");
49
+ injectString("de", "Remove", "Entfernen");
50
+ injectString("en", "Remove", "Remove");
51
+ injectString("es", "Remove", "Eliminar");
52
+ injectString("fi-FI", "Remove", "Poistaa");
53
+ injectString("fr", "Remove", "Supprimer");
54
+ injectString("fr-FR", "Remove", "Supprimer");
55
+ injectString("hu-HU", "Remove", "T\xE1vol\xEDtsa el");
56
+ injectString("id", "Remove", "Hapus");
57
+ injectString("it", "Remove", "Rimuovere");
58
+ injectString("ja", "Remove", "\u524A\u9664");
59
+ injectString("ko-KR", "Remove", "\uC81C\uAC70");
60
+ injectString("ms", "Remove", "Alih Keluar");
61
+ injectString("nb-NO", "Remove", "Fjern");
62
+ injectString("nl", "Remove", "Verwijderen");
63
+ injectString("pl", "Remove", "Usu\u0144");
64
+ injectString("pt-BR", "Remove", "Remover");
65
+ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
66
+ injectString("sv", "Remove", "Ta bort");
67
+ injectString("th", "Remove", "\u0E25\u0E1A");
68
+ injectString("tr", "Remove", "Kald\u0131r");
69
+ injectString("zh-Hans", "Remove", "\u5220\u9664");
70
+ injectString("zh-TW", "Remove", "\u79FB\u9664");
71
+ injectString("en", "Saved filters", "Saved filters");
72
+ injectString("en", "Remove saved {name} filter?", "Remove saved {name} filter?");
73
+ injectString("cs", "Cancel", "Zru\u0161it");
74
+ injectString("da-DK", "Cancel", "Annuller");
75
+ injectString("de", "Cancel", "Abbrechen");
76
+ injectString("en", "Cancel", "Cancel");
77
+ injectString("es", "Cancel", "Cancelar");
78
+ injectString("fi-FI", "Cancel", "Peruuta");
79
+ injectString("fr", "Cancel", "Annuler");
80
+ injectString("fr-FR", "Cancel", "Annuler");
81
+ injectString("hu-HU", "Cancel", "M\xE9gse");
82
+ injectString("id", "Cancel", "Batalkan");
83
+ injectString("it", "Cancel", "Annullare");
84
+ injectString("ja", "Cancel", "\u30AD\u30E3\u30F3\u30BB\u30EB");
85
+ injectString("ko-KR", "Cancel", "\uCDE8\uC18C");
86
+ injectString("ms", "Cancel", "Batal");
87
+ injectString("nb-NO", "Cancel", "Avbryt");
88
+ injectString("nl", "Cancel", "Annuleren");
89
+ injectString("pl", "Cancel", "Anuluj");
90
+ injectString("pt-BR", "Cancel", "Cancelar");
91
+ injectString("sk-SK", "Cancel", "Zru\u0161.");
92
+ injectString("sv", "Cancel", "Avbryt");
93
+ injectString("th", "Cancel", "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01");
94
+ injectString("tr", "Cancel", "\u0130ptal");
95
+ injectString("zh-Hans", "Cancel", "\u53D6\u6D88");
96
+ injectString("zh-TW", "Cancel", "\u53D6\u6D88");
97
+ injectString("cs", "Confirm", "Potvrdit");
98
+ injectString("da-DK", "Confirm", "Bekr\xE6fte");
99
+ injectString("de", "Confirm", "Best\xE4tigen");
100
+ injectString("en", "Confirm", "Confirm");
101
+ injectString("es", "Confirm", "Confirmar");
102
+ injectString("fi-FI", "Confirm", "Vahvistaa");
103
+ injectString("fr", "Confirm", "Confirmer");
104
+ injectString("fr-FR", "Confirm", "Confirmer");
105
+ injectString("hu-HU", "Confirm", "Meger\u0151s\xEDt\xE9s");
106
+ injectString("id", "Confirm", "Konfirmasi");
107
+ injectString("it", "Confirm", "Confermare");
108
+ injectString("ja", "Confirm", "\u78BA\u8A8D");
109
+ injectString("ko-KR", "Confirm", "\uD655\uC778");
110
+ injectString("ms", "Confirm", "Sahkan");
111
+ injectString("nb-NO", "Confirm", "Bekreft");
112
+ injectString("nl", "Confirm", "Bevestigen");
113
+ injectString("pl", "Confirm", "Potwierd\u017A");
114
+ injectString("pt-BR", "Confirm", "Confirmar");
115
+ injectString("sk-SK", "Confirm", "Potvrdi\u0165");
116
+ injectString("sv", "Confirm", "Bekr\xE4fta");
117
+ injectString("th", "Confirm", "\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19");
118
+ injectString("tr", "Confirm", "Onayla");
119
+ injectString("zh-Hans", "Confirm", "\u786E\u8BA4");
120
+ injectString("zh-TW", "Confirm", "\u78BA\u8A8D");
15
121
  const filtersSaveModal_1 = require("./filtersSaveModal");
16
122
  const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
17
123
  const useMobile_1 = require("../../commonHelpers/hooks/useMobile");
18
124
  const mobileSheet_1 = require("../../mobileSheet/mobileSheet");
19
125
  const keyboardHelpers_1 = require("../../utils/keyboardHelpers");
20
126
  const FiltersSavedChipComponent = () => {
21
- const { translate } = (0, useLanguage_1.useLanguage)();
22
- const isMobile = (0, useMobile_1.useMobile)();
23
- const iconDriveClassName = (0, useDriveClassName_1.useDriveClassName)("icon");
24
- const contentDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-filters-saved-popup__content");
25
- const { items, active, onRemove, onApply, onSave } = (0, filtersSavedItemsProvider_1.useFiltersSavedItems)();
26
- const [savedChipOpen, setSavedChipOpen] = (0, react_1.useState)(false);
27
- const [removeModalOpen, setRemoveModalOpen] = (0, react_1.useState)(false);
28
- const [saveModalOpen, setSaveModalOpen] = (0, react_1.useState)(false);
29
- const savedChipRef = (0, react_1.useRef)(null);
30
- const removeChipRef = (0, react_1.useRef)("");
31
- const savedFiltersRef = (0, react_1.useRef)(null);
32
- const handleRemove = (0, react_1.useCallback)((itemKey) => () => {
33
- removeChipRef.current = itemKey;
34
- setRemoveModalOpen(true);
35
- }, []);
36
- const toggleSavedChipOpen = (0, react_1.useCallback)(() => {
37
- if (removeModalOpen || saveModalOpen) {
38
- return;
39
- }
40
- setSavedChipOpen((prev) => !prev);
41
- }, [removeModalOpen, saveModalOpen]);
42
- const toggleRemoveModal = (0, react_1.useCallback)(() => {
43
- setRemoveModalOpen((prev) => !prev);
44
- }, []);
45
- const toggleSaveModal = (0, react_1.useCallback)(() => {
46
- setSaveModalOpen((prev) => !prev);
47
- }, []);
48
- const handleCancelRemoveModal = (0, react_1.useCallback)(() => {
49
- setRemoveModalOpen(false);
50
- removeChipRef.current = "";
51
- }, []);
52
- const handleRemoveItem = (0, react_1.useCallback)((e) => {
53
- e.stopPropagation();
54
- setRemoveModalOpen(false);
55
- onRemove && onRemove(removeChipRef.current);
56
- removeChipRef.current = "";
57
- }, [onRemove]);
58
- const handleFilterSelect = (0, react_1.useCallback)((e) => {
59
- var _a;
60
- const filterName = e.target.dataset.filterName;
61
- if (!filterName) {
62
- return;
63
- }
64
- onApply && onApply(filterName);
65
- setSavedChipOpen((prev) => !prev);
66
- (_a = savedChipRef.current) === null || _a === void 0 ? void 0 : _a.focus();
67
- }, [onApply]);
68
- const handleSaveItemKeyDown = (0, react_1.useCallback)((e) => {
69
- if (e.key === "ArrowDown") {
70
- const nextItem = (0, keyboardHelpers_1.getFirstFocusableItem)(savedFiltersRef.current);
71
- nextItem === null || nextItem === void 0 ? void 0 : nextItem.focus();
72
- return;
73
- }
74
- }, [savedFiltersRef]);
75
- const handleItemKeyDown = (0, react_1.useCallback)((e) => {
76
- var _a;
77
- if (e.key === "Enter" || e.key === " ") {
78
- const filterName = e.currentTarget.dataset.filterName;
79
- const isRemoveButton = e.target.dataset.removeButton;
80
- if (isRemoveButton || !filterName) {
81
- return;
82
- }
83
- onApply && onApply(filterName);
84
- setSavedChipOpen((prev) => !prev);
85
- (_a = savedChipRef.current) === null || _a === void 0 ? void 0 : _a.focus();
86
- return;
87
- }
88
- const isListItem = e.target instanceof HTMLElement && e.target.dataset.listItem === "true";
89
- const isButtonItem = e.target instanceof HTMLElement && e.target.dataset.removeButton === "true";
90
- const getSelector = () => {
91
- if (isListItem) {
92
- return `[data-list-item="true"]`;
93
- }
94
- if (isButtonItem) {
95
- return `[data-remove-button="true"]`;
96
- }
97
- return undefined;
98
- };
99
- if (e.key === "ArrowDown") {
100
- const nextItem = (0, keyboardHelpers_1.getNewFocusableItem)(1, savedFiltersRef.current, getSelector());
101
- nextItem === null || nextItem === void 0 ? void 0 : nextItem.focus();
102
- return;
103
- }
104
- if (e.key === "ArrowUp") {
105
- const prevItem = (0, keyboardHelpers_1.getNewFocusableItem)(-1, savedFiltersRef.current, getSelector());
106
- prevItem === null || prevItem === void 0 ? void 0 : prevItem.focus();
107
- return;
108
- }
109
- if (e.key === "ArrowRight" && isListItem) {
110
- const nextItem = (0, keyboardHelpers_1.getNewFocusableItem)(1, savedFiltersRef.current, `[data-remove-button="true"]`);
111
- nextItem === null || nextItem === void 0 ? void 0 : nextItem.focus();
112
- return;
113
- }
114
- if (e.key === "ArrowLeft" && isButtonItem) {
115
- const prevItem = (0, keyboardHelpers_1.getNewFocusableItem)(-1, savedFiltersRef.current, `[data-list-item="true"]`);
116
- prevItem === null || prevItem === void 0 ? void 0 : prevItem.focus();
117
- return;
118
- }
119
- }, [onApply]);
120
- const saveButton = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)("button", { type: "button", onKeyDown: handleSaveItemKeyDown, onClick: toggleSaveModal, className: "zen-filters-saved-popup__action-button", title: translate("Save new filters"), children: [(0, jsx_runtime_1.jsx)(iconDisk_1.IconDisk, { description: translate("Save"), className: "svgIcon", size: iconDriveClassName ? "huge" : "large" }), (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["", "zen-ellipsis"]), children: translate("Save new") })] }), [iconDriveClassName, toggleSaveModal, translate, handleSaveItemKeyDown]);
121
- const memoizedItems = (0, react_1.useMemo)(() => Array.from(items), [items]);
122
- const popupContent = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-filters-saved-popup__content", contentDriveClassName || ""]), children: [onSave ? saveButton : null, (0, jsx_runtime_1.jsx)("div", { ref: savedFiltersRef, onClick: handleFilterSelect, children: memoizedItems.map((filterName) => ((0, jsx_runtime_1.jsxs)("div", { tabIndex: 0, onKeyDown: handleItemKeyDown, "data-list-item": true, "data-filter-name": filterName, className: (0, classNames_1.classNames)(["zen-filters-saved-popup__item", active.has(filterName) ? "zen-filters-saved-popup__item--active" : ""]), children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-filters-saved-popup__name", "data-filter-name": filterName, children: filterName }), onRemove ? (0, jsx_runtime_1.jsx)(button_1.Button, { "data-remove-button": true, type: "tertiary-black", className: "zen-filters-saved-popup__action", onClick: handleRemove(filterName), title: translate("Remove"), "aria-label": translate("Remove"), children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, { size: iconDriveClassName ? "huge" : "large", className: "zen-filters-saved-popup__close-icon" }) }) : null] }, filterName))) })] }), [active, contentDriveClassName, handleFilterSelect, handleItemKeyDown, handleRemove, iconDriveClassName, memoizedItems, onRemove, onSave, saveButton, translate]);
123
- const memoizedStatus = (0, react_1.useMemo)(() => (active.size > 0 && Array.from(items).some(item => active.has(item)) ? "active" : undefined), [active, items]);
124
- const memoizedDesktopView = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(controlledPopup_1.ControlledPopup, { isOpen: savedChipOpen, className: (0, classNames_1.classNames)(["zen-filters-saved-popup"]), onOpenChange: toggleSavedChipOpen, useTrapFocusWithTrigger: "on", shouldHoldScroll: true, triggerRef: savedChipRef, ariaLabel: translate("Saved filters"), recalculateOnScroll: true, children: popupContent }), [popupContent, savedChipOpen, toggleSavedChipOpen, savedChipRef, translate]);
125
- const memoizedMobileView = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)(mobileSheet_1.MobileSheet, { label: translate("Saved filters"), triggerRef: savedChipRef, isOpen: savedChipOpen, onHidePanel: toggleSavedChipOpen, onCloseClick: toggleSavedChipOpen, useTrapFocusWithTrigger: false, children: [(0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Title, { children: translate("Saved filters") }), (0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Content, { className: "zen-filters-saved-chip__mobile-sheet", children: popupContent })] }), [popupContent, savedChipOpen, toggleSavedChipOpen, translate]);
126
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(chip_1.Chip, { className: "zen-filters-saved-chip", isOpen: savedChipOpen, status: memoizedStatus, onClick: toggleSavedChipOpen, title: translate("Saved filters"), icon: iconDisk_1.IconDisk, triggerRef: savedChipRef }), isMobile ? memoizedMobileView : memoizedDesktopView, (0, jsx_runtime_1.jsxs)(modal_1.Modal, { isOpen: removeModalOpen, onClose: toggleRemoveModal, modalContainerClassName: (0, classNames_1.classNames)([isMobile ? "zen-filters-prioritized-modal" : ""]), title: translate("Remove saved {name} filter?").replace("{name}", removeChipRef.current), children: [(0, jsx_runtime_1.jsx)(modal_1.Modal.SecondaryButton, { title: translate("Cancel"), onClick: handleCancelRemoveModal, children: translate("Cancel") }), (0, jsx_runtime_1.jsx)(modal_1.Modal.PrimaryButton, { title: translate("Confirm"), onClick: handleRemoveItem, type: "destructive", children: translate("Confirm") })] }), onSave ? (0, jsx_runtime_1.jsx)(filtersSaveModal_1.FiltersSaveModal, { prioritize: isMobile, isOpen: saveModalOpen, onClose: setSaveModalOpen, onSave: onSave }) : null] }));
127
+ const {
128
+ translate
129
+ } = (0, useLanguage_1.useLanguage)();
130
+ const isMobile = (0, useMobile_1.useMobile)();
131
+ const iconDriveClassName = (0, useDriveClassName_1.useDriveClassName)("icon");
132
+ const contentDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-filters-saved-popup__content");
133
+ const {
134
+ items,
135
+ active,
136
+ onRemove,
137
+ onApply,
138
+ onSave
139
+ } = (0, filtersSavedItemsProvider_1.useFiltersSavedItems)();
140
+ const [savedChipOpen, setSavedChipOpen] = (0, react_1.useState)(false);
141
+ const [removeModalOpen, setRemoveModalOpen] = (0, react_1.useState)(false);
142
+ const [saveModalOpen, setSaveModalOpen] = (0, react_1.useState)(false);
143
+ const savedChipRef = (0, react_1.useRef)(null);
144
+ const removeChipRef = (0, react_1.useRef)("");
145
+ const savedFiltersRef = (0, react_1.useRef)(null);
146
+ const handleRemove = (0, react_1.useCallback)(itemKey => () => {
147
+ removeChipRef.current = itemKey;
148
+ setRemoveModalOpen(true);
149
+ }, []);
150
+ const toggleSavedChipOpen = (0, react_1.useCallback)(() => {
151
+ if (removeModalOpen || saveModalOpen) {
152
+ return;
153
+ }
154
+ setSavedChipOpen(prev => !prev);
155
+ }, [removeModalOpen, saveModalOpen]);
156
+ const toggleRemoveModal = (0, react_1.useCallback)(() => {
157
+ setRemoveModalOpen(prev => !prev);
158
+ }, []);
159
+ const toggleSaveModal = (0, react_1.useCallback)(() => {
160
+ setSaveModalOpen(prev => !prev);
161
+ }, []);
162
+ const handleCancelRemoveModal = (0, react_1.useCallback)(() => {
163
+ setRemoveModalOpen(false);
164
+ removeChipRef.current = "";
165
+ }, []);
166
+ const handleRemoveItem = (0, react_1.useCallback)(e => {
167
+ e.stopPropagation();
168
+ setRemoveModalOpen(false);
169
+ onRemove && onRemove(removeChipRef.current);
170
+ removeChipRef.current = "";
171
+ }, [onRemove]);
172
+ const handleFilterSelect = (0, react_1.useCallback)(e => {
173
+ var _a;
174
+ const filterName = e.target.dataset.filterName;
175
+ if (!filterName) {
176
+ return;
177
+ }
178
+ onApply && onApply(filterName);
179
+ setSavedChipOpen(prev => !prev);
180
+ (_a = savedChipRef.current) === null || _a === void 0 ? void 0 : _a.focus();
181
+ }, [onApply]);
182
+ const handleSaveItemKeyDown = (0, react_1.useCallback)(e => {
183
+ if (e.key === "ArrowDown") {
184
+ const nextItem = (0, keyboardHelpers_1.getFirstFocusableItem)(savedFiltersRef.current);
185
+ nextItem === null || nextItem === void 0 ? void 0 : nextItem.focus();
186
+ return;
187
+ }
188
+ }, [savedFiltersRef]);
189
+ const handleItemKeyDown = (0, react_1.useCallback)(e => {
190
+ var _a;
191
+ if (e.key === "Enter" || e.key === " ") {
192
+ const filterName = e.currentTarget.dataset.filterName;
193
+ const isRemoveButton = e.target.dataset.removeButton;
194
+ if (isRemoveButton || !filterName) {
195
+ return;
196
+ }
197
+ onApply && onApply(filterName);
198
+ setSavedChipOpen(prev => !prev);
199
+ (_a = savedChipRef.current) === null || _a === void 0 ? void 0 : _a.focus();
200
+ return;
201
+ }
202
+ const isListItem = e.target instanceof HTMLElement && e.target.dataset.listItem === "true";
203
+ const isButtonItem = e.target instanceof HTMLElement && e.target.dataset.removeButton === "true";
204
+ const getSelector = () => {
205
+ if (isListItem) {
206
+ return `[data-list-item="true"]`;
207
+ }
208
+ if (isButtonItem) {
209
+ return `[data-remove-button="true"]`;
210
+ }
211
+ return undefined;
212
+ };
213
+ if (e.key === "ArrowDown") {
214
+ const nextItem = (0, keyboardHelpers_1.getNewFocusableItem)(1, savedFiltersRef.current, getSelector());
215
+ nextItem === null || nextItem === void 0 ? void 0 : nextItem.focus();
216
+ return;
217
+ }
218
+ if (e.key === "ArrowUp") {
219
+ const prevItem = (0, keyboardHelpers_1.getNewFocusableItem)(-1, savedFiltersRef.current, getSelector());
220
+ prevItem === null || prevItem === void 0 ? void 0 : prevItem.focus();
221
+ return;
222
+ }
223
+ if (e.key === "ArrowRight" && isListItem) {
224
+ const nextItem = (0, keyboardHelpers_1.getNewFocusableItem)(1, savedFiltersRef.current, `[data-remove-button="true"]`);
225
+ nextItem === null || nextItem === void 0 ? void 0 : nextItem.focus();
226
+ return;
227
+ }
228
+ if (e.key === "ArrowLeft" && isButtonItem) {
229
+ const prevItem = (0, keyboardHelpers_1.getNewFocusableItem)(-1, savedFiltersRef.current, `[data-list-item="true"]`);
230
+ prevItem === null || prevItem === void 0 ? void 0 : prevItem.focus();
231
+ return;
232
+ }
233
+ }, [onApply]);
234
+ const saveButton = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)("button", {
235
+ type: "button",
236
+ onKeyDown: handleSaveItemKeyDown,
237
+ onClick: toggleSaveModal,
238
+ className: "zen-filters-saved-popup__action-button",
239
+ title: translate("Save new filters"),
240
+ children: [(0, jsx_runtime_1.jsx)(iconDisk_1.IconDisk, {
241
+ description: translate("Save"),
242
+ className: "svgIcon",
243
+ size: iconDriveClassName ? "huge" : "large"
244
+ }), (0, jsx_runtime_1.jsx)("div", {
245
+ className: (0, classNames_1.classNames)(["", "zen-ellipsis"]),
246
+ children: translate("Save new")
247
+ })]
248
+ }), [iconDriveClassName, toggleSaveModal, translate, handleSaveItemKeyDown]);
249
+ const memoizedItems = (0, react_1.useMemo)(() => Array.from(items), [items]);
250
+ const popupContent = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)("div", {
251
+ className: (0, classNames_1.classNames)(["zen-filters-saved-popup__content", contentDriveClassName || ""]),
252
+ children: [onSave ? saveButton : null, (0, jsx_runtime_1.jsx)("div", {
253
+ ref: savedFiltersRef,
254
+ onClick: handleFilterSelect,
255
+ children: memoizedItems.map(filterName => (0, jsx_runtime_1.jsxs)("div", {
256
+ tabIndex: 0,
257
+ onKeyDown: handleItemKeyDown,
258
+ "data-list-item": true,
259
+ "data-filter-name": filterName,
260
+ className: (0, classNames_1.classNames)(["zen-filters-saved-popup__item", active.has(filterName) ? "zen-filters-saved-popup__item--active" : ""]),
261
+ children: [(0, jsx_runtime_1.jsx)("div", {
262
+ className: "zen-filters-saved-popup__name",
263
+ "data-filter-name": filterName,
264
+ children: filterName
265
+ }), onRemove ? (0, jsx_runtime_1.jsx)(button_1.Button, {
266
+ "data-remove-button": true,
267
+ type: "tertiary-black",
268
+ className: "zen-filters-saved-popup__action",
269
+ onClick: handleRemove(filterName),
270
+ title: translate("Remove"),
271
+ "aria-label": translate("Remove"),
272
+ children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, {
273
+ size: iconDriveClassName ? "huge" : "large",
274
+ className: "zen-filters-saved-popup__close-icon"
275
+ })
276
+ }) : null]
277
+ }, filterName))
278
+ })]
279
+ }), [active, contentDriveClassName, handleFilterSelect, handleItemKeyDown, handleRemove, iconDriveClassName, memoizedItems, onRemove, onSave, saveButton, translate]);
280
+ const memoizedStatus = (0, react_1.useMemo)(() => active.size > 0 && Array.from(items).some(item => active.has(item)) ? "active" : undefined, [active, items]);
281
+ const memoizedDesktopView = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(controlledPopup_1.ControlledPopup, {
282
+ isOpen: savedChipOpen,
283
+ className: (0, classNames_1.classNames)(["zen-filters-saved-popup"]),
284
+ onOpenChange: toggleSavedChipOpen,
285
+ useTrapFocusWithTrigger: "on",
286
+ shouldHoldScroll: true,
287
+ triggerRef: savedChipRef,
288
+ ariaLabel: translate("Saved filters"),
289
+ recalculateOnScroll: true,
290
+ children: popupContent
291
+ }), [popupContent, savedChipOpen, toggleSavedChipOpen, savedChipRef, translate]);
292
+ const memoizedMobileView = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)(mobileSheet_1.MobileSheet, {
293
+ label: translate("Saved filters"),
294
+ triggerRef: savedChipRef,
295
+ isOpen: savedChipOpen,
296
+ onHidePanel: toggleSavedChipOpen,
297
+ onCloseClick: toggleSavedChipOpen,
298
+ useTrapFocusWithTrigger: false,
299
+ children: [(0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Title, {
300
+ children: translate("Saved filters")
301
+ }), (0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Content, {
302
+ className: "zen-filters-saved-chip__mobile-sheet",
303
+ children: popupContent
304
+ })]
305
+ }), [popupContent, savedChipOpen, toggleSavedChipOpen, translate]);
306
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
307
+ children: [(0, jsx_runtime_1.jsx)(chip_1.Chip, {
308
+ className: "zen-filters-saved-chip",
309
+ isOpen: savedChipOpen,
310
+ status: memoizedStatus,
311
+ onClick: toggleSavedChipOpen,
312
+ title: translate("Saved filters"),
313
+ icon: iconDisk_1.IconDisk,
314
+ triggerRef: savedChipRef
315
+ }), isMobile ? memoizedMobileView : memoizedDesktopView, (0, jsx_runtime_1.jsxs)(modal_1.Modal, {
316
+ isOpen: removeModalOpen,
317
+ onClose: toggleRemoveModal,
318
+ modalContainerClassName: (0, classNames_1.classNames)([isMobile ? "zen-filters-prioritized-modal" : ""]),
319
+ title: translate("Remove saved {name} filter?").replace("{name}", removeChipRef.current),
320
+ children: [(0, jsx_runtime_1.jsx)(modal_1.Modal.SecondaryButton, {
321
+ title: translate("Cancel"),
322
+ onClick: handleCancelRemoveModal,
323
+ children: translate("Cancel")
324
+ }), (0, jsx_runtime_1.jsx)(modal_1.Modal.PrimaryButton, {
325
+ title: translate("Confirm"),
326
+ onClick: handleRemoveItem,
327
+ type: "destructive",
328
+ children: translate("Confirm")
329
+ })]
330
+ }), onSave ? (0, jsx_runtime_1.jsx)(filtersSaveModal_1.FiltersSaveModal, {
331
+ prioritize: isMobile,
332
+ isOpen: saveModalOpen,
333
+ onClose: setSaveModalOpen,
334
+ onSave: onSave
335
+ }) : null]
336
+ });
127
337
  };
128
- exports.FiltersSavedChipComponent = FiltersSavedChipComponent;
338
+ exports.FiltersSavedChipComponent = FiltersSavedChipComponent;
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ const {
4
+ injectString
5
+ } = require("../../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
3
9
  exports.FiltersSearchItemData = void 0;
4
10
  const jsx_runtime_1 = require("react/jsx-runtime");
5
11
  const react_1 = require("react");
@@ -8,52 +14,126 @@ const button_1 = require("../../button/button");
8
14
  const classNames_1 = require("../../commonHelpers/classNames/classNames");
9
15
  const isActiveElement_1 = require("../../list/utils/isActiveElement");
10
16
  const iconClose_1 = require("../../icons/iconClose");
11
- const FiltersSearchItemData = ({ id, icon, isActive, iconClassName, name, secondary, onClick, onClose, isDrive, isMobile }) => {
12
- const { translate } = (0, useLanguage_1.useLanguage)();
13
- const driveClassName = (0, react_1.useMemo)(() => isDrive
14
- ? isMobile ? "zen-search-item-data--drive" : "zen-search-item-data--drive-tablet"
15
- : "", [isDrive, isMobile]);
16
- const renderIcon = (0, react_1.useCallback)((iconComponent, iClassName, className) => {
17
- if (typeof iconComponent === "function") {
18
- return (0, react_1.createElement)(iconComponent, { size: "large", className: (0, classNames_1.classNames)([className || "", iClassName || ""]) });
19
- }
20
- return iconComponent;
21
- }, []);
22
- const handleClick = (0, react_1.useCallback)((e) => {
23
- if (!onClick) {
24
- return;
25
- }
26
- if (e.target instanceof HTMLElement && (0, isActiveElement_1.isActiveElement)(e.target)) {
27
- return;
28
- }
29
- onClick();
30
- }, [onClick]);
31
- const handleKeyDown = (0, react_1.useCallback)((e) => {
32
- if (!onClick) {
33
- return;
34
- }
35
- if (e.key === "Enter" || e.key === " ") {
36
- const isCloseButton = e.target instanceof HTMLElement && (e.target.dataset.closeButton === "true");
37
- if (isCloseButton) {
38
- e.preventDefault();
39
- e.stopPropagation();
40
- onClose === null || onClose === void 0 ? void 0 : onClose();
41
- return;
42
- }
43
- e.preventDefault();
44
- onClick();
45
- }
46
- }, [onClick, onClose]);
47
- const handleClose = (0, react_1.useCallback)((e) => {
48
- if (!onClose) {
49
- return;
50
- }
51
- console.log("handleClose");
17
+ injectString("cs", "Close", "Zav\u0159\xEDt");
18
+ injectString("da-DK", "Close", "Luk");
19
+ injectString("de", "Close", "Schlie\xDFen");
20
+ injectString("en", "Close", "Close");
21
+ injectString("es", "Close", "Cerrar");
22
+ injectString("fi-FI", "Close", "Sulje");
23
+ injectString("fr", "Close", "Fermer");
24
+ injectString("fr-FR", "Close", "Fermer");
25
+ injectString("hu-HU", "Close", "Z\xE1rd be.");
26
+ injectString("id", "Close", "Tutup");
27
+ injectString("it", "Close", "Chiudere");
28
+ injectString("ja", "Close", "\u9589\u3058\u308B");
29
+ injectString("ko-KR", "Close", "\uB2EB\uAE30");
30
+ injectString("ms", "Close", "Tutup");
31
+ injectString("nb-NO", "Close", "Lukk");
32
+ injectString("nl", "Close", "Sluiten");
33
+ injectString("pl", "Close", "Zamknij");
34
+ injectString("pt-BR", "Close", "Fechar");
35
+ injectString("sk-SK", "Close", "Zatvor");
36
+ injectString("sv", "Close", "St\xE4ng");
37
+ injectString("th", "Close", "\u0E1B\u0E34\u0E14");
38
+ injectString("tr", "Close", "Kapat");
39
+ injectString("zh-Hans", "Close", "\u5173\u95ED");
40
+ injectString("zh-TW", "Close", "\u95DC\u9589");
41
+ const FiltersSearchItemData = ({
42
+ id,
43
+ icon,
44
+ isActive,
45
+ iconClassName,
46
+ name,
47
+ secondary,
48
+ onClick,
49
+ onClose,
50
+ isDrive,
51
+ isMobile
52
+ }) => {
53
+ const {
54
+ translate
55
+ } = (0, useLanguage_1.useLanguage)();
56
+ const driveClassName = (0, react_1.useMemo)(() => isDrive ? isMobile ? "zen-search-item-data--drive" : "zen-search-item-data--drive-tablet" : "", [isDrive, isMobile]);
57
+ const renderIcon = (0, react_1.useCallback)((iconComponent, iClassName, className) => {
58
+ if (typeof iconComponent === "function") {
59
+ return (0, react_1.createElement)(iconComponent, {
60
+ size: "large",
61
+ className: (0, classNames_1.classNames)([className || "", iClassName || ""])
62
+ });
63
+ }
64
+ return iconComponent;
65
+ }, []);
66
+ const handleClick = (0, react_1.useCallback)(e => {
67
+ if (!onClick) {
68
+ return;
69
+ }
70
+ if (e.target instanceof HTMLElement && (0, isActiveElement_1.isActiveElement)(e.target)) {
71
+ return;
72
+ }
73
+ onClick();
74
+ }, [onClick]);
75
+ const handleKeyDown = (0, react_1.useCallback)(e => {
76
+ if (!onClick) {
77
+ return;
78
+ }
79
+ if (e.key === "Enter" || e.key === " ") {
80
+ const isCloseButton = e.target instanceof HTMLElement && e.target.dataset.closeButton === "true";
81
+ if (isCloseButton) {
52
82
  e.preventDefault();
53
83
  e.stopPropagation();
54
- onClose();
55
- }, [onClose]);
56
- return (0, jsx_runtime_1.jsx)("li", { tabIndex: 0, className: (0, classNames_1.classNames)(["zen-search-item-data", isActive ? "zen-search-item-data--active" : "",
57
- onClick ? "zen-search-item-data--clickable" : "", driveClassName || ""]), "data-list-item-id": id, onClick: handleClick, onKeyDown: handleKeyDown, "data-list-item": true, children: (0, jsx_runtime_1.jsxs)("div", { className: "zen-search-item-data__main", children: [icon ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-search-item-data__icon", iconClassName || ""]), children: renderIcon(icon) }) : null, (0, jsx_runtime_1.jsxs)("div", { className: "zen-search-item-data__main-data", children: [(0, jsx_runtime_1.jsxs)("div", { className: "zen-search-item-data__identifier", children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-search-item-data__name", children: name }), secondary ? (0, jsx_runtime_1.jsx)("div", { className: "zen-search-item-data__secondary", children: secondary }) : null] }), onClose ? (0, jsx_runtime_1.jsx)(button_1.Button, { type: "tertiary-black", className: "zen-search-item-data__close", "data-close-button": true, title: translate("Close"), "aria-label": translate("Close"), onClick: handleClose, children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, { size: "large", className: "zen-search-item-data__close-icon" }) }) : null] })] }) }, id);
84
+ onClose === null || onClose === void 0 ? void 0 : onClose();
85
+ return;
86
+ }
87
+ e.preventDefault();
88
+ onClick();
89
+ }
90
+ }, [onClick, onClose]);
91
+ const handleClose = (0, react_1.useCallback)(e => {
92
+ if (!onClose) {
93
+ return;
94
+ }
95
+ console.log("handleClose");
96
+ e.preventDefault();
97
+ e.stopPropagation();
98
+ onClose();
99
+ }, [onClose]);
100
+ return (0, jsx_runtime_1.jsx)("li", {
101
+ tabIndex: 0,
102
+ className: (0, classNames_1.classNames)(["zen-search-item-data", isActive ? "zen-search-item-data--active" : "", onClick ? "zen-search-item-data--clickable" : "", driveClassName || ""]),
103
+ "data-list-item-id": id,
104
+ onClick: handleClick,
105
+ onKeyDown: handleKeyDown,
106
+ "data-list-item": true,
107
+ children: (0, jsx_runtime_1.jsxs)("div", {
108
+ className: "zen-search-item-data__main",
109
+ children: [icon ? (0, jsx_runtime_1.jsx)("div", {
110
+ className: (0, classNames_1.classNames)(["zen-search-item-data__icon", iconClassName || ""]),
111
+ children: renderIcon(icon)
112
+ }) : null, (0, jsx_runtime_1.jsxs)("div", {
113
+ className: "zen-search-item-data__main-data",
114
+ children: [(0, jsx_runtime_1.jsxs)("div", {
115
+ className: "zen-search-item-data__identifier",
116
+ children: [(0, jsx_runtime_1.jsx)("div", {
117
+ className: "zen-search-item-data__name",
118
+ children: name
119
+ }), secondary ? (0, jsx_runtime_1.jsx)("div", {
120
+ className: "zen-search-item-data__secondary",
121
+ children: secondary
122
+ }) : null]
123
+ }), onClose ? (0, jsx_runtime_1.jsx)(button_1.Button, {
124
+ type: "tertiary-black",
125
+ className: "zen-search-item-data__close",
126
+ "data-close-button": true,
127
+ title: translate("Close"),
128
+ "aria-label": translate("Close"),
129
+ onClick: handleClose,
130
+ children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, {
131
+ size: "large",
132
+ className: "zen-search-item-data__close-icon"
133
+ })
134
+ }) : null]
135
+ })]
136
+ })
137
+ }, id);
58
138
  };
59
- exports.FiltersSearchItemData = FiltersSearchItemData;
139
+ exports.FiltersSearchItemData = FiltersSearchItemData;