impact-ui 4.0.17 → 5.0.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 (194) hide show
  1. package/README.md +8 -9
  2. package/dist/_virtual/_commonjsHelpers.js +0 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index15.js +2 -2
  6. package/dist/_virtual/index2.js +2 -2
  7. package/dist/_virtual/index3.js +2 -4
  8. package/dist/_virtual/index4.js +3 -3
  9. package/dist/_virtual/index5.js +4 -2
  10. package/dist/components/Checkbox/WithDropDown.d.ts.map +1 -1
  11. package/dist/components/Checkbox/WithDropDown.js +46 -30
  12. package/dist/components/Checkbox/index.js +1 -1
  13. package/dist/components/Input/HelperText.d.ts.map +1 -1
  14. package/dist/components/Input/HelperText.js +22 -2
  15. package/dist/components/Input/index.js +3 -3
  16. package/dist/components/KeyboardShortCuts/ShortcutLandingPage.js +1 -1
  17. package/dist/components/KeyboardShortCuts/ShortcutModal.js +1 -1
  18. package/dist/components/KeyboardShortCuts/allSetBox.js +1 -1
  19. package/dist/components/KeyboardShortCuts/index.d.ts.map +1 -1
  20. package/dist/components/KeyboardShortCuts/index.js +38 -112
  21. package/dist/components/KeyboardShortCuts/tutorial.js +1 -1
  22. package/dist/components/OnboardingTour/index.d.ts +61 -0
  23. package/dist/components/OnboardingTour/index.d.ts.map +1 -0
  24. package/dist/components/OnboardingTour/index.js +232 -0
  25. package/dist/components/OnboardingTour/productTourList.d.ts +39 -0
  26. package/dist/components/OnboardingTour/productTourList.d.ts.map +1 -0
  27. package/dist/components/OnboardingTour/productTourList.js +86 -0
  28. package/dist/components/OnboardingTour/tooltipCard.d.ts +45 -0
  29. package/dist/components/OnboardingTour/tooltipCard.d.ts.map +1 -0
  30. package/dist/components/OnboardingTour/tooltipCard.js +96 -0
  31. package/dist/components/OnboardingTour/useTooltipCardPosition.d.ts +29 -0
  32. package/dist/components/OnboardingTour/useTooltipCardPosition.d.ts.map +1 -0
  33. package/dist/components/OnboardingTour/useTooltipCardPosition.js +221 -0
  34. package/dist/components/Select/index.d.ts.map +1 -1
  35. package/dist/components/Select/index.js +14 -5
  36. package/dist/components/Sidebar/index.js +1 -1
  37. package/dist/components/Stepper/index.js +1 -1
  38. package/dist/components/TableV36/AdvanceSearchModalItem.d.ts.map +1 -0
  39. package/dist/components/TableV36/AdvanceSortModal.d.ts.map +1 -0
  40. package/dist/components/{Table → TableV36}/AdvanceSortModal.js +35 -37
  41. package/dist/components/{Table → TableV36}/AgGridHeader.d.ts +4 -1
  42. package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -0
  43. package/dist/components/{Table → TableV36}/AgGridHeader.js +93 -105
  44. package/dist/components/TableV36/AgGridHeaderGroup.d.ts +3 -0
  45. package/dist/components/TableV36/AgGridHeaderGroup.d.ts.map +1 -0
  46. package/dist/components/TableV36/AgGridHeaderGroup.js +29 -0
  47. package/dist/components/TableV36/CellTooltip.d.ts +14 -0
  48. package/dist/components/TableV36/CellTooltip.d.ts.map +1 -0
  49. package/dist/components/TableV36/CellTooltip.js +11 -0
  50. package/dist/components/{Table → TableV36}/CommentsPortal.d.ts +5 -3
  51. package/dist/components/TableV36/CommentsPortal.d.ts.map +1 -0
  52. package/dist/components/{Table → TableV36}/CommentsPortal.js +6 -10
  53. package/dist/components/TableV36/HighlightedText.d.ts +11 -0
  54. package/dist/components/TableV36/HighlightedText.d.ts.map +1 -0
  55. package/dist/components/TableV36/HighlightedText.js +20 -0
  56. package/dist/components/TableV36/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts.map +1 -0
  57. package/dist/components/{Table → TableV36}/NewAdvanceSearchModal/NewAdvanceSearchModal.js +23 -26
  58. package/dist/components/{Table → TableV36}/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts +2 -3
  59. package/dist/components/TableV36/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts.map +1 -0
  60. package/dist/components/{Table → TableV36}/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +19 -43
  61. package/dist/components/TableV36/NoComments.d.ts.map +1 -0
  62. package/dist/components/{Table → TableV36}/NoComments.js +3 -5
  63. package/dist/components/TableV36/Table.types.d.ts +127 -0
  64. package/dist/components/TableV36/Table.types.d.ts.map +1 -0
  65. package/dist/components/TableV36/TableSkeletonCell.d.ts +18 -0
  66. package/dist/components/TableV36/TableSkeletonCell.d.ts.map +1 -0
  67. package/dist/components/TableV36/TableSkeletonCell.js +38 -0
  68. package/dist/components/{TableOld → TableV36}/actionBar.d.ts.map +1 -1
  69. package/dist/components/{Table → TableV36}/actionBar.js +1 -5
  70. package/dist/components/TableV36/advanceSearchModal.d.ts.map +1 -0
  71. package/dist/components/{Table → TableV36}/filterUtils.d.ts +2 -56
  72. package/dist/components/TableV36/filterUtils.d.ts.map +1 -0
  73. package/dist/components/{Table → TableV36}/filterUtils.js +17 -100
  74. package/dist/components/TableV36/index.d.ts +3 -0
  75. package/dist/components/TableV36/index.d.ts.map +1 -0
  76. package/dist/components/TableV36/index.js +1767 -0
  77. package/dist/components/TableV36/mockData.d.ts.map +1 -0
  78. package/dist/components/TableV36/resolveTableLoadingOptions.d.ts +62 -0
  79. package/dist/components/TableV36/resolveTableLoadingOptions.d.ts.map +1 -0
  80. package/dist/components/TableV36/resolveTableLoadingOptions.js +52 -0
  81. package/dist/components/TableV36/resolveTableLoadingOptions.test.d.ts +2 -0
  82. package/dist/components/TableV36/resolveTableLoadingOptions.test.d.ts.map +1 -0
  83. package/dist/components/{TableOld → TableV36}/tableFunctions.d.ts +14 -10
  84. package/dist/components/TableV36/tableFunctions.d.ts.map +1 -0
  85. package/dist/components/{shared/tableColumnSettings/columnsTabV36.js → TableV36/tableFunctions.js} +663 -292
  86. package/dist/components/{Table → TableV36}/tableHeader.d.ts +2 -2
  87. package/dist/components/TableV36/tableHeader.d.ts.map +1 -0
  88. package/dist/components/{Table → TableV36}/tableHeader.js +17 -26
  89. package/dist/components/{TableOld → TableV36}/tableIcons.d.ts.map +1 -1
  90. package/dist/components/{Table → TableV36}/tableMoreOptions.d.ts +2 -2
  91. package/dist/components/TableV36/tableMoreOptions.d.ts.map +1 -0
  92. package/dist/components/{Table → TableV36}/tableMoreOptions.js +39 -84
  93. package/dist/components/TableV36/tablePagination.d.ts.map +1 -0
  94. package/dist/components/{Table → TableV36}/tablePagination.js +6 -16
  95. package/dist/components/{Table → TableV36}/tableSettings.d.ts +3 -2
  96. package/dist/components/TableV36/tableSettings.d.ts.map +1 -0
  97. package/dist/components/{shared/tableColumnSettings/tableSettingsV36.js → TableV36/tableSettings.js} +34 -40
  98. package/dist/components/TableV36/tableUtils.d.ts +17 -0
  99. package/dist/components/TableV36/tableUtils.d.ts.map +1 -0
  100. package/dist/components/TableV36/tableUtils.js +60 -0
  101. package/dist/components/TableV36/withCommentIcon.d.ts +13 -0
  102. package/dist/components/TableV36/withCommentIcon.d.ts.map +1 -0
  103. package/dist/components/TableV36/withCommentIcon.js +134 -0
  104. package/dist/components/TextArea/index.js +1 -1
  105. package/dist/components/index.d.ts +3 -2
  106. package/dist/components/index.d.ts.map +1 -1
  107. package/dist/components/index.js +4 -4
  108. package/dist/components/shared/tableColumnSettings/agGridColumnSettingsApi.d.ts +2 -4
  109. package/dist/components/shared/tableColumnSettings/agGridColumnSettingsApi.d.ts.map +1 -1
  110. package/dist/mcp-component-registry.json +268 -337
  111. package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +3 -9
  112. package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
  113. package/dist/node_modules/call-bind/index.js +1 -1
  114. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
  115. package/dist/node_modules/prop-types/index.js +1 -1
  116. package/dist/node_modules/react-is/index.js +1 -1
  117. package/dist/node_modules/react-with-styles-interface-css/dist/index.js +1 -1
  118. package/dist/stories/tableStoryDefaults.d.ts +1 -1
  119. package/dist/stories/tableStoryDefaults.d.ts.map +1 -1
  120. package/dist/stories/tableStoryManyColumns.d.ts +1 -1
  121. package/dist/stories/tableV36ChatApiMock.d.ts +420 -0
  122. package/dist/stories/tableV36ChatApiMock.d.ts.map +1 -0
  123. package/dist/utils/helper.js +0 -60
  124. package/package.json +8 -8
  125. package/dist/_virtual/lodash.js +0 -4
  126. package/dist/components/Table/AdvanceSearchModalItem.d.ts.map +0 -1
  127. package/dist/components/Table/AdvanceSearchModalItem.js +0 -313
  128. package/dist/components/Table/AdvanceSortModal.d.ts.map +0 -1
  129. package/dist/components/Table/AgGridHeader.d.ts.map +0 -1
  130. package/dist/components/Table/CommentsPortal.d.ts.map +0 -1
  131. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts.map +0 -1
  132. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts.map +0 -1
  133. package/dist/components/Table/NoComments.d.ts.map +0 -1
  134. package/dist/components/Table/Table.types.d.ts +0 -40
  135. package/dist/components/Table/Table.types.d.ts.map +0 -1
  136. package/dist/components/Table/actionBar.d.ts.map +0 -1
  137. package/dist/components/Table/advanceSearchModal.d.ts.map +0 -1
  138. package/dist/components/Table/advanceSearchModal.js +0 -601
  139. package/dist/components/Table/agGridLocale.d.ts +0 -33
  140. package/dist/components/Table/agGridLocale.d.ts.map +0 -1
  141. package/dist/components/Table/agGridLocale.js +0 -59
  142. package/dist/components/Table/filterUtils.d.ts.map +0 -1
  143. package/dist/components/Table/filterUtils.test.d.ts +0 -2
  144. package/dist/components/Table/filterUtils.test.d.ts.map +0 -1
  145. package/dist/components/Table/index.d.ts +0 -4
  146. package/dist/components/Table/index.d.ts.map +0 -1
  147. package/dist/components/Table/index.js +0 -1441
  148. package/dist/components/Table/mockData.d.ts.map +0 -1
  149. package/dist/components/Table/tableFunctions.d.ts +0 -57
  150. package/dist/components/Table/tableFunctions.d.ts.map +0 -1
  151. package/dist/components/Table/tableFunctions.js +0 -1317
  152. package/dist/components/Table/tableHeader.d.ts.map +0 -1
  153. package/dist/components/Table/tableIcons.d.ts.map +0 -1
  154. package/dist/components/Table/tableMoreOptions.d.ts.map +0 -1
  155. package/dist/components/Table/tablePagination.d.ts.map +0 -1
  156. package/dist/components/Table/tableSettings.d.ts.map +0 -1
  157. package/dist/components/Table/tableSettings.js +0 -282
  158. package/dist/components/Table/withCommentIcon.d.ts +0 -2
  159. package/dist/components/Table/withCommentIcon.d.ts.map +0 -1
  160. package/dist/components/Table/withCommentIcon.js +0 -88
  161. package/dist/components/TableOld/AgGridHeader.d.ts +0 -12
  162. package/dist/components/TableOld/AgGridHeader.d.ts.map +0 -1
  163. package/dist/components/TableOld/AgGridHeader.js +0 -496
  164. package/dist/components/TableOld/actionBar.d.ts +0 -7
  165. package/dist/components/TableOld/actionBar.js +0 -35
  166. package/dist/components/TableOld/index.d.ts +0 -3
  167. package/dist/components/TableOld/index.d.ts.map +0 -1
  168. package/dist/components/TableOld/index.js +0 -645
  169. package/dist/components/TableOld/mockData.d.ts +0 -39
  170. package/dist/components/TableOld/mockData.d.ts.map +0 -1
  171. package/dist/components/TableOld/tableFunctions.d.ts.map +0 -1
  172. package/dist/components/TableOld/tableFunctions.js +0 -1321
  173. package/dist/components/TableOld/tableHeader.d.ts +0 -53
  174. package/dist/components/TableOld/tableHeader.d.ts.map +0 -1
  175. package/dist/components/TableOld/tableHeader.js +0 -229
  176. package/dist/components/TableOld/tableIcons.d.ts +0 -3
  177. package/dist/components/TableOld/tablePagination.d.ts +0 -8
  178. package/dist/components/TableOld/tablePagination.d.ts.map +0 -1
  179. package/dist/components/TableOld/tablePagination.js +0 -80
  180. package/dist/components/TableOld/tableSettings.d.ts +0 -11
  181. package/dist/components/TableOld/tableSettings.d.ts.map +0 -1
  182. package/dist/components/shared/tableColumnSettings/agGridColumnSettingsApi.js +0 -52
  183. package/dist/components/shared/tableColumnSettings/columnsSettingsColumnRow.js +0 -264
  184. package/dist/components/shared/tableColumnSettings/columnsSettingsVirtualList.js +0 -298
  185. package/dist/node_modules/lodash/lodash.js +0 -5506
  186. /package/dist/components/{Table → TableV36}/AdvanceSearchModalItem.d.ts +0 -0
  187. /package/dist/components/{Table → TableV36}/AdvanceSortModal.d.ts +0 -0
  188. /package/dist/components/{Table → TableV36}/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts +0 -0
  189. /package/dist/components/{Table → TableV36}/NoComments.d.ts +0 -0
  190. /package/dist/components/{Table → TableV36}/actionBar.d.ts +0 -0
  191. /package/dist/components/{Table → TableV36}/advanceSearchModal.d.ts +0 -0
  192. /package/dist/components/{Table → TableV36}/mockData.d.ts +0 -0
  193. /package/dist/components/{Table → TableV36}/tableIcons.d.ts +0 -0
  194. /package/dist/components/{Table → TableV36}/tablePagination.d.ts +0 -0
