@adaptabletools/adaptable-cjs 20.1.9 → 20.2.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 (66) hide show
  1. package/base.css +27 -0
  2. package/base.css.map +1 -1
  3. package/index.css +22 -0
  4. package/index.css.map +1 -1
  5. package/package.json +2 -2
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  7. package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -1
  8. package/src/AdaptableOptions/ExportOptions.d.ts +91 -8
  9. package/src/AdaptableOptions/FilterOptions.d.ts +4 -0
  10. package/src/AdaptableOptions/QuickSearchOptions.d.ts +2 -4
  11. package/src/AdaptableState/FormatColumnState.d.ts +8 -0
  12. package/src/AdaptableState/LayoutState.d.ts +15 -2
  13. package/src/AdaptableState/QuickSearchState.d.ts +8 -0
  14. package/src/AdaptableState/Selection/GridCell.d.ts +1 -0
  15. package/src/Api/ColumnApi.d.ts +5 -0
  16. package/src/Api/ExportApi.d.ts +23 -7
  17. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
  18. package/src/Api/Implementation/ColumnApiImpl.js +15 -31
  19. package/src/Api/Implementation/ExportApiImpl.d.ts +11 -4
  20. package/src/Api/Implementation/ExportApiImpl.js +50 -8
  21. package/src/Api/Implementation/LayoutHelpers.js +44 -0
  22. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +4 -0
  23. package/src/Api/Implementation/QuickSearchApiImpl.js +12 -0
  24. package/src/Api/Internal/AlertInternalApi.js +1 -1
  25. package/src/Api/Internal/ExportInternalApi.d.ts +3 -8
  26. package/src/Api/Internal/ExportInternalApi.js +1 -74
  27. package/src/Api/Internal/ExpressionInternalApi.d.ts +1 -1
  28. package/src/Api/Internal/ExpressionInternalApi.js +1 -32
  29. package/src/Api/Internal/FormatColumnInternalApi.d.ts +2 -1
  30. package/src/Api/Internal/FormatColumnInternalApi.js +62 -0
  31. package/src/Api/QuickSearchApi.d.ts +16 -0
  32. package/src/Redux/Store/AdaptableStore.js +3 -2
  33. package/src/Utilities/Constants/GeneralConstants.js +2 -1
  34. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -0
  35. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -0
  36. package/src/View/Components/NewScopeComponent.js +4 -4
  37. package/src/View/Dashboard/Dashboard.js +2 -4
  38. package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -2
  39. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +2 -2
  40. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +6 -1
  41. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +4 -0
  42. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +24 -20
  43. package/src/View/QuickSearch/QuickSearchInput.js +6 -1
  44. package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
  45. package/src/agGrid/AdaptableAgGrid.d.ts +2 -0
  46. package/src/agGrid/AdaptableAgGrid.js +132 -38
  47. package/src/agGrid/AgGridAdapter.d.ts +4 -1
  48. package/src/agGrid/AgGridAdapter.js +89 -12
  49. package/src/agGrid/AgGridColumnAdapter.d.ts +4 -0
  50. package/src/agGrid/AgGridColumnAdapter.js +142 -35
  51. package/src/agGrid/AgGridExportAdapter.d.ts +6 -1
  52. package/src/agGrid/AgGridExportAdapter.js +103 -14
  53. package/src/agGrid/FloatingFilterWrapper.js +30 -4
  54. package/src/env.js +2 -2
  55. package/src/layout-manager/src/LayoutManagerModel.d.ts +16 -2
  56. package/src/layout-manager/src/index.d.ts +1 -1
  57. package/src/layout-manager/src/index.js +133 -18
  58. package/src/layout-manager/src/normalizeLayoutModel.d.ts +2 -4
  59. package/src/layout-manager/src/normalizeLayoutModel.js +13 -18
  60. package/src/layout-manager/src/simplifyLayoutModel.js +14 -2
  61. package/src/metamodel/adaptable.metamodel.d.ts +71 -0
  62. package/src/metamodel/adaptable.metamodel.js +1 -1
  63. package/src/types.d.ts +1 -1
  64. package/tsconfig.cjs.tsbuildinfo +1 -1
  65. package/src/Utilities/buildSortedColumnStateForLayout.d.ts +0 -7
  66. package/src/Utilities/buildSortedColumnStateForLayout.js +0 -135
@@ -34,7 +34,7 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
34
34
  }
35
35
  return !evaluateExpressionExternallyFn(context);
36
36
  }
37
- evaluatePredicatesInAdaptableQL(module, object, predicates) {
37
+ shouldEvaluatePredicatesInAdaptableQL(module, object, predicates) {
38
38
  const evaluateExpressionExternallyFn = this.getExpressionOptions()?.evaluateAdaptableQLExternally;
39
39
  if (typeof evaluateExpressionExternallyFn !== 'function') {
40
40
  return true;
@@ -54,37 +54,6 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
54
54
  }
55
55
  return !evaluateExpressionExternallyFn(context);
56
56
  }
57
- // Used later, when we extend to support inferring fields from data
58
- // private getFieldsFromData<T extends Record<string, any>>(data: T): string[] {
59
- // if (!data) {
60
- // return [];
61
- // }
62
- // if (typeof data !== 'object' || Number.isNaN(data)) {
63
- // return [];
64
- // }
65
- // const keys: string[] = [];
66
- // for (const key in Object.keys(data)) {
67
- // const candidate = data[key];
68
- // if (
69
- // typeof candidate === 'number' ||
70
- // typeof candidate === 'string' ||
71
- // typeof candidate === 'boolean' ||
72
- // candidate instanceof Date
73
- // ) {
74
- // keys.push(key);
75
- // continue;
76
- // }
77
- // // no support for arrays
78
- // // for objects we go one level deep
79
- // if (typeof candidate === 'object' && candidate !== null && !Array.isArray(candidate)) {
80
- // const childKeys = this.getFieldsFromData(candidate);
81
- // for (const childKey of childKeys) {
82
- // keys.push(`${key}.${childKey}`);
83
- // }
84
- // }
85
- // }
86
- // return keys;
87
- // }
88
57
  getFieldsFromOptions() {
89
58
  const fields = this.getExpressionOptions().fields;
90
59
  if (fields != null && typeof fields === 'function') {
@@ -1,6 +1,6 @@
1
+ import { IRowNode } from 'ag-grid-enterprise';
1
2
  import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, StringFormatterOptions } from '../../types';
2
3
  import { ApiBase } from '../Implementation/ApiBase';
3
- import { IRowNode } from 'ag-grid-enterprise';
4
4
  export declare class FormatColumnInternalApi extends ApiBase {
5
5
  /**
6
6
  * Retrieves all Format Columns in Adaptable State with the `Style` property set
@@ -77,6 +77,7 @@ export declare class FormatColumnInternalApi extends ApiBase {
77
77
  * @param scope Scope to check
78
78
  */
79
79
  getFormatColumnDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
80
+ formatColumnWithColumnGroupStateShouldRender(formatColumn: FormatColumn, column: AdaptableColumn): boolean;
80
81
  /**
81
82
  * Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
82
83
  *
@@ -8,6 +8,33 @@ const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/
8
8
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
9
9
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
10
10
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
11
+ function getParentGroup(source) {
12
+ if (!source) {
13
+ return undefined;
14
+ }
15
+ let current = source;
16
+ while (current.getParent()) {
17
+ current = current.getParent();
18
+ if (!current) {
19
+ return undefined;
20
+ }
21
+ const currentProvidedColumnGroup = current.getProvidedColumnGroup();
22
+ // for columns that don't belong to groups or belong to a group that doesn't have full depth
23
+ // there are artificial parent groups created by ag-grid
24
+ // so for the current column group, lets grab the leaf columns
25
+ // and if the only leaf column is the source column, then we can continue
26
+ // and do another iteration where we go up one level
27
+ if (currentProvidedColumnGroup) {
28
+ const leafColumns = current.getLeafColumns();
29
+ if (leafColumns.length === 1 && leafColumns[0] === source) {
30
+ continue;
31
+ }
32
+ // otherwise, we have found the parent group corresponding to the source column
33
+ return currentProvidedColumnGroup;
34
+ }
35
+ }
36
+ return undefined;
37
+ }
11
38
  class FormatColumnInternalApi extends ApiBase_1.ApiBase {
12
39
  /**
13
40
  * Retrieves all Format Columns in Adaptable State with the `Style` property set
@@ -149,6 +176,37 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
149
176
  .predicateApi.internalApi.getFormatColumnPredicateDefs(scope)
150
177
  .filter((predicateDef) => this.getColumnScopeApi().isScopeInScope(scope, predicateDef.columnScope));
151
178
  }
179
+ formatColumnWithColumnGroupStateShouldRender(formatColumn, column) {
180
+ if (!formatColumn.ColumnGroupState) {
181
+ return true;
182
+ }
183
+ const agGridApi = this.getAdaptableApi().agGridApi;
184
+ const agGridColumn = agGridApi.isPivotMode()
185
+ ? agGridApi.getPivotResultColumns().find((col) => col.getColId() === column.columnId)
186
+ : agGridApi.getColumn(column.columnId);
187
+ if (!agGridColumn) {
188
+ return false;
189
+ }
190
+ const columnGroupParentForCurrentColumn = getParentGroup(agGridColumn);
191
+ if (!columnGroupParentForCurrentColumn) {
192
+ return false;
193
+ }
194
+ const columnGroupState = columnGroupParentForCurrentColumn.isExpanded()
195
+ ? 'Expanded'
196
+ : 'Collapsed';
197
+ const columnGroupLeafColumns = columnGroupParentForCurrentColumn.getLeafColumns();
198
+ const columnIsTopLevel = columnGroupParentForCurrentColumn.getLevel() === 0 &&
199
+ columnGroupLeafColumns.length === 1 &&
200
+ columnGroupLeafColumns[0] === agGridColumn;
201
+ if (columnIsTopLevel) {
202
+ // for top-level columns don't apply formatColumns that have an explicit ColumnGroupState defined
203
+ return false;
204
+ }
205
+ if (formatColumn.ColumnGroupState === 'Both') {
206
+ return true;
207
+ }
208
+ return formatColumn.ColumnGroupState === columnGroupState;
209
+ }
152
210
  /**
153
211
  * Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
154
212
  *
@@ -179,6 +237,10 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
179
237
  return false;
180
238
  }
181
239
  }
240
+ if (formatColumn.ColumnGroupState &&
241
+ !this.formatColumnWithColumnGroupStateShouldRender(formatColumn, column)) {
242
+ return false;
243
+ }
182
244
  if (!formatColumn.Rule) {
183
245
  return true;
184
246
  }
@@ -17,6 +17,14 @@ export interface QuickSearchApi {
17
17
  * Clears Quick Search
18
18
  */
19
19
  clearQuickSearch(): void;
20
+ /**
21
+ * Goes to the next match for the current Quick Search text
22
+ */
23
+ gotoNextMatch(): void;
24
+ /**
25
+ * Goes to the previous match for the current Quick Search text
26
+ */
27
+ gotoPreviousMatch(): void;
20
28
  /**
21
29
  * Retrieves current Quick Search text
22
30
  */
@@ -25,6 +33,14 @@ export interface QuickSearchApi {
25
33
  * Retrieves current Quick Search style
26
34
  */
27
35
  getQuickSearchStyle(): AdaptableStyle;
36
+ /**
37
+ * Retrieves the style for the text match in the Quick Search
38
+ */
39
+ getQuickSearchTextMatchStyle(): Omit<AdaptableStyle, 'ClassName'> | undefined;
40
+ /**
41
+ * Retrieves the style for the current text match in the Quick Search
42
+ */
43
+ getQuickSearchCurrentTextMatchStyle(): Omit<AdaptableStyle, 'ClassName'> | undefined;
28
44
  /**
29
45
  * Sets style for Quick Search; can be name of (a provided) css style
30
46
  * @param style the style to use
@@ -506,10 +506,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
506
506
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
507
507
  let returnAction = next(action);
508
508
  adaptable.api.gridApi.refreshAllCells(true);
509
+ const actionTyped = action;
510
+ const searchText = actionTyped.quickSearchText;
511
+ adaptable.setAgGridFindSearchValue(searchText);
509
512
  // if set then return a query on the text
510
513
  if (adaptable.adaptableOptions.quickSearchOptions.filterGridAfterQuickSearch) {
511
- const actionTyped = action;
512
- const searchText = actionTyped.quickSearchText;
513
514
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(searchText)) {
514
515
  adaptable.setAgGridQuickSearch(searchText);
515
516
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LAYOUT_NEW_TABLE_TOOLTIP = exports.THEME_STYLE = exports.SYSTEM_EXPORT_DESTINATIONS = exports.CLIPBOARD_EXPORT_DESTINATION = exports.DOWNLOAD_EXPORT_DESTINATION = exports.SELECT_REPORT_FORMAT_STRING = exports.SELECT_REPORT_STRING = exports.SYSTEM_REPORT_FORMATS = exports.JSON_FORMAT_REPORT = exports.CSV_FORMAT_REPORT = exports.VISUAL_EXCEL_FORMAT_REPORT = exports.EXCEL_FORMAT_REPORT = exports.SYSTEM_REPORT_NAMES = exports.SELECTED_DATA_REPORT = exports.CURRENT_LAYOUT_REPORT = exports.ALL_DATA_REPORT = exports.SERVER_VALIDATION_MESSAGE_TYPE = exports.SERVER_VALIDATION_HEADER = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.MENU_SEPARATOR = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.DEFAULT_DOUBLE_DISPLAY_VALUE = exports.DEFAULT_INTEGER_DISPLAY_VALUE = exports.DEFAULT_STRING_DISPLAY_VALUE = exports.DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_GRAND_TOTAL_COLUMN = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_SELECTION_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.GROUP_PATH_SEPARATOR = exports.QUARTER_SECOND = exports.HALF_SECOND = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.READ_ONLY_STYLE = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE_ID = exports.ADAPTABLE = exports.ERROR_LAYOUT = exports.OS_THEME = exports.DARK_THEME = exports.LIGHT_THEME = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
4
4
  exports.OBSERVABLE_EXPRESSION_ROW_REMOVED = exports.OBSERVABLE_EXPRESSION_ROW_ADDED = exports.STANDALONE_MODULE_POPUPS = exports.LAYOUT_DELETE_TOOLTIP = exports.LAYOUT_CLONE_TOOLTIP = exports.LAYOUT_EDIT_TOOLTIP = exports.LAYOUT_SAVE_TOOLTIP = exports.LAYOUT_NEW_TABLE_OR_PIVOT_TOOLTIP = exports.LAYOUT_NEW_PIVOT_TOOLTIP = void 0;
5
+ const normalizeLayoutModel_1 = require("../../layout-manager/src/normalizeLayoutModel");
5
6
  exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
6
7
  exports.MISSING_COLUMN = ' [MISSING]';
7
8
  exports.LIGHT_THEME = 'light';
@@ -24,7 +25,7 @@ exports.EMPTY_ARRAY = [];
24
25
  exports.HALF_SECOND = 500;
25
26
  exports.QUARTER_SECOND = 250;
26
27
  exports.GROUP_PATH_SEPARATOR = '/';
27
- exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
28
+ exports.AG_GRID_GROUPED_COLUMN = normalizeLayoutModel_1.AUTO_GROUP_COLUMN_ID__SINGLE;
28
29
  exports.AG_GRID_SELECTION_COLUMN = 'ag-Grid-SelectionColumn';
29
30
  exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
30
31
  exports.AG_GRID_PIVOT_GRAND_TOTAL_COLUMN = 'PivotRowTotal_pivot_';
@@ -6,5 +6,6 @@ export type AdaptableFormControlTextClearProps = {
6
6
  focusOnClear?: boolean;
7
7
  autoFocus?: boolean;
8
8
  inputStyle?: CSSProperties;
9
+ actionTools?: React.ReactNode;
9
10
  } & InputProps;
10
11
  export declare const AdaptableFormControlTextClear: React.ForwardRefExoticComponent<Omit<AdaptableFormControlTextClearProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -29,6 +29,7 @@ exports.AdaptableFormControlTextClear = React.forwardRef((props, ref) => {
29
29
  ref.current = r;
30
30
  }
31
31
  }, type: "text", placeholder: props.placeholder, value: props.value, onChange: (x) => props.OnTextChange(x.target.value) }),
32
+ props.actionTools,
32
33
  React.createElement(SimpleButton_1.default, { variant: "text", icon: "close", tooltip: closeButtonTooltip, px: 0, py: 0, marginRight: 1, onClick: () => {
33
34
  props.OnTextChange('');
34
35
  const input = inputRef.current;
@@ -29,19 +29,19 @@ const isScopeValid = ({ Scope }) => {
29
29
  };
30
30
  exports.isScopeValid = isScopeValid;
31
31
  const DATA_TYPES_MAP = {
32
- Date: {
32
+ date: {
33
33
  label: 'Date',
34
34
  value: 'date',
35
35
  },
36
- Number: {
36
+ number: {
37
37
  label: 'Number',
38
38
  value: 'number',
39
39
  },
40
- String: {
40
+ text: {
41
41
  label: 'Text',
42
42
  value: 'text',
43
43
  },
44
- Boolean: {
44
+ boolean: {
45
45
  label: 'Boolean',
46
46
  value: 'boolean',
47
47
  },
@@ -15,16 +15,14 @@ const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
15
15
  const AdaptableViewFactory_1 = require("../AdaptableViewFactory");
16
16
  const AdaptableButton_1 = require("../Components/AdaptableButton");
17
17
  const AdaptableIconComponent_1 = require("../Components/AdaptableIconComponent");
18
- const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
19
- const useQuickSearchDebounced_1 = require("../QuickSearch/useQuickSearchDebounced");
20
18
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
21
19
  const CustomDashboardButton_1 = require("./CustomDashboardButton");
22
20
  const CustomToolbar_1 = require("./CustomToolbar");
23
21
  const DashboardToolbarFactory_1 = require("./DashboardToolbarFactory");
24
22
  const PinnedDashboard_1 = require("./PinnedDashboard");
25
23
  const ModuleToolbarWrapper_1 = require("./ModuleToolbarWrapper");
24
+ const QuickSearchInput_1 = require("../QuickSearch/QuickSearchInput");
26
25
  const DashboardComponent = (props) => {
27
- const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
28
26
  const dashboardAccessLevel = props.api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard');
29
27
  const renderTab = (tab) => {
30
28
  const visibleToolbarNames = tab.Toolbars.filter((vt) => vt);
@@ -93,7 +91,7 @@ const DashboardComponent = (props) => {
93
91
  };
94
92
  const renderQuickSearch = () => {
95
93
  return (React.createElement(rebass_1.Box, { ml: 2 },
96
- React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", "aria-label": 'Quick Search', placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: "ab-DashboardToolbar__QuickSearch__text", value: searchText, OnTextChange: search, style: { width: 'auto' }, inputStyle: { width: '7rem' } })));
94
+ React.createElement(QuickSearchInput_1.QuickSearchInput, { width: '7rem' })));
97
95
  };
98
96
  let instanceName = props.api.internalApi.getToolbarTitle();
99
97
  let dashboardOptions = props.api.optionsApi.getDashboardOptions();
@@ -201,9 +201,9 @@ const AggregationsSection = (props) => {
201
201
  React.createElement(FormLayout_1.FormRow, { label: 'Omit Aggregation from Header' },
202
202
  React.createElement(CheckBox_1.CheckBox, { checked: layout.SuppressAggFuncInHeader, onChange: handleSuppressAggFuncInHeader })),
203
203
  React.createElement(FormLayout_1.FormRow, { label: 'Grand Total Row' },
204
- React.createElement(Select_1.Select, { style: { width: 120 }, options: ['top', 'bottom'].map((position) => {
204
+ React.createElement(Select_1.Select, { style: { width: 160 }, options: ['top', 'bottom', 'pinnedTop', 'pinnedBottom'].map((position) => {
205
205
  return {
206
- label: StringExtensions_1.default.CapitaliseFirstLetter(position),
206
+ label: StringExtensions_1.default.CamelCaseToHumanText(position),
207
207
  value: position,
208
208
  };
209
209
  }), placeholder: "Off", value: layout.GrandTotalRow, onChange: (value) => {
@@ -328,9 +328,9 @@ const PivotAggregationsSection = (props) => {
328
328
  React.createElement(FormLayout_1.FormRow, { label: 'Omit Aggregation from Header' },
329
329
  React.createElement(CheckBox_1.CheckBox, { checked: layout.SuppressAggFuncInHeader, onChange: handleSuppressAggFuncInHeader })),
330
330
  React.createElement(FormLayout_1.FormRow, { label: 'Grand Total Row' },
331
- React.createElement(Select_1.Select, { style: { width: 120 }, options: ['top', 'bottom'].map((position) => {
331
+ React.createElement(Select_1.Select, { style: { width: 160 }, options: ['top', 'bottom', 'pinnedTop', 'pinnedBottom'].map((position) => {
332
332
  return {
333
- label: StringExtensions_1.default.CapitaliseFirstLetter(position),
333
+ label: StringExtensions_1.default.CamelCaseToHumanText(position),
334
334
  value: position,
335
335
  };
336
336
  }), placeholder: "Off", value: layout.GrandTotalRow, onChange: (value) => {
@@ -12,6 +12,7 @@ const ValueSelector_1 = require("../../../Components/ValueSelector");
12
12
  const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
13
13
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
14
14
  const LayoutHelpers_1 = require("../../../../Api/Implementation/LayoutHelpers");
15
+ const RowGroupingSection_1 = require("./RowGroupingSection");
15
16
  const PivotRowGroupingSectionSummary = () => {
16
17
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
17
18
  const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
@@ -37,11 +38,15 @@ const PivotRowGroupingSection = (props) => {
37
38
  PivotGroupedColumns: columnIds,
38
39
  });
39
40
  };
41
+ const rowGroupsText = 'Row Group ' + adaptable.api.internalApi.getCorrectEnglishVariant('Behaviour');
40
42
  return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
41
43
  React.createElement(Tabs_1.Tabs.Tab, null, "Row Grouped Columns"),
44
+ React.createElement(Tabs_1.Tabs.Tab, null, rowGroupsText),
42
45
  React.createElement(Tabs_1.Tabs.Content, null,
43
46
  React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, options: sortedGroupableColumns, value: layout.PivotGroupedColumns ?? [], allowReorder: true, xSelectedLabel: () => {
44
47
  return `Selected Columns:`;
45
- }, onChange: handleColumnsChange }))));
48
+ }, onChange: handleColumnsChange })),
49
+ React.createElement(Tabs_1.Tabs.Content, null,
50
+ React.createElement(RowGroupingSection_1.RowGroupBehaviorSection, { layout: layout, onChange: onChange }))));
46
51
  };
47
52
  exports.PivotRowGroupingSection = PivotRowGroupingSection;
@@ -4,5 +4,9 @@ export declare const RowGroupingSectionSummary: React.FunctionComponent;
4
4
  interface RowGroupingSectionProps {
5
5
  onChange: (data: Layout) => void;
6
6
  }
7
+ export declare const RowGroupBehaviorSection: (props: {
8
+ layout: Layout;
9
+ onChange: (data: Layout) => void;
10
+ }) => React.JSX.Element;
7
11
  export declare const RowGroupingSection: React.FunctionComponent<RowGroupingSectionProps>;
8
12
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RowGroupingSection = exports.RowGroupingSectionSummary = void 0;
3
+ exports.RowGroupingSection = exports.RowGroupBehaviorSection = exports.RowGroupingSectionSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
@@ -28,6 +28,28 @@ const RowGroupingSectionSummary = () => {
28
28
  })) : (React.createElement(Tag_1.Tag, null, "No Row Grouping"))));
29
29
  };
30
30
  exports.RowGroupingSectionSummary = RowGroupingSectionSummary;
31
+ const RowGroupBehaviorSection = (props) => {
32
+ const { layout, onChange } = props;
33
+ return (React.createElement(FormLayout_1.default, null,
34
+ React.createElement(Radio_1.RadioGroup, { orientation: "vertical", value: layout.RowGroupValues?.RowGroupDefaultBehavior ?? 'always-collapsed', onRadioChange: (RowGroupDefaultBehavior) => {
35
+ const newLayout = {
36
+ ...layout,
37
+ RowGroupValues: {
38
+ RowGroupDefaultBehavior,
39
+ },
40
+ };
41
+ if (newLayout.RowGroupValues.RowGroupDefaultBehavior === 'collapsed' ||
42
+ newLayout.RowGroupValues.RowGroupDefaultBehavior === 'expanded') {
43
+ newLayout.RowGroupValues.ExceptionGroupKeys = [];
44
+ }
45
+ onChange(newLayout);
46
+ } },
47
+ React.createElement(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Always open Layout with all Grouped Rows collapsed" }),
48
+ React.createElement(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Always open Layout with all Grouped Rows expanded" }),
49
+ React.createElement(TypeRadio_1.TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "Layout opens with all Grouped rows expanded, other than those collapsed when Layout last displayed" }),
50
+ React.createElement(TypeRadio_1.TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "Layout opens with all Grouped rows collapsed, other than those expanded when Layout last displayed" }))));
51
+ };
52
+ exports.RowGroupBehaviorSection = RowGroupBehaviorSection;
31
53
  const RowGroupingSection = (props) => {
32
54
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
33
55
  if (adaptable.api.gridApi.isTreeDataGrid()) {
@@ -83,24 +105,6 @@ const RowGroupingSection = (props) => {
83
105
  return `Selected Columns:`;
84
106
  }, onChange: handleColumnsChange })),
85
107
  React.createElement(Tabs_1.Tabs.Content, null,
86
- React.createElement(FormLayout_1.default, null,
87
- React.createElement(Radio_1.RadioGroup, { orientation: "vertical", value: layout.RowGroupValues?.RowGroupDefaultBehavior ?? 'always-collapsed', onRadioChange: (RowGroupDefaultBehavior) => {
88
- let newLayout = {
89
- ...layout,
90
- RowGroupValues: {
91
- RowGroupDefaultBehavior,
92
- },
93
- };
94
- if (newLayout.RowGroupValues.RowGroupDefaultBehavior === 'collapsed' ||
95
- newLayout.RowGroupValues.RowGroupDefaultBehavior === 'expanded') {
96
- newLayout.RowGroupValues.ExceptionGroupKeys =
97
- [];
98
- }
99
- onChange(newLayout);
100
- } },
101
- React.createElement(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Always open Layout with all Grouped Rows collapsed" }),
102
- React.createElement(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Always open Layout with all Grouped Rows expanded" }),
103
- React.createElement(TypeRadio_1.TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "Layout opens with all Grouped rows expanded, other than those collapsed when Layout last displayed" }),
104
- React.createElement(TypeRadio_1.TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "Layout opens with all Grouped rows collapsed, other than those expanded when Layout last displayed" })))))));
108
+ React.createElement(exports.RowGroupBehaviorSection, { layout: layout, onChange: onChange })))));
105
109
  };
106
110
  exports.RowGroupingSection = RowGroupingSection;
@@ -8,6 +8,9 @@ const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReduce
8
8
  const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
9
9
  const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
10
10
  const AdaptableContext_1 = require("../AdaptableContext");
11
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
12
+ const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
13
+ const rebass_1 = require("rebass");
11
14
  const QuickSearchInput = (props) => {
12
15
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
16
  const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
@@ -17,6 +20,8 @@ const QuickSearchInput = (props) => {
17
20
  QuickSearchText,
18
21
  onRunQuickSearch,
19
22
  });
20
- return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: props.className, value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' } }));
23
+ return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, join_1.default)('ab-DashboardToolbar__QuickSearch__text', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: react_1.default.createElement(rebass_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
24
+ react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Previous Match', icon: "arrow-up", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoPreviousMatch() }),
25
+ react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Next Match', icon: "arrow-down", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() })) }));
21
26
  };
22
27
  exports.QuickSearchInput = QuickSearchInput;
@@ -9,12 +9,12 @@ const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReduce
9
9
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
10
10
  const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
11
11
  const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
12
- const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
13
12
  const StyleComponent_1 = require("../Components/StyleComponent");
14
13
  const rebass_1 = require("rebass");
15
14
  const CheckBox_1 = require("../../components/CheckBox");
16
15
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
17
16
  const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
17
+ const QuickSearchInput_1 = require("./QuickSearchInput");
18
18
  const QuickSearchPopupComponent = (props) => {
19
19
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
20
20
  const [state, setState] = (0, react_1.useState)({
@@ -32,9 +32,8 @@ const QuickSearchPopupComponent = (props) => {
32
32
  };
33
33
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
34
34
  React.createElement(Panel_1.default, { header: props.moduleInfo.FriendlyName + ' Text', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
35
- ' ',
36
35
  React.createElement(FormLayout_1.default, null,
37
- React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "data-name": "quick-search-text", type: "text", marginLeft: 2, marginRight: 5, padding: 20, style: { height: '100%' }, placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, value: searchText, OnTextChange: search }))),
36
+ React.createElement(QuickSearchInput_1.QuickSearchInput, null))),
38
37
  React.createElement(Panel_1.default, { header: props.api.internalApi.getCorrectEnglishVariant('Behaviour'), style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
39
38
  ' ',
40
39
  React.createElement(rebass_1.Flex, { flexDirection: "column" },
@@ -106,6 +106,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
106
106
  private listenerPivotChanged;
107
107
  private listenerCellSelectionChanged;
108
108
  private listenerSortChanged;
109
+ private listenerColumnGroupOpened;
109
110
  private layoutManager;
110
111
  private columnMinMaxValuesCache;
111
112
  renderReactRoot: RenderReactRootFn;
@@ -303,6 +304,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
303
304
  isGridGroupingActive(): boolean;
304
305
  setAgGridQuickSearch(searchText: string): void;
305
306
  clearAgGridQuickSearch(): void;
307
+ setAgGridFindSearchValue(searchText: string): void;
306
308
  applyAdaptableTheme(theme: AdaptableTheme | string): void;
307
309
  setRowGroupColumns(columnIds: string[]): void;
308
310
  getAllGridColumns(): Column<any>[];