@geotab/zenith 3.10.0-beta.3 → 3.10.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +9 -1
  2. package/dist/commonStyles/pillStyles/pillContent.less +9 -9
  3. package/dist/commonStyles/pillStyles/pillStyles.less +2 -2
  4. package/dist/dataGrid/cell/cell.d.ts +2 -1
  5. package/dist/dataGrid/cell/cell.js +2 -2
  6. package/dist/dataGrid/dataGrid.js +6 -4
  7. package/dist/dataGrid/listColumn.d.ts +2 -0
  8. package/dist/dataGrid/row/row.js +11 -7
  9. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +2 -1
  10. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
  11. package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
  12. package/dist/dropdownRaw/dropdownList.d.ts +1 -2
  13. package/dist/dropdownRaw/dropdownList.js +2 -7
  14. package/dist/dropdownRaw/dropdownRaw.js +12 -7
  15. package/dist/filtersBar/filtersContainer/filtersContainer.js +14 -4
  16. package/dist/index.css +690 -653
  17. package/dist/radioGroupRaw/radioGroupRaw.js +2 -1
  18. package/dist/selectList/selectList.helpers.d.ts +1 -1
  19. package/dist/selectList/selectList.helpers.js +31 -6
  20. package/dist/selectList/selectList.js +3 -1
  21. package/dist/selectList/selectList.reducer.js +1 -2
  22. package/dist/sortControl/sortControl.js +58 -2
  23. package/dist/table/children/useTableChildren.d.ts +1 -1
  24. package/dist/table/children/useTableChildren.js +3 -3
  25. package/dist/table/flexible/columnsList.js +4 -2
  26. package/dist/table/selectable/useSelectableRows.d.ts +8 -0
  27. package/dist/table/selectable/useSelectableRows.js +14 -6
  28. package/dist/table/table.js +1 -7
  29. package/dist/utils/localization/translations/ar.json +3 -1
  30. package/dist/utils/localization/translations/cs.json +3 -1
  31. package/dist/utils/localization/translations/da-DK.json +3 -1
  32. package/dist/utils/localization/translations/de.json +3 -1
  33. package/dist/utils/localization/translations/en.json +3 -1
  34. package/dist/utils/localization/translations/es.json +3 -1
  35. package/dist/utils/localization/translations/fi-FI.json +3 -1
  36. package/dist/utils/localization/translations/fr-FR.json +3 -1
  37. package/dist/utils/localization/translations/fr.json +3 -1
  38. package/dist/utils/localization/translations/hu-HU.json +3 -1
  39. package/dist/utils/localization/translations/id.json +3 -1
  40. package/dist/utils/localization/translations/it.json +3 -1
  41. package/dist/utils/localization/translations/ja.json +3 -1
  42. package/dist/utils/localization/translations/ko-KR.json +3 -1
  43. package/dist/utils/localization/translations/ms.json +3 -1
  44. package/dist/utils/localization/translations/nb-NO.json +3 -1
  45. package/dist/utils/localization/translations/nl.json +3 -1
  46. package/dist/utils/localization/translations/pl.json +3 -1
  47. package/dist/utils/localization/translations/pt-BR.json +3 -1
  48. package/dist/utils/localization/translations/pt-PT.json +3 -1
  49. package/dist/utils/localization/translations/ro-RO.json +3 -1
  50. package/dist/utils/localization/translations/sk-SK.json +3 -1
  51. package/dist/utils/localization/translations/sv.json +3 -1
  52. package/dist/utils/localization/translations/th.json +3 -1
  53. package/dist/utils/localization/translations/tr.json +3 -1
  54. package/dist/utils/localization/translations/zh-Hans.json +3 -1
  55. package/dist/utils/localization/translations/zh-TW.json +3 -1
  56. package/esm/dataGrid/cell/cell.d.ts +2 -1
  57. package/esm/dataGrid/cell/cell.js +2 -2
  58. package/esm/dataGrid/dataGrid.js +6 -4
  59. package/esm/dataGrid/listColumn.d.ts +2 -0
  60. package/esm/dataGrid/row/row.js +11 -7
  61. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +2 -1
  62. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
  63. package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
  64. package/esm/dropdownRaw/dropdownList.d.ts +1 -2
  65. package/esm/dropdownRaw/dropdownList.js +2 -7
  66. package/esm/dropdownRaw/dropdownRaw.js +12 -7
  67. package/esm/filtersBar/filtersContainer/filtersContainer.js +14 -4
  68. package/esm/radioGroupRaw/radioGroupRaw.js +2 -1
  69. package/esm/selectList/selectList.helpers.d.ts +1 -1
  70. package/esm/selectList/selectList.helpers.js +31 -6
  71. package/esm/selectList/selectList.js +3 -1
  72. package/esm/selectList/selectList.reducer.js +1 -2
  73. package/esm/sortControl/sortControl.js +58 -2
  74. package/esm/table/children/useTableChildren.d.ts +1 -1
  75. package/esm/table/children/useTableChildren.js +3 -3
  76. package/esm/table/flexible/columnsList.js +4 -2
  77. package/esm/table/selectable/useSelectableRows.d.ts +8 -0
  78. package/esm/table/selectable/useSelectableRows.js +14 -6
  79. package/esm/table/table.js +1 -7
  80. package/esm/utils/localization/translations/ar.json +3 -1
  81. package/esm/utils/localization/translations/cs.json +3 -1
  82. package/esm/utils/localization/translations/da-DK.json +3 -1
  83. package/esm/utils/localization/translations/de.json +3 -1
  84. package/esm/utils/localization/translations/en.json +3 -1
  85. package/esm/utils/localization/translations/es.json +3 -1
  86. package/esm/utils/localization/translations/fi-FI.json +3 -1
  87. package/esm/utils/localization/translations/fr-FR.json +3 -1
  88. package/esm/utils/localization/translations/fr.json +3 -1
  89. package/esm/utils/localization/translations/hu-HU.json +3 -1
  90. package/esm/utils/localization/translations/id.json +3 -1
  91. package/esm/utils/localization/translations/it.json +3 -1
  92. package/esm/utils/localization/translations/ja.json +3 -1
  93. package/esm/utils/localization/translations/ko-KR.json +3 -1
  94. package/esm/utils/localization/translations/ms.json +3 -1
  95. package/esm/utils/localization/translations/nb-NO.json +3 -1
  96. package/esm/utils/localization/translations/nl.json +3 -1
  97. package/esm/utils/localization/translations/pl.json +3 -1
  98. package/esm/utils/localization/translations/pt-BR.json +3 -1
  99. package/esm/utils/localization/translations/pt-PT.json +3 -1
  100. package/esm/utils/localization/translations/ro-RO.json +3 -1
  101. package/esm/utils/localization/translations/sk-SK.json +3 -1
  102. package/esm/utils/localization/translations/sv.json +3 -1
  103. package/esm/utils/localization/translations/th.json +3 -1
  104. package/esm/utils/localization/translations/tr.json +3 -1
  105. package/esm/utils/localization/translations/zh-Hans.json +3 -1
  106. package/esm/utils/localization/translations/zh-TW.json +3 -1
  107. package/package.json +2 -1
@@ -4,7 +4,7 @@ import { classNames } from "../../commonHelpers/classNames/classNames";
4
4
  import { isPromiseLike } from "../columns/basicColumn";
5
5
  import { isActiveElement } from "../../list/utils/isActiveElement";
6
6
  import { zen } from "../../utils/zen";
7
- const Cell = ({ index, limited, visibleOnHover, isVisible, width, render, renderWrappers, renderPlaceholder, defaultValue, entity, colspan, className, onClick, isActive }) => {
7
+ const Cell = ({ index, limited, visibleOnHover, isVisible, width, maxWidth, render, renderWrappers, renderPlaceholder, defaultValue, entity, colspan, className, onClick, isActive }) => {
8
8
  const [content, setContent] = useState("");
9
9
  const placeholderRenderer = useCallback(() => {
10
10
  const renderFn = renderPlaceholder || (() => "...");
@@ -69,6 +69,6 @@ const Cell = ({ index, limited, visibleOnHover, isVisible, width, render, render
69
69
  visibleOnHover ? "zen-data-grid__row-cell--visible-on-hover" : "",
70
70
  onClick ? "zen-data-grid__row-cell--clickable" : "",
71
71
  limited ? "zen-ellipsis" : ""
72
- ]), style: { minWidth: width || "auto", maxWidth: width || "auto" }, role: "gridcell", children: content }));
72
+ ]), style: { minWidth: width || "auto", maxWidth: maxWidth ? `${Math.max(width !== null && width !== void 0 ? width : 0, maxWidth)}px` : width || "auto" }, role: "gridcell", children: content }));
73
73
  };
74
74
  export const DataGridCell = memo(Cell);
@@ -49,7 +49,7 @@ const getHeaderPropsFromWrappers = wrappers => wrappers.reduce((result, wrapper)
49
49
  const props = (_a = wrapper.getHeaderProps) === null || _a === void 0 ? void 0 : _a.call(wrapper);
50
50
  return props ? Object.assign(Object.assign({}, result), props) : result;
51
51
  }, {});
52
- const getColumnWidth = defaultWidth => Math.floor(Math.max(defaultWidth, MIN_CELL_WIDTH));
52
+ const getColumnWidth = (defaultWidth, minWidth) => Math.floor(Math.max(defaultWidth, minWidth !== null && minWidth !== void 0 ? minWidth : MIN_CELL_WIDTH));
53
53
  export const EmptyList = ({
54
54
  children
55
55
  }) => _jsx("div", {
@@ -144,12 +144,13 @@ const DataGridInner = ({
144
144
  setVisibleRows(visible);
145
145
  }, [entities]);
146
146
  const listOfDefaultWidthColumns = useMemo(() => columnsList.map(column => column.meta.defaultWidth), [columnsList]);
147
+ const listOfMinWidthColumns = useMemo(() => columnsList.map(column => column.meta.minWidth), [columnsList]);
147
148
  const {
148
149
  result: observerResult
149
150
  } = useResizeObserver({
150
151
  target: gridRef.current
151
152
  });
152
- const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width) => acc + (width === undefined ? 0 : getColumnWidth(width)), 0);
153
+ const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width, index) => acc + (width === undefined ? 0 : getColumnWidth(width, listOfMinWidthColumns[index])), 0);
153
154
  const unallocatedSpace = observerResult && observerResult.contentRect.width - allocatedSpace || 0;
154
155
  const flexibleColumnsQty = listOfDefaultWidthColumns.filter(width => width === undefined).length;
155
156
  const flexibleColumnWidth = getColumnWidth(unallocatedSpace / flexibleColumnsQty);
@@ -172,18 +173,19 @@ const DataGridInner = ({
172
173
  }, [updateScroll, scheduleLazyRender]);
173
174
  const getCellParams = useCallback(columnIndex => {
174
175
  const defaultWidth = listOfDefaultWidthColumns[columnIndex];
176
+ const minWidth = listOfMinWidthColumns[columnIndex];
175
177
  const limited = !!defaultWidth && defaultWidth > 0;
176
178
  const isFirst = columnIndex === 0;
177
179
  const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
178
180
  // If the column is the last one or doesn't have a default width, it should be limited to the remaining space
179
- const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
181
+ const width = getColumnWidth(defaultWidth || flexibleColumnWidth, minWidth);
180
182
  return {
181
183
  limited,
182
184
  isFirst,
183
185
  isLast,
184
186
  width
185
187
  };
186
- }, [listOfDefaultWidthColumns, flexibleColumnWidth]);
188
+ }, [listOfDefaultWidthColumns, listOfMinWidthColumns, flexibleColumnWidth]);
187
189
  const renderHeaderCell = useCallback((column, columnIndex) => {
188
190
  var _a;
189
191
  const {
@@ -2,6 +2,8 @@ import { ReactNode } from "react";
2
2
  import { ColumnSortDirection } from "../table/table";
3
3
  export interface IListColumnMeta<T, N = T> {
4
4
  readonly defaultWidth?: number;
5
+ readonly minWidth?: number;
6
+ readonly maxWidth?: number;
5
7
  readonly defaultValue?: string;
6
8
  readonly lazyLoad?: boolean;
7
9
  readonly visibleOnHover?: boolean;
@@ -3,10 +3,12 @@ import { memo, useCallback, useId, useMemo } from "react";
3
3
  import { classNames } from "../../commonHelpers/classNames/classNames";
4
4
  import { DataGridCell } from "../cell/cell";
5
5
  export const MIN_CELL_WIDTH = 100;
6
- const getColumnWidth = (defaultWidth) => Math.floor(Math.max(defaultWidth, MIN_CELL_WIDTH));
6
+ const getColumnWidth = (defaultWidth, minWidth) => Math.floor(Math.max(defaultWidth, minWidth !== null && minWidth !== void 0 ? minWidth : MIN_CELL_WIDTH));
7
7
  const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow, className, expanded, onExpandedChange, isTreeGrid, ariaPosinset, ariaSetsize, onClick, isActive }) => {
8
8
  const isVisible = visibleRows.has(entity.id);
9
9
  const listOfDefaultWidthColumns = useMemo(() => columns.map(column => column.meta.defaultWidth), [columns]);
10
+ const listOfMinWidthColumns = useMemo(() => columns.map(column => column.meta.minWidth), [columns]);
11
+ const listOfMaxWidthColumns = useMemo(() => columns.map(column => column.meta.maxWidth), [columns]);
10
12
  const getColWidth = useCallback((columnIndex, colspan) => {
11
13
  const colsp = colspan || 1;
12
14
  let columnWidth = 0;
@@ -15,26 +17,28 @@ const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow,
15
17
  continue;
16
18
  }
17
19
  const defaultWidth = listOfDefaultWidthColumns[columnIndex + i];
20
+ const minWidth = listOfMinWidthColumns[columnIndex + i];
18
21
  // If the column is the last one or doesn't have a default width, it should be limited to the remaining space
19
- const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
22
+ const width = getColumnWidth(defaultWidth || flexibleColumnWidth, minWidth);
20
23
  columnWidth += width;
21
24
  }
22
25
  return columnWidth;
23
- }, [flexibleColumnWidth, listOfDefaultWidthColumns]);
26
+ }, [flexibleColumnWidth, listOfDefaultWidthColumns, listOfMinWidthColumns]);
24
27
  const getCellParams = useCallback((columnIndex, colspan) => {
25
28
  const width = getColWidth(columnIndex, colspan);
26
29
  const defaultWidth = listOfDefaultWidthColumns[columnIndex];
30
+ const maxWidth = listOfMaxWidthColumns[columnIndex];
27
31
  const limited = !!defaultWidth && defaultWidth > 0;
28
32
  const isFirst = columnIndex === 0;
29
33
  const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
30
- return { limited, isFirst, isLast, width };
31
- }, [getColWidth, listOfDefaultWidthColumns]);
34
+ return { limited, isFirst, isLast, width, maxWidth };
35
+ }, [getColWidth, listOfDefaultWidthColumns, listOfMaxWidthColumns]);
32
36
  const mainRowId = useId();
33
37
  const renderCells = useCallback((rowEntity, isNested) => columns.reduce((acc, column, index) => {
34
38
  const colspanFn = column.colspan;
35
39
  let colspan = colspanFn ? (typeof colspanFn === "function" ? colspanFn(rowEntity) : colspanFn) : undefined;
36
40
  colspan = colspan && colspan > 1 ? colspan : undefined;
37
- const { limited, width } = getCellParams(index, colspan);
41
+ const { limited, width, maxWidth } = getCellParams(index, colspan);
38
42
  if (acc.colspan > 0) {
39
43
  acc.colspan--;
40
44
  return acc;
@@ -49,7 +53,7 @@ const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow,
49
53
  ? column.columnComponent.renderNested.bind(column.columnComponent)
50
54
  : column.columnComponent.render.bind(column.columnComponent))
51
55
  : column.columnComponent.render.bind(column.columnComponent);
52
- acc.cells.push(_jsx(DataGridCell, { render: e => renderFn(e, isNested), renderPlaceholder: column.meta.renderPlaceholder, renderWrappers: renderWrappers, defaultValue: column.meta.defaultValue, entity: rowEntity, index: index, limited: limited, visibleOnHover: column.meta.visibleOnHover, width: column.meta.visibleOnHover ? 0 : width, isVisible: isVisible, colspan: colspan, onClick: !isNested && onExpandedChange ? () => onExpandedChange(!expanded) : onClick ? () => onClick(rowEntity.id) : undefined, isActive: isActive, className: isNested ? "zen-data-grid__row-cell--nested" : "" }, `${rowEntity.id}_${column.name}`));
56
+ acc.cells.push(_jsx(DataGridCell, { render: e => renderFn(e, isNested), renderPlaceholder: column.meta.renderPlaceholder, renderWrappers: renderWrappers, defaultValue: column.meta.defaultValue, entity: rowEntity, index: index, limited: limited, visibleOnHover: column.meta.visibleOnHover, width: column.meta.visibleOnHover ? 0 : width, maxWidth: column.meta.visibleOnHover ? undefined : maxWidth, isVisible: isVisible, colspan: colspan, onClick: !isNested && onExpandedChange ? () => onExpandedChange(!expanded) : onClick ? () => onClick(rowEntity.id) : undefined, isActive: isActive, className: isNested ? "zen-data-grid__row-cell--nested" : "" }, `${rowEntity.id}_${column.name}`));
53
57
  return acc;
54
58
  }, { cells: [], colspan: 0 }).cells, [columns, expanded, getCellParams, isVisible, onExpandedChange, isActive, onClick]);
55
59
  const cells = useMemo(() => renderCells(entity, false), [entity, renderCells]);
@@ -18,6 +18,7 @@ const SubColumnsList = ({ title, columns, settings, disabledColumns, onChange, s
18
18
  showCheckbox: true,
19
19
  children: c.title
20
20
  })), [columns, disabledColumns, sortColumnsInt]);
21
+ const allDisabled = useMemo(() => items.every(item => item.disabled), [items]);
21
22
  const state = columns.reduce((res, c) => {
22
23
  res.set(c.id, settings.get(c.name) !== false ? CheckboxState.On : CheckboxState.Off);
23
24
  return res;
@@ -30,7 +31,7 @@ const SubColumnsList = ({ title, columns, settings, disabledColumns, onChange, s
30
31
  });
31
32
  onChange && onChange(newSettings);
32
33
  }, [columns, settings, onChange]);
33
- const list = useMemo(() => _jsx(SelectList, { id: id, items: items, value: state, title: title || "", multiselect: true, showCheckbox: true, onChange: onChangeItem }), [id, items, state, title, onChangeItem]);
34
+ const list = useMemo(() => (_jsx(SelectList, { id: id, items: items, value: state, title: title || "", multiselect: true, showCheckbox: true, onChange: onChangeItem, disabled: allDisabled })), [id, items, state, title, onChangeItem, allDisabled]);
34
35
  if (!title) {
35
36
  return list;
36
37
  }
@@ -7,6 +7,10 @@ import { DeviceType } from "../../../../commonHelpers/hooks/deviceType";
7
7
  type TBulkAction = IBulkActionLink | IBulkActionButton;
8
8
  export interface IBulkActionsProps extends IZenComponentProps {
9
9
  selected: number;
10
+ /**
11
+ * When `true`, displays "All selected" instead of a count, and enables action buttons
12
+ * even when `selected` is 0 (i.e., cross-page "select all" is active).
13
+ */
10
14
  allSelected?: boolean;
11
15
  onClearSelection: () => void;
12
16
  onSelectAll?: () => void;
@@ -7,5 +7,5 @@ export const parseLabel = (option, dateFormat, translate, toLocalFn) => {
7
7
  localeFrom.getFullYear() === localeTo.getFullYear()) {
8
8
  return formatDate(localeFrom, dateFormat, translate);
9
9
  }
10
- return `${formatDate(localeFrom, dateFormat, translate)} - ${formatDate(localeTo, dateFormat, translate)}`;
10
+ return `${formatDate(localeFrom, dateFormat, translate)} ${formatDate(localeTo, dateFormat, translate)}`;
11
11
  };
@@ -15,7 +15,6 @@ export interface IDropdownList extends IZenComponentProps {
15
15
  backButtonName?: string;
16
16
  isAllSelected?: boolean;
17
17
  isSelectAllActive?: boolean;
18
- shouldBlockItems?: boolean;
19
18
  listData: ICheckboxListWithActionOption[] | ISelectListItem[];
20
19
  isWithFooter: boolean;
21
20
  width?: number;
@@ -41,6 +40,6 @@ interface IDropdownEmptyList extends Pick<IDropdownList, "className" | "width" |
41
40
  hasError: boolean;
42
41
  }
43
42
  export declare const EmptyList: ({ className, width, onClearClick, onApplyClick, onCancelClick, hasApplyButton, isApplyDisabled, isClearButtonDisabled, isWithFooter, hasError }: IDropdownEmptyList) => import("react/jsx-runtime").JSX.Element;
44
- export declare const DropdownList: ({ onBackButtonClick, onSelectAllClick, onClearClick, onApplyClick, onCancelClick, onChange, onSelect, onSingleSelect, listData, isSelectAllActive, shouldBlockItems, backButtonName, width, minWidth, isSelectAllButtonDisable, hasSelectAllButton, filterName, isMultiselect, hasApplyButton, isApplyDisabled, isClearButtonDisabled, activeValue, forceSelection, isWithFooter, isMobile, handleCheckboxChange, checkboxLabel, isChecked, listElementRef, listId }: IDropdownList) => import("react/jsx-runtime").JSX.Element;
43
+ export declare const DropdownList: ({ onBackButtonClick, onSelectAllClick, onClearClick, onApplyClick, onCancelClick, onChange, onSelect, onSingleSelect, listData, isSelectAllActive, backButtonName, width, minWidth, isSelectAllButtonDisable, hasSelectAllButton, filterName, isMultiselect, hasApplyButton, isApplyDisabled, isClearButtonDisabled, activeValue, forceSelection, isWithFooter, isMobile, handleCheckboxChange, checkboxLabel, isChecked, listElementRef, listId }: IDropdownList) => import("react/jsx-runtime").JSX.Element;
45
44
  export declare const TRANSLATIONS: string[];
46
45
  export {};
@@ -293,7 +293,6 @@ export const DropdownList = ({
293
293
  onSingleSelect,
294
294
  listData,
295
295
  isSelectAllActive,
296
- shouldBlockItems,
297
296
  backButtonName,
298
297
  width,
299
298
  minWidth,
@@ -393,15 +392,11 @@ export const DropdownList = ({
393
392
  });
394
393
  return values;
395
394
  };
396
- const multiselectOptions = shouldBlockItems ? listData.map(item => Object.assign(Object.assign({}, item), {
397
- blocked: true,
398
- checked: false
399
- })) : listData;
400
395
  return _jsx("div", {
401
396
  className: "zen-dropdown-list__elements",
402
397
  ref: listElementRef,
403
398
  children: isMultiselect ? _jsx(CheckboxListWithAction, {
404
- options: multiselectOptions,
399
+ options: listData,
405
400
  label: "",
406
401
  onChange: handleChange,
407
402
  onClick: handleClick
@@ -417,7 +412,7 @@ export const DropdownList = ({
417
412
  value: createValue(listData, activeValue)
418
413
  })
419
414
  });
420
- }, [listElementRef, isMultiselect, shouldBlockItems, listData, handleChange, handleClick, handleSingleChange, translate, selectListId, forceSelection, activeValue]);
415
+ }, [listElementRef, isMultiselect, listData, handleChange, handleClick, handleSingleChange, translate, selectListId, forceSelection, activeValue]);
421
416
  return _jsxs("div", Object.assign({
422
417
  className: classNames(["zen-dropdown-list", driveComponentClass || ""])
423
418
  }, styleWidth, {
@@ -526,12 +526,18 @@ export const DropdownRaw = props => {
526
526
  }, [setChecked, setSearch]);
527
527
  const debouncedGetData = useDebounce((signal, searchValue, isChecked) => getData ? (isCheckboxMode ? getData(signal, searchValue, isChecked) : getData(signal, searchValue)).then(dta => handleData(dta, searchValue)).catch(handleError) : customGetData(searchValue).then(dta => handleData(dta, searchValue)).catch(handleError), 200);
528
528
  const controlData = useCallback((signal, searchValue, isChecked) => {
529
- !isQueryMode && dispatchState({
530
- type: StateActionType.ShowWaiting,
531
- payload: undefined
532
- });
533
- isQueryMode ? handleQueryMode(searchValue, isChecked) : debouncedGetData(signal, searchValue, isChecked);
534
- }, [debouncedGetData, handleQueryMode, isQueryMode]);
529
+ if (isQueryMode) {
530
+ handleQueryMode(searchValue, isChecked);
531
+ } else if (!getData && dataItems && !searchValue) {
532
+ handleData(dataItems, "");
533
+ } else {
534
+ dispatchState({
535
+ type: StateActionType.ShowWaiting,
536
+ payload: undefined
537
+ });
538
+ debouncedGetData(signal, searchValue, isChecked);
539
+ }
540
+ }, [debouncedGetData, handleData, handleQueryMode, isQueryMode, getData, dataItems]);
535
541
  useEffect(() => {
536
542
  var _a;
537
543
  const timeoutId = (_a = zen.setTimeout) === null || _a === void 0 ? void 0 : _a.call(zen, () => {
@@ -856,7 +862,6 @@ export const DropdownRaw = props => {
856
862
  filterName: isMobile ? undefined : filterName,
857
863
  isAllSelected: currentAllSelected ? currentAllSelected : isSearchMode ? isEveryItemSelected(getListDataWithDisabled(state.listData, state.isNestedList), state.selectedIds) : currentAllSelected === undefined ? isAllChildrenSelected(state, state.currentId || state.rootId) : false,
858
864
  isSelectAllActive: isFullSelectionMode ? currentAllSelected : selectAllActiveForCurrentLevel,
859
- shouldBlockItems: !state.inputValue && !isFullSelectionMode && selectAllActiveForCurrentLevel,
860
865
  isMultiselect: multiselect,
861
866
  forceSelection: forceSelection,
862
867
  listData: currentListData,
@@ -4,8 +4,10 @@ import { ButtonIconPosition, TextIconButton } from "../../textIconButton/textIco
4
4
  import { classNames } from "../../commonHelpers/classNames/classNames";
5
5
  import { useEffect, useRef, useState, Children, cloneElement, useCallback } from "react";
6
6
  import { IconChevronRight } from "../../icons/iconChevronRight";
7
+ import { IconChevronLeft } from "../../icons/iconChevronLeft";
7
8
  import { useLanguage } from "../../utils/localization/useLanguage";
8
9
  import { useDriveClassName } from "../../utils/theme/useDriveClassName";
10
+ import { useIsRTL } from "../../utils/localization/useIsRTL";
9
11
  import { zen } from "../../utils/zen";
10
12
  injectString("cs", "Scroll left", "P\u0159ej\xEDt doleva");
11
13
  injectString("da-DK", "Scroll left", "Rul til venstre");
@@ -76,6 +78,10 @@ const getScrollButtonType = element => {
76
78
  }
77
79
  return "start";
78
80
  };
81
+ const getScrollIcons = isRTL => ({
82
+ start: isRTL ? IconChevronRight : IconChevronLeft,
83
+ end: isRTL ? IconChevronLeft : IconChevronRight
84
+ });
79
85
  export const FiltersContainer = ({
80
86
  className,
81
87
  children
@@ -85,6 +91,11 @@ export const FiltersContainer = ({
85
91
  const {
86
92
  translate
87
93
  } = useLanguage();
94
+ const isRTL = useIsRTL();
95
+ const {
96
+ start: startScrollIcon,
97
+ end: endScrollIcon
98
+ } = getScrollIcons(isRTL);
88
99
  const gradientClass = "zen-filters-toolbar__gradient";
89
100
  const scrollerClass = "zen-filters-toolbar__scroller";
90
101
  const driveClassNameScroller = useDriveClassName(scrollerClass);
@@ -197,10 +208,9 @@ export const FiltersContainer = ({
197
208
  }), _jsx(TextIconButton, {
198
209
  title: translate("Scroll left"),
199
210
  className: classNames(["zen-filters-toolbar__scroller", driveClassNameScroller || "", "zen-filters-toolbar__start", showLeft ? `${scrollerClass}--visible` : "", isHiddenDisplay.left ? `${scrollerClass}--hidden` : ""]),
200
- icon: IconChevronRight,
211
+ icon: startScrollIcon,
201
212
  iconPosition: ButtonIconPosition.Start,
202
- onClick: handleScrollButtonClick(-scrollableStep),
203
- iconClasses: "zen-filters-toolbar__start-icon"
213
+ onClick: handleScrollButtonClick(-scrollableStep)
204
214
  }), _jsx("div", {
205
215
  ref: scrollableRef,
206
216
  className: classNames(["zen-filters-toolbar__scrollable", !isHiddenDisplay.left ? "has-left-scroller" : "", !isHiddenDisplay.right ? "has-right-scroller" : ""]),
@@ -213,7 +223,7 @@ export const FiltersContainer = ({
213
223
  }), _jsx(TextIconButton, {
214
224
  title: translate("Scroll right"),
215
225
  className: classNames([scrollerClass, driveClassNameScroller || "", "zen-filters-toolbar__end", showRight ? `${scrollerClass}--visible` : "", isHiddenDisplay.right ? `${scrollerClass}--hidden` : ""]),
216
- icon: IconChevronRight,
226
+ icon: endScrollIcon,
217
227
  onClick: handleScrollButtonClick(scrollableStep),
218
228
  iconPosition: ButtonIconPosition.End
219
229
  })]
@@ -63,6 +63,7 @@ export const RadioGroupRaw = (props) => {
63
63
  "zen-radio-group__item",
64
64
  wrappedInLabel ? "zen-radio-group__item--no-paddings" : "",
65
65
  type === "interactive" ? "zen-radio--interactive" : "",
66
- size === "small" ? "zen-radio-group__item--small" : ""
66
+ size === "small" ? "zen-radio-group__item--small" : "",
67
+ direction === "horizontal" ? "zen-radio--align-start" : ""
67
68
  ]), key: ind, checked: item.value === value, disabled: disabled ? disabled : item.disabled, name: name, reverse: reverse, fullWidth: fullWidth, value: item.value, onChange: onChangeInner, wrappedInLabel: wrappedInLabel, tabIndex: selectItemOnFocus || disabled || item.disabled ? undefined : ind === focusedIndex ? 0 : -1, ref: selectItemOnFocus ? undefined : ind === focusedIndex ? focusElementRef : undefined, role: itemRole }), item.children) }, `${ind}-li`))) })) }));
68
69
  };
@@ -5,7 +5,7 @@ export declare const getItemIdByIndex: (state: Map<string, CheckboxState>, index
5
5
  export declare const getItemIndexById: (state: Map<string, CheckboxState>, id: string) => number;
6
6
  export declare const updateItemState: (initialState: Map<string, CheckboxState>, multiselect: boolean, updatedId: string, newState: CheckboxState) => [Map<string, CheckboxState>, boolean];
7
7
  export declare const searchItemIndex: (items: ISelectListItem[], searchStr: string) => number;
8
- export declare const getFirstIndex: (items: ISelectListItem[]) => 0 | -1;
8
+ export declare const getFirstIndex: (items: ISelectListItem[]) => number;
9
9
  export declare const getLastIndex: (items: ISelectListItem[]) => number;
10
10
  export declare const getNextIndex: (currIndex: number, items: ISelectListItem[]) => number;
11
11
  export declare const getPrevIndex: (currIndex: number, items: ISelectListItem[]) => number;
@@ -35,27 +35,52 @@ export const searchItemIndex = (items, searchStr) => {
35
35
  return content.toLocaleLowerCase().indexOf(searchStr.toLocaleLowerCase()) > -1;
36
36
  });
37
37
  };
38
- export const getFirstIndex = (items) => (items.length > 0 ? 0 : -1);
39
- export const getLastIndex = (items) => (items.length > 0 ? items.length - 1 : -1);
38
+ export const getFirstIndex = (items) => items.findIndex(item => !item.disabled);
39
+ export const getLastIndex = (items) => {
40
+ for (let i = items.length - 1; i >= 0; i--) {
41
+ if (!items[i].disabled) {
42
+ return i;
43
+ }
44
+ }
45
+ return -1;
46
+ };
40
47
  export const getNextIndex = (currIndex, items) => {
48
+ var _a;
41
49
  if (items.length === 0) {
42
50
  return -1;
43
51
  }
44
- return currIndex + 1 >= items.length ? 0 : currIndex + 1;
52
+ let nextIndex = currIndex + 1 >= items.length ? 0 : currIndex + 1;
53
+ const startIndex = nextIndex;
54
+ while ((_a = items[nextIndex]) === null || _a === void 0 ? void 0 : _a.disabled) {
55
+ nextIndex = nextIndex + 1 >= items.length ? 0 : nextIndex + 1;
56
+ if (nextIndex === startIndex) {
57
+ return currIndex;
58
+ }
59
+ }
60
+ return nextIndex;
45
61
  };
46
62
  export const getPrevIndex = (currIndex, items) => {
63
+ var _a;
47
64
  if (items.length === 0) {
48
65
  return -1;
49
66
  }
50
- return currIndex <= 0 || currIndex >= items.length ? items.length - 1 : currIndex - 1;
67
+ let prevIndex = currIndex <= 0 || currIndex >= items.length ? items.length - 1 : currIndex - 1;
68
+ const startIndex = prevIndex;
69
+ while ((_a = items[prevIndex]) === null || _a === void 0 ? void 0 : _a.disabled) {
70
+ prevIndex = prevIndex <= 0 ? items.length - 1 : prevIndex - 1;
71
+ if (prevIndex === startIndex) {
72
+ return currIndex;
73
+ }
74
+ }
75
+ return prevIndex;
51
76
  };
52
77
  export const getFirstActiveIndex = (state, items, multiselect) => {
53
78
  for (let i = 0; i < items.length; i++) {
54
- if (state.get(items[i].id) === CheckboxState.On) {
79
+ if (!items[i].disabled && state.get(items[i].id) === CheckboxState.On) {
55
80
  return i;
56
81
  }
57
82
  }
58
- return multiselect && items.length > 0 ? 0 : -1;
83
+ return multiselect ? items.findIndex(item => !item.disabled) : -1;
59
84
  };
60
85
  export const getItemsState = (items, value, multiselect) => {
61
86
  let forceUncheck = false;
@@ -48,7 +48,9 @@ export const SelectList = (_a) => {
48
48
  if (!multiselect && selectItemOnFocus) {
49
49
  dispatchState({ type: ListAction.FocusFirst, payload: { items } });
50
50
  }
51
- dispatchState({ type: ListAction.Focus, payload: { items, multiselect } });
51
+ if (!multiselect) {
52
+ dispatchState({ type: ListAction.Focus, payload: { items, multiselect } });
53
+ }
52
54
  }, [multiselect, items, selectItemOnFocus]);
53
55
  useEffect(() => {
54
56
  onChange && state.isItemsStateChanged && onChange(new Map(state.itemsState));
@@ -117,8 +117,7 @@ export const selectListReducer = (state, action) => {
117
117
  newItemsState = updatedState;
118
118
  });
119
119
  const prevActiveItemId = getItemIdByIndex(state.itemsState, state.activeIndex);
120
- const newActiveItemIndex = !!prevActiveItemId && getItemIndexById(newItemsState, prevActiveItemId);
121
- const activeIndex = newActiveItemIndex ? newActiveItemIndex : -1;
120
+ const activeIndex = prevActiveItemId !== undefined ? getItemIndexById(newItemsState, prevActiveItemId) : -1;
122
121
  return Object.assign(Object.assign({}, state), { itemsState: newItemsState, activeIndex, isItemsStateChanged: false });
123
122
  }
124
123
  case ListAction.SetLevel: {
@@ -65,6 +65,60 @@ injectString("zh-Hans", "Change sort direction", "\u66F4\u6539\u6392\u5E8F");
65
65
  injectString("zh-TW", "Change sort direction", "\u8B8A\u66F4\u6392\u5E8F\u65B9\u5411");
66
66
  injectString("ro-RO", "Change sort direction", "Schimba\u021Bi direc\u021Bia sort\u0103rii");
67
67
  injectString("ar-SA", "Change sort direction", "\u062A\u063A\u064A\u064A\u0631 \u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u062A\u0631\u062A\u064A\u0628");
68
+ injectString("cs", "Ascending", "Vzestupn\u011B");
69
+ injectString("da-DK", "Ascending", "Stigende");
70
+ injectString("de", "Ascending", "Aufsteigend");
71
+ injectString("en", "Ascending", "Ascending");
72
+ injectString("es", "Ascending", "Ascendente");
73
+ injectString("fi-FI", "Ascending", "Nouseva");
74
+ injectString("fr", "Ascending", "Croissant");
75
+ injectString("fr-FR", "Ascending", "Croissant");
76
+ injectString("hu-HU", "Ascending", "N\xF6vekv\u0151");
77
+ injectString("id", "Ascending", "Naik");
78
+ injectString("it", "Ascending", "Crescente");
79
+ injectString("ja", "Ascending", "\u6607\u9806");
80
+ injectString("ko-KR", "Ascending", "\uC624\uB984\uCC28\uC21C");
81
+ injectString("ms", "Ascending", "Menaik");
82
+ injectString("nb-NO", "Ascending", "Stigende");
83
+ injectString("nl", "Ascending", "Oplopend");
84
+ injectString("pl", "Ascending", "Rosn\u0105co");
85
+ injectString("pt-BR", "Ascending", "Crescente");
86
+ injectString("pt-PT", "Ascending", "Ascendente");
87
+ injectString("sk-SK", "Ascending", "Vzostupne");
88
+ injectString("sv", "Ascending", "Stigande");
89
+ injectString("th", "Ascending", "\u0E08\u0E32\u0E01\u0E19\u0E49\u0E2D\u0E22\u0E44\u0E1B\u0E21\u0E32\u0E01");
90
+ injectString("tr", "Ascending", "Artan");
91
+ injectString("zh-Hans", "Ascending", "\u5347\u5E8F");
92
+ injectString("zh-TW", "Ascending", "\u905E\u589E");
93
+ injectString("ro-RO", "Ascending", "Ascensiune");
94
+ injectString("ar-SA", "Ascending", "\u062A\u0635\u0627\u0639\u062F\u064A");
95
+ injectString("cs", "Descending", "Sestupn\u011B");
96
+ injectString("da-DK", "Descending", "Faldende");
97
+ injectString("de", "Descending", "Absteigend");
98
+ injectString("en", "Descending", "Descending");
99
+ injectString("es", "Descending", "Descendente");
100
+ injectString("fi-FI", "Descending", "Laskeva");
101
+ injectString("fr", "Descending", "D\xE9croissant");
102
+ injectString("fr-FR", "Descending", "Descendant");
103
+ injectString("hu-HU", "Descending", "Cs\xF6kken\u0151");
104
+ injectString("id", "Descending", "Menurun");
105
+ injectString("it", "Descending", "Decrescente");
106
+ injectString("ja", "Descending", "\u964D\u9806");
107
+ injectString("ko-KR", "Descending", "\uB0B4\uB9BC\uCC28\uC21C");
108
+ injectString("ms", "Descending", "Menurun");
109
+ injectString("nb-NO", "Descending", "Synkende");
110
+ injectString("nl", "Descending", "Aflopend");
111
+ injectString("pl", "Descending", "Malej\u0105co");
112
+ injectString("pt-BR", "Descending", "Decrescente");
113
+ injectString("pt-PT", "Descending", "Descendente");
114
+ injectString("sk-SK", "Descending", "Zostupne");
115
+ injectString("sv", "Descending", "Fallande");
116
+ injectString("th", "Descending", "\u0E08\u0E32\u0E01\u0E21\u0E32\u0E01\u0E44\u0E1B\u0E19\u0E49\u0E2D\u0E22");
117
+ injectString("tr", "Descending", "Azalan");
118
+ injectString("zh-Hans", "Descending", "\u964D\u5E8F");
119
+ injectString("zh-TW", "Descending", "\u905E\u6E1B");
120
+ injectString("ro-RO", "Descending", "Cobor\xE2re");
121
+ injectString("ar-SA", "Descending", "\u062A\u0646\u0627\u0632\u0644\u064A");
68
122
  injectString("cs", "Sort Options", "Sort Options");
69
123
  injectString("da-DK", "Sort Options", "Sorteringsmuligheder");
70
124
  injectString("de", "Sort Options", "Sort Options");
@@ -149,7 +203,6 @@ export const SortControl = ({
149
203
  onClick: () => onSortDirectionToggle(),
150
204
  disabled: disabled,
151
205
  title: translate("Change sort direction"),
152
- "aria-label": translate("Change sort direction"),
153
206
  children: [directionIcon ? sortDirection === SortDirections.Ascending ? _jsx(IconFilter3Asc, {
154
207
  className: "zen-sort-container__sort-icon",
155
208
  size: isDrive ? "huge" : "large"
@@ -162,6 +215,9 @@ export const SortControl = ({
162
215
  children: [buttonTextValue, ": "]
163
216
  }), _jsx("span", {
164
217
  children: (items.find(item => item.id === sortBy) || items[0]).children
218
+ }), _jsxs("span", {
219
+ className: "zen-visually-hidden",
220
+ children: [" ", sortDirection === SortDirections.Ascending ? translate("Ascending") : translate("Descending")]
165
221
  })]
166
222
  })]
167
223
  }), isSingleItem ? "" : _jsx(Popup, {
@@ -188,4 +244,4 @@ export const SortControl = ({
188
244
  }, popupKey)]
189
245
  });
190
246
  };
191
- export const TRANSLATIONS = ["Sort by", "Sort Options", "Change sort direction"];
247
+ export const TRANSLATIONS = ["Sort by", "Sort Options", "Change sort direction", "Ascending", "Descending"];
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode, RefObject } from "react";
2
- export declare const useTableChildren: (children: ReactNode, isMobile: boolean, selected: number, allSelected: boolean, clearSelection: () => void, selectAll: () => void, turnOffSelectAll?: boolean, activeId?: string, gridRef?: RefObject<HTMLElement | null>, onCloseDetailPanel?: () => void) => {
2
+ export declare const useTableChildren: (children: ReactNode, isMobile: boolean, selected: number, allSelected: boolean, clearSelection: () => void, activeId?: string, gridRef?: RefObject<HTMLElement | null>, onCloseDetailPanel?: () => void) => {
3
3
  bulkActions: ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
4
4
  pagination: ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
5
5
  activePage: number | undefined;
@@ -24,7 +24,7 @@ const isChildElement = function (child, expectedType) {
24
24
  }
25
25
  return false;
26
26
  };
27
- export const useTableChildren = (children, isMobile, selected, allSelected, clearSelection, selectAll, turnOffSelectAll, activeId, gridRef, onCloseDetailPanel) => useMemo(() => {
27
+ export const useTableChildren = (children, isMobile, selected, allSelected, clearSelection, activeId, gridRef, onCloseDetailPanel) => useMemo(() => {
28
28
  let bulkActions = undefined;
29
29
  let tablePagination = undefined;
30
30
  let activePage = undefined;
@@ -39,7 +39,7 @@ export const useTableChildren = (children, isMobile, selected, allSelected, clea
39
39
  }
40
40
  if (isChildElement(child, TableBulkActions.displayName)) {
41
41
  const bulkActionButtons = child.props.children || [];
42
- bulkActions = (_jsx(BulkActions, { gridType: isMobile ? DeviceType.Mobile : DeviceType.Desktop, selected: selected, allSelected: allSelected, onClearSelection: clearSelection, onSelectAll: selectAll, turnOffSelectAll: turnOffSelectAll, children: bulkActionButtons }));
42
+ bulkActions = (_jsx(BulkActions, { gridType: isMobile ? DeviceType.Mobile : DeviceType.Desktop, selected: selected, allSelected: allSelected, onClearSelection: clearSelection, children: bulkActionButtons }));
43
43
  return;
44
44
  }
45
45
  if (isChildElement(child, TablePagination.displayName)) {
@@ -100,4 +100,4 @@ export const useTableChildren = (children, isMobile, selected, allSelected, clea
100
100
  detailPanel: detailPanel,
101
101
  other: other
102
102
  };
103
- }, [children, clearSelection, isMobile, selected, gridRef, allSelected, selectAll, turnOffSelectAll, activeId, onCloseDetailPanel]);
103
+ }, [children, clearSelection, isMobile, selected, gridRef, allSelected, activeId, onCloseDetailPanel]);
@@ -57,6 +57,7 @@ const SubColumnsList = ({
57
57
  showCheckbox: true,
58
58
  children: c.title
59
59
  })), [columns, sortColumnsInt, lastVisibleColumnId]);
60
+ const allDisabled = useMemo(() => items.every(item => item.disabled), [items]);
60
61
  const state = columns.reduce((res, c) => {
61
62
  res.set(c.id, settings.get(c.id) !== false ? CheckboxState.On : CheckboxState.Off);
62
63
  return res;
@@ -76,8 +77,9 @@ const SubColumnsList = ({
76
77
  title: title || translate("Select visible columns"),
77
78
  multiselect: true,
78
79
  showCheckbox: true,
79
- onChange: onChangeItem
80
- }), [id, items, state, title, translate, onChangeItem]);
80
+ onChange: onChangeItem,
81
+ disabled: allDisabled
82
+ }), [id, items, state, title, translate, onChangeItem, allDisabled]);
81
83
  if (!title) {
82
84
  return list;
83
85
  }
@@ -16,6 +16,14 @@ export interface ISelectableRowsOptions<T extends IRowEntity<N>, N extends IEnti
16
16
  checkboxTitle?: (entity: T | N) => string;
17
17
  headerTitle?: (state: SelectionState) => string;
18
18
  turnOffSelectAll?: boolean;
19
+ /**
20
+ * When `true`, the header checkbox emits the current page's IDs instead of `{ all: true }`.
21
+ * When `undefined`, falls back to `turnOffSelectAll` for backward compatibility.
22
+ *
23
+ * Note: avoid setting this to `false` alongside `turnOffSelectAll: true` — the checkbox
24
+ * will emit `{ all: true }` while the dropdown hides the "Select all" option, which is inconsistent.
25
+ */
26
+ checkboxSelectsCurrentPage?: boolean;
19
27
  checkboxPlaceholder?: boolean;
20
28
  strategy?: TSelectionStrategy;
21
29
  selectAll?: boolean;
@@ -179,8 +179,16 @@ export const useSelectableRows = (columns, entities, isMobile, selectMode, setSe
179
179
  return translate("Deselect all");
180
180
  }, [selectable, selectableState, state, translate]);
181
181
  const isEntityChecked = useCallback((entity, isNested) => isRowChecked(selections, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy, entity, isNested), [selections, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
182
+ const hasSelectable = !!selectable;
183
+ const selectableCheckboxSelectsCurrentPage = selectable === null || selectable === void 0 ? void 0 : selectable.checkboxSelectsCurrentPage;
184
+ const selectableTurnOffSelectAll = selectable === null || selectable === void 0 ? void 0 : selectable.turnOffSelectAll;
185
+ const selectableCheckboxInHeader = selectable === null || selectable === void 0 ? void 0 : selectable.checkboxInHeader;
186
+ const selectableSelectionLimit = selectable === null || selectable === void 0 ? void 0 : selectable.selectionLimit;
187
+ const selectableHeader = selectable === null || selectable === void 0 ? void 0 : selectable.header;
188
+ const checkboxEmitsCurrentPage = selectableCheckboxSelectsCurrentPage !== null && selectableCheckboxSelectsCurrentPage !== void 0 ? selectableCheckboxSelectsCurrentPage : selectableTurnOffSelectAll;
189
+ const checkboxInHeaderValue = selectableCheckboxInHeader !== undefined ? selectableCheckboxInHeader : selectableSelectionLimit !== undefined ? false : undefined;
182
190
  const wrapper = useMemo(() => {
183
- if (!selectable) {
191
+ if (!hasSelectable) {
184
192
  return null;
185
193
  }
186
194
  return {
@@ -224,7 +232,7 @@ export const useSelectableRows = (columns, entities, isMobile, selectMode, setSe
224
232
  onChange: newValue => {
225
233
  var _a, _b;
226
234
  if (newValue) {
227
- const newState = selectable.turnOffSelectAll ? SelectionState.CurrentPage : SelectionState.All;
235
+ const newState = checkboxEmitsCurrentPage ? SelectionState.CurrentPage : SelectionState.All;
228
236
  setState(newState);
229
237
  onChangeSelectionState(newState);
230
238
  } else {
@@ -242,18 +250,18 @@ export const useSelectableRows = (columns, entities, isMobile, selectMode, setSe
242
250
  }
243
251
  },
244
252
  calculateSelectionState: () => selectableState,
245
- checkboxInHeader: selectable.checkboxInHeader !== undefined ? selectable.checkboxInHeader : selectable.selectionLimit !== undefined ? false : undefined,
246
- header: selectable.header,
253
+ checkboxInHeader: checkboxInHeaderValue,
254
+ header: selectableHeader,
247
255
  onSelect: newState => {
248
256
  setState(newState);
249
257
  onChangeSelectionState(newState);
250
258
  },
251
- turnOffSelectAll: selectable.turnOffSelectAll
259
+ turnOffSelectAll: selectableTurnOffSelectAll
252
260
  });
253
261
  return cell;
254
262
  }
255
263
  };
256
- }, [checkboxDisabled, checkboxTitle, checkboxVisible, headerTitle, onChangeSelectionState, onSelectListener, selectable, selectableState, state, isMobile, checkboxPlaceholder, isEntityChecked, entities, setSelectMode]);
264
+ }, [checkboxDisabled, checkboxTitle, checkboxVisible, headerTitle, onChangeSelectionState, onSelectListener, hasSelectable, checkboxEmitsCurrentPage, checkboxInHeaderValue, selectableHeader, selectableTurnOffSelectAll, selectable, selectableState, state, isMobile, checkboxPlaceholder, isEntityChecked, entities, setSelectMode]);
257
265
  const selectableFeedWrapper = useCallback((primaryData, secondaryData, entity, isNested) => {
258
266
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
259
267
  if (!entity) {