@@ -1,34 +1,35 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef, useState, useRef, useMemo, useEffect, useLayoutEffect, useCallback } from "react";
2
+ import { forwardRef, useState, useRef, useMemo, useEffect, useCallback, memo } from "react";
3
3
  import { useSensors, useSensor, MouseSensor, TouchSensor, DndContext, closestCenter, DragOverlay } from "@dnd-kit/core";
4
- import { arrayMove, SortableContext } from "@dnd-kit/sortable";
5
- import { PersonUser as PersonUser_default, Globe as Globe_default } from "../../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
6
- import default_1$1 from "../../../node_modules/@mui/icons-material/KeyboardArrowDown.js";
7
- import default_1$3 from "../../../node_modules/@mui/icons-material/KeyboardArrowRight.js";
8
- import default_1 from "../../../node_modules/@mui/icons-material/KeyboardArrowUp.js";
9
- import default_1$2 from "../../../node_modules/@mui/icons-material/Search.js";
10
- import { getAssetUrl } from "../../../utils/assetBase.js";
11
- import { applyVisibilityMapToGrid, resolveColumnStateApi } from "./agGridColumnSettingsApi.js";
12
- import { SortableColumnItem, NestedColumnItem, capitalizeHeader } from "./columnsSettingsColumnRow.js";
13
- import { flattenColumnRows, SETTINGS_VIRTUALIZE_THRESHOLD, computeSettingsListHeights, buildCheckStateMap, scrollListTowardPointer, VirtualColumnList, FrozenListOuter, ScrollableListOuter } from "./columnsSettingsVirtualList.js";
14
- import { debounce } from "../../../utils/debounce.js";
15
- import { isViewNameUnique } from "../../../utils/helper.js";
16
- import { Badge } from "../../Badge/index.js";
17
- import { Button } from "../../Button/index.js";
18
- import { Checkbox } from "../../Checkbox/index.js";
19
- import { Input } from "../../Input/index.js";
20
- import { Modal } from "../../Modal/index.js";
21
- import { Prompt } from "../../Prompt/index.js";
22
- import { RadioButtonGroup } from "../../RadioButtonGroup/index.js";
23
- import { Select } from "../../Select/index.js";
24
- import { useTranslation } from "../../../i18n/useTranslation.js";
25
- import IconButton from "../../../node_modules/@mui/material/IconButton/IconButton.js";
26
- import DragIndicator from "../../../node_modules/@mui/icons-material/esm/DragIndicator.js";
4
+ import { arrayMove, SortableContext, useSortable } from "@dnd-kit/sortable";
5
+ import { CSS } from "@dnd-kit/utilities";
6
+ import { PersonUser as PersonUser_default, Globe as Globe_default } from "../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
7
+ import default_1$1 from "../../node_modules/@mui/icons-material/KeyboardArrowDown.js";
8
+ import default_1$3 from "../../node_modules/@mui/icons-material/KeyboardArrowRight.js";
9
+ import default_1 from "../../node_modules/@mui/icons-material/KeyboardArrowUp.js";
10
+ import default_1$2 from "../../node_modules/@mui/icons-material/Search.js";
11
+ import { getAssetUrl } from "../../utils/assetBase.js";
12
+ import { debounce } from "../../utils/debounce.js";
13
+ import { isViewNameUnique } from "../../utils/helper.js";
14
+ import { Badge } from "../Badge/index.js";
15
+ import { Button } from "../Button/index.js";
16
+ import { Checkbox } from "../Checkbox/index.js";
17
+ import { Input } from "../Input/index.js";
18
+ import { Modal } from "../Modal/index.js";
19
+ import { Prompt } from "../Prompt/index.js";
20
+ import { RadioButtonGroup } from "../RadioButtonGroup/index.js";
21
+ import { Select } from "../Select/index.js";
22
+ import HighlightedText from "./HighlightedText.js";
23
+ import { collectVisibleLeafIds, syncColumnSearchTextToGrid, ensureColumnGroupsExpanded } from "./tableUtils.js";
24
+ import IconButton from "../../node_modules/@mui/material/IconButton/IconButton.js";
25
+ import DragIndicator from "../../node_modules/@mui/icons-material/esm/DragIndicator.js";
27
26
  const saveViewIcon = getAssetUrl("icons/saveViewIcon.svg");
28
27
  const saveViewEditIcon = getAssetUrl("icons/saveViewEditIcon.svg");
29
28
  const saveViewDeleteIcon = getAssetUrl("icons/saveViewDeleteIcon.svg");
30
29
  const defaultViewIcon = getAssetUrl("icons/defaultViewIcon.svg");
31
30
  const defaultViewActiveIcon = getAssetUrl("icons/defaultViewIconActive.svg");
31
+ const clearIcon = getAssetUrl("icons/close-tags.svg");
32
+ const searchIcon = getAssetUrl("icons/search-table.svg");
32
33
  const DEFAULT_VIEW_TYPE_ICONS = {
33
34
  global: /* @__PURE__ */ jsx(Globe_default, { height: 16, width: 16 }),
34
35
  personal: /* @__PURE__ */ jsx(PersonUser_default, { height: 16, width: 16 })
@@ -38,12 +39,172 @@ const getViewTypeIcon = (viewType, viewTypeOptions) => {
38
39
  const customIcon = (_a = viewTypeOptions == null ? void 0 : viewTypeOptions.find((option) => option.value === viewType)) == null ? void 0 : _a.icon;
39
40
  return customIcon || DEFAULT_VIEW_TYPE_ICONS[viewType] || null;
40
41
  };
42
+ const onColMenuFreezeClick = (params) => {
43
+ const { pinned } = params.column;
44
+ if (pinned) {
45
+ freezeColumn(params, false);
46
+ } else {
47
+ freezeColumn(params, true);
48
+ }
49
+ };
50
+ const getTableMeta = (api) => {
51
+ if (!api) return null;
52
+ if (!api.__impactTableMeta) {
53
+ api.__impactTableMeta = {};
54
+ }
55
+ return api.__impactTableMeta;
56
+ };
57
+ const freezeColumn = (params, isPinned) => {
58
+ const { colId } = params.column;
59
+ params.api.applyColumnState({
60
+ state: [{ colId, pinned: isPinned ? "left" : null }]
61
+ });
62
+ };
63
+ const onColMenuAutoAdjustClick = (params) => {
64
+ const colDefExtra = { ...params.column.colDef.extra };
65
+ params.column.colDef.extra = colDefExtra;
66
+ params.api.autoSizeColumns([params.column]);
67
+ };
68
+ const sortFunc = (columnData, sortBy, api) => {
69
+ api.api.applyColumnState({
70
+ state: [{ colId: columnData.colId, sort: sortBy }],
71
+ defaultState: { sort: null }
72
+ });
73
+ };
74
+ const getMainMenuItems = (params) => {
75
+ var _a, _b, _c;
76
+ if (!(params == null ? void 0 : params.column)) {
77
+ return [];
78
+ }
79
+ const { onFontSizeChange, onNumberFormatChange } = params;
80
+ const { colDef, pinned, sort, actualWidth } = params.column;
81
+ const columnMenuItems = [];
82
+ columnMenuItems.push(
83
+ {
84
+ name: "Column Settings",
85
+ cssClasses: ["settings-main-container"]
86
+ },
87
+ "separator"
88
+ );
89
+ columnMenuItems.push({
90
+ name: "Sort",
91
+ subMenu: [
92
+ {
93
+ name: "Sort A to Z",
94
+ action: () => {
95
+ sortFunc(params.column, "asc", params);
96
+ },
97
+ checked: sort === "asc"
98
+ },
99
+ {
100
+ name: "Sort Z to A",
101
+ checked: sort === "desc",
102
+ action: () => {
103
+ sortFunc(params.column, "desc", params);
104
+ }
105
+ },
106
+ {
107
+ name: "Reset",
108
+ action: () => {
109
+ sortFunc(params.column, null, params);
110
+ }
111
+ }
112
+ ],
113
+ disabled: !(colDef == null ? void 0 : colDef.sortable)
114
+ });
115
+ columnMenuItems.push({
116
+ name: pinned ? "Unfreeze Column" : "Freeze Column",
117
+ action: () => {
118
+ onColMenuFreezeClick(params);
119
+ }
120
+ });
121
+ columnMenuItems.push({
122
+ name: "Column width",
123
+ subMenu: [
124
+ {
125
+ name: "Auto Adjust",
126
+ action: () => {
127
+ onColMenuAutoAdjustClick(params);
128
+ },
129
+ // if extra.width property is not present- column is auto adjusted
130
+ checked: actualWidth !== ((_a = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _a.width)
131
+ },
132
+ {
133
+ name: "Custom width",
134
+ action: () => {
135
+ var _a2;
136
+ params.api.setColumnWidths([
137
+ { key: params.column.colId, newWidth: (_a2 = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _a2.width }
138
+ ]);
139
+ },
140
+ // if extra.width property is present- column has custom width
141
+ checked: ((_b = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _b.width) === actualWidth,
142
+ disabled: !((_c = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _c.width)
143
+ }
144
+ ]
145
+ });
146
+ columnMenuItems.push({
147
+ name: "Wrap Text",
148
+ disabled: true
149
+ });
150
+ columnMenuItems.push(
151
+ {
152
+ name: "Format",
153
+ cssClasses: ["format-main-container"]
154
+ },
155
+ "separator"
156
+ );
157
+ columnMenuItems.push({
158
+ name: "Numeric Values",
159
+ subMenu: [
160
+ {
161
+ name: "Full Number",
162
+ action: () => onNumberFormatChange("full")
163
+ },
164
+ {
165
+ name: "In K",
166
+ action: () => onNumberFormatChange("thousand")
167
+ },
168
+ {
169
+ name: "In Mn",
170
+ action: () => onNumberFormatChange("million")
171
+ },
172
+ {
173
+ name: "In Bn",
174
+ action: () => onNumberFormatChange("billion")
175
+ }
176
+ ],
177
+ disabled: !onFontSizeChange
178
+ });
179
+ columnMenuItems.push({
180
+ name: "Font Size",
181
+ subMenu: [
182
+ {
183
+ name: "Small Font",
184
+ action: () => onFontSizeChange("small")
185
+ },
186
+ {
187
+ name: "Medium Font",
188
+ action: () => onFontSizeChange("medium")
189
+ },
190
+ {
191
+ name: "Large Font",
192
+ action: () => onFontSizeChange("large")
193
+ }
194
+ ],
195
+ disabled: !onNumberFormatChange
196
+ });
197
+ return columnMenuItems;
198
+ };
41
199
  const filterColumnsBySearch = (columns, searchText) => {
42
200
  if (!searchText) return columns;
43
201
  return columns.map((column) => {
44
202
  const matches = column.headerName.toLowerCase().includes(searchText);
203
+ if (matches) {
204
+ return column;
205
+ }
45
206
  const filteredChildren = column.children ? filterColumnsBySearch(column.children, searchText) : null;
46
- if (matches || (filteredChildren == null ? void 0 : filteredChildren.length) > 0) {
207
+ if ((filteredChildren == null ? void 0 : filteredChildren.length) > 0) {
47
208
  return {
48
209
  ...column,
49
210
  children: filteredChildren
@@ -109,9 +270,8 @@ const buildOrderedLeafIds = (topLevelColumns, topLevelOrder) => {
109
270
  return col ? collectLeafColIds(col) : [id];
110
271
  });
111
272
  };
112
- const applyColumnReorderToGrid = (gridApi, { allColumns, frozenOrder, scrollableOrder, pinChanges, childReorder }, gridRef) => {
113
- if (!gridApi) return;
114
- const stateApi = resolveColumnStateApi(gridApi, gridRef) ?? gridApi;
273
+ const applyColumnReorderToGrid = (api, { allColumns, frozenOrder, scrollableOrder, pinChanges, childReorder }) => {
274
+ if (!api) return;
115
275
  let columns = allColumns;
116
276
  if ((childReorder == null ? void 0 : childReorder.parentId) && (childReorder == null ? void 0 : childReorder.siblingOrder)) {
117
277
  columns = reorderSiblingsInTree(columns, childReorder.parentId, childReorder.siblingOrder);
@@ -126,7 +286,7 @@ const applyColumnReorderToGrid = (gridApi, { allColumns, frozenOrder, scrollable
126
286
  pinState.push({ colId: leafId, pinned });
127
287
  });
128
288
  });
129
- stateApi.applyColumnState({ state: pinState });
289
+ api.applyColumnState({ state: pinState });
130
290
  }
131
291
  const orderedLeafIds = [
132
292
  ...buildOrderedLeafIds(columns, frozenOrder),
@@ -138,7 +298,7 @@ const applyColumnReorderToGrid = (gridApi, { allColumns, frozenOrder, scrollable
138
298
  seen.add(id);
139
299
  return true;
140
300
  });
141
- stateApi.applyColumnState({
301
+ api.applyColumnState({
142
302
  state: uniqueLeafIds.map((colId) => ({ colId })),
143
303
  applyOrder: true
144
304
  });
@@ -182,35 +342,28 @@ const applyVisibilityToggle = (columns, colId) => {
182
342
  children: column.children ? updateChildren(column.children, visibility) : null
183
343
  };
184
344
  });
185
- const update = (cols) => {
186
- let changed = false;
187
- const next = cols.map((column) => {
188
- if (column.colId === colId) {
189
- changed = true;
190
- const newVisibility = !column.isVisible;
191
- visibilityMap.set(column.colId, newVisibility);
192
- return {
193
- ...column,
194
- isVisible: newVisibility,
195
- children: column.children ? updateChildren(column.children, newVisibility) : null
196
- };
197
- }
198
- if (column.children) {
199
- const updatedChildren = update(column.children);
200
- if (updatedChildren === column.children) return column;
201
- changed = true;
202
- const isAnyChildVisible = updatedChildren.some((child) => child.isVisible);
203
- visibilityMap.set(column.colId, isAnyChildVisible);
204
- return {
205
- ...column,
206
- isVisible: isAnyChildVisible,
207
- children: updatedChildren
208
- };
209
- }
210
- return column;
211
- });
212
- return changed ? next : cols;
213
- };
345
+ const update = (cols) => cols.map((column) => {
346
+ if (column.colId === colId) {
347
+ const newVisibility = !column.isVisible;
348
+ visibilityMap.set(column.colId, newVisibility);
349
+ return {
350
+ ...column,
351
+ isVisible: newVisibility,
352
+ children: column.children ? updateChildren(column.children, newVisibility) : null
353
+ };
354
+ }
355
+ if (column.children) {
356
+ const updatedChildren = update(column.children);
357
+ const isAnyChildVisible = updatedChildren.some((child) => child.isVisible);
358
+ visibilityMap.set(column.colId, isAnyChildVisible);
359
+ return {
360
+ ...column,
361
+ isVisible: isAnyChildVisible,
362
+ children: updatedChildren
363
+ };
364
+ }
365
+ return column;
366
+ });
214
367
  return { columns: update(columns), visibilityMap };
215
368
  };
216
369
  const applyVisibilityToAll = (columns, visibility) => {
@@ -225,11 +378,268 @@ const applyVisibilityToAll = (columns, visibility) => {
225
378
  });
226
379
  return { columns: update(columns), visibilityMap };
227
380
  };
381
+ const applyVisibilityMapToGrid = (api, visibilityMap) => {
382
+ if (!api || !visibilityMap.size) return;
383
+ const showIds = [];
384
+ const hideIds = [];
385
+ visibilityMap.forEach((visible, colId) => {
386
+ if (visible) showIds.push(colId);
387
+ else hideIds.push(colId);
388
+ });
389
+ if (showIds.length) api.setColumnsVisible(showIds, true);
390
+ if (hideIds.length) api.setColumnsVisible(hideIds, false);
391
+ };
392
+ const capitalizeHeader = (name) => name ? name.charAt(0).toUpperCase() + name.slice(1) : "";
228
393
  const mouseSensorOptions = { activationConstraint: { distance: 5 } };
229
394
  const touchSensorOptions = { activationConstraint: { delay: 200, tolerance: 5 } };
230
- const ColumnsV36 = forwardRef((props, ref) => {
395
+ const ColumnRowContent = memo(function ColumnRowContent2({
396
+ column,
397
+ level,
398
+ isCollapsed,
399
+ hasChildren,
400
+ isIndeterminate,
401
+ checkboxChecked,
402
+ reserveCollapseSlot,
403
+ rowClassName,
404
+ dragIconClass,
405
+ onToggleCollapse,
406
+ onToggleVisibility,
407
+ onKeyboardReorder,
408
+ dragHandleProps,
409
+ isOverlay,
410
+ searchText
411
+ }) {
412
+ const rowStyle = useMemo(
413
+ () => ({
414
+ ["--indent-level"]: level
415
+ }),
416
+ [level]
417
+ );
418
+ const handleCollapseClick = useCallback(
419
+ (e) => {
420
+ e.stopPropagation();
421
+ onToggleCollapse == null ? void 0 : onToggleCollapse(column.colId);
422
+ },
423
+ [onToggleCollapse, column.colId]
424
+ );
425
+ const handleVisibilityChange = useCallback(() => {
426
+ onToggleVisibility == null ? void 0 : onToggleVisibility(column.colId);
427
+ }, [onToggleVisibility, column.colId]);
428
+ const handleRowKeyDown = useCallback(
429
+ (e) => {
430
+ var _a, _b, _c, _d;
431
+ if (isOverlay) return;
432
+ const current = e.currentTarget;
433
+ if (e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
434
+ e.preventDefault();
435
+ onKeyboardReorder == null ? void 0 : onKeyboardReorder(column.colId, e.key === "ArrowUp" ? -1 : 1);
436
+ return;
437
+ }
438
+ switch (e.key) {
439
+ case "ArrowDown": {
440
+ e.preventDefault();
441
+ const next = (_b = (_a = current.parentElement) == null ? void 0 : _a.nextElementSibling) == null ? void 0 : _b.querySelector('[role="treeitem"]');
442
+ next == null ? void 0 : next.focus();
443
+ break;
444
+ }
445
+ case "ArrowUp": {
446
+ e.preventDefault();
447
+ const prev = (_d = (_c = current.parentElement) == null ? void 0 : _c.previousElementSibling) == null ? void 0 : _d.querySelector('[role="treeitem"]');
448
+ prev == null ? void 0 : prev.focus();
449
+ break;
450
+ }
451
+ case "ArrowRight": {
452
+ if (hasChildren && isCollapsed) {
453
+ e.preventDefault();
454
+ onToggleCollapse == null ? void 0 : onToggleCollapse(column.colId);
455
+ }
456
+ break;
457
+ }
458
+ case "ArrowLeft": {
459
+ if (hasChildren && !isCollapsed) {
460
+ e.preventDefault();
461
+ onToggleCollapse == null ? void 0 : onToggleCollapse(column.colId);
462
+ }
463
+ break;
464
+ }
465
+ case "Enter":
466
+ case " ": {
467
+ if (column.disabled) break;
468
+ e.preventDefault();
469
+ onToggleVisibility == null ? void 0 : onToggleVisibility(column.colId);
470
+ break;
471
+ }
472
+ }
473
+ },
474
+ [
475
+ isOverlay,
476
+ level,
477
+ hasChildren,
478
+ isCollapsed,
479
+ onToggleCollapse,
480
+ onToggleVisibility,
481
+ onKeyboardReorder,
482
+ column.colId,
483
+ column.disabled
484
+ ]
485
+ );
486
+ return /* @__PURE__ */ jsxs(
487
+ "div",
488
+ {
489
+ "aria-checked": isIndeterminate ? "mixed" : checkboxChecked,
490
+ "aria-expanded": hasChildren ? !isCollapsed : void 0,
491
+ "aria-label": column.headerName,
492
+ "aria-roledescription": !isOverlay && dragHandleProps ? "sortable column" : void 0,
493
+ "aria-selected": !!checkboxChecked,
494
+ className: rowClassName,
495
+ "data-col-id": column.colId,
496
+ role: "treeitem",
497
+ style: rowStyle,
498
+ tabIndex: isOverlay ? -1 : 0,
499
+ onKeyDown: handleRowKeyDown,
500
+ children: [
501
+ /* @__PURE__ */ jsxs("div", { className: "table-setting-column-leading", children: [
502
+ reserveCollapseSlot && /* @__PURE__ */ jsx("span", { "aria-hidden": !hasChildren, className: "table-setting-column-collapse-slot", children: hasChildren ? /* @__PURE__ */ jsx(
503
+ IconButton,
504
+ {
505
+ "aria-label": isCollapsed ? "Expand column group" : "Collapse column group",
506
+ className: "table-setting-column-collapse-btn",
507
+ onClick: handleCollapseClick,
508
+ children: isCollapsed ? /* @__PURE__ */ jsx(default_1$3, {}) : /* @__PURE__ */ jsx(default_1, {})
509
+ }
510
+ ) : null }),
511
+ /* @__PURE__ */ jsx(
512
+ Checkbox,
513
+ {
514
+ checked: checkboxChecked,
515
+ disabled: column.disabled || isOverlay,
516
+ variant: isIndeterminate ? "dashed" : "default",
517
+ onChange: handleVisibilityChange
518
+ }
519
+ )
520
+ ] }),
521
+ /* @__PURE__ */ jsxs("div", { className: "table-setting-column-trailing", children: [
522
+ dragHandleProps && /* @__PURE__ */ jsx(
523
+ "span",
524
+ {
525
+ className: "table-setting-column-drag-handle",
526
+ ...dragHandleProps,
527
+ "aria-label": `Reorder ${column.headerName}`,
528
+ children: /* @__PURE__ */ jsx(DragIndicator, { className: dragIconClass })
529
+ }
530
+ ),
531
+ /* @__PURE__ */ jsx(
532
+ HighlightedText,
533
+ {
534
+ className: "table-setting-column-name",
535
+ searchText,
536
+ text: capitalizeHeader(column.headerName)
537
+ }
538
+ )
539
+ ] })
540
+ ]
541
+ }
542
+ );
543
+ });
544
+ const areSortablePropsEqual = (prev, next) => prev.column.colId === next.column.colId && prev.column.isVisible === next.column.isVisible && prev.column.headerName === next.column.headerName && prev.column.disabled === next.column.disabled && prev.isIndeterminate === next.isIndeterminate && prev.checkboxChecked === next.checkboxChecked && prev.reserveCollapseSlot === next.reserveCollapseSlot && prev.level === next.level && prev.isCollapsed === next.isCollapsed && prev.hasChildren === next.hasChildren && prev.rowClassName === next.rowClassName && prev.dragIconClass === next.dragIconClass && prev.onToggleCollapse === next.onToggleCollapse && prev.onToggleVisibility === next.onToggleVisibility && prev.onKeyboardReorder === next.onKeyboardReorder && prev.searchText === next.searchText && prev.children === next.children;
545
+ const SortableColumnItem = memo(function SortableColumnItem2({
546
+ column,
547
+ level,
548
+ isCollapsed,
549
+ hasChildren,
550
+ isIndeterminate,
551
+ checkboxChecked,
552
+ reserveCollapseSlot,
553
+ rowClassName,
554
+ dragIconClass,
555
+ onToggleCollapse,
556
+ onToggleVisibility,
557
+ onKeyboardReorder,
558
+ searchText,
559
+ children
560
+ }) {
561
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
562
+ id: column.colId
563
+ });
564
+ const style = useMemo(
565
+ () => ({
566
+ transform: CSS.Transform.toString(transform),
567
+ transition,
568
+ // Placeholder stays in-flow; DragOverlay renders the floating preview
569
+ opacity: isDragging ? 0 : void 0,
570
+ zIndex: isDragging ? 0 : void 0
571
+ }),
572
+ [transform, transition, isDragging]
573
+ );
574
+ return /* @__PURE__ */ jsxs(
575
+ "div",
576
+ {
577
+ ref: setNodeRef,
578
+ className: isDragging ? "table-setting-column-sortable--dragging" : void 0,
579
+ style,
580
+ children: [
581
+ /* @__PURE__ */ jsx(
582
+ ColumnRowContent,
583
+ {
584
+ checkboxChecked,
585
+ column,
586
+ dragHandleProps: { ...attributes, ...listeners },
587
+ dragIconClass,
588
+ hasChildren,
589
+ isCollapsed,
590
+ isIndeterminate,
591
+ level,
592
+ reserveCollapseSlot,
593
+ rowClassName,
594
+ searchText,
595
+ onKeyboardReorder,
596
+ onToggleCollapse,
597
+ onToggleVisibility
598
+ }
599
+ ),
600
+ hasChildren && !isCollapsed && children
601
+ ]
602
+ }
603
+ );
604
+ }, areSortablePropsEqual);
605
+ const NestedColumnItem = memo(function NestedColumnItem2({
606
+ column,
607
+ level,
608
+ isCollapsed,
609
+ hasChildren,
610
+ isIndeterminate,
611
+ checkboxChecked,
612
+ reserveCollapseSlot,
613
+ rowClassName,
614
+ dragIconClass,
615
+ onToggleCollapse,
616
+ onToggleVisibility,
617
+ searchText,
618
+ children
619
+ }) {
620
+ return /* @__PURE__ */ jsxs("div", { children: [
621
+ /* @__PURE__ */ jsx(
622
+ ColumnRowContent,
623
+ {
624
+ checkboxChecked,
625
+ column,
626
+ dragIconClass,
627
+ hasChildren,
628
+ isCollapsed,
629
+ isIndeterminate,
630
+ level,
631
+ reserveCollapseSlot,
632
+ rowClassName,
633
+ searchText,
634
+ onToggleCollapse,
635
+ onToggleVisibility
636
+ }
637
+ ),
638
+ hasChildren && !isCollapsed && children
639
+ ] });
640
+ });
641
+ const Columns = forwardRef((props, ref) => {
231
642
  var _a, _b, _c, _d, _e, _f;
232
- const { t } = useTranslation();
233
643
  const [frozenColumn, setFrozenColumn] = useState([]);
234
644
  const [scrollableColumn, setScrollableColumn] = useState([]);
235
645
  const [searchInputValue, setSearchInputValue] = useState("");
@@ -264,24 +674,15 @@ const ColumnsV36 = forwardRef((props, ref) => {
264
674
  const isDraggingRef = useRef(false);
265
675
  const isInternalUpdateRef = useRef(false);
266
676
  const isColumnPinnedRef = useRef(false);
267
- const frozenListRef = useRef(null);
268
- const scrollableListRef = useRef(null);
269
- const collapseContainerRef = useRef(null);
270
- const autoScrollRafRef = useRef(null);
271
- const dragPointerYRef = useRef(null);
272
677
  const debouncedSetSearchText = useMemo(
273
678
  () => debounce((value) => {
274
679
  setDebouncedSearchText(value);
275
- }, 150),
680
+ }, 400),
276
681
  []
277
682
  );
278
683
  useEffect(
279
684
  () => () => {
280
685
  debouncedSetSearchText.cancel();
281
- if (autoScrollRafRef.current != null) {
282
- cancelAnimationFrame(autoScrollRafRef.current);
283
- autoScrollRafRef.current = null;
284
- }
285
686
  },
286
687
  [debouncedSetSearchText]
287
688
  );
@@ -293,6 +694,48 @@ const ColumnsV36 = forwardRef((props, ref) => {
293
694
  () => filterColumnsBySearch(scrollableColumn, debouncedSearchText),
294
695
  [scrollableColumn, debouncedSearchText]
295
696
  );
697
+ const [activeMatchIndex, setActiveMatchIndex] = useState(0);
698
+ const searchMatchIds = useMemo(() => {
699
+ if (!debouncedSearchText) return [];
700
+ return [
701
+ ...collectVisibleLeafIds(filteredFrozenColumns),
702
+ ...collectVisibleLeafIds(filteredScrollableColumns)
703
+ ];
704
+ }, [debouncedSearchText, filteredFrozenColumns, filteredScrollableColumns]);
705
+ const searchMatchCount = searchMatchIds.length;
706
+ const normalizedMatchIndex = searchMatchCount ? (activeMatchIndex % searchMatchCount + searchMatchCount) % searchMatchCount : 0;
707
+ const activeMatchColId = searchMatchCount ? searchMatchIds[normalizedMatchIndex] : null;
708
+ useEffect(() => {
709
+ setActiveMatchIndex(0);
710
+ }, [debouncedSearchText]);
711
+ useEffect(() => {
712
+ var _a2;
713
+ syncColumnSearchTextToGrid((_a2 = ref == null ? void 0 : ref.current) == null ? void 0 : _a2.api, debouncedSearchText);
714
+ }, [debouncedSearchText, ref]);
715
+ const goToSearchMatch = useCallback((direction) => {
716
+ setActiveMatchIndex((prev) => prev + direction);
717
+ }, []);
718
+ useEffect(() => {
719
+ var _a2, _b2;
720
+ if (!activeMatchColId) return;
721
+ const api = (_a2 = ref == null ? void 0 : ref.current) == null ? void 0 : _a2.api;
722
+ ensureColumnGroupsExpanded(api, activeMatchColId);
723
+ (_b2 = api == null ? void 0 : api.ensureColumnVisible) == null ? void 0 : _b2.call(api, activeMatchColId, "middle");
724
+ const escaped = CSS.escape ? CSS.escape(activeMatchColId) : activeMatchColId.replace(/"/g, '\\"');
725
+ const node = document.querySelector(
726
+ `.table-setting-column-collapse-container [data-col-id="${escaped}"]`
727
+ );
728
+ node == null ? void 0 : node.scrollIntoView({ block: "nearest" });
729
+ }, [activeMatchColId, ref]);
730
+ const handleSearchKeyDown = useCallback(
731
+ (e) => {
732
+ if (e.key !== "Enter") return;
733
+ e.preventDefault();
734
+ if (!searchMatchCount) return;
735
+ goToSearchMatch(e.shiftKey ? -1 : 1);
736
+ },
737
+ [goToSearchMatch, searchMatchCount]
738
+ );
296
739
  const frozenColumnOrder = useMemo(
297
740
  () => getTopLevelColumnIds(
298
741
  filteredFrozenColumns.filter((c) => c.headerName !== "N/A" && c.isVisible !== false)
@@ -313,54 +756,10 @@ const ColumnsV36 = forwardRef((props, ref) => {
313
756
  () => getTopLevelColumnIds(scrollableColumn.filter((c) => c.headerName !== "N/A")),
314
757
  [scrollableColumn]
315
758
  );
316
- const frozenRows = useMemo(
317
- () => flattenColumnRows(filteredFrozenColumns, collapsedFrozenColumns, "frozen"),
318
- [filteredFrozenColumns, collapsedFrozenColumns]
319
- );
320
- const scrollableRows = useMemo(
321
- () => collapsedScrollable ? [] : flattenColumnRows(filteredScrollableColumns, collapsedScrollColumns, "scrollable"),
322
- [filteredScrollableColumns, collapsedScrollColumns, collapsedScrollable]
323
- );
324
- const shouldVirtualize = frozenRows.length + scrollableRows.length > SETTINGS_VIRTUALIZE_THRESHOLD;
325
- const [listViewportHeight, setListViewportHeight] = useState(0);
326
- useLayoutEffect(() => {
327
- const el = collapseContainerRef.current;
328
- if (!el || !shouldVirtualize) return void 0;
329
- const measure = () => {
330
- setListViewportHeight(el.clientHeight);
331
- };
332
- measure();
333
- if (typeof ResizeObserver === "undefined") {
334
- window.addEventListener("resize", measure);
335
- return () => {
336
- window.removeEventListener("resize", measure);
337
- };
338
- }
339
- const observer = new ResizeObserver(measure);
340
- observer.observe(el);
341
- return () => {
342
- observer.disconnect();
343
- };
344
- }, [shouldVirtualize, collapsedColumn, props.isSaveViewEnabled]);
345
- const listHeights = useMemo(
346
- () => computeSettingsListHeights({
347
- shouldVirtualize,
348
- listViewportHeight,
349
- frozenRowCount: frozenRows.length,
350
- scrollableRowCount: scrollableRows.length
351
- }),
352
- [shouldVirtualize, listViewportHeight, frozenRows.length, scrollableRows.length]
353
- );
354
- const checkStateMap = useMemo(
355
- () => buildCheckStateMap([filteredFrozenColumns, filteredScrollableColumns]),
356
- [filteredFrozenColumns, filteredScrollableColumns]
759
+ const sortableItems = useMemo(
760
+ () => [...scrollableColumnOrder, ...frozenColumnOrder],
761
+ [scrollableColumnOrder, frozenColumnOrder]
357
762
  );
358
- const sortableItems = useMemo(() => {
359
- if (!shouldVirtualize) {
360
- return [...scrollableColumnOrder, ...frozenColumnOrder];
361
- }
362
- return [...scrollableRows, ...frozenRows].filter((row) => row.column.isVisible !== false).map((row) => row.column.colId);
363
- }, [shouldVirtualize, scrollableColumnOrder, frozenColumnOrder, scrollableRows, frozenRows]);
364
763
  const allColumnsForLookup = useMemo(
365
764
  () => [...frozenColumn, ...scrollableColumn],
366
765
  [frozenColumn, scrollableColumn]
@@ -473,10 +872,9 @@ const ColumnsV36 = forwardRef((props, ref) => {
473
872
  () => debounce(updateColumnState, 100),
474
873
  [updateColumnState]
475
874
  );
476
- const isColumnsPanelOpen = props.showTableSetting ?? props.showMenu;
477
875
  useEffect(() => {
478
876
  var _a2, _b2, _c2, _d2, _e2, _f2;
479
- if (isColumnsPanelOpen || isColumnPinnedRef.current) {
877
+ if (props.showMenu || isColumnPinnedRef.current) {
480
878
  isColumnPinnedRef.current = false;
481
879
  updateColumnState();
482
880
  const onColumnEvent = () => {
@@ -500,7 +898,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
500
898
  }
501
899
  };
502
900
  }
503
- }, [isColumnsPanelOpen, updateColumnState, debouncedUpdateColumnState, ref]);
901
+ }, [props.showMenu, updateColumnState, debouncedUpdateColumnState, ref]);
504
902
  const handleSearchChange = useCallback(
505
903
  (e) => {
506
904
  const value = e.target.value;
@@ -517,7 +915,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
517
915
  setter((prev) => {
518
916
  const { columns, visibilityMap } = applyVisibilityToggle(prev, colId);
519
917
  isInternalUpdateRef.current = true;
520
- applyVisibilityMapToGrid(api, visibilityMap, ref);
918
+ applyVisibilityMapToGrid(api, visibilityMap);
521
919
  queueMicrotask(() => {
522
920
  isInternalUpdateRef.current = false;
523
921
  });
@@ -563,7 +961,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
563
961
  result = applyVisibilityToAll(prev, nextVisible);
564
962
  }
565
963
  isInternalUpdateRef.current = true;
566
- applyVisibilityMapToGrid(api, result.visibilityMap, ref);
964
+ applyVisibilityMapToGrid(api, result.visibilityMap);
567
965
  queueMicrotask(() => {
568
966
  isInternalUpdateRef.current = false;
569
967
  });
@@ -578,7 +976,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
578
976
  const scrollResult = applyVisibilityToAll(scrollableColumn, nextVisible);
579
977
  const combinedMap = new Map([...frozenResult.visibilityMap, ...scrollResult.visibilityMap]);
580
978
  isInternalUpdateRef.current = true;
581
- applyVisibilityMapToGrid(api, combinedMap, ref);
979
+ applyVisibilityMapToGrid(api, combinedMap);
582
980
  setFrozenColumn(frozenResult.columns);
583
981
  setScrollableColumn(scrollResult.columns);
584
982
  queueMicrotask(() => {
@@ -605,14 +1003,11 @@ const ColumnsV36 = forwardRef((props, ref) => {
605
1003
  [colId]: !prev[colId]
606
1004
  }));
607
1005
  }, []);
608
- const announceReorder = useCallback(
609
- (colId, direction) => {
610
- const el = reorderLiveRegionRef.current;
611
- if (!el) return;
612
- el.textContent = direction === -1 ? t("table.columns.reorderMovedUp", { name: colId }) : t("table.columns.reorderMovedDown", { name: colId });
613
- },
614
- [t]
615
- );
1006
+ const announceReorder = useCallback((colId, direction) => {
1007
+ const el = reorderLiveRegionRef.current;
1008
+ if (!el) return;
1009
+ el.textContent = `Moved ${colId} ${direction === -1 ? "up" : "down"}`;
1010
+ }, []);
616
1011
  const commitColumnReorder = useCallback(
617
1012
  ({ frozenOrder, scrollableOrder, pinChanges, childReorder, announce }) => {
618
1013
  var _a2;
@@ -620,17 +1015,13 @@ const ColumnsV36 = forwardRef((props, ref) => {
620
1015
  if (!api) return;
621
1016
  isInternalUpdateRef.current = true;
622
1017
  isDraggingRef.current = true;
623
- applyColumnReorderToGrid(
624
- api,
625
- {
626
- allColumns: allColumnsForLookup,
627
- frozenOrder,
628
- scrollableOrder,
629
- pinChanges,
630
- childReorder
631
- },
632
- ref
633
- );
1018
+ applyColumnReorderToGrid(api, {
1019
+ allColumns: allColumnsForLookup,
1020
+ frozenOrder,
1021
+ scrollableOrder,
1022
+ pinChanges,
1023
+ childReorder
1024
+ });
634
1025
  updateColumnState();
635
1026
  if (announce) {
636
1027
  announceReorder(announce.colId, announce.direction);
@@ -642,49 +1033,17 @@ const ColumnsV36 = forwardRef((props, ref) => {
642
1033
  },
643
1034
  [ref, allColumnsForLookup, updateColumnState, announceReorder]
644
1035
  );
645
- const stopSettingsListAutoScroll = useCallback(() => {
646
- if (autoScrollRafRef.current != null) {
647
- cancelAnimationFrame(autoScrollRafRef.current);
648
- autoScrollRafRef.current = null;
649
- }
650
- dragPointerYRef.current = null;
651
- }, []);
652
- const tickSettingsListAutoScroll = useCallback(() => {
653
- autoScrollRafRef.current = null;
654
- const y = dragPointerYRef.current;
655
- if (y == null) return;
656
- const moved = scrollListTowardPointer(frozenListRef.current, y) || scrollListTowardPointer(scrollableListRef.current, y);
657
- if (moved) {
658
- autoScrollRafRef.current = requestAnimationFrame(tickSettingsListAutoScroll);
659
- }
660
- }, []);
661
1036
  const handleDragStart = useCallback((event) => {
662
1037
  isDraggingRef.current = true;
663
1038
  setActiveDragId(event.active.id);
664
1039
  }, []);
665
- const handleDragMove = useCallback(
666
- (event) => {
667
- var _a2, _b2, _c2, _d2;
668
- if (!shouldVirtualize) return;
669
- const translated = (_c2 = (_b2 = (_a2 = event.active) == null ? void 0 : _a2.rect) == null ? void 0 : _b2.current) == null ? void 0 : _c2.translated;
670
- const y = translated ? translated.top + translated.height / 2 : (_d2 = event.activatorEvent) == null ? void 0 : _d2.clientY;
671
- if (y == null) return;
672
- dragPointerYRef.current = y;
673
- if (autoScrollRafRef.current == null) {
674
- autoScrollRafRef.current = requestAnimationFrame(tickSettingsListAutoScroll);
675
- }
676
- },
677
- [shouldVirtualize, tickSettingsListAutoScroll]
678
- );
679
1040
  const handleDragCancel = useCallback(() => {
680
- stopSettingsListAutoScroll();
681
1041
  setActiveDragId(null);
682
1042
  isDraggingRef.current = false;
683
- }, [stopSettingsListAutoScroll]);
1043
+ }, []);
684
1044
  const handleDragEnd = useCallback(
685
1045
  (event) => {
686
1046
  const { active, over } = event;
687
- stopSettingsListAutoScroll();
688
1047
  setActiveDragId(null);
689
1048
  if (!over || active.id === over.id) {
690
1049
  isDraggingRef.current = false;
@@ -778,8 +1137,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
778
1137
  fullScrollableOrder,
779
1138
  frozenColumnOrder,
780
1139
  scrollableColumnOrder,
781
- commitColumnReorder,
782
- stopSettingsListAutoScroll
1140
+ commitColumnReorder
783
1141
  ]
784
1142
  );
785
1143
  const handleKeyboardReorder = useCallback(
@@ -827,16 +1185,14 @@ const ColumnsV36 = forwardRef((props, ref) => {
827
1185
  (column, level, section) => {
828
1186
  const isFrozen = section === "frozen";
829
1187
  const collapsedMap = isFrozen ? collapsedFrozenColumns : collapsedScrollColumns;
830
- const isCollapsed = !!collapsedMap[column.colId];
1188
+ const isCollapsed = debouncedSearchText ? false : !!collapsedMap[column.colId];
831
1189
  const hasChildren = Array.isArray(column.children) && column.children.length > 0;
832
1190
  const onToggleCollapse = isFrozen ? toggleFrozenColumnCollapse : toggleScrollColumnCollapse;
833
1191
  const onToggleVisibility = isFrozen ? toggleColumnVisibilityFrozen : toggleColumnVisibilityScroll;
834
- const checkState = checkStateMap.get(column.colId) || {
835
- checked: !!column.isVisible,
836
- indeterminate: false
837
- };
1192
+ const checkState = hasChildren ? getCheckState(column.children) : { checked: !!column.isVisible, indeterminate: false };
838
1193
  const reserveCollapseSlot = isFrozen ? hasChildren : true;
839
- const rowClassName = isFrozen ? "table-setting-frozen-columns-list-item" : "table-setting-scroll-inner-column";
1194
+ const isActiveSearchMatch = !!debouncedSearchText && column.colId === activeMatchColId;
1195
+ const rowClassName = `${isFrozen ? "table-setting-frozen-columns-list-item" : "table-setting-scroll-inner-column"}${isActiveSearchMatch ? " table-setting-column-search-match-active" : ""}`;
840
1196
  const dragIconClass = isFrozen ? "table-setting-frozen-columns-list-drag-icon" : "table-setting-scroll-columns-list-drag-icon";
841
1197
  const nestedSortableIds = hasChildren ? getDirectColumnIds(
842
1198
  column.children.filter((c) => c.headerName !== "N/A" && c.isVisible !== false)
@@ -855,6 +1211,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
855
1211
  level,
856
1212
  reserveCollapseSlot,
857
1213
  rowClassName,
1214
+ searchText: debouncedSearchText,
858
1215
  onKeyboardReorder: handleKeyboardReorder,
859
1216
  onToggleCollapse,
860
1217
  onToggleVisibility,
@@ -875,6 +1232,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
875
1232
  level,
876
1233
  reserveCollapseSlot,
877
1234
  rowClassName,
1235
+ searchText: debouncedSearchText,
878
1236
  onToggleCollapse,
879
1237
  onToggleVisibility,
880
1238
  children: childNodes
@@ -883,9 +1241,10 @@ const ColumnsV36 = forwardRef((props, ref) => {
883
1241
  );
884
1242
  },
885
1243
  [
886
- checkStateMap,
887
1244
  collapsedFrozenColumns,
888
1245
  collapsedScrollColumns,
1246
+ debouncedSearchText,
1247
+ activeMatchColId,
889
1248
  toggleFrozenColumnCollapse,
890
1249
  toggleScrollColumnCollapse,
891
1250
  toggleColumnVisibilityFrozen,
@@ -893,32 +1252,6 @@ const ColumnsV36 = forwardRef((props, ref) => {
893
1252
  handleKeyboardReorder
894
1253
  ]
895
1254
  );
896
- const virtualRowHandlers = useMemo(
897
- () => ({
898
- checkStateMap,
899
- onToggleFrozenCollapse: toggleFrozenColumnCollapse,
900
- onToggleScrollCollapse: toggleScrollColumnCollapse,
901
- onToggleVisibilityFrozen: toggleColumnVisibilityFrozen,
902
- onToggleVisibilityScroll: toggleColumnVisibilityScroll,
903
- onKeyboardReorder: handleKeyboardReorder
904
- }),
905
- [
906
- checkStateMap,
907
- toggleFrozenColumnCollapse,
908
- toggleScrollColumnCollapse,
909
- toggleColumnVisibilityFrozen,
910
- toggleColumnVisibilityScroll,
911
- handleKeyboardReorder
912
- ]
913
- );
914
- const frozenItemData = useMemo(
915
- () => ({ ...virtualRowHandlers, rows: frozenRows }),
916
- [virtualRowHandlers, frozenRows]
917
- );
918
- const scrollableItemData = useMemo(
919
- () => ({ ...virtualRowHandlers, rows: scrollableRows }),
920
- [virtualRowHandlers, scrollableRows]
921
- );
922
1255
  const handleSaveAndApply = () => {
923
1256
  var _a2, _b2;
924
1257
  if (isEditView) {
@@ -1043,6 +1376,18 @@ const ColumnsV36 = forwardRef((props, ref) => {
1043
1376
  nameConflictExcludeView,
1044
1377
  props.isViewNameUniqueAcrossTypes
1045
1378
  );
1379
+ const onSearchUpArrowClick = () => {
1380
+ goToSearchMatch(-1);
1381
+ };
1382
+ const onSearchDownArrowClick = () => {
1383
+ goToSearchMatch(1);
1384
+ };
1385
+ const clearSearchText = () => {
1386
+ debouncedSetSearchText.cancel();
1387
+ setSearchInputValue("");
1388
+ setDebouncedSearchText("");
1389
+ };
1390
+ const rightIconForSearchInout = searchInputValue.length > 0 ? /* @__PURE__ */ jsx("img", { alt: "Clear", src: clearIcon, onClick: clearSearchText }) : /* @__PURE__ */ jsx("img", { alt: "search", className: "table-settings-search-icon", src: searchIcon });
1046
1391
  return /* @__PURE__ */ jsxs("div", { className: "table-setting-columns-settings", children: [
1047
1392
  /* @__PURE__ */ jsx(
1048
1393
  "div",
@@ -1055,13 +1400,13 @@ const ColumnsV36 = forwardRef((props, ref) => {
1055
1400
  props.isSaveViewEnabled && /* @__PURE__ */ jsxs("div", { className: "table-setting-save-view-container", children: [
1056
1401
  savedViewsOptions.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "save-view-icon-title", children: [
1057
1402
  /* @__PURE__ */ jsx("img", { alt: "save-view-icon", src: saveViewIcon }),
1058
- /* @__PURE__ */ jsx("span", { className: "save-view-title", children: t("table.views.none") })
1403
+ /* @__PURE__ */ jsx("span", { className: "save-view-title", children: "No views saved yet" })
1059
1404
  ] }) : /* @__PURE__ */ jsxs("div", { className: "save-view-container-active-view", children: [
1060
1405
  /* @__PURE__ */ jsx(
1061
1406
  Badge,
1062
1407
  {
1063
1408
  color: "success",
1064
- label: `${((_b = savedViewsOptions.find((view) => view.isActive)) == null ? void 0 : _b.viewName) || t("table.views.notApplicable")}`,
1409
+ label: `${((_b = savedViewsOptions.find((view) => view.isActive)) == null ? void 0 : _b.viewName) || "Not Applicable"}`,
1065
1410
  variant: "stroke"
1066
1411
  }
1067
1412
  ),
@@ -1086,16 +1431,16 @@ const ColumnsV36 = forwardRef((props, ref) => {
1086
1431
  onClick: () => {
1087
1432
  setOpenSaveViewModal(true);
1088
1433
  },
1089
- children: t("table.views.saveView")
1434
+ children: "Save View"
1090
1435
  }
1091
1436
  )
1092
1437
  ] }),
1093
1438
  openSaveViewMenu && /* @__PURE__ */ jsxs("div", { className: "save-view-menu", children: [
1094
1439
  /* @__PURE__ */ jsxs("div", { className: "save-view-menu-title", children: [
1095
- /* @__PURE__ */ jsx("span", { children: t("table.views.savedViews") }),
1440
+ /* @__PURE__ */ jsx("span", { children: "Saved views" }),
1096
1441
  /* @__PURE__ */ jsxs("div", { className: "save-view-menu-default-view", children: [
1097
1442
  /* @__PURE__ */ jsx("img", { alt: "default-view-icon", src: defaultViewActiveIcon }),
1098
- /* @__PURE__ */ jsx("span", { className: "save-view-menu-default-view-text", children: t("table.views.default") })
1443
+ /* @__PURE__ */ jsx("span", { className: "save-view-menu-default-view-text", children: "Default" })
1099
1444
  ] })
1100
1445
  ] }),
1101
1446
  /* @__PURE__ */ jsxs("div", { className: "save-view-menu-view-type", children: [
@@ -1103,7 +1448,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1103
1448
  Badge,
1104
1449
  {
1105
1450
  color: selectedBadge === "All" ? "info" : "default",
1106
- label: t("table.views.all"),
1451
+ label: "All",
1107
1452
  size: "small",
1108
1453
  variant: "stroke",
1109
1454
  onClick: () => {
@@ -1135,7 +1480,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1135
1480
  Input,
1136
1481
  {
1137
1482
  leftIcon: /* @__PURE__ */ jsx(default_1$2, {}),
1138
- placeholder: t("table.views.searchPlaceholder"),
1483
+ placeholder: "Search here...",
1139
1484
  value: saveViewSearchText,
1140
1485
  onChange: handleSaveViewSearchChange
1141
1486
  }
@@ -1145,7 +1490,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1145
1490
  return /* @__PURE__ */ jsxs(
1146
1491
  "div",
1147
1492
  {
1148
- "aria-label": t("table.views.savedViewAria", { name: view.viewName }),
1493
+ "aria-label": `Saved view ${view.viewName}`,
1149
1494
  className: `save-view-menu-view-list-item ${view.isActive ? "active" : ""}`,
1150
1495
  role: "button",
1151
1496
  tabIndex: idx === 0 ? 0 : -1,
@@ -1248,7 +1593,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1248
1593
  setOpenSaveViewMenu(false);
1249
1594
  setFilteredSavedViewsOptions([...savedViewsOptions]);
1250
1595
  },
1251
- children: t("common.cancel")
1596
+ children: "Cancel"
1252
1597
  }
1253
1598
  ),
1254
1599
  /* @__PURE__ */ jsx(
@@ -1263,7 +1608,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1263
1608
  updateColumnState();
1264
1609
  setOpenSaveViewMenu(false);
1265
1610
  },
1266
- children: t("common.apply")
1611
+ children: "Apply"
1267
1612
  }
1268
1613
  )
1269
1614
  ] })
@@ -1274,23 +1619,20 @@ const ColumnsV36 = forwardRef((props, ref) => {
1274
1619
  className: "save-view-modal",
1275
1620
  height: "542px",
1276
1621
  open: openSaveViewModal,
1277
- primaryButtonLabel: props.isSavingViewLoading ? t("table.views.saving") : t("common.save"),
1622
+ primaryButtonLabel: props.isSavingViewLoading ? "Saving..." : "Save",
1278
1623
  primaryButtonProps: {
1279
1624
  disabled: (isInputValueEmpty || props.maxSavedViews != null && savedViewsOptions.length >= props.maxSavedViews) && !isReplaceViewSelected || nameConflict || props.isSavingViewLoading,
1280
1625
  loading: props.isSavingViewLoading,
1281
1626
  iconPlacement: "right"
1282
1627
  },
1283
- secondaryButtonLabel: t("common.cancel"),
1284
- title: isEditView ? t("table.views.editView") : t("table.views.saveViewTitle"),
1628
+ secondaryButtonLabel: "Cancel",
1629
+ title: isEditView ? "Edit view" : "Save view",
1285
1630
  width: "422px",
1286
1631
  onClose: handleCloseSaveViewModal,
1287
1632
  onPrimaryButtonClick: handleSaveAndApply,
1288
1633
  onSecondaryButtonClick: handleCloseSaveViewModal,
1289
1634
  children: /* @__PURE__ */ jsxs("div", { className: "save-view-modal-children", children: [
1290
- props.maxSavedViews != null && /* @__PURE__ */ jsx("div", { className: "save-view-modal-children-header", children: /* @__PURE__ */ jsx("span", { className: "save-view-modal-children-header-text", children: t("table.views.remaining", {
1291
- remaining: props.maxSavedViews - savedViewsOptions.length,
1292
- max: props.maxSavedViews
1293
- }) }) }),
1635
+ props.maxSavedViews != null && /* @__PURE__ */ jsx("div", { className: "save-view-modal-children-header", children: /* @__PURE__ */ jsx("span", { className: "save-view-modal-children-header-text", children: `${props.maxSavedViews - savedViewsOptions.length}/${props.maxSavedViews} views remaining` }) }),
1294
1636
  /* @__PURE__ */ jsxs(
1295
1637
  "div",
1296
1638
  {
@@ -1299,12 +1641,12 @@ const ColumnsV36 = forwardRef((props, ref) => {
1299
1641
  /* @__PURE__ */ jsx("div", { className: "save-view-modal-children-body-input", children: /* @__PURE__ */ jsx(
1300
1642
  Input,
1301
1643
  {
1302
- helperText: nameConflict ? t("table.views.nameConflict") : "",
1644
+ helperText: nameConflict ? "A view with this name already exists" : "",
1303
1645
  isDisabled: isReplaceViewSelected,
1304
1646
  isError: nameConflict,
1305
1647
  isHelperText: nameConflict,
1306
- label: t("table.views.newViewName"),
1307
- placeholder: t("table.views.enterHere"),
1648
+ label: "New view name",
1649
+ placeholder: "Enter here",
1308
1650
  readOnly: isReplaceViewSelected,
1309
1651
  value: inputValue,
1310
1652
  onChange: (e) => {
@@ -1314,7 +1656,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1314
1656
  }
1315
1657
  ) }),
1316
1658
  !isEditView && /* @__PURE__ */ jsxs("div", { className: "save-view-modal-children-body-radio-group", children: [
1317
- /* @__PURE__ */ jsx("span", { className: "save-view-modal-children-body-radio-group-text", children: t("table.views.viewType") }),
1659
+ /* @__PURE__ */ jsx("span", { className: "save-view-modal-children-body-radio-group-text", children: "View type" }),
1318
1660
  /* @__PURE__ */ jsx(
1319
1661
  RadioButtonGroup,
1320
1662
  {
@@ -1334,14 +1676,14 @@ const ColumnsV36 = forwardRef((props, ref) => {
1334
1676
  Checkbox,
1335
1677
  {
1336
1678
  checked: isDefaultView,
1337
- disabled: isReplaceViewSelected,
1338
- label: t("table.views.makeDefault"),
1679
+ disabled: isReplaceViewSelected || isEditView,
1680
+ label: "Make it default view",
1339
1681
  onChange: () => {
1340
1682
  setIsDefaultView(!isDefaultView);
1341
1683
  }
1342
1684
  }
1343
1685
  ) }),
1344
- /* @__PURE__ */ jsx("div", { className: "save-view-modal-children-body-replace-view", children: /* @__PURE__ */ jsx("span", { children: t("table.views.orReplace") }) }),
1686
+ /* @__PURE__ */ jsx("div", { className: "save-view-modal-children-body-replace-view", children: /* @__PURE__ */ jsx("span", { children: "Or replace with saved view" }) }),
1345
1687
  /* @__PURE__ */ jsx("div", { className: "save-view-modal-children-body-replace-view-select", children: /* @__PURE__ */ jsx(
1346
1688
  Select,
1347
1689
  {
@@ -1351,7 +1693,7 @@ const ColumnsV36 = forwardRef((props, ref) => {
1351
1693
  initialOptions: currentSaveViewOptions,
1352
1694
  isDisabled: savedViewsOptions.length === 0 || !isInputValueEmpty && !isReplaceViewSelected || isEditView,
1353
1695
  isOpen,
1354
- label: t("table.views.replaceWith"),
1696
+ label: "Replace with",
1355
1697
  minWidth: "100%",
1356
1698
  selectedOptions: selectedSavedView,
1357
1699
  setCurrentOptions: setCurrentSaveViewOptions,
@@ -1373,13 +1715,13 @@ const ColumnsV36 = forwardRef((props, ref) => {
1373
1715
  setOpenDeletePrompt(false);
1374
1716
  },
1375
1717
  isOpen: openDeletePrompt,
1376
- primaryButtonLabel: t("table.views.deleteConfirm"),
1718
+ primaryButtonLabel: "Yes,Delete",
1377
1719
  primaryButtonProps: {
1378
1720
  loading: props.isDeleteViewLoading,
1379
1721
  iconPlacement: "right"
1380
1722
  },
1381
- secondaryButtonLabel: t("common.cancel"),
1382
- title: t("table.views.deleteTitle"),
1723
+ secondaryButtonLabel: "Cancel",
1724
+ title: "Delete, Are you sure?",
1383
1725
  variant: "error",
1384
1726
  onPrimaryButtonClick: (e) => {
1385
1727
  var _a2;
@@ -1397,66 +1739,81 @@ const ColumnsV36 = forwardRef((props, ref) => {
1397
1739
  /* @__PURE__ */ jsx("span", { className: "table-setting-column-collapse-slot", children: /* @__PURE__ */ jsx(
1398
1740
  IconButton,
1399
1741
  {
1400
- "aria-label": collapsedColumn ? t("table.columns.expandColumns") : t("table.columns.collapseColumns"),
1742
+ "aria-label": collapsedColumn ? "Expand columns" : "Collapse columns",
1401
1743
  className: "table-setting-column-collapse-btn",
1402
1744
  onClick: toggleColumnCollapse,
1403
1745
  children: collapsedColumn ? /* @__PURE__ */ jsx(default_1$3, {}) : /* @__PURE__ */ jsx(default_1, {})
1404
1746
  }
1405
1747
  ) }),
1406
1748
  /* @__PURE__ */ jsxs("div", { className: "table-setting-column-search-controls", children: [
1407
- /* @__PURE__ */ jsx(
1408
- Checkbox,
1409
- {
1410
- "aria-label": t("table.columns.toggleAll"),
1411
- checked: allCheckState.checked,
1412
- variant: allCheckState.indeterminate ? "dashed" : "default",
1413
- onChange: onAllColumnCheckBoxChange
1414
- }
1415
- ),
1416
- /* @__PURE__ */ jsx(
1417
- Input,
1418
- {
1419
- placeholder: t("common.search"),
1420
- rightIcon: /* @__PURE__ */ jsx(default_1$2, {}),
1421
- value: searchInputValue,
1422
- onChange: handleSearchChange
1423
- }
1424
- )
1749
+ /* @__PURE__ */ jsxs("div", { className: "table-settings-lhs", children: [
1750
+ /* @__PURE__ */ jsx(
1751
+ Checkbox,
1752
+ {
1753
+ "aria-label": "Toggle all columns",
1754
+ checked: allCheckState.checked,
1755
+ variant: allCheckState.indeterminate ? "dashed" : "default",
1756
+ onChange: onAllColumnCheckBoxChange
1757
+ }
1758
+ ),
1759
+ /* @__PURE__ */ jsx(
1760
+ Input,
1761
+ {
1762
+ "aria-label": "Search columns",
1763
+ className: "table-settings-input",
1764
+ placeholder: "Search",
1765
+ rightIcon: rightIconForSearchInout,
1766
+ value: searchInputValue,
1767
+ onChange: handleSearchChange,
1768
+ onKeyDown: handleSearchKeyDown
1769
+ }
1770
+ )
1771
+ ] }),
1772
+ /* @__PURE__ */ jsxs("div", { className: "table-setting-column-search-nav", role: "status", children: [
1773
+ /* @__PURE__ */ jsx("span", { className: "table-setting-column-search-nav-count", children: searchMatchCount ? `${normalizedMatchIndex + 1}/${searchMatchCount}` : "0/0" }),
1774
+ /* @__PURE__ */ jsx(
1775
+ IconButton,
1776
+ {
1777
+ "aria-label": "Previous match",
1778
+ className: "table-setting-column-search-nav-btn",
1779
+ disabled: !searchMatchCount,
1780
+ onClick: onSearchUpArrowClick,
1781
+ children: /* @__PURE__ */ jsx(default_1, { fontSize: "small" })
1782
+ }
1783
+ ),
1784
+ /* @__PURE__ */ jsx(
1785
+ IconButton,
1786
+ {
1787
+ "aria-label": "Next match",
1788
+ className: "table-setting-column-search-nav-btn",
1789
+ disabled: !searchMatchCount,
1790
+ onClick: onSearchDownArrowClick,
1791
+ children: /* @__PURE__ */ jsx(default_1$1, { fontSize: "small" })
1792
+ }
1793
+ )
1794
+ ] })
1425
1795
  ] })
1426
1796
  ] }),
1427
1797
  !collapsedColumn && /* @__PURE__ */ jsx(
1428
1798
  "div",
1429
1799
  {
1430
- ref: collapseContainerRef,
1431
- className: `table-setting-column-collapse-container ${props.isSaveViewEnabled ? "save-view-enabled" : ""} ${shouldVirtualize ? "is-virtualized" : ""}`,
1800
+ className: `table-setting-column-collapse-container ${props.isSaveViewEnabled ? "save-view-enabled" : ""}`,
1432
1801
  children: /* @__PURE__ */ jsxs(
1433
1802
  DndContext,
1434
1803
  {
1435
- autoScroll: !shouldVirtualize,
1436
1804
  collisionDetection: closestCenter,
1437
1805
  sensors,
1438
1806
  onDragCancel: handleDragCancel,
1439
1807
  onDragEnd: handleDragEnd,
1440
- onDragMove: handleDragMove,
1441
1808
  onDragStart: handleDragStart,
1442
1809
  children: [
1443
1810
  /* @__PURE__ */ jsxs(SortableContext, { items: sortableItems, children: [
1444
1811
  frozenColumn.length > 0 && !(frozenColumn.length === 1 && frozenColumn[0].headerName === "N/A") && /* @__PURE__ */ jsxs("div", { className: "table-setting-collapse-columns-container", children: [
1445
- /* @__PURE__ */ jsx("h3", { children: t("table.columns.frozen") }),
1446
- shouldVirtualize ? /* @__PURE__ */ jsx(
1447
- VirtualColumnList,
1448
- {
1449
- className: "table-setting-frozen-columns-list",
1450
- itemData: frozenItemData,
1451
- maxHeight: listHeights.frozen,
1452
- outerElementType: FrozenListOuter,
1453
- outerRef: frozenListRef,
1454
- rows: frozenRows
1455
- }
1456
- ) : /* @__PURE__ */ jsx(
1812
+ /* @__PURE__ */ jsx("h3", { children: "Frozen columns" }),
1813
+ /* @__PURE__ */ jsx(
1457
1814
  "div",
1458
1815
  {
1459
- "aria-label": t("table.columns.frozen"),
1816
+ "aria-label": "Frozen columns",
1460
1817
  className: "table-setting-frozen-columns-list",
1461
1818
  role: "tree",
1462
1819
  children: filteredFrozenColumns.map(
@@ -1466,14 +1823,14 @@ const ColumnsV36 = forwardRef((props, ref) => {
1466
1823
  )
1467
1824
  ] }),
1468
1825
  /* @__PURE__ */ jsxs("div", { className: "table-setting-scroll-columns-container", children: [
1469
- /* @__PURE__ */ jsx("h3", { children: t("table.columns.scrollable") }),
1826
+ /* @__PURE__ */ jsx("h3", { children: "Scrollable Columns" }),
1470
1827
  /* @__PURE__ */ jsxs("div", { className: "table-setting-scroll-main-column-list", children: [
1471
1828
  /* @__PURE__ */ jsxs("div", { className: "table-setting-scroll-main-column", children: [
1472
1829
  /* @__PURE__ */ jsxs("div", { className: "table-setting-column-leading", children: [
1473
1830
  /* @__PURE__ */ jsx("span", { className: "table-setting-column-collapse-slot", children: /* @__PURE__ */ jsx(
1474
1831
  IconButton,
1475
1832
  {
1476
- "aria-label": collapsedScrollable ? t("table.columns.expandScrollable") : t("table.columns.collapseScrollable"),
1833
+ "aria-label": collapsedScrollable ? "Expand scrollable columns" : "Collapse scrollable columns",
1477
1834
  className: "table-setting-column-collapse-btn",
1478
1835
  onClick: toggleScrollableCollapse,
1479
1836
  children: collapsedScrollable ? /* @__PURE__ */ jsx(default_1$3, {}) : /* @__PURE__ */ jsx(default_1, {})
@@ -1482,29 +1839,19 @@ const ColumnsV36 = forwardRef((props, ref) => {
1482
1839
  /* @__PURE__ */ jsx(
1483
1840
  Checkbox,
1484
1841
  {
1485
- "aria-label": t("table.columns.toggleMain"),
1842
+ "aria-label": "Toggle main columns",
1486
1843
  checked: mainCheckState.checked,
1487
1844
  variant: mainCheckState.indeterminate ? "dashed" : "default",
1488
1845
  onChange: onMainCheckboxChange
1489
1846
  }
1490
1847
  )
1491
1848
  ] }),
1492
- /* @__PURE__ */ jsx("span", { className: "table-setting-column-name", children: t("table.columns.main") })
1849
+ /* @__PURE__ */ jsx("span", { className: "table-setting-column-name", children: "Main Column" })
1493
1850
  ] }),
1494
- shouldVirtualize ? /* @__PURE__ */ jsx(
1495
- VirtualColumnList,
1496
- {
1497
- className: "table-setting-scroll-inner-column-list",
1498
- itemData: scrollableItemData,
1499
- maxHeight: listHeights.scrollable,
1500
- outerElementType: ScrollableListOuter,
1501
- outerRef: scrollableListRef,
1502
- rows: scrollableRows
1503
- }
1504
- ) : /* @__PURE__ */ jsx(
1851
+ /* @__PURE__ */ jsx(
1505
1852
  "div",
1506
1853
  {
1507
- "aria-label": t("table.columns.scrollable"),
1854
+ "aria-label": "Scrollable columns",
1508
1855
  className: "table-setting-scroll-inner-column-list",
1509
1856
  role: "tree",
1510
1857
  children: !collapsedScrollable && filteredScrollableColumns.map(
@@ -1526,6 +1873,30 @@ const ColumnsV36 = forwardRef((props, ref) => {
1526
1873
  )
1527
1874
  ] });
1528
1875
  });
1876
+ const updateFontSizeOnToolPanel = (fontSizeType) => {
1877
+ let fontSize;
1878
+ switch (fontSizeType) {
1879
+ case "small":
1880
+ fontSize = "12px";
1881
+ break;
1882
+ case "medium":
1883
+ fontSize = "14px";
1884
+ break;
1885
+ case "large":
1886
+ fontSize = "16px";
1887
+ break;
1888
+ default:
1889
+ fontSize = "14px";
1890
+ }
1891
+ return fontSize;
1892
+ };
1529
1893
  export {
1530
- ColumnsV36
1894
+ Columns,
1895
+ freezeColumn,
1896
+ getMainMenuItems,
1897
+ getTableMeta,
1898
+ onColMenuAutoAdjustClick,
1899
+ onColMenuFreezeClick,
1900
+ sortFunc,
1901
+ updateFontSizeOnToolPanel
1531
1902
  };