@adaptabletools/adaptable-cjs 22.0.11 → 22.1.0-canary.1

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 (75) hide show
  1. package/index.css +19 -1
  2. package/index.css.map +1 -1
  3. package/package.json +3 -4
  4. package/src/AdaptableOptions/DashboardOptions.d.ts +2 -2
  5. package/src/AdaptableState/Common/AdaptablePredicate.js +1 -1
  6. package/src/AdaptableState/InitialState.d.ts +2 -2
  7. package/src/AdaptableState/LayoutState.d.ts +44 -0
  8. package/src/Api/CalendarApi.d.ts +15 -0
  9. package/src/Api/ColumnScopeApi.d.ts +5 -0
  10. package/src/Api/Implementation/CalendarApiImpl.d.ts +3 -0
  11. package/src/Api/Implementation/CalendarApiImpl.js +10 -0
  12. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  13. package/src/Api/Implementation/ColumnApiImpl.js +15 -0
  14. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -0
  15. package/src/Api/Implementation/ColumnScopeApiImpl.js +12 -0
  16. package/src/Api/Implementation/LayoutHelpers.js +12 -0
  17. package/src/Api/Internal/AlertInternalApi.js +4 -1
  18. package/src/Api/Internal/FormatColumnInternalApi.js +3 -3
  19. package/src/Strategy/FlashingCellModule.js +1 -0
  20. package/src/Strategy/PlusMinusModule.js +3 -3
  21. package/src/Strategy/SmartEditModule.js +1 -1
  22. package/src/Utilities/Constants/GeneralConstants.js +2 -1
  23. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
  24. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +41 -2
  25. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  26. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +31 -2
  27. package/src/Utilities/Helpers/AdaptableHelper.js +30 -4
  28. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -0
  29. package/src/Utilities/Services/MetamodelService.js +18 -18
  30. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -0
  31. package/src/Utilities/Services/QueryLanguageService.js +20 -8
  32. package/src/Utilities/Services/ValidationService.js +3 -1
  33. package/src/View/Components/EntityRulesEditor/index.js +1 -1
  34. package/src/View/Components/ModuleValueSelector/index.js +9 -1
  35. package/src/View/Components/ReorderDraggable/index.js +21 -35
  36. package/src/View/Components/ValueSelector/index.js +45 -49
  37. package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
  38. package/src/View/Layout/Wizard/LayoutWizard.js +16 -1
  39. package/src/View/Layout/Wizard/sections/ColumnsSection.js +30 -18
  40. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
  41. package/src/View/Layout/Wizard/sections/RowSelectionSection.d.ts +8 -0
  42. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +146 -0
  43. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +0 -1
  44. package/src/agGrid/AdaptableAgGrid.js +10 -0
  45. package/src/components/Dashboard/Dashboard.js +1 -1
  46. package/src/components/DragAndDropContext/ModuleManager.d.ts +1 -0
  47. package/src/components/DragAndDropContext/ModuleManager.js +11 -36
  48. package/src/components/DragAndDropContext/TabList.d.ts +11 -6
  49. package/src/components/DragAndDropContext/TabList.js +77 -35
  50. package/src/components/DragAndDropContext/UnusedPanel.js +9 -20
  51. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +2 -0
  52. package/src/components/ExpressionEditor/BaseEditorInput.js +4 -0
  53. package/src/components/ExpressionEditor/EditorInput.d.ts +3 -1
  54. package/src/components/ExpressionEditor/EditorInput.js +20 -9
  55. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.d.ts +2 -1
  56. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +1 -10
  57. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +16 -18
  58. package/src/components/ExpressionEditor/index.d.ts +2 -1
  59. package/src/components/ExpressionEditor/index.js +1 -1
  60. package/src/components/Tree/TreeDropdown/index.js +37 -26
  61. package/src/components/dnd/index.d.ts +3 -13
  62. package/src/components/dnd/index.js +11 -59
  63. package/src/env.js +2 -2
  64. package/src/layout-manager/src/LayoutManagerModel.d.ts +2 -1
  65. package/src/layout-manager/src/index.d.ts +10 -0
  66. package/src/layout-manager/src/index.js +156 -4
  67. package/src/layout-manager/src/normalizeLayoutModel.js +8 -0
  68. package/src/layout-manager/src/simplifyLayoutModel.js +6 -0
  69. package/src/metamodel/adaptable-metamodel-model.d.ts +22 -13
  70. package/src/metamodel/adaptable.metamodel.d.ts +3792 -5143
  71. package/src/metamodel/adaptable.metamodel.js +1 -1
  72. package/src/parser/src/parser.js +55 -1218
  73. package/src/parser/src/types.d.ts +5 -0
  74. package/src/types.d.ts +1 -1
  75. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -5,43 +5,29 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const dnd_1 = require("../../../components/dnd");
7
7
  const icons_1 = require("../../../components/icons");
8
- const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
9
8
  const Flex_1 = require("../../../components/Flex");
10
9
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
11
- const twMerge_1 = require("../../../twMerge");
12
10
  function ReorderDraggable(props) {
13
- const { onChange, order, toIdentifier, isOptionDraggable, disabled, } = props;
11
+ const { onChange, order, toIdentifier, isOptionDraggable, disabled } = props;
14
12
  const baseClassName = 'ab-ReorderDraggable';
15
- const renderOption = (option, index) => {
16
- const identifier = toIdentifier(option);
17
- const renderNode = (flexProps, dragHandleProps) => {
18
- const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
19
- return (React.createElement(Flex_1.Flex, { alignItems: "center", key: identifier ?? index, "data-index": index, "data-id": identifier, "data-name": "option", ...flexProps, className: (0, clsx_1.default)(`${baseClassName}__option ${index ? 'twa:mt-1' : 'twa:mt-0'} twa:bg-primary twa:p-2 ${flexProps?.className || ''}`, props.optionClassName?.(option)), onClick: (e) => props.onOptionClick?.(option, e) },
20
- React.createElement(Flex_1.Flex, { className: "twa:flex-1", flexDirection: "row", alignItems: "center" },
21
- reorderable ? (React.createElement(Flex_1.Box, { ...dragHandleProps, className: `twa:mr-3 ${dragHandleProps?.className || ''}` },
22
- React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : (React.createElement(Flex_1.Box, { className: "twa:mr-3" },
23
- React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }))),
24
- props.renderOption(option, index))));
25
- };
26
- const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
27
- return (React.createElement(dnd_1.Draggable, { key: identifier, index: index, draggableId: `${identifier}`, isDragDisabled: !reorderable || disabled }, (draggableProvided) => {
28
- return renderNode({
29
- ref: draggableProvided.innerRef,
30
- ...draggableProvided.draggableProps,
31
- style: draggableProvided.draggableProps.style,
32
- }, draggableProvided.dragHandleProps);
33
- }));
34
- };
35
- return (React.createElement(Flex_1.Flex, { style: props.style, className: (0, twMerge_1.twMerge)(`${baseClassName} twa:flex-1`, props.className), flexDirection: "column" },
36
- React.createElement(dnd_1.DragDropContext, { onDragEnd: (result) => {
37
- const { source, destination } = result;
38
- const newOrder = ArrayExtensions_1.default.reorderArray(props.order, source.index, destination.index);
39
- onChange(newOrder);
40
- } },
41
- React.createElement(Flex_1.Flex, { className: `${baseClassName}__body twa:flex-1 twa:overflow-auto`, flexDirection: "column" },
42
- React.createElement(dnd_1.Droppable, { droppableId: "droppable" }, (droppableProvided) => {
43
- return (React.createElement("div", { ref: droppableProvided.innerRef, ...droppableProvided.droppableProps },
44
- order.map(renderOption),
45
- droppableProvided.placeholder));
46
- })))));
13
+ return (React.createElement(Flex_1.Flex, { style: props.style, className: `${baseClassName} twa:flex-1`, flexDirection: "column" },
14
+ React.createElement(dnd_1.DragDropProvider, null,
15
+ React.createElement(Flex_1.Flex, { className: `${baseClassName}__body twa:flex-1 twa:overflow-y-auto twa:overflow-x-hidden`, flexDirection: "column" },
16
+ React.createElement(dnd_1.DragList, { dragListId: "reorder-draggable", orientation: "vertical", dragStrategy: "proxy", preserveDragSpace: true, onDragProxyMove: dnd_1.defaultDragProxyMove, onDragProxySetup: ({ proxyElement }) => {
17
+ proxyElement.classList.add('twa:shadow-md');
18
+ }, onDrop: (sortedIndexes) => {
19
+ onChange(sortedIndexes.map((i) => order[i]));
20
+ } }, (listDomProps) => (React.createElement("div", { ...listDomProps }, order.map((option, index) => {
21
+ const identifier = toIdentifier(option);
22
+ const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
23
+ return (React.createElement(dnd_1.DragList.DraggableItem, { key: identifier, id: `${identifier}` }, (itemDomProps, itemContext) => {
24
+ const { onPointerDown, ...restDomProps } = itemDomProps;
25
+ return (React.createElement(Flex_1.Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: (0, clsx_1.default)(`${baseClassName}__option`, index ? 'twa:mt-1' : 'twa:mt-0', 'twa:bg-primary twa:p-2', itemContext.active ? 'twa:shadow-md' : '', restDomProps.className, props.optionClassName?.(option)), onClick: (e) => props.onOptionClick?.(option, e) },
26
+ React.createElement(Flex_1.Flex, { className: "twa:flex-1", flexDirection: "row", alignItems: "center" },
27
+ reorderable && !disabled ? (React.createElement(Flex_1.Box, { onPointerDown: onPointerDown, className: "twa:mr-3" },
28
+ React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : (React.createElement(Flex_1.Box, { className: "twa:mr-3" },
29
+ React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }))),
30
+ props.renderOption(option, index))));
31
+ }));
32
+ }))))))));
47
33
  }
@@ -10,7 +10,6 @@ const CheckBox_1 = require("../../../components/CheckBox");
10
10
  const icons_1 = require("../../../components/icons");
11
11
  const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
12
12
  const AdaptableFormControlTextClear_1 = require("../Forms/AdaptableFormControlTextClear");
13
- const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
14
13
  const Flex_1 = require("../../../components/Flex");
15
14
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
16
15
  function useValuesMap({ options, value, toIdentifier, selectedMap, }) {
@@ -62,13 +61,14 @@ function ValueSelector(props) {
62
61
  const identifier = toIdentifier(option);
63
62
  const label = !allowReorder ? preparedToLabel(option) : null;
64
63
  const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
65
- const renderNode = (props, dragHandleProps) => {
66
- return (React.createElement(Flex_1.Flex, { alignItems: "center", key: identifier ?? index, "data-index": index, "data-id": identifier, "data-name": "option", ...props, className: (0, clsx_1.default)(`twa:bg-primary twa:text-text-on-primary twa:rounded-standard twa:p-2`, {
64
+ return (React.createElement(dnd_1.DragList.DraggableItem, { key: identifier, id: `${identifier}` }, (itemDomProps) => {
65
+ const { onPointerDown, ...restDomProps } = itemDomProps;
66
+ return (React.createElement(Flex_1.Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: (0, clsx_1.default)('twa:bg-primary twa:text-text-on-primary twa:rounded-standard twa:p-2', {
67
67
  'twa:mt-1': index,
68
68
  'twa:mt-0': !index,
69
- }, props.className, `${baseClassName}__option`) },
69
+ }, restDomProps.className, `${baseClassName}__option`) },
70
70
  React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-1" },
71
- reorderable ? (React.createElement(Flex_1.Box, { ...dragHandleProps, className: (0, clsx_1.default)('twa:mr-3', dragHandleProps?.className) },
71
+ reorderable ? (React.createElement(Flex_1.Box, { onPointerDown: onPointerDown, className: "twa:mr-3" },
72
72
  React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : null,
73
73
  singleSelect ? (React.createElement(Radio_1.default, { checked: selectedMap.has(identifier), "data-name": identifier, onChange: (checked) => {
74
74
  if (checked) {
@@ -89,13 +89,6 @@ function ValueSelector(props) {
89
89
  notifyChange();
90
90
  }, checked: selectedMap.has(identifier) }, label)),
91
91
  React.createElement(Flex_1.Box, { className: "twa:ml-2 twa:flex-1" }, allowReorder ? preparedToLabel(option) : null))));
92
- };
93
- return (React.createElement(dnd_1.Draggable, { key: identifier, index: index, draggableId: `${identifier}`, isDragDisabled: !reorderable }, (draggableProvided) => {
94
- return renderNode({
95
- ref: draggableProvided.innerRef,
96
- ...draggableProvided.draggableProps,
97
- style: draggableProvided.draggableProps.style,
98
- }, draggableProvided.dragHandleProps);
99
92
  }));
100
93
  };
101
94
  const showOnlySelectedCheckbox = (React.createElement(CheckBox_1.CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly }, showSelectedOnlyLabel ?? 'Show Selected Only'));
@@ -120,45 +113,48 @@ function ValueSelector(props) {
120
113
  return (React.createElement(Flex_1.Flex, { style: props.style, className: (0, clsx_1.default)('twa:flex-1', baseClassName), flexDirection: "column" },
121
114
  React.createElement(Flex_1.Flex, { className: "twa:mb-1" }, showFilterInput && filter ? (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Type to search", className: "twa:flex-1 twa:border-0 twa:m-[3px]" })) : (React.createElement(Flex_1.Box, { className: "twa:flex-1" }))),
122
115
  (0, exports.renderSelectionSection)(selectionSectionProps),
123
- React.createElement(dnd_1.DragDropContext, { onDragEnd: (result) => {
124
- const { source, destination } = result;
125
- const selection = [];
126
- const extraKeys = [];
127
- for (let [key, value] of selectedMap) {
128
- if (value != null) {
129
- selection.push(key);
130
- }
131
- else {
132
- // null/non-existent keys have to be stored separately
133
- extraKeys.push(key);
134
- }
135
- }
136
- const clone = new Map(selectedMap);
137
- const newSelection = ArrayExtensions_1.default.reorderArray(selection, source.index, destination.index);
138
- // and then pushed back in the new order, at the end
139
- newSelection.push(...extraKeys);
140
- selectedMap.clear();
141
- newSelection.forEach((key) => {
142
- selectedMap.set(key, clone.get(key));
143
- });
144
- notifyChange();
145
- } },
116
+ React.createElement(dnd_1.DragDropProvider, null,
146
117
  React.createElement(Flex_1.Flex, { className: `${baseClassName}__body twa:flex-1 twa:overflow-auto`, flexDirection: "column" },
147
- React.createElement(dnd_1.Droppable, { droppableId: "droppable" }, (droppableProvided) => {
148
- return (React.createElement("div", { ref: droppableProvided.innerRef, ...droppableProvided.droppableProps },
149
- options
150
- .filter((option) => {
151
- let result = true;
152
- if (filter) {
153
- result = filter(option, searchInputValue);
118
+ React.createElement(dnd_1.DragList, { dragListId: "value-selector", orientation: "vertical", onDragProxyMove: dnd_1.defaultDragProxyMove, onDragProxySetup: ({ proxyElement }) => {
119
+ proxyElement.classList.add('twa:shadow-md');
120
+ }, onDrop: (_sortedIndexes) => {
121
+ const selection = [];
122
+ const extraKeys = [];
123
+ for (const [key, value] of selectedMap) {
124
+ if (value != null) {
125
+ selection.push(key);
154
126
  }
155
- result =
156
- result && (selectedOnly ? selectedMap.has(toIdentifier(option)) : true);
157
- return result;
158
- })
159
- .map(renderOption),
160
- droppableProvided.placeholder));
161
- })))));
127
+ else {
128
+ // null/non-existent keys have to be stored separately
129
+ extraKeys.push(key);
130
+ }
131
+ }
132
+ const clone = new Map(selectedMap);
133
+ // const newSelection: ID_TYPE[] = ArrayExtensions.reorderArray(
134
+ // selection,
135
+ // dragIndex,
136
+ // dropIndex
137
+ // );
138
+ const newSelection = _sortedIndexes
139
+ .map((index) => selection[index])
140
+ .filter((x) => x != null);
141
+ newSelection.push(...extraKeys);
142
+ selectedMap.clear();
143
+ newSelection.forEach((key) => {
144
+ selectedMap.set(key, clone.get(key));
145
+ });
146
+ notifyChange();
147
+ } }, (listDomProps) => (React.createElement("div", { ...listDomProps }, options
148
+ .filter((option) => {
149
+ let result = true;
150
+ if (filter) {
151
+ result = filter(option, searchInputValue);
152
+ }
153
+ result =
154
+ result && (selectedOnly ? selectedMap.has(toIdentifier(option)) : true);
155
+ return result;
156
+ })
157
+ .map(renderOption))))))));
162
158
  }
163
159
  const renderSelectionSection = (props) => {
164
160
  const { value, options, disabled, singleSelect, toLabel, toIdentifier, } = props;
@@ -41,6 +41,6 @@ const PinnedToolbarsSelector = (props) => {
41
41
  editTabName: false,
42
42
  }, onTabsChange: (tabs) => {
43
43
  dispatch((0, DashboardRedux_1.DashboardSetPinnedToolbars)(tabs[0].Items));
44
- }, disabled: isDashboardDisabled, tabs: tabs, availableItems: toolbars, tabsTitle: 'Pinned Toolbars', unusedPanelTitle: "Available Pinned Toolbars", dragItemText: "Drag into the Panel below" }));
44
+ }, disabled: isDashboardDisabled, tabs: tabs, availableItems: toolbars, filterOutSelectedItems: true, tabsTitle: 'Pinned Toolbars', unusedPanelTitle: "Available Pinned Toolbars", dragItemText: "Drag into the Panel below" }));
45
45
  };
46
46
  exports.PinnedToolbarsSelector = PinnedToolbarsSelector;
@@ -17,6 +17,7 @@ const SortSection_1 = require("./sections/SortSection");
17
17
  const FilterSection_1 = require("./sections/FilterSection");
18
18
  const GridFilterSection_1 = require("./sections/GridFilterSection");
19
19
  const RowSummarySection_1 = require("./sections/RowSummarySection");
20
+ const RowSelectionSection_1 = require("./sections/RowSelectionSection");
20
21
  const RowSummary_1 = require("../../../AdaptableState/Common/RowSummary");
21
22
  const isPivotLayout_1 = require("../../../Utilities/isPivotLayout");
22
23
  const PivotRowGroupingSection_1 = require("./sections/PivotRowGroupingSection");
@@ -118,7 +119,7 @@ const LayoutWizard = (props) => {
118
119
  isValid: (data) => (0, PivotAggregationsSection_1.isPivotAggregationsSectionValid)(data),
119
120
  render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2 twa:h-full" },
120
121
  React.createElement(PivotAggregationsSection_1.PivotAggregationsSection, { onChange: (layout) => {
121
- let newLayout = (0, Helper_1.cloneObject)(layout);
122
+ const newLayout = (0, Helper_1.cloneObject)(layout);
122
123
  setLayout(newLayout);
123
124
  } }))),
124
125
  },
@@ -148,6 +149,13 @@ const LayoutWizard = (props) => {
148
149
  render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2 twa:h-full" },
149
150
  React.createElement(GridFilterSection_1.GridFilterSection, { onChange: (newLayout) => setLayout(newLayout) }))),
150
151
  },
152
+ {
153
+ title: 'Row Selection',
154
+ details: 'Configure Row Selection',
155
+ renderSummary: () => React.createElement(RowSelectionSection_1.RowSelectionSectionSummary, null),
156
+ render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
157
+ React.createElement(RowSelectionSection_1.RowSelectionSection, { onChange: (newLayout) => setLayout(newLayout) }))),
158
+ },
151
159
  '-',
152
160
  {
153
161
  details: 'Review your Pivot Layout',
@@ -261,6 +269,13 @@ const LayoutWizard = (props) => {
261
269
  render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2 twa:h-full" },
262
270
  React.createElement(GridFilterSection_1.GridFilterSection, { onChange: (newLayout) => setLayout(newLayout) }))),
263
271
  },
272
+ {
273
+ title: 'Row Selection',
274
+ details: 'Configure Row Selection',
275
+ renderSummary: () => React.createElement(RowSelectionSection_1.RowSelectionSectionSummary, null),
276
+ render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
277
+ React.createElement(RowSelectionSection_1.RowSelectionSection, { onChange: (newLayout) => setLayout(newLayout) }))),
278
+ },
264
279
  '-',
265
280
  {
266
281
  details: 'Review your Table Layout',
@@ -137,26 +137,29 @@ const ColumnsSectionSummary = () => {
137
137
  React.createElement(InfiniteTable_1.InfiniteTableGrid, { columnTypes: columnTypes, rowHeight: rowHeight, columnHeaderHeight: headerHeight, domProps: tableDOMProps, columns: columns })));
138
138
  };
139
139
  exports.ColumnsSectionSummary = ColumnsSectionSummary;
140
+ const isSelectionColumn = (columnId) => columnId === GeneralConstants_1.AG_GRID_SELECTION_COLUMN;
140
141
  const isColumnVisible = (options) => {
141
142
  const { columnId, layout } = options;
142
143
  const isRowGroupColumn = (0, ColumnApiImpl_1.isAutoRowGroupColumn)(columnId);
143
144
  const visible = (!(0, isPivotLayout_1.isPivotLayout)(layout) &&
144
145
  layout.TableColumns.includes(columnId) &&
145
146
  layout.ColumnVisibility?.[columnId] !== false) ||
146
- isRowGroupColumn;
147
+ isRowGroupColumn ||
148
+ isSelectionColumn(columnId);
147
149
  return visible;
148
150
  };
149
151
  const ColumnRow = (props) => {
150
152
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
151
153
  const initialHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(props.column.columnId, props.layout);
152
154
  const isRowGroupColumn = (0, ColumnApiImpl_1.isAutoRowGroupColumn)(props.column.columnId);
155
+ const isSelectionCol = isSelectionColumn(props.column.columnId);
153
156
  const { column } = props;
154
157
  const visible = isColumnVisible({ columnId: column.columnId, layout: props.layout });
155
158
  return (React.createElement(Flex_1.Box, { "data-name": props.column.columnId, className: "twa:flex-1" },
156
159
  React.createElement(Flex_1.Flex, { className: "ab-Layout-Wizard__ColumnRow__Header twa:my-1" },
157
160
  React.createElement(CheckBox_1.CheckBox, { "data-name": column.columnId, onChange: (checked) => {
158
161
  props.onColumnVisibilityChange(column.columnId, checked);
159
- }, disabled: column.hideable === false || isRowGroupColumn, onClick: (event) => {
162
+ }, disabled: column.hideable === false || isRowGroupColumn || isSelectionCol, onClick: (event) => {
160
163
  event.stopPropagation();
161
164
  }, checked: visible }),
162
165
  React.createElement(Flex_1.Flex, { className: "twa:mx-2", alignItems: "center", "data-name": "column-label" }, initialHeader),
@@ -169,7 +172,12 @@ const ColumnsSection = (props) => {
169
172
  const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
170
173
  const [searchInputValue, setSearchInputValue] = React.useState('');
171
174
  const [selectedColumnId, setSelectedColumnId] = React.useState(null);
172
- let hasSelectionColumn = false;
175
+ // the selection column is a special column managed by AG Grid - it is not
176
+ // returned by `getUIAvailableColumns`, but we still want to expose it in the
177
+ // column list (similar to auto row group columns) so users can reorder/pin it
178
+ const hasSelectionColumn = adaptable.api.columnApi
179
+ .getColumns()
180
+ .some((col) => col.isGeneratedSelectionColumn);
173
181
  const allColumns = adaptable.api.columnApi
174
182
  .getUIAvailableColumns()
175
183
  .filter((col) => {
@@ -180,14 +188,9 @@ const ColumnsSection = (props) => {
180
188
  })
181
189
  // if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
182
190
  .filter((col) => !col.isGeneratedPivotResultColumn)
183
- // also we need to filter out selection column
184
- .filter((col) => {
185
- const result = !col.isGeneratedSelectionColumn;
186
- if (!result) {
187
- hasSelectionColumn = true;
188
- }
189
- return result;
190
- });
191
+ // selection columns are not returned by `getUIAvailableColumns` but guard
192
+ // against any future change
193
+ .filter((col) => !col.isGeneratedSelectionColumn);
191
194
  const onChange = (data) => {
192
195
  if (hasSelectionColumn &&
193
196
  Array.isArray(data.TableColumns) &&
@@ -214,13 +217,22 @@ const ColumnsSection = (props) => {
214
217
  !allColumns.find((col) => col.columnId === GeneralConstants_1.AG_GRID_GROUPED_COLUMN)) {
215
218
  allColumns.unshift((0, ColumnApiImpl_1.generateAutoTreeSingleColumn)());
216
219
  }
220
+ if (hasSelectionColumn) {
221
+ allColumns.unshift((0, ColumnApiImpl_1.generateSelectionColumn)());
222
+ }
217
223
  const colIdToCol = allColumns.reduce((acc, col) => {
218
224
  if (col) {
219
225
  acc[col.columnId] = col;
220
226
  }
221
227
  return acc;
222
228
  }, {});
223
- const TableColumns = layout.TableColumns;
229
+ let TableColumns = layout.TableColumns;
230
+ // when the selection column exists but is not explicitly listed in
231
+ // TableColumns, `sortArrayWithOrder` would push it to the end - instead we
232
+ // want it at the start (consistent with AG Grid's default position for it)
233
+ if (hasSelectionColumn && !TableColumns.includes(GeneralConstants_1.AG_GRID_SELECTION_COLUMN)) {
234
+ TableColumns = [GeneralConstants_1.AG_GRID_SELECTION_COLUMN, ...TableColumns];
235
+ }
224
236
  const ColumnOrderAllColumns = ArrayExtensions_1.default.sortArrayWithOrder(allColumns.map((col) => col.columnId), TableColumns, { sortUnorderedItems: false }).map((colId) => colIdToCol[colId]);
225
237
  const currentOrder = searchInputValue
226
238
  ? ColumnOrderAllColumns.filter((col) => {
@@ -264,7 +276,7 @@ const ColumnsSection = (props) => {
264
276
  const columnIdArray = Array.isArray(columnId) ? columnId : [columnId];
265
277
  const columnIdSet = new Set(columnIdArray);
266
278
  const ColumnVisibility = { ...layout.ColumnVisibility };
267
- let TableColumns = [...layout.TableColumns];
279
+ let newTableColumns = [...TableColumns];
268
280
  if (visible) {
269
281
  columnIdArray.forEach((colId) => {
270
282
  delete ColumnVisibility[colId];
@@ -277,11 +289,11 @@ const ColumnsSection = (props) => {
277
289
  }
278
290
  const columnIds = ColumnOrderAllColumns.map((col) => col.columnId);
279
291
  const idsToIndexes = new Map(columnIds.map((colId, index) => [colId, index]));
280
- const columnOrderSet = new Set(TableColumns);
292
+ const columnOrderSet = new Set(newTableColumns);
281
293
  const currentColumnIdsAreIncluded = columnIdArray.every((colId) => columnOrderSet.has(colId));
282
294
  if (!currentColumnIdsAreIncluded) {
283
295
  const biggestIndex = Math.max(...columnIdArray.map((colId) => idsToIndexes.get(colId)));
284
- TableColumns = columnIds.filter((colId) => {
296
+ newTableColumns = columnIds.filter((colId) => {
285
297
  const isCurrent = columnOrderSet.has(colId);
286
298
  if (isCurrent) {
287
299
  return true;
@@ -303,7 +315,7 @@ const ColumnsSection = (props) => {
303
315
  }
304
316
  onChange({
305
317
  ...layout,
306
- TableColumns: TableColumns,
318
+ TableColumns: newTableColumns,
307
319
  ColumnVisibility,
308
320
  });
309
321
  };
@@ -457,7 +469,7 @@ const ColumnsSection = (props) => {
457
469
  return (React.createElement(ColumnRow, { onColumnNameChange: handleColumnNameChange, onColumnWidthChange: handleColumnWidthChange, onColumnFlexChange: handleColumnFlexChange, onColumnMinWidthChange: handleColumnMinWidthChange, onColumnMaxWidthChange: handleColumnMaxWidthChange, onColumnVisibilityChange: handleColumnVisibilityChange, onPinChange: handlePinChange, layout: layout, column: option }));
458
470
  }, onChange: handleColumnsChange }))),
459
471
  currentOrderIds.length ? (React.createElement(ColumnPropertiesEditor, { column: selectedColumnId && currentOrderIds.includes(selectedColumnId)
460
- ? (colIdToCol[selectedColumnId] ?? null)
472
+ ? colIdToCol[selectedColumnId] ?? null
461
473
  : null, layout: layout, onPinChange: handlePinChange, onColumnNameChange: handleColumnNameChange, onColumnWidthChange: handleColumnWidthChange, onColumnFlexChange: handleColumnFlexChange, onColumnMinWidthChange: handleColumnMinWidthChange, onColumnMaxWidthChange: handleColumnMaxWidthChange, onColumnVisibilityChange: handleColumnVisibilityChange })) : null))));
462
474
  };
463
475
  exports.ColumnsSection = ColumnsSection;
@@ -500,7 +512,7 @@ const ColumnPropertiesEditor = (props) => {
500
512
  React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:mt-3" },
501
513
  React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1" },
502
514
  "Header",
503
- React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input twa:w-full", placeholder: "Custom name (optional)", onChange: () => {
515
+ React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input twa:w-full", placeholder: "Custom name (optional)", disabled: props.column.isGeneratedSelectionColumn, onChange: () => {
504
516
  props.onColumnNameChange(props.column.columnId, event.target.value);
505
517
  }, value: customHeader })),
506
518
  React.createElement(Flex_1.Box, { className: "twa:grid twa:grid-cols-[1fr_1fr] twa:gap-2" },
@@ -97,7 +97,7 @@ const RowGroupingSection = (props) => {
97
97
  onChange(newLayout);
98
98
  } },
99
99
  React.createElement(TypeRadio_1.TypeRadio, { value: "single", text: "Single Column", description: "All Row Grouped Columns display in one hierarchical Column" }),
100
- React.createElement(TypeRadio_1.TypeRadio, { value: "multi", text: "Multiple Columns", description: "Each Row Grouped Columns displays in its own, separate, Column" }))))),
100
+ React.createElement(TypeRadio_1.TypeRadio, { value: "multi", text: "Multiple Columns", description: "Each Row Grouped Column displays in its own, separate, Column" }))))),
101
101
  React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
102
102
  React.createElement(Tabs_1.Tabs.Tab, null, "Row Grouped Columns"),
103
103
  React.createElement(Tabs_1.Tabs.Tab, null, rowGroupsText),
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Layout } from '../../../../../types';
3
+ export declare const RowSelectionSectionSummary: React.FunctionComponent;
4
+ interface RowSelectionSectionProps {
5
+ onChange: (data: Layout) => void;
6
+ }
7
+ export declare const RowSelectionSection: React.FunctionComponent<RowSelectionSectionProps>;
8
+ export {};
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RowSelectionSection = exports.RowSelectionSectionSummary = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const CheckBox_1 = require("../../../../components/CheckBox");
7
+ const Radio_1 = tslib_1.__importStar(require("../../../../components/Radio"));
8
+ const Radio_2 = require("../../../../components/Radio");
9
+ const Tabs_1 = require("../../../../components/Tabs");
10
+ const Tag_1 = require("../../../../components/Tag");
11
+ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
12
+ const Flex_1 = require("../../../../components/Flex");
13
+ const twMerge_1 = require("../../../../twMerge");
14
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
15
+ const isPivotLayout_1 = require("../../../../Utilities/isPivotLayout");
16
+ const GeneralConstants_1 = require("../../../../Utilities/Constants/GeneralConstants");
17
+ const RowSelectionSectionSummary = () => {
18
+ const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
19
+ if (layout.RowSelection === false) {
20
+ return (React.createElement(Flex_1.Box, null,
21
+ React.createElement(Tag_1.Tag, null, "Row Selection Disabled")));
22
+ }
23
+ if (!layout.RowSelection) {
24
+ return (React.createElement(Flex_1.Box, null,
25
+ React.createElement(Tag_1.Tag, null, "Default (from Grid Options)")));
26
+ }
27
+ const rs = layout.RowSelection;
28
+ return (React.createElement(Flex_1.Box, null,
29
+ React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
30
+ "Mode: ",
31
+ rs.Mode === 'multiRow' ? 'Multi Row' : 'Single Row'),
32
+ rs.Checkboxes != null && (React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
33
+ "Checkboxes: ",
34
+ rs.Checkboxes ? 'Yes' : 'No')),
35
+ rs.HeaderCheckbox != null && (React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
36
+ "Header Checkbox: ",
37
+ rs.HeaderCheckbox ? 'Yes' : 'No')),
38
+ rs.EnableClickSelection != null && (React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
39
+ "Click Selection: ",
40
+ String(rs.EnableClickSelection))),
41
+ rs.CheckboxInGroupColumn != null && (React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
42
+ "Checkbox Location: ",
43
+ rs.CheckboxInGroupColumn ? 'Group Column' : 'Selection Column')),
44
+ rs.GroupSelectMode != null && (React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
45
+ "Group Select Mode: ",
46
+ rs.GroupSelectMode)),
47
+ rs.SelectAllMode != null && (React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
48
+ "Select All Mode: ",
49
+ rs.SelectAllMode))));
50
+ };
51
+ exports.RowSelectionSectionSummary = RowSelectionSectionSummary;
52
+ function getMode(layout) {
53
+ if (!layout.RowSelection) {
54
+ return false;
55
+ }
56
+ return layout.RowSelection.Mode;
57
+ }
58
+ const RowSelectionSection = (props) => {
59
+ const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
60
+ const mode = getMode(layout);
61
+ const isPivot = (0, isPivotLayout_1.isPivotLayout)(layout);
62
+ const rowSelection = layout.RowSelection ?? false;
63
+ const handleModeChange = (newMode) => {
64
+ if (newMode === false) {
65
+ props.onChange({ ...layout, RowSelection: false });
66
+ return;
67
+ }
68
+ const base = rowSelection
69
+ ? { ...rowSelection, Mode: newMode }
70
+ : { Mode: newMode };
71
+ if (newMode === 'singleRow') {
72
+ delete base.HeaderCheckbox;
73
+ delete base.GroupSelectMode;
74
+ delete base.SelectAllMode;
75
+ }
76
+ props.onChange({ ...layout, RowSelection: base });
77
+ };
78
+ const updateRowSelection = (patch) => {
79
+ if (!rowSelection) {
80
+ return;
81
+ }
82
+ const newLayout = {
83
+ ...layout,
84
+ RowSelection: { ...rowSelection, ...patch },
85
+ };
86
+ if (newLayout.RowSelection && !newLayout.RowSelection.CheckboxInGroupColumn) {
87
+ if (newLayout.TableColumns) {
88
+ if (!newLayout.TableColumns.includes(GeneralConstants_1.AG_GRID_SELECTION_COLUMN)) {
89
+ newLayout.TableColumns = [GeneralConstants_1.AG_GRID_SELECTION_COLUMN, ...(newLayout.TableColumns ?? [])];
90
+ }
91
+ }
92
+ else if (newLayout.PivotColumns) {
93
+ if (!newLayout.PivotColumns.includes(GeneralConstants_1.AG_GRID_SELECTION_COLUMN)) {
94
+ newLayout.PivotColumns = [GeneralConstants_1.AG_GRID_SELECTION_COLUMN, ...(newLayout.PivotColumns ?? [])];
95
+ }
96
+ }
97
+ }
98
+ props.onChange(newLayout);
99
+ };
100
+ return (React.createElement(React.Fragment, null,
101
+ React.createElement(Tabs_1.Tabs, null,
102
+ React.createElement(Tabs_1.Tabs.Tab, null, "Row Selection Mode"),
103
+ React.createElement(Tabs_1.Tabs.Content, null,
104
+ React.createElement(Flex_1.Flex, { flexDirection: "column" },
105
+ React.createElement(Radio_2.RadioGroup, { orientation: "horizontal", variant: "text-only", className: (0, twMerge_1.twMerge)(Radio_1.radioGroupStyling.horizontalTextOnly, 'twa:gap-2 twa:max-w-[500px] twa:bg-defaultbackground twa:p-2'), value: mode, name: "rowSelectionMode", onRadioChange: handleModeChange },
106
+ React.createElement(Radio_1.default, { value: false }, "Disabled"),
107
+ React.createElement(Radio_1.default, { value: "singleRow" }, "Single Row"),
108
+ React.createElement(Radio_1.default, { value: "multiRow" }, "Multi Row"))))),
109
+ !rowSelection && React.createElement(HelpBlock_1.default, null, "There is no Row Selection configured for this Layout"),
110
+ rowSelection && (React.createElement(React.Fragment, null,
111
+ React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
112
+ React.createElement(Tabs_1.Tabs.Tab, null, "Row Selection Column"),
113
+ React.createElement(Tabs_1.Tabs.Content, null,
114
+ React.createElement(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-6" },
115
+ React.createElement(CheckBox_1.CheckBox, { className: "twa:flex-1", checked: rowSelection.Checkboxes ?? true, onChange: (checked) => updateRowSelection({ Checkboxes: checked }) }, "Show Row Selection Checkboxes"),
116
+ mode === 'multiRow' && (React.createElement(CheckBox_1.CheckBox, { className: "twa:flex-1", checked: rowSelection.HeaderCheckbox ?? true, onChange: (checked) => updateRowSelection({ HeaderCheckbox: checked }) }, "Show Header Checkbox (to enable Select All)"))))),
117
+ (rowSelection.Checkboxes ?? true) && (React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
118
+ React.createElement(Tabs_1.Tabs.Tab, null, "Row Grouping"),
119
+ React.createElement(Tabs_1.Tabs.Content, null,
120
+ React.createElement(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.CheckboxInGroupColumn ?? false, name: "checkboxLocation", onRadioChange: (value) => updateRowSelection({ CheckboxInGroupColumn: value }) },
121
+ React.createElement(Radio_1.default, { value: false }, "Show Row Selection Checkbox in dedicated Selection Column"),
122
+ React.createElement(Radio_1.default, { value: true }, "Show Row Selection Checkbox in Row Grouped Column"))))),
123
+ React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
124
+ React.createElement(Tabs_1.Tabs.Tab, null, "Row Click Selection (when user clicks on Row outside of Selection Checkbox)"),
125
+ React.createElement(Tabs_1.Tabs.Content, null,
126
+ React.createElement(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.EnableClickSelection ?? false, name: "clickSelection", onRadioChange: (value) => updateRowSelection({ EnableClickSelection: value }) },
127
+ React.createElement(Radio_1.default, { value: false }, "Disabled (Cannot select or deselect by clicking in Row)"),
128
+ React.createElement(Radio_1.default, { value: true }, "Full (Enable selection by clicking in Row and deselection by Ctrl+clicking in Row)"),
129
+ React.createElement(Radio_1.default, { value: 'enableSelection' }, "Selection Only (Enable selection by clicking in Row)"),
130
+ React.createElement(Radio_1.default, { value: 'enableDeselection' }, "Deselection Only (Enable deselection by Ctrl+clicking in Row)")))),
131
+ mode === 'multiRow' && !isPivot && (React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
132
+ React.createElement(Tabs_1.Tabs.Tab, null, "Grouped Row Selection Behaviour"),
133
+ React.createElement(Tabs_1.Tabs.Content, null,
134
+ React.createElement(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.GroupSelectMode ?? 'self', name: "groupSelectMode", onRadioChange: (value) => updateRowSelection({ GroupSelectMode: value }) },
135
+ React.createElement(Radio_1.default, { value: 'self' }, "Select Grouped Row Only (no cascade)"),
136
+ React.createElement(Radio_1.default, { value: 'descendants' }, "Select Grouped Row and all descendants"),
137
+ React.createElement(Radio_1.default, { value: 'filteredDescendants' }, "Select Grouped Row and only filtered descendants"))))),
138
+ mode === 'multiRow' && (React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
139
+ React.createElement(Tabs_1.Tabs.Tab, null, "Select All (in Header) Behaviour"),
140
+ React.createElement(Tabs_1.Tabs.Content, null,
141
+ React.createElement(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.SelectAllMode ?? 'all', name: "selectAllMode", onRadioChange: (value) => updateRowSelection({ SelectAllMode: value }) },
142
+ React.createElement(Radio_1.default, { value: 'all' }, "All rows"),
143
+ React.createElement(Radio_1.default, { value: 'filtered' }, "Filtered rows only"),
144
+ React.createElement(Radio_1.default, { value: 'currentPage' }, "Current page only")))))))));
145
+ };
146
+ exports.RowSelectionSection = RowSelectionSection;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NamedQuerySettingsWizardSection = exports.renderNamedQuerySettingsSummary = exports.isValidNamedQuerySettings = void 0;
4
4
  const tslib_1 = require("tslib");
5
- // TODO: move to named query
6
5
  const React = tslib_1.__importStar(require("react"));
7
6
  const WizardPanel_1 = tslib_1.__importDefault(require("../../../components/WizardPanel"));
8
7
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
@@ -456,6 +456,7 @@ class AdaptableAgGrid {
456
456
  columnDefs = src_1.LayoutManager.getColumnDefsChangesForLayout(layoutModel, columnDefs) ?? columnDefs;
457
457
  gridOptions.columnDefs = columnDefs;
458
458
  gridOptions.initialState = initialGridState;
459
+ const initialRowSelection = gridOptions.rowSelection;
459
460
  if (layoutModel) {
460
461
  if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel)) {
461
462
  gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
@@ -464,6 +465,14 @@ class AdaptableAgGrid {
464
465
  layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
465
466
  // fixes issue #3053
466
467
  gridOptions.suppressAggFuncInHeader = !!layoutModel.SuppressAggFuncInHeader;
468
+ if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel) &&
469
+ src_1.LayoutManager.shouldUnlockSelectionColumnPosition(layoutModel)) {
470
+ gridOptions.selectionColumnDef = {
471
+ ...gridOptions.selectionColumnDef,
472
+ lockPosition: false,
473
+ };
474
+ }
475
+ gridOptions.rowSelection = src_1.LayoutManager.getGridOptionForRowSelectionFromLayout(layoutModel.RowSelection, gridOptions.rowSelection);
467
476
  }
468
477
  this.lifecycleState = 'initAgGrid';
469
478
  this.agGridAdapter.initialGridOptions = gridOptions;
@@ -479,6 +488,7 @@ class AdaptableAgGrid {
479
488
  this.layoutManager = new src_1.LayoutManager({
480
489
  gridApi: agGridApi,
481
490
  debugId: this.adaptableOptions.adaptableId,
491
+ initialRowSelection,
482
492
  });
483
493
  this.silentUpdateCurrentLayoutModel(layoutModel);
484
494
  // this shouldn't be needed
@@ -31,7 +31,7 @@ function Dashboard(props) {
31
31
  left: position.x,
32
32
  top: position.y,
33
33
  };
34
- const renderTabs = () => (React.createElement("div", { className: "ab-Dashboard__tabs" }, children &&
34
+ const renderTabs = () => (React.createElement("div", { className: "ab-Dashboard__tabs twa:whitespace-nowrap" }, children &&
35
35
  React.Children.map(children, (child, index) => (React.createElement("button", { type: "button", className: (0, join_1.default)('ab-Dashboard__tab', !collapsed && activeTabIndex === index ? 'ab-Dashboard__tab--active' : ''), key: index, onClick: () => {
36
36
  if (activeTabIndex === index) {
37
37
  setCollapsed(!collapsed);
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { BaseModuleTab, ModuleDraggableItem } from './types';
3
3
  export interface ModuleManagerProps {
4
4
  availableItems: ModuleDraggableItem[];
5
+ filterOutSelectedItems?: boolean;
5
6
  className?: string;
6
7
  disabled: boolean;
7
8
  onTabsChange: (tabs: BaseModuleTab[]) => void;