@geotab/zenith 3.8.0-beta.1 → 3.9.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 (204) hide show
  1. package/README.md +11 -12
  2. package/dist/button/button.d.ts +2 -1
  3. package/dist/button/button.js +3 -3
  4. package/dist/calendar/calendar.js +201 -4
  5. package/dist/card/card.d.ts +1 -1
  6. package/dist/card/card.js +1 -1
  7. package/dist/card/components/cardButton/cardButton.d.ts +2 -1
  8. package/dist/card/components/cardButton/cardButton.js +5 -3
  9. package/dist/card/helpers/getIconTypeFromStatus.d.ts +1 -1
  10. package/dist/chart/barChart/getBarLegendItems.js +3 -5
  11. package/dist/chart/lineChart/getLineLegendItems.js +7 -7
  12. package/dist/chart/pieChart/centerTextPlugin.js +13 -5
  13. package/dist/chart/pieChart/getPieLegendItems.js +8 -12
  14. package/dist/chart/pieChart.js +13 -11
  15. package/dist/chart/plugins/legend/interfaces.d.ts +1 -1
  16. package/dist/commonHelpers/generateId.d.ts +8 -0
  17. package/dist/commonHelpers/generateId.js +8 -0
  18. package/dist/commonHelpers/hooks/ssrProvider.d.ts +14 -0
  19. package/dist/commonHelpers/hooks/ssrProvider.js +12 -0
  20. package/dist/commonHelpers/hooks/useClientReady.js +3 -1
  21. package/dist/commonHelpers/hooks/useDeviceType.js +6 -2
  22. package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
  23. package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.js +6 -0
  24. package/dist/commonHelpers/hooks/useMobile.js +4 -3
  25. package/dist/commonHelpers/hooks/usePortal.js +2 -5
  26. package/dist/commonHelpers/isDomEnv.js +1 -2
  27. package/dist/commonHelpers/useUniqueId.d.ts +6 -0
  28. package/dist/commonHelpers/useUniqueId.js +8 -2
  29. package/dist/commonHelpers/utils.d.ts +0 -1
  30. package/dist/commonHelpers/utils.js +1 -3
  31. package/dist/commonStyles/common.less +13 -1
  32. package/dist/commonStyles/fonts/notosarabic/LICENSE.txt +93 -0
  33. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff +0 -0
  34. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff2 +0 -0
  35. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff +0 -0
  36. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff2 +0 -0
  37. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff +0 -0
  38. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff2 +0 -0
  39. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff +0 -0
  40. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff2 +0 -0
  41. package/dist/commonStyles/fonts/notosarabic.less +43 -0
  42. package/dist/commonStyles/pillStyles/pillContent.less +2 -3
  43. package/dist/commonStyles/pillStyles/pillStyles.less +1 -2
  44. package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
  45. package/dist/commonStyles/typography/typography.less +440 -305
  46. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +5 -3
  47. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +2 -38
  48. package/dist/dateInputInner/dateInputInnerControlBlock.js +12 -8
  49. package/dist/dateRangeRaw/dateRangeRaw.js +5 -1
  50. package/dist/dialog/dialog.js +4 -3
  51. package/dist/feedbackContainer/feedbackContainer.js +4 -4
  52. package/dist/fileUpload/fileUpload.js +21 -12
  53. package/dist/filters/components/filtersSidePanel.d.ts +1 -1
  54. package/dist/filters/components/filtersSidePanel.js +123 -116
  55. package/dist/filters/filters.js +1 -2
  56. package/dist/filtersBar/filtersBar.d.ts +2 -0
  57. package/dist/filtersBar/filtersBar.js +5 -3
  58. package/dist/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
  59. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +3 -0
  60. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.d.ts +1 -1
  61. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +86 -80
  62. package/dist/formFieldError/formFieldError.d.ts +2 -1
  63. package/dist/formFieldError/formFieldError.js +2 -2
  64. package/dist/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
  65. package/dist/index.css +3210 -2238
  66. package/dist/index.d.ts +3 -5
  67. package/dist/index.js +24 -29
  68. package/dist/menu/components/menuItem.js +4 -4
  69. package/dist/menu/controlledMenu.js +4 -4
  70. package/dist/nav/nav.js +10 -5
  71. package/dist/nav/navAddMenu/navAddMenu.js +1 -2
  72. package/dist/nav/navEditList/navEditListUtils.d.ts +1 -1
  73. package/dist/nav/navEditList/navEditListUtils.js +2 -1
  74. package/dist/nav/navItem/navActionItem.js +3 -3
  75. package/dist/nav/navItem/navItem.js +1 -2
  76. package/dist/pageHeader/pageHeaderActions.js +4 -3
  77. package/dist/rangeRaw/rangeRaw.js +7 -1
  78. package/dist/selectList/selectList.js +11 -7
  79. package/dist/selectRaw/selectRaw.js +1 -1
  80. package/dist/shield/shield.js +5 -3
  81. package/dist/sidePanel/sidePanel.js +9 -8
  82. package/dist/summaryTile/summaryTile.d.ts +1 -3
  83. package/dist/summaryTile/summaryTile.js +1 -2
  84. package/dist/table/children/useTableChildren.d.ts +1 -1
  85. package/dist/table/children/useTableChildren.js +3 -3
  86. package/dist/table/flexible/useFlexibleColumns.js +39 -1
  87. package/dist/table/nested/useNestedRows.d.ts +1 -0
  88. package/dist/table/nested/useNestedRows.js +3 -3
  89. package/dist/table/selectable/useSelectableRows.d.ts +9 -0
  90. package/dist/table/selectable/useSelectableRows.js +18 -11
  91. package/dist/table/table.js +1 -7
  92. package/dist/{card/components → title}/title.d.ts +1 -1
  93. package/dist/title/title.js +27 -0
  94. package/dist/toggleButtonRaw/toggleButtonRaw.js +3 -1
  95. package/dist/toggleButtonRaw/types.d.ts +1 -0
  96. package/dist/tooltip/tooltip.d.ts +2 -1
  97. package/dist/tooltip/tooltip.js +68 -64
  98. package/dist/utils/localization/directionContext.d.ts +3 -0
  99. package/dist/utils/localization/directionContext.js +5 -0
  100. package/dist/utils/localization/getTextDirection.d.ts +2 -0
  101. package/dist/utils/localization/getTextDirection.js +6 -0
  102. package/dist/utils/localization/languageProvider.js +15 -1
  103. package/dist/utils/localization/translations/en-json.d.ts +2 -0
  104. package/dist/utils/localization/translations/en-json.js +3 -1
  105. package/dist/utils/localization/translations/en.json +3 -0
  106. package/dist/utils/localization/useDirection.d.ts +2 -0
  107. package/dist/utils/localization/useDirection.js +7 -0
  108. package/esm/button/button.d.ts +2 -1
  109. package/esm/button/button.js +3 -3
  110. package/esm/calendar/calendar.js +201 -4
  111. package/esm/card/card.d.ts +1 -1
  112. package/esm/card/card.js +1 -1
  113. package/esm/card/components/cardButton/cardButton.d.ts +2 -1
  114. package/esm/card/components/cardButton/cardButton.js +5 -3
  115. package/esm/card/helpers/getIconTypeFromStatus.d.ts +1 -1
  116. package/esm/chart/barChart/getBarLegendItems.js +3 -5
  117. package/esm/chart/lineChart/getLineLegendItems.js +7 -7
  118. package/esm/chart/pieChart/centerTextPlugin.js +13 -5
  119. package/esm/chart/pieChart/getPieLegendItems.js +8 -12
  120. package/esm/chart/pieChart.js +14 -12
  121. package/esm/chart/plugins/legend/interfaces.d.ts +1 -1
  122. package/esm/commonHelpers/generateId.d.ts +8 -0
  123. package/esm/commonHelpers/generateId.js +8 -0
  124. package/esm/commonHelpers/hooks/ssrProvider.d.ts +14 -0
  125. package/esm/commonHelpers/hooks/ssrProvider.js +6 -0
  126. package/esm/commonHelpers/hooks/useClientReady.js +4 -2
  127. package/esm/commonHelpers/hooks/useDeviceType.js +7 -3
  128. package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
  129. package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.js +3 -0
  130. package/esm/commonHelpers/hooks/useMobile.js +4 -3
  131. package/esm/commonHelpers/hooks/usePortal.js +2 -5
  132. package/esm/commonHelpers/isDomEnv.js +1 -2
  133. package/esm/commonHelpers/useUniqueId.d.ts +6 -0
  134. package/esm/commonHelpers/useUniqueId.js +7 -1
  135. package/esm/commonHelpers/utils.d.ts +0 -1
  136. package/esm/commonHelpers/utils.js +0 -1
  137. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +5 -3
  138. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +2 -38
  139. package/esm/dateInputInner/dateInputInnerControlBlock.js +13 -9
  140. package/esm/dateRangeRaw/dateRangeRaw.js +5 -1
  141. package/esm/dialog/dialog.js +4 -3
  142. package/esm/feedbackContainer/feedbackContainer.js +4 -4
  143. package/esm/fileUpload/fileUpload.js +21 -12
  144. package/esm/filters/components/filtersSidePanel.d.ts +1 -1
  145. package/esm/filters/components/filtersSidePanel.js +123 -116
  146. package/esm/filters/filters.js +2 -3
  147. package/esm/filtersBar/filtersBar.d.ts +2 -0
  148. package/esm/filtersBar/filtersBar.js +5 -3
  149. package/esm/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
  150. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +3 -0
  151. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.d.ts +1 -1
  152. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +86 -80
  153. package/esm/formFieldError/formFieldError.d.ts +2 -1
  154. package/esm/formFieldError/formFieldError.js +2 -2
  155. package/esm/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
  156. package/esm/index.d.ts +3 -5
  157. package/esm/index.js +3 -5
  158. package/esm/menu/components/menuItem.js +1 -1
  159. package/esm/menu/controlledMenu.js +1 -1
  160. package/esm/nav/nav.js +10 -5
  161. package/esm/nav/navAddMenu/navAddMenu.js +2 -3
  162. package/esm/nav/navEditList/navEditListUtils.d.ts +1 -1
  163. package/esm/nav/navEditList/navEditListUtils.js +2 -1
  164. package/esm/nav/navItem/navActionItem.js +3 -2
  165. package/esm/nav/navItem/navItem.js +2 -3
  166. package/esm/pageHeader/pageHeaderActions.js +4 -3
  167. package/esm/rangeRaw/rangeRaw.js +7 -1
  168. package/esm/selectList/selectList.js +11 -7
  169. package/esm/selectRaw/selectRaw.js +1 -1
  170. package/esm/shield/shield.js +5 -3
  171. package/esm/sidePanel/sidePanel.js +9 -8
  172. package/esm/summaryTile/summaryTile.d.ts +1 -3
  173. package/esm/summaryTile/summaryTile.js +1 -2
  174. package/esm/table/children/useTableChildren.d.ts +1 -1
  175. package/esm/table/children/useTableChildren.js +3 -3
  176. package/esm/table/flexible/useFlexibleColumns.js +39 -1
  177. package/esm/table/nested/useNestedRows.d.ts +1 -0
  178. package/esm/table/nested/useNestedRows.js +1 -1
  179. package/esm/table/selectable/useSelectableRows.d.ts +9 -0
  180. package/esm/table/selectable/useSelectableRows.js +15 -8
  181. package/esm/table/table.js +1 -7
  182. package/esm/{card/components → title}/title.d.ts +1 -1
  183. package/esm/title/title.js +23 -0
  184. package/esm/toggleButtonRaw/toggleButtonRaw.js +3 -1
  185. package/esm/toggleButtonRaw/types.d.ts +1 -0
  186. package/esm/tooltip/tooltip.d.ts +2 -1
  187. package/esm/tooltip/tooltip.js +68 -64
  188. package/esm/utils/localization/directionContext.d.ts +3 -0
  189. package/esm/utils/localization/directionContext.js +2 -0
  190. package/esm/utils/localization/getTextDirection.d.ts +2 -0
  191. package/esm/utils/localization/getTextDirection.js +2 -0
  192. package/esm/utils/localization/languageProvider.js +15 -1
  193. package/esm/utils/localization/translations/en-json.d.ts +2 -0
  194. package/esm/utils/localization/translations/en-json.js +3 -1
  195. package/esm/utils/localization/translations/en.json +3 -0
  196. package/esm/utils/localization/useDirection.d.ts +2 -0
  197. package/esm/utils/localization/useDirection.js +3 -0
  198. package/package.json +33 -31
  199. package/dist/card/components/title.js +0 -22
  200. package/dist/commonHelpers/hooks/deviceProvider.d.ts +0 -7
  201. package/dist/commonHelpers/hooks/deviceProvider.js +0 -11
  202. package/esm/card/components/title.js +0 -18
  203. package/esm/commonHelpers/hooks/deviceProvider.d.ts +0 -7
  204. package/esm/commonHelpers/hooks/deviceProvider.js +0 -4
@@ -63,7 +63,7 @@ const mergeStates = (initialState, newState) => {
63
63
  });
64
64
  return state;
65
65
  };
66
- const FiltersBar = ({ className, children, isAllFiltersVisible, hideAllFiltersButton, parentElement, selectedQuantity, ignoreNewFunctionality, pillName, pillIcon, pillType, toggleAllFilters, getDefaultFiltersState, onClearAllFilters, onApplyAllFilters }) => {
66
+ const FiltersBar = ({ className, children, isAllFiltersVisible, hideAllFiltersButton, parentElement, selectedQuantity, trailingContent, ignoreNewFunctionality, pillName, pillIcon, pillType, toggleAllFilters, getDefaultFiltersState, onClearAllFilters, onApplyAllFilters }) => {
67
67
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
68
68
  ignoreNewFunctionality; // TODO: remove after deprecated ignoreNewFunctionality removed
69
69
  const allFiltersRef = (0, react_1.useRef)(null);
@@ -134,7 +134,9 @@ const FiltersBar = ({ className, children, isAllFiltersVisible, hideAllFiltersBu
134
134
  }
135
135
  }, [filterBarChildren, memoizedShouldUpdate, sidePanelState, stateFromChildren]);
136
136
  const searchChild = childrenArray.find(child => child && typeof child === "object" && "type" in child && child.type === filtersBarSearch_1.FiltersBarSearch);
137
- setSearchComponent(searchChild);
137
+ (0, react_1.useEffect)(() => {
138
+ setSearchComponent(searchChild);
139
+ }, [searchChild, setSearchComponent]);
138
140
  (0, react_1.useEffect)(() => {
139
141
  setFiltersBarToggleAllFiltersFn(toggleAllFilters);
140
142
  }, [toggleAllFilters, setFiltersBarToggleAllFiltersFn]);
@@ -236,7 +238,7 @@ const FiltersBar = ({ className, children, isAllFiltersVisible, hideAllFiltersBu
236
238
  if (!isClientReady) {
237
239
  return null;
238
240
  }
239
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isMobile && ((0, jsx_runtime_1.jsxs)("div", { ref: toolbarRef, className: (0, classNames_1.classNames)(["zen-filters-toolbar", noActions ? "zen-filters-toolbar--no-actions" : "", className !== null && className !== void 0 ? className : ""]), children: [(0, jsx_runtime_1.jsx)(filtersContainer_1.FiltersContainer, { children: filterBarChildren }), (0, jsx_runtime_1.jsx)(filtersBarActions_1.FiltersBarActions, { allFiltersRef: allFiltersRef, onShowAllFilters: () => toggleAllFiltersCallback(true), onClearFilters: handleClearClick, selectedQuantity: selectedQuantity !== undefined ? selectedQuantity : filtersBarState.currentNumberOfChangedFilters, selectedQuantityToDisplay: selectedQuantity !== undefined ? selectedQuantity : filtersBarState.numberOfChangedFilters, hideAllFiltersButton: isAllFiltersButtonHidden, onApplyButtonClick: onApplyAllFilters ? handleApplyAllFilters(false) : undefined, isApplyButtonShown: isApplyButtonShown })] })), !isAllFiltersButtonHidden ? sidePanel : null] }));
241
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isMobile && ((0, jsx_runtime_1.jsxs)("div", { ref: toolbarRef, className: (0, classNames_1.classNames)(["zen-filters-toolbar", noActions ? "zen-filters-toolbar--no-actions" : "", className !== null && className !== void 0 ? className : ""]), children: [(0, jsx_runtime_1.jsx)(filtersContainer_1.FiltersContainer, { children: filterBarChildren }), (0, jsx_runtime_1.jsx)(filtersBarActions_1.FiltersBarActions, { allFiltersRef: allFiltersRef, onShowAllFilters: () => toggleAllFiltersCallback(true), onClearFilters: handleClearClick, selectedQuantity: selectedQuantity !== undefined ? selectedQuantity : filtersBarState.currentNumberOfChangedFilters, selectedQuantityToDisplay: selectedQuantity !== undefined ? selectedQuantity : filtersBarState.numberOfChangedFilters, hideAllFiltersButton: isAllFiltersButtonHidden, onApplyButtonClick: onApplyAllFilters ? handleApplyAllFilters(false) : undefined, isApplyButtonShown: isApplyButtonShown }), trailingContent && (0, jsx_runtime_1.jsx)("div", { className: "zen-filters-toolbar__trailing-content", children: trailingContent })] })), !isAllFiltersButtonHidden ? sidePanel : null] }));
240
242
  };
241
243
  exports.FiltersBar = FiltersBar;
242
244
  exports.FiltersBar.Search = filtersBarSearch_1.FiltersBarSearch;
@@ -14,6 +14,7 @@ const buttonType_1 = require("../../button/buttonType");
14
14
  const textIconButton_1 = require("../../textIconButton/textIconButton");
15
15
  const useLanguage_1 = require("../../utils/localization/useLanguage");
16
16
  const iconSettings6_1 = require("../../icons/iconSettings6");
17
+ injectString("en", "Active filters: {}", "Active filters: {}");
17
18
  injectString("cs", "Filters", "Filtry");
18
19
  injectString("da-DK", "Filters", "Filtre");
19
20
  injectString("de", "Filters", "Filter");
@@ -118,6 +119,7 @@ const FiltersBarActions = ({
118
119
  onClick: onShowAllFilters,
119
120
  icon: iconSettings6_1.IconSettings6,
120
121
  iconPosition: textIconButton_1.ButtonIconPosition.Start,
122
+ "aria-label": selectedQuantityToDisplay && selectedQuantityToDisplay > 0 ? translate("Active filters: {}").replace("{}", selectedQuantityToDisplay.toString()) : translate("Filters"),
121
123
  children: (0, jsx_runtime_1.jsxs)("span", {
122
124
  className: "zen-filters-toolbar__action-label",
123
125
  children: [translate("Filters"), selectedQuantityToDisplay && selectedQuantityToDisplay > 0 ? (0, jsx_runtime_1.jsx)("span", {
@@ -143,4 +145,4 @@ const FiltersBarActions = ({
143
145
  });
144
146
  };
145
147
  exports.FiltersBarActions = FiltersBarActions;
146
- exports.TRANSLATIONS = ["Filters", "Clear", "Search"];
148
+ exports.TRANSLATIONS = ["Filters", "Clear", "Search", "Active filters: {}"];
@@ -86,6 +86,7 @@ const FiltersBarSidePanelRange = ({
86
86
  }) => {
87
87
  const generatedId = (0, react_1.useId)();
88
88
  const intId = id || generatedId;
89
+ const rangeErrorId = `${intId}-error`;
89
90
  const [currentValue, setCurrentValue] = (0, react_1.useState)(value);
90
91
  const [errorType, setErrorType] = (0, react_1.useState)(undefined);
91
92
  const prevValueRef = (0, react_1.useRef)(value);
@@ -160,11 +161,13 @@ const FiltersBarSidePanelRange = ({
160
161
  return (0, jsx_runtime_1.jsxs)("div", {
161
162
  ref: setFieldsContainerRef,
162
163
  id: intId,
164
+ "aria-describedby": errorType !== undefined && directionState === "row" ? rangeErrorId : undefined,
163
165
  className: (0, classNames_1.classNames)(["zen-filters-bar-side-panel-range", className || ""]),
164
166
  children: [(0, jsx_runtime_1.jsxs)("div", {
165
167
  className: rangeFieldContainerClasses,
166
168
  children: [memoizedMinRangeField, memoizedMaxRangeField]
167
169
  }), errorType !== undefined && directionState === "row" ? (0, jsx_runtime_1.jsx)(formFieldError_1.FormFieldError, {
170
+ id: rangeErrorId,
168
171
  className: "zen-filters-bar-side-panel-range__error",
169
172
  error: [(0, rangeHelper_1.getErrorString)("min", currentValue.min, translate, errorType, min, max) || "", (0, rangeHelper_1.getErrorString)("max", currentValue.max, translate, errorType, min, max) || ""]
170
173
  }) : null]
@@ -20,7 +20,7 @@ interface IFiltersBarSidePanelInternal extends IZenComponentProps {
20
20
  }
21
21
  export interface IFiltersBarSidePanel extends Pick<IFiltersBarSidePanelInternal, "className" | "children" | "state" | "dispatch"> {
22
22
  }
23
- export declare const FiltersBarSidePanel: ({ isOpen, className, children, triggerRef, parentElement, pillName, pillIcon, pillType, onClosePanel, getDefaultFiltersState, state, dispatch, onApplyAllFilters }: IFiltersBarSidePanelInternal) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const FiltersBarSidePanel: ({ isOpen, className, children, triggerRef, parentElement, pillName, pillIcon, pillType, onClosePanel, getDefaultFiltersState, state, dispatch, onApplyAllFilters }: IFiltersBarSidePanelInternal) => import("react/jsx-runtime").JSX.Element | null;
24
24
  export declare const FiltersBarSidePanelContainer: (_: IFiltersBarSidePanel) => import("react/jsx-runtime").JSX.Element;
25
25
  export declare const TRANSLATIONS: string[];
26
26
  export {};
@@ -163,8 +163,9 @@ const useUniqueId_1 = require("../../commonHelpers/useUniqueId");
163
163
  const useBodyScroll_1 = require("../../utils/useBodyScroll");
164
164
  const footerButtons_1 = require("../../footerButtons/footerButtons");
165
165
  const pill_1 = require("../../pill/pill");
166
- const react_dom_1 = require("react-dom");
167
166
  const zen_1 = require("../../utils/zen");
167
+ const usePortal_1 = require("../../commonHelpers/hooks/usePortal");
168
+ const useClientReady_1 = require("../../commonHelpers/hooks/useClientReady");
168
169
  const getChangeHandlers = children => {
169
170
  const handlers = {};
170
171
  react_1.Children.map(children, child => {
@@ -309,95 +310,100 @@ const FiltersBarSidePanel = ({
309
310
  handleClose();
310
311
  };
311
312
  }, [isOpen, setScrollHidden, resetScroll]);
312
- return (0, jsx_runtime_1.jsxs)(react_1.Fragment, {
313
- children: [(0, jsx_runtime_1.jsx)(shield_1.Shield, {
314
- className: "zen-high-level-shield",
315
- dataShieldId: dataShieldId,
316
- isVisible: isOpen
317
- }), (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(sidePanel_1.SidePanel, {
318
- triggerRef: triggerRef,
319
- isOpen: isOpen,
320
- label: translate("All Filters"),
321
- onHidePanel: onCloseAction,
322
- className: (0, classNames_1.classNames)(["zen-side-panel-filters-bar", dark ? "zen-dark" : "", className !== null && className !== void 0 ? className : ""]),
323
- onTransitionEnd: handleReadyForFocus,
324
- children: (0, jsx_runtime_1.jsxs)("div", {
325
- className: "zen-side-panel-filters-bar-wrapper",
313
+ const isClientReady = (0, useClientReady_1.useClientReady)();
314
+ const portal = (0, usePortal_1.usePortal)((0, jsx_runtime_1.jsx)(sidePanel_1.SidePanel, {
315
+ triggerRef: triggerRef,
316
+ isOpen: isOpen,
317
+ label: translate("All Filters"),
318
+ onHidePanel: onCloseAction,
319
+ className: (0, classNames_1.classNames)(["zen-side-panel-filters-bar", dark ? "zen-dark" : "", className !== null && className !== void 0 ? className : ""]),
320
+ onTransitionEnd: handleReadyForFocus,
321
+ children: (0, jsx_runtime_1.jsxs)("div", {
322
+ className: "zen-side-panel-filters-bar-wrapper",
323
+ children: [(0, jsx_runtime_1.jsxs)("div", {
324
+ className: "zen-side-panel-filters-bar__header",
326
325
  children: [(0, jsx_runtime_1.jsxs)("div", {
327
- className: "zen-side-panel-filters-bar__header",
328
- children: [(0, jsx_runtime_1.jsxs)("div", {
329
- className: "zen-side-panel-filters-bar__title-wrapper",
330
- children: [(0, jsx_runtime_1.jsx)("div", {
331
- className: "zen-side-panel-filters-bar__title zen-ellipsis",
332
- children: translate("All Filters")
333
- }), pillName ? (0, jsx_runtime_1.jsx)("div", {
334
- className: "zen-side-panel-filters-bar__title-pill",
335
- children: (0, jsx_runtime_1.jsx)(pill_1.Pill, {
336
- type: pillType,
337
- icon: pillIcon,
338
- children: pillName
339
- })
340
- }) : null]
341
- }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
342
- type: "tertiary-black",
343
- className: "zen-side-panel-filters-bar__close-button",
344
- icon: iconClose_1.IconClose,
345
- iconSize: isMobile ? "huge" : "large",
326
+ className: "zen-side-panel-filters-bar__title-wrapper",
327
+ children: [(0, jsx_runtime_1.jsx)("div", {
328
+ className: "zen-side-panel-filters-bar__title zen-ellipsis",
329
+ children: translate("All Filters")
330
+ }), pillName ? (0, jsx_runtime_1.jsx)("div", {
331
+ className: "zen-side-panel-filters-bar__title-pill",
332
+ children: (0, jsx_runtime_1.jsx)(pill_1.Pill, {
333
+ type: pillType,
334
+ icon: pillIcon,
335
+ children: pillName
336
+ })
337
+ }) : null]
338
+ }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
339
+ type: "tertiary-black",
340
+ className: "zen-side-panel-filters-bar__close-button",
341
+ icon: iconClose_1.IconClose,
342
+ iconSize: isMobile ? "huge" : "large",
343
+ onClick: onClosePanel,
344
+ iconPosition: textIconButton_2.ButtonIconPosition.Start,
345
+ title: translate("Close")
346
+ })]
347
+ }), (0, jsx_runtime_1.jsx)("div", {
348
+ className: "zen-side-panel-filters-bar__content",
349
+ children: newChildren
350
+ }), (0, jsx_runtime_1.jsx)("div", {
351
+ className: (0, classNames_1.classNames)(["zen-side-panel-filters-bar__footer", isMobile ? "zen-side-panel-filters-bar__footer--mobile" : "", isLongTextLanguages && !isMobile ? "zen-side-panel-filters-bar__footer--long-text" : ""]),
352
+ children: isMobile ? (0, jsx_runtime_1.jsxs)(footerButtons_1.FooterButtons, {
353
+ children: [(0, jsx_runtime_1.jsx)(button_1.Button, {
354
+ className: "zen-side-panel-filters-bar__apply-button",
355
+ disabled: applyDisabled,
356
+ onClick: onApplyFilters,
357
+ type: "primary",
358
+ children: translate("Apply")
359
+ }), (0, jsx_runtime_1.jsx)(button_1.Button, {
360
+ className: "zen-side-panel-filters-bar__cancel-button",
361
+ type: "secondary",
346
362
  onClick: onClosePanel,
347
- iconPosition: textIconButton_2.ButtonIconPosition.Start,
348
- title: translate("Close")
363
+ children: translate("Cancel")
364
+ }), (0, jsx_runtime_1.jsx)(button_1.Button, {
365
+ className: "zen-side-panel-filters-bar__clear-button",
366
+ onClick: onResetFilters,
367
+ type: "tertiary",
368
+ children: translate("Reset All")
349
369
  })]
350
- }), (0, jsx_runtime_1.jsx)("div", {
351
- className: "zen-side-panel-filters-bar__content",
352
- children: newChildren
353
- }), (0, jsx_runtime_1.jsx)("div", {
354
- className: (0, classNames_1.classNames)(["zen-side-panel-filters-bar__footer", isMobile ? "zen-side-panel-filters-bar__footer--mobile" : "", isLongTextLanguages && !isMobile ? "zen-side-panel-filters-bar__footer--long-text" : ""]),
355
- children: isMobile ? (0, jsx_runtime_1.jsxs)(footerButtons_1.FooterButtons, {
370
+ }) : (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
371
+ children: [(0, jsx_runtime_1.jsx)("div", {
372
+ className: "zen-side-panel-filters-bar__footer-section",
373
+ children: (0, jsx_runtime_1.jsx)(button_1.Button, {
374
+ type: "tertiary",
375
+ className: "zen-side-panel-filters-bar__clear-button",
376
+ onClick: onResetFilters,
377
+ children: translate("Reset All")
378
+ })
379
+ }), (0, jsx_runtime_1.jsxs)("div", {
380
+ className: "zen-side-panel-filters-bar__footer-section",
356
381
  children: [(0, jsx_runtime_1.jsx)(button_1.Button, {
357
- className: "zen-side-panel-filters-bar__apply-button",
358
- disabled: applyDisabled,
359
- onClick: onApplyFilters,
360
- type: "primary",
361
- children: translate("Apply")
362
- }), (0, jsx_runtime_1.jsx)(button_1.Button, {
363
382
  className: "zen-side-panel-filters-bar__cancel-button",
364
383
  type: "secondary",
365
384
  onClick: onClosePanel,
366
385
  children: translate("Cancel")
367
386
  }), (0, jsx_runtime_1.jsx)(button_1.Button, {
368
- className: "zen-side-panel-filters-bar__clear-button",
369
- onClick: onResetFilters,
370
- type: "tertiary",
371
- children: translate("Reset All")
372
- })]
373
- }) : (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
374
- children: [(0, jsx_runtime_1.jsx)("div", {
375
- className: "zen-side-panel-filters-bar__footer-section",
376
- children: (0, jsx_runtime_1.jsx)(button_1.Button, {
377
- type: "tertiary",
378
- className: "zen-side-panel-filters-bar__clear-button",
379
- onClick: onResetFilters,
380
- children: translate("Reset All")
381
- })
382
- }), (0, jsx_runtime_1.jsxs)("div", {
383
- className: "zen-side-panel-filters-bar__footer-section",
384
- children: [(0, jsx_runtime_1.jsx)(button_1.Button, {
385
- className: "zen-side-panel-filters-bar__cancel-button",
386
- type: "secondary",
387
- onClick: onClosePanel,
388
- children: translate("Cancel")
389
- }), (0, jsx_runtime_1.jsx)(button_1.Button, {
390
- className: "zen-side-panel-filters-bar__apply-button zen-side-panel-filters-bar__apply-button--desktop",
391
- disabled: applyDisabled,
392
- onClick: onApplyFilters,
393
- type: "primary",
394
- children: translate("Apply")
395
- })]
387
+ className: "zen-side-panel-filters-bar__apply-button zen-side-panel-filters-bar__apply-button--desktop",
388
+ disabled: applyDisabled,
389
+ onClick: onApplyFilters,
390
+ type: "primary",
391
+ children: translate("Apply")
396
392
  })]
397
- })
398
- })]
399
- })
400
- }), (_b = parentElement !== null && parentElement !== void 0 ? parentElement : (_a = zen_1.zen.document) === null || _a === void 0 ? void 0 : _a.fullscreenElement) !== null && _b !== void 0 ? _b : (_c = zen_1.zen.document) === null || _c === void 0 ? void 0 : _c.body)]
393
+ })]
394
+ })
395
+ })]
396
+ })
397
+ }), (_b = parentElement !== null && parentElement !== void 0 ? parentElement : (_a = zen_1.zen.document) === null || _a === void 0 ? void 0 : _a.fullscreenElement) !== null && _b !== void 0 ? _b : (_c = zen_1.zen.document) === null || _c === void 0 ? void 0 : _c.body);
398
+ if (!isClientReady) {
399
+ return null;
400
+ }
401
+ return (0, jsx_runtime_1.jsxs)(react_1.Fragment, {
402
+ children: [(0, jsx_runtime_1.jsx)(shield_1.Shield, {
403
+ className: "zen-high-level-shield",
404
+ dataShieldId: dataShieldId,
405
+ isVisible: isOpen
406
+ }), portal]
401
407
  });
402
408
  };
403
409
  exports.FiltersBarSidePanel = FiltersBarSidePanel;
@@ -1,7 +1,8 @@
1
1
  import "./formFieldError.less";
2
2
  interface IFormFieldError {
3
+ id?: string;
3
4
  className?: string;
4
5
  error?: string | string[];
5
6
  }
6
- export declare const FormFieldError: ({ className, error }: IFormFieldError) => import("react/jsx-runtime").JSX.Element | null;
7
+ export declare const FormFieldError: ({ id, className, error }: IFormFieldError) => import("react/jsx-runtime").JSX.Element | null;
7
8
  export {};
@@ -6,12 +6,12 @@ const classNames_1 = require("../commonHelpers/classNames/classNames");
6
6
  const iconException_1 = require("../icons/iconException");
7
7
  const useDrive_1 = require("../utils/theme/useDrive");
8
8
  const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
9
- const FormFieldError = ({ className, error }) => {
9
+ const FormFieldError = ({ id, className, error }) => {
10
10
  const driveComponentClass = (0, useDriveClassName_1.useDriveClassName)("zen-form-field-error");
11
11
  const isDrive = (0, useDrive_1.useDrive)();
12
12
  const errorStrings = Array.isArray(error)
13
13
  ? error.filter(el => el).map((erStr, ind) => (0, jsx_runtime_1.jsx)("div", { children: erStr }, `error_str_${ind}`))
14
14
  : error && (0, jsx_runtime_1.jsx)("div", { children: error });
15
- return error ? ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-form-field-error", driveComponentClass || "", className || ""]), children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-form-field-error__icon-container", children: (0, jsx_runtime_1.jsx)(iconException_1.IconException, { className: "zen-form-field-error__error-icon", size: isDrive ? "large" : "bigger" }) }), (0, jsx_runtime_1.jsx)("div", { className: "zen-form-field-error__error-text", children: errorStrings })] })) : null;
15
+ return error ? ((0, jsx_runtime_1.jsxs)("span", { id: id, className: (0, classNames_1.classNames)(["zen-form-field-error", driveComponentClass || "", className || ""]), children: [(0, jsx_runtime_1.jsx)(iconException_1.IconException, { className: "zen-form-field-error__error-icon", size: isDrive ? "large" : "bigger" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-form-field-error__error-text", children: errorStrings })] })) : null;
16
16
  };
17
17
  exports.FormFieldError = FormFieldError;
@@ -36,7 +36,7 @@ const handleCustomMenuWrapper = (reactNode, content, menuItems) => {
36
36
  const el = (0, react_1.createElement)(menu_1.Menu.Item, {
37
37
  id: reactNode.props.id || menu.props.id,
38
38
  key: reactNode.props.id || menu.props.id,
39
- name: reactNode.props.name || "",
39
+ name: reactNode.props.name || menu.props.name || "",
40
40
  disabled: reactNode.props.disabled || menu.props.disabled,
41
41
  link: reactNode.props.link || menu.props.link,
42
42
  target: reactNode.props.target || menu.props.target,