@adaptabletools/adaptable 18.0.0-canary.32 → 18.0.0-canary.33

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 (45) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  3. package/src/Api/GridApi.d.ts +1 -1
  4. package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
  5. package/src/Api/Implementation/NoteApiImpl.js +2 -2
  6. package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
  7. package/src/Api/NoteApi.d.ts +1 -1
  8. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  9. package/src/PredefinedConfig/Common/RowScope.d.ts +2 -2
  10. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  11. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  12. package/src/Redux/ActionsReducers/NoteRedux.d.ts +1 -1
  13. package/src/Redux/ActionsReducers/NoteRedux.js +3 -3
  14. package/src/Strategy/ExportModule.js +19 -2
  15. package/src/Strategy/NoteModule.js +3 -3
  16. package/src/Strategy/StyledColumnModule.js +1 -1
  17. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +1 -1
  18. package/src/Utilities/Services/CellPopupService.js +4 -4
  19. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +3 -6
  20. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  21. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +5 -5
  22. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
  23. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +5 -7
  24. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +5 -5
  25. package/src/agGrid/ActionColumnRenderer.js +2 -2
  26. package/src/agGrid/AgGridColumnAdapter.js +2 -2
  27. package/src/agGrid/AgGridMenuAdapter.js +5 -5
  28. package/src/agGrid/BadgeRenderer.js +1 -1
  29. package/src/agGrid/PercentBarRenderer.js +1 -1
  30. package/src/components/Accordion.d.ts +7 -0
  31. package/src/components/Accordion.js +36 -0
  32. package/src/components/icons/collapse-all.d.ts +3 -0
  33. package/src/components/icons/collapse-all.js +4 -0
  34. package/src/components/icons/csv.d.ts +3 -0
  35. package/src/components/icons/csv.js +4 -0
  36. package/src/components/icons/data-object.d.ts +3 -0
  37. package/src/components/icons/data-object.js +4 -0
  38. package/src/components/icons/excel.d.ts +3 -0
  39. package/src/components/icons/excel.js +5 -0
  40. package/src/components/icons/expand-all.d.ts +3 -0
  41. package/src/components/icons/expand-all.js +4 -0
  42. package/src/components/icons/index.js +10 -0
  43. package/src/env.js +2 -2
  44. package/src/metamodel/adaptable.metamodel.js +1 -1
  45. package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "18.0.0-canary.32",
3
+ "version": "18.0.0-canary.33",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -33,7 +33,7 @@ export interface QuickSearchOptions<TData = any> {
33
33
  */
34
34
  filterResultsAfterQuickSearch?: boolean;
35
35
  /**
36
- * Include Aggregrated Columns in Grouped Rows when Quick Searching (highlight only)
36
+ * Include Aggregrated Columns in Group Rows when Quick Searching (highlight only)
37
37
  *
38
38
  * @defaultValue false
39
39
  * @gridInfoItem
@@ -485,7 +485,7 @@ export interface GridApi {
485
485
  */
486
486
  refreshRowNodes(rowNodes: IRowNode[]): void;
487
487
  /**
488
- * Forces a re-render of all Grouped rows (including aggregations)
488
+ * Forces a re-render of all Group Rows (including aggregations)
489
489
  */
490
490
  refreshGroupRowNodes(): void;
491
491
  /**
@@ -13,6 +13,6 @@ export declare class NoteApiImpl extends ApiBase implements NoteApi {
13
13
  deleteNote(note: AdaptableNote): void;
14
14
  getNoteState(): NoteState;
15
15
  getAllNotes(): AdaptableNotes;
16
- getNotesForCell(address: CellAddress): AdaptableNote[];
16
+ getNoteForCell(address: CellAddress): AdaptableNote;
17
17
  getNoteByUuid(uuid: string): AdaptableNote | undefined;
18
18
  }
@@ -31,8 +31,8 @@ export class NoteApiImpl extends ApiBase {
31
31
  getAllNotes() {
32
32
  return this.getNoteState().Notes;
33
33
  }
34
- getNotesForCell(address) {
35
- return NoteRedux.GetNotesSelector(this.getAdaptableState().Note, address);
34
+ getNoteForCell(address) {
35
+ return NoteRedux.GetNoteSelector(this.getAdaptableState().Note, address);
36
36
  }
37
37
  getNoteByUuid(uuid) {
38
38
  return this.getAllNotes().find((note) => note.Uuid === uuid);
@@ -168,7 +168,7 @@ export class FormatColumnInternalApi extends ApiBase {
168
168
  }
169
169
  }
170
170
  else if (isGroupedRowNode) {
171
- if ((_b = formatColumn.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows) {
171
+ if ((_b = formatColumn.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupRows) {
172
172
  return false;
173
173
  }
174
174
  }
@@ -39,7 +39,7 @@ export interface NoteApi {
39
39
  * Gets all Notes for a cell
40
40
  * @param CellAddress note position
41
41
  */
42
- getNotesForCell(CellAddress: CellAddress): AdaptableNote[];
42
+ getNoteForCell(CellAddress: CellAddress): AdaptableNote;
43
43
  /**
44
44
  * Returns a Note by uuid
45
45
  * @param uuid note uuid
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
54
54
  /**
55
55
  * All AdapTable System Icon names
56
56
  */
57
- export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'copy' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'filter-off' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'select-all' | 'select-off' | 'select-fwd' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter' | 'grid-info' | 'rows';
57
+ export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'copy' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'json' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'excel' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'filter-off' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'select-all' | 'select-off' | 'select-fwd' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter' | 'grid-info' | 'csv' | 'rows' | 'expand-all' | 'collapse-all';
@@ -7,9 +7,9 @@ export type RowScope = {
7
7
  */
8
8
  ExcludeDataRows?: boolean;
9
9
  /**
10
- * Exclude Grouped Rows
10
+ * Exclude Group Rows
11
11
  */
12
- ExcludeGroupedRows?: boolean;
12
+ ExcludeGroupRows?: boolean;
13
13
  /**
14
14
  * Exclude Summary Rows (used in Row Summaries)
15
15
  */
@@ -46,7 +46,7 @@ export interface FormatColumn extends SuspendableObject {
46
46
  */
47
47
  RowScope?: RowScope;
48
48
  /**
49
- * @deprecated FormatColumns now apply to grouped rows by default; use RowScope for more control
49
+ * @deprecated FormatColumns now apply to Group Rows by default; use RowScope for more control
50
50
  */
51
51
  IncludeGroupedRows?: never;
52
52
  }
@@ -56,7 +56,7 @@ export interface Layout extends AdaptableObject {
56
56
  */
57
57
  ExpandedRowGroupValues?: any[];
58
58
  /**
59
- * Columns showing aggregated values in grouped rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
59
+ * Columns showing aggregated values in Group Rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
60
60
  */
61
61
  AggregationColumns?: AggregationColumns;
62
62
  /**
@@ -34,5 +34,5 @@ export declare const NoteEdit: (note: AdaptableNote) => AdaptableNoteEditAction;
34
34
  export declare const NoteDelete: (note: AdaptableNote) => AdaptableNoteDeleteAction;
35
35
  export declare const NoteReady: (note: NoteState) => NoteReadyAction;
36
36
  export declare const GetAllNotesSelector: (state: NoteState) => AdaptableNote[];
37
- export declare const GetNotesSelector: (state: NoteState, address: CellAddress) => AdaptableNote[];
37
+ export declare const GetNoteSelector: (state: NoteState, address: CellAddress) => AdaptableNote;
38
38
  export declare const NoteReducer: Redux.Reducer<NoteState>;
@@ -33,12 +33,12 @@ export const NoteReady = (note) => ({
33
33
  noteState: note,
34
34
  });
35
35
  export const GetAllNotesSelector = (state) => state.Notes;
36
- export const GetNotesSelector = (state, address) => {
36
+ export const GetNoteSelector = (state, address) => {
37
37
  var _a;
38
38
  if (!address) {
39
- return [];
39
+ return null;
40
40
  }
41
- return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
41
+ return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).find((note) => {
42
42
  if (note.PrimaryKeyValue === address.PrimaryKeyValue && note.ColumnId === address.ColumnId) {
43
43
  // happy check
44
44
  return true;
@@ -48,7 +48,7 @@ export class ExportModule extends AdaptableModuleBase {
48
48
  let returnMenuItems = [];
49
49
  const availableSystemReports = this.api.exportApi.getAvailableSystemReports();
50
50
  if (availableSystemReports.includes(VISUAL_DATA_REPORT)) {
51
- returnMenuItems.push(this.createMenuItemClickFunction('export-visual-data-excel', 'Excel', this.moduleInfo.Glyph, () => this.export(this.api.exportApi.getReportByName(VISUAL_DATA_REPORT), ExportDestination.Excel)));
51
+ returnMenuItems.push(this.createMenuItemClickFunction('export-visual-data-excel', 'Excel', 'excel', () => this.export(this.api.exportApi.getReportByName(VISUAL_DATA_REPORT), ExportDestination.Excel)));
52
52
  }
53
53
  if (availableSystemReports.includes(ALL_DATA_REPORT)) {
54
54
  const allDataReport = this.api.exportApi.getReportByName(ALL_DATA_REPORT);
@@ -88,9 +88,26 @@ export class ExportModule extends AdaptableModuleBase {
88
88
  const getMenuItemName = (reportName, destination) => {
89
89
  return `export-${adjustName(reportName)}-${adjustName(destination)}`;
90
90
  };
91
+ const getMenuItemIcon = (exportDestination) => {
92
+ // once we have icons for csv, clipboard etc then i would like to add them here one by one and use moduleinfo for custom
93
+ switch (exportDestination) {
94
+ case ExportDestination.Excel:
95
+ return 'excel';
96
+ case ExportDestination.Clipboard:
97
+ return 'clipboard';
98
+ case ExportDestination.CSV:
99
+ return 'csv';
100
+ case ExportDestination.JSON:
101
+ return 'json';
102
+ case ExportDestination.Table:
103
+ return 'grid';
104
+ }
105
+ return this.moduleInfo.Glyph;
106
+ };
91
107
  const menuItems = [];
92
108
  for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
93
- menuItems.push(this.createMenuItemClickFunction(getMenuItemName(report.Name, destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
109
+ menuItems.push(this.createMenuItemClickFunction(getMenuItemName(report.Name, destination), destination, getMenuItemIcon(destination), // 'filter', // this.moduleInfo.Glyph,
110
+ () => this.export(report, destination)));
94
111
  }
95
112
  for (const customDestination of this.api.exportApi.getCustomDestinations()) {
96
113
  menuItems.push(this.createMenuItemClickFunction(getMenuItemName(report.Name, customDestination.name), customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
@@ -11,7 +11,7 @@ export class NoteModule extends AdaptableModuleBase {
11
11
  return super.isModuleAvailable() && !this.api.optionsApi.getAutogeneratePrimaryKey();
12
12
  }
13
13
  createContextMenuItems(menuContext) {
14
- var _a, _b, _c;
14
+ var _a, _b;
15
15
  if (!this.isModuleAvailable()) {
16
16
  return;
17
17
  }
@@ -28,10 +28,10 @@ export class NoteModule extends AdaptableModuleBase {
28
28
  if (!isCellNotable) {
29
29
  return;
30
30
  }
31
- const [note] = (_c = this.adaptable.api.noteApi.getNotesForCell({
31
+ const note = this.adaptable.api.noteApi.getNoteForCell({
32
32
  PrimaryKeyValue: menuContext.primaryKeyValue,
33
33
  ColumnId: menuContext.adaptableColumn.columnId,
34
- })) !== null && _c !== void 0 ? _c : [];
34
+ });
35
35
  if (note) {
36
36
  return [
37
37
  this.createMenuItemClickFunction('note-remove', 'Remove Note', this.moduleInfo.Glyph, () => {
@@ -177,7 +177,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
177
177
  name: 'Settings',
178
178
  values: [
179
179
  `Data Rows: ${((_b = (_a = styledColumn.BadgeStyle) === null || _a === void 0 ? void 0 : _a.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeDataRows) ? 'No' : 'Yes'}`,
180
- `Grouped Rows: ${((_d = (_c = styledColumn.BadgeStyle) === null || _c === void 0 ? void 0 : _c.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeGroupedRows) ? 'No' : 'Yes'}`,
180
+ `Group Rows: ${((_d = (_c = styledColumn.BadgeStyle) === null || _c === void 0 ? void 0 : _c.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeGroupRows) ? 'No' : 'Yes'}`,
181
181
  `Summary Rows: ${((_f = (_e = styledColumn.BadgeStyle) === null || _e === void 0 ? void 0 : _e.RowScope) === null || _f === void 0 ? void 0 : _f.ExcludeSummaryRows) ? 'No' : 'Yes'}`,
182
182
  ],
183
183
  });
@@ -3,7 +3,7 @@ export const getFormatColumnSettingsViewItems = (formatColumn) => {
3
3
  const values = [
4
4
  `Cell alignment: ${(_a = formatColumn.CellAlignment) !== null && _a !== void 0 ? _a : 'default'}`,
5
5
  `Data Rows: ${((_b = formatColumn.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeDataRows) ? 'Yes' : 'No'}`,
6
- `Grouped Rows: ${((_c = formatColumn.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeGroupedRows) ? 'Yes' : 'No'}`,
6
+ `Group Rows: ${((_c = formatColumn.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeGroupRows) ? 'Yes' : 'No'}`,
7
7
  `Row Summaries: ${((_d = formatColumn.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeSummaryRows) ? 'Yes' : 'No'}`,
8
8
  ].filter(Boolean);
9
9
  return {
@@ -74,9 +74,9 @@ export class CellPopupService {
74
74
  this.hidePopup();
75
75
  return;
76
76
  }
77
- const cellNotes = this.adaptable.api.noteApi.getNotesForCell(cellPosition);
77
+ const cellNote = this.adaptable.api.noteApi.getNoteForCell(cellPosition);
78
78
  const cellComments = this.adaptable.api.commentApi.getCommentThread(cellPosition);
79
- const hasNotesOrComments = (cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length) || cellComments;
79
+ const hasNotesOrComments = cellNote || cellComments;
80
80
  // call only if it is different
81
81
  if (CellPopupService.isSameAddress(openCellAddress, cellPosition)) {
82
82
  return;
@@ -92,9 +92,9 @@ export class CellPopupService {
92
92
  return;
93
93
  }
94
94
  // if open but this has no note, close
95
- const cellNotes = this.adaptable.api.noteApi.getNotesForCell(cellAddress);
95
+ const cellNote = this.adaptable.api.noteApi.getNoteForCell(cellAddress);
96
96
  const cellComments = this.adaptable.api.commentApi.getCommentThread(cellAddress);
97
- const hasNotesOrComments = (cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length) || cellComments;
97
+ const hasNotesOrComments = cellNote || cellComments;
98
98
  if (openCellAddress && !hasNotesOrComments) {
99
99
  // hide only if in edit mode
100
100
  // because if you select a cell and move the mouse fast over another cell
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useSelector } from 'react-redux';
3
3
  import { Flex } from 'rebass';
4
- import { GetNotesSelector } from '../../../../Redux/ActionsReducers/NoteRedux';
4
+ import { GetNoteSelector } from '../../../../Redux/ActionsReducers/NoteRedux';
5
5
  import { SystemCommentsAndNotesEditModeSelector, SystemCommentsAndNotesFocusedEntitySelector, SystemCommentsAndNotesSelector, } from '../../../../Redux/ActionsReducers/SystemRedux';
6
6
  import { useAdaptable } from '../../../AdaptableContext';
7
7
  import { CommentsEditor } from '../../../Comments/CommentsEditor';
@@ -13,11 +13,8 @@ const ConnectedNoteEditor = ({ enableEditMode }) => {
13
13
  const editMode = useSelector((state) => SystemCommentsAndNotesEditModeSelector(state.System));
14
14
  const cellPopupService = api.internalApi.getCellPopupService();
15
15
  const cellAddress = useSelector((state) => SystemCommentsAndNotesSelector(state.System));
16
- const [
17
- // Only handle first note for now
18
- // Later we can handle multiple notes
19
- note,] = useSelector((state) => {
20
- return cellAddress ? GetNotesSelector(state.Note, cellAddress) : [];
16
+ const note = useSelector((state) => {
17
+ return cellAddress ? GetNoteSelector(state.Note, cellAddress) : null;
21
18
  });
22
19
  const handleNoteChange = React.useCallback((value) => {
23
20
  api.noteApi.updateNoteText(value, note);
@@ -95,7 +95,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
95
95
  columnId: 'undoActionColumn',
96
96
  friendlyName: ' ',
97
97
  rowScope: {
98
- ExcludeGroupedRows: true,
98
+ ExcludeGroupRows: true,
99
99
  ExcludeSummaryRows: true,
100
100
  },
101
101
  actionColumnSettings: { suppressMenu: true, suppressMovable: true },
@@ -18,8 +18,8 @@ export const renderFormatColumnSettingsSummary = (data) => {
18
18
  React.createElement(Tag, null, ((_b = data.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeDataRows) ? 'no' : 'yes')),
19
19
  ' ',
20
20
  React.createElement(Text, { mt: 3 },
21
- "Grouped Rows ",
22
- React.createElement(Tag, null, ((_c = data.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeGroupedRows) ? 'no' : 'yes')),
21
+ "Group Rows ",
22
+ React.createElement(Tag, null, ((_c = data.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeGroupRows) ? 'no' : 'yes')),
23
23
  React.createElement(Text, { mt: 3 },
24
24
  "Summary Rows ",
25
25
  React.createElement(Tag, null, ((_d = data.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeSummaryRows) ? 'no' : 'yes'))));
@@ -38,7 +38,7 @@ export const FormatColumnSettingsWizardSection = (props) => {
38
38
  props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeDataRows }) }));
39
39
  };
40
40
  const onExcludeGroupedRowsChanged = (ExcludeGroupedRows) => {
41
- props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeGroupedRows }) }));
41
+ props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeGroupRows: ExcludeGroupedRows }) }));
42
42
  };
43
43
  const onExcludeSummaryRowsChanged = (ExcludeSummaryRows) => {
44
44
  props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeSummaryRows }) }));
@@ -62,9 +62,9 @@ export const FormatColumnSettingsWizardSection = (props) => {
62
62
  React.createElement(FormRow, { label: "Exclude Data Rows:" },
63
63
  React.createElement(Flex, { alignItems: "center", marginLeft: 2 },
64
64
  React.createElement(CheckBox, { "data-name": "exclude-data-rows-checkbox", checked: (_a = data.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeDataRows, onChange: onExcludeDataRowsChanged, mr: 2 }))),
65
- React.createElement(FormRow, { label: "Exclude Grouped Rows:" },
65
+ React.createElement(FormRow, { label: "Exclude Group Rows:" },
66
66
  React.createElement(Flex, { alignItems: "center", marginLeft: 2 },
67
- React.createElement(CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked: (_b = data.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows, onChange: onExcludeGroupedRowsChanged, mr: 2 }))),
67
+ React.createElement(CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked: (_b = data.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, mr: 2 }))),
68
68
  React.createElement(FormRow, { label: "Exclude Row Summaries:" },
69
69
  React.createElement(Flex, { alignItems: "center", marginLeft: 2 },
70
70
  React.createElement(CheckBox, { "data-name": "exclude-summary-rows-checkbox", checked: (_c = data.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged, mr: 2 }))))))));
@@ -43,7 +43,7 @@ export const RowGroupingSection = (props) => {
43
43
  props.onChange(Object.assign(Object.assign({}, layout), { RowGroupedColumns: columnIds }));
44
44
  };
45
45
  return (React.createElement(Tabs, { style: { height: '100%' } },
46
- React.createElement(Tabs.Tab, null, "Grouped Rows"),
46
+ React.createElement(Tabs.Tab, null, "Group Rows"),
47
47
  ((_a = layout.ExpandedRowGroupValues) === null || _a === void 0 ? void 0 : _a.length) && React.createElement(Tabs.Tab, null, "Expanded Rows"),
48
48
  React.createElement(Tabs.Content, null,
49
49
  React.createElement(ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, options: sortedGroupableColumns, value: (_b = layout.RowGroupedColumns) !== null && _b !== void 0 ? _b : [], allowReorder: true, xSelectedLabel: () => {
@@ -7,7 +7,6 @@ import HelpBlock from '../../../components/HelpBlock';
7
7
  import SimpleButton from '../../../components/SimpleButton';
8
8
  import { Tabs } from '../../../components/Tabs';
9
9
  import ObjectFactory from '../../../Utilities/ObjectFactory';
10
- import { AdaptablePopover } from '../../AdaptablePopover';
11
10
  import { AdaptableIconSelector } from '../../Components/AdaptableIconSelector';
12
11
  import { PredicateEditor } from '../../Components/PredicateEditor/PredicateEditor';
13
12
  import { StyleComponent } from '../../Components/StyleComponent';
@@ -16,6 +15,7 @@ import { StyledColumnBadgePreview } from './StyledColumnWizardStyleSection/Compo
16
15
  import { Badge } from '../../Components/Badge';
17
16
  import { AdaptableIconComponent } from '../../Components/AdaptableIconComponent';
18
17
  import { DEFAULT_INTEGER_DISPLAY_VALUE, DEFAULT_STRING_DISPLAY_VALUE, } from '../../../Utilities/Constants/GeneralConstants';
18
+ import { Accordion } from '../../../components/Accordion';
19
19
  const BadgeEditor = (props) => {
20
20
  var _a, _b;
21
21
  const { api } = useOnePageAdaptableWizardContext();
@@ -36,12 +36,10 @@ const BadgeEditor = (props) => {
36
36
  React.createElement(FormRow, { label: "Style" },
37
37
  React.createElement(HelpBlock, { fontSize: 2, mb: 1, mt: 2 }, "Select the Style for the Badge"),
38
38
  ' ',
39
- React.createElement(AdaptablePopover, { showEvent: "mouseenter", hideEvent: "mouseleave", showIcon: false, useButton: false, popoverMaxWidth: 700, bodyText: [
40
- React.createElement(StyleComponent, { showFontSizeAs: "radio", headless: true, hidePreview: true, api: api, Style: (_a = badge.Style) !== null && _a !== void 0 ? _a : {}, UpdateStyle: (Style) => {
41
- onChange(Object.assign(Object.assign({}, badge), { Style }));
42
- } }),
43
- ] },
44
- React.createElement(SimpleButton, { variant: "raised" }, "Edit Badge Style"))),
39
+ React.createElement(Accordion, { title: "Edit Badge Style" },
40
+ React.createElement(StyleComponent, { showFontSizeAs: "radio", headless: true, hidePreview: true, api: api, Style: (_a = badge.Style) !== null && _a !== void 0 ? _a : {}, UpdateStyle: (Style) => {
41
+ onChange(Object.assign(Object.assign({}, badge), { Style }));
42
+ } }))),
45
43
  !api.columnApi.hasArrayDataType(columnId) && ( // dont show predicates for arrays
46
44
  (React.createElement(
47
45
  FormRow,
@@ -14,8 +14,8 @@ export const renderStyledColumnWizardSettingsSummary = (data) => {
14
14
  React.createElement(Tag, null, ((_a = badgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeDataRows) ? 'no' : 'yes')),
15
15
  ' ',
16
16
  React.createElement(Text, { mt: 3 },
17
- "Grouped Rows ",
18
- React.createElement(Tag, null, ((_b = badgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows) ? 'no' : 'yes')),
17
+ "Group Rows ",
18
+ React.createElement(Tag, null, ((_b = badgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupRows) ? 'no' : 'yes')),
19
19
  React.createElement(Text, { mt: 3 },
20
20
  "Summary Rows ",
21
21
  React.createElement(Tag, null, ((_c = badgeStyle.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeSummaryRows) ? 'no' : 'yes'))));
@@ -27,7 +27,7 @@ export const StyledColumnWizardSettingsSection = (props) => {
27
27
  props.onChange(Object.assign(Object.assign({}, data), { BadgeStyle: Object.assign(Object.assign({}, data.BadgeStyle), { RowScope: Object.assign(Object.assign({}, data.BadgeStyle.RowScope), { ExcludeDataRows }) }) }));
28
28
  };
29
29
  const onExcludeGroupedRowsChanged = (ExcludeGroupedRows) => {
30
- props.onChange(Object.assign(Object.assign({}, data), { BadgeStyle: Object.assign(Object.assign({}, data.BadgeStyle), { RowScope: Object.assign(Object.assign({}, data.BadgeStyle.RowScope), { ExcludeGroupedRows }) }) }));
30
+ props.onChange(Object.assign(Object.assign({}, data), { BadgeStyle: Object.assign(Object.assign({}, data.BadgeStyle), { RowScope: Object.assign(Object.assign({}, data.BadgeStyle.RowScope), { ExcludeGroupRows: ExcludeGroupedRows }) }) }));
31
31
  };
32
32
  const onExcludeSummaryRowsChanged = (ExcludeSummaryRows) => {
33
33
  props.onChange(Object.assign(Object.assign({}, data), { BadgeStyle: Object.assign(Object.assign({}, data.BadgeStyle), { RowScope: Object.assign(Object.assign({}, data.BadgeStyle.RowScope), { ExcludeSummaryRows }) }) }));
@@ -42,11 +42,11 @@ export const StyledColumnWizardSettingsSection = (props) => {
42
42
  React.createElement(CheckBox, { "data-name": "exclude-data-rows-checkbox", checked:
43
43
  // @ts-ignore
44
44
  (_a = data.BadgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeDataRows, onChange: onExcludeDataRowsChanged, mr: 2 }))),
45
- React.createElement(FormRow, { label: "Exclude Grouped Rows:" },
45
+ React.createElement(FormRow, { label: "Exclude Group Rows:" },
46
46
  React.createElement(Flex, { alignItems: "center", marginLeft: 2 },
47
47
  React.createElement(CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked:
48
48
  // @ts-ignore
49
- (_b = data.BadgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows, onChange: onExcludeGroupedRowsChanged, mr: 2 }))),
49
+ (_b = data.BadgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, mr: 2 }))),
50
50
  React.createElement(FormRow, { label: "Exclude Row Summaries:" },
51
51
  React.createElement(Flex, { alignItems: "center", marginLeft: 2 },
52
52
  React.createElement(CheckBox, { "data-name": "exclude-summary-rows-checkbox", checked:
@@ -43,7 +43,7 @@ export const ReactActionColumnRenderer = (props) => {
43
43
  const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
44
44
  let shouldRender = true;
45
45
  if (isGroupedRow) {
46
- if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupedRows) {
46
+ if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
47
47
  shouldRender = false;
48
48
  }
49
49
  }
@@ -89,7 +89,7 @@ export class ActionColumnRenderer {
89
89
  const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
90
90
  let shouldRender = true;
91
91
  if (isGroupedRow) {
92
- if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupedRows) {
92
+ if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
93
93
  shouldRender = false;
94
94
  }
95
95
  }
@@ -576,8 +576,8 @@ export class AgGridColumnAdapter {
576
576
  PrimaryKeyValue: gridCell.primaryKeyValue,
577
577
  ColumnId: gridCell.column.columnId,
578
578
  };
579
- const cellNotes = this.adaptableApi.noteApi.getNotesForCell(cellPosition);
580
- if (!(cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length)) {
579
+ const cellNote = this.adaptableApi.noteApi.getNoteForCell(cellPosition);
580
+ if (!cellNote) {
581
581
  return undefined;
582
582
  }
583
583
  return 'ab-Cell-Note';
@@ -352,25 +352,25 @@ export class AgGridMenuAdapter {
352
352
  ? [
353
353
  this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-visual-data-excel')), {
354
354
  label: 'Visual Data',
355
- icon: false,
355
+ icon: 'export-data',
356
356
  }),
357
357
  ]
358
358
  : [];
359
359
  const allDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-all-data')), {
360
360
  label: 'All Data',
361
- icon: false,
361
+ icon: 'export-data',
362
362
  }));
363
363
  const currentDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-current-data')), {
364
364
  label: 'Current Data',
365
- icon: false,
365
+ icon: 'export-data',
366
366
  }));
367
367
  const selectedCellsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-cells')), {
368
368
  label: 'Selected Cells',
369
- icon: false,
369
+ icon: 'export-data',
370
370
  }));
371
371
  const selectedRowsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-rows')), {
372
372
  label: 'Selected Rows',
373
- icon: false,
373
+ icon: 'export-data',
374
374
  }));
375
375
  return this.normalizeMenuGroup(this.buildMenuGroupParent('Export', [
376
376
  ...visualDataExportItems,
@@ -17,7 +17,7 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
17
17
  const isSummaryRow = adapatableApi.gridApi.isSummaryNode(params.node);
18
18
  let shouldRender = true;
19
19
  if (isGroupedRow) {
20
- if ((_a = badgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupedRows) {
20
+ if ((_a = badgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
21
21
  shouldRender = false;
22
22
  }
23
23
  }
@@ -13,7 +13,7 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
13
13
  if (Helper.objectNotExists(value)) {
14
14
  value = 0;
15
15
  }
16
- // No longer support showing Percent Bar in Grouped Rows
16
+ // We no longer support showing Percent Bar in Group Rows as it only made sense for Min / Max
17
17
  if (api.gridApi.isGroupRowNode(params.node)) {
18
18
  if (params.value) {
19
19
  this.eGui = document.createElement('div');
@@ -0,0 +1,7 @@
1
+ import React, { ReactElement } from 'react';
2
+ interface AccordionProps {
3
+ title: string | ReactElement;
4
+ children: ReactElement;
5
+ }
6
+ export declare const Accordion: React.FC<AccordionProps>;
7
+ export default Accordion;
@@ -0,0 +1,36 @@
1
+ import React, { useState, useEffect, useRef } from 'react';
2
+ import SimpleButton from './SimpleButton';
3
+ import Panel from './Panel';
4
+ export const Accordion = ({ title, children }) => {
5
+ const [isOpen, setIsOpen] = useState(false);
6
+ const [height, setHeight] = useState('0px');
7
+ const content = useRef(null);
8
+ const observer = useRef(null);
9
+ useEffect(() => {
10
+ setHeight(isOpen && content.current ? `${content.current.scrollHeight}px` : '0px');
11
+ }, [isOpen, content]);
12
+ useEffect(() => {
13
+ if (content.current) {
14
+ observer.current = new MutationObserver(() => {
15
+ var _a;
16
+ setHeight(`${(_a = content.current) === null || _a === void 0 ? void 0 : _a.scrollHeight}px`);
17
+ });
18
+ observer.current.observe(content.current, { childList: true, subtree: true });
19
+ }
20
+ return () => {
21
+ var _a;
22
+ (_a = observer.current) === null || _a === void 0 ? void 0 : _a.disconnect();
23
+ };
24
+ }, []);
25
+ const toggleAccordion = () => {
26
+ setIsOpen(!isOpen);
27
+ };
28
+ return (React.createElement(Panel, { className: "ab-Accordion" },
29
+ React.createElement(SimpleButton, { iconPosition: 'end', icon: isOpen ? 'expand-all' : 'collapse-all', variant: "text", onClick: toggleAccordion, style: { width: '100%', textAlign: 'left' } }, title),
30
+ React.createElement("div", { ref: content, style: {
31
+ maxHeight: `${height}`,
32
+ overflow: 'hidden',
33
+ transition: 'max-height 0.6s ease',
34
+ } }, children)));
35
+ };
36
+ export default Accordion;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import DefaultIcon from './DefaultIcon';
3
+ export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
4
+ React.createElement("path", { d: "m296-80-56-56 240-240 240 240-56 56-184-184L296-80Zm184-504L240-824l56-56 184 184 184-184 56 56-240 240Z" })));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import DefaultIcon from './DefaultIcon';
3
+ export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
4
+ React.createElement("path", { d: "M230-360h120v-60H250v-120h100v-60H230q-17 0-28.5 11.5T190-560v160q0 17 11.5 28.5T230-360Zm156 0h120q17 0 28.5-11.5T546-400v-60q0-17-11.5-31.5T506-506h-60v-34h100v-60H426q-17 0-28.5 11.5T386-560v60q0 17 11.5 30.5T426-456h60v36H386v60Zm264 0h60l70-240h-60l-40 138-40-138h-60l70 240ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm0 0v-480 480Z" })));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import DefaultIcon from './DefaultIcon';
3
+ export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
4
+ React.createElement("path", { d: "M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35H560Zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80H280Z" })));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import DefaultIcon from './DefaultIcon';
3
+ export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
4
+ React.createElement("path", { d: "M200-200h80v-80h-80v80Zm160 0h80v-80h-80v80Zm160 0h80v-80h-80v80Zm160 0h80v-80h-80v80ZM200-680h80v-80h-80v80Zm0 160h80v-80h-80v80Zm0 160h80v-80h-80v80Zm160-320h80v-80h-80v80Zm0 160h80v-80h-80v80Zm0 160h80v-80h-80v80Zm160-320h80v-80h-80v80Zm0 160h80v-80h-80v80Zm0 160h80v-80h-80v80Zm160-320h80v-80h-80v80Zm0 160h80v-80h-80v80Zm0 160h80v-80h-80v80ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z" }),
5
+ ' '));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import DefaultIcon from './DefaultIcon';
3
+ export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
4
+ React.createElement("path", { d: "M480-80 240-320l57-57 183 183 183-183 57 57L480-80ZM298-584l-58-56 240-240 240 240-58 56-182-182-182 182Z" })));