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

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 (88) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/MenuOptions.d.ts +36 -16
  3. package/src/AdaptableOptions/MenuOptions.js +5 -0
  4. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  5. package/src/Api/GridApi.d.ts +1 -1
  6. package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
  7. package/src/Api/Implementation/NoteApiImpl.js +2 -2
  8. package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
  9. package/src/Api/NoteApi.d.ts +1 -1
  10. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  11. package/src/PredefinedConfig/Common/Menu.d.ts +14 -6
  12. package/src/PredefinedConfig/Common/Menu.js +3 -0
  13. package/src/PredefinedConfig/Common/RowScope.d.ts +2 -2
  14. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  15. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  16. package/src/Redux/ActionsReducers/NoteRedux.d.ts +1 -1
  17. package/src/Redux/ActionsReducers/NoteRedux.js +3 -3
  18. package/src/Strategy/AdaptableModuleBase.d.ts +8 -8
  19. package/src/Strategy/AlertModule.d.ts +3 -2
  20. package/src/Strategy/BulkUpdateModule.d.ts +3 -2
  21. package/src/Strategy/CalculatedColumnModule.d.ts +3 -4
  22. package/src/Strategy/CalculatedColumnModule.js +16 -12
  23. package/src/Strategy/CellSummaryModule.d.ts +3 -4
  24. package/src/Strategy/CellSummaryModule.js +17 -14
  25. package/src/Strategy/ColumnFilterModule.d.ts +3 -3
  26. package/src/Strategy/ColumnInfoModule.d.ts +3 -3
  27. package/src/Strategy/CommentModule.d.ts +3 -2
  28. package/src/Strategy/CustomSortModule.d.ts +1 -2
  29. package/src/Strategy/DashboardModule.d.ts +3 -3
  30. package/src/Strategy/DataImportModule.d.ts +2 -2
  31. package/src/Strategy/ExportModule.d.ts +1 -1
  32. package/src/Strategy/ExportModule.js +19 -2
  33. package/src/Strategy/Fdc3Module.d.ts +1 -1
  34. package/src/Strategy/FlashingCellModule.d.ts +4 -3
  35. package/src/Strategy/FormatColumnModule.d.ts +1 -1
  36. package/src/Strategy/FormatColumnModule.js +0 -1
  37. package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
  38. package/src/Strategy/GridInfoModule.d.ts +3 -3
  39. package/src/Strategy/Interface/IModule.d.ts +3 -3
  40. package/src/Strategy/LayoutModule.d.ts +2 -2
  41. package/src/Strategy/NoteModule.d.ts +2 -2
  42. package/src/Strategy/NoteModule.js +3 -3
  43. package/src/Strategy/PlusMinusModule.d.ts +1 -2
  44. package/src/Strategy/SettingsPanelModule.d.ts +2 -2
  45. package/src/Strategy/SmartEditModule.d.ts +3 -2
  46. package/src/Strategy/StyledColumnModule.d.ts +1 -1
  47. package/src/Strategy/StyledColumnModule.js +1 -9
  48. package/src/Strategy/SystemStatusModule.d.ts +3 -3
  49. package/src/Strategy/SystemStatusModule.js +3 -1
  50. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +1 -1
  51. package/src/Utilities/MenuItem.d.ts +9 -9
  52. package/src/Utilities/Services/CellPopupService.js +4 -4
  53. package/src/Utilities/Services/RowSummaryService.d.ts +7 -3
  54. package/src/Utilities/Services/RowSummaryService.js +29 -15
  55. package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -2
  56. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -1
  57. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -0
  58. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +3 -6
  59. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  60. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +5 -5
  61. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
  62. package/src/View/SmartEdit/SmartEditPopup.js +1 -1
  63. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +5 -7
  64. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +5 -5
  65. package/src/agGrid/ActionColumnRenderer.js +2 -2
  66. package/src/agGrid/AgGridColumnAdapter.js +2 -2
  67. package/src/agGrid/AgGridMenuAdapter.d.ts +1 -0
  68. package/src/agGrid/AgGridMenuAdapter.js +75 -64
  69. package/src/agGrid/BadgeRenderer.js +1 -1
  70. package/src/agGrid/PercentBarRenderer.js +1 -1
  71. package/src/components/Accordion.d.ts +7 -0
  72. package/src/components/Accordion.js +36 -0
  73. package/src/components/icons/collapse-all.d.ts +3 -0
  74. package/src/components/icons/collapse-all.js +4 -0
  75. package/src/components/icons/csv.d.ts +3 -0
  76. package/src/components/icons/csv.js +4 -0
  77. package/src/components/icons/data-object.d.ts +3 -0
  78. package/src/components/icons/data-object.js +4 -0
  79. package/src/components/icons/excel.d.ts +3 -0
  80. package/src/components/icons/excel.js +5 -0
  81. package/src/components/icons/expand-all.d.ts +3 -0
  82. package/src/components/icons/expand-all.js +4 -0
  83. package/src/components/icons/index.js +10 -0
  84. package/src/env.js +2 -2
  85. package/src/metamodel/adaptable.metamodel.d.ts +10 -0
  86. package/src/metamodel/adaptable.metamodel.js +1 -1
  87. package/src/types.d.ts +1 -1
  88. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -24,18 +24,19 @@ export class AgGridMenuAdapter {
24
24
  }
25
25
  const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
26
26
  const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
27
+ /**
28
+ * AG Grid items
29
+ */
30
+ const agGridDefaultStructure = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
27
31
  const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
28
32
  const defaultColumnMenuStructure = this.buildColumnMenuDefaultStructure(adaptableMenuItems, menuContext);
29
33
  // 1. first check if there is a custom column menu defined
30
34
  if (typeof menuOptions.customColumnMenu === 'function') {
31
- const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
32
- menuType: 'AgGrid',
33
- name: itemName,
34
- }));
35
+ const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
35
36
  const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
36
37
  const customMenuItems = menuOptions
37
38
  .customColumnMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
38
- defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultColumnMenuStructure) }))
39
+ defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultColumnMenuStructure), defaultAgGridMenuStructure: agGridDefaultStructure }))
39
40
  .filter(Boolean);
40
41
  return customMenuItems
41
42
  .map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
@@ -51,56 +52,70 @@ export class AgGridMenuAdapter {
51
52
  }
52
53
  buildContextMenu(params, originalGetContextMenuItems) {
53
54
  var _a;
55
+ if (!params.column) {
56
+ return [];
57
+ }
54
58
  // we do this in order to refresh the internal state of selected cells (technically query the AG Grid cellRanges)
55
59
  // (right-click selected the current cell, but this was not reflected in the internal state of the selected cells)
56
60
  this.adaptableInstance.refreshSelectedCellsState();
57
61
  const menuOptions = this.adaptableOptions.menuOptions;
58
- const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
59
- if (!params.column) {
60
- return [];
61
- }
62
62
  const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
63
63
  const menuContext = this.createContextMenuContextObject(params, adaptableColumn);
64
+ /**
65
+ * AG Grid Items
66
+ */
67
+ const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
68
+ const agGridCopyItems = agGridMenuItems.filter((item) => ['copy', 'copyWithHeaders', 'copyWithGroupHeaders', 'cut', 'paste'].includes(item));
69
+ const otherAgGridItems = agGridMenuItems.filter((item) => !agGridCopyItems.includes(item) &&
70
+ // we provide Adaptable exports in the context menu
71
+ !['export', 'csvExport', 'excelExport'].includes(item));
72
+ const agGridDefaultStructure = [
73
+ {
74
+ menuType: 'Group',
75
+ label: 'Copy & Paste',
76
+ icon: {
77
+ name: 'copy',
78
+ },
79
+ subMenuItems: agGridCopyItems.map((item) => this.mapAgGridItemTypeToAgGridMenuItem(item)),
80
+ },
81
+ ...otherAgGridItems
82
+ .filter((itemName) => itemName !== 'separator')
83
+ .map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName)),
84
+ ];
85
+ /**
86
+ * Adaptable Items
87
+ */
64
88
  const adaptableMenuItems = this.createAdaptableContextMenuItems(menuContext);
65
- const defaultContextMenuStructure = this.buildContextMenuDefaultStructure(adaptableMenuItems, menuContext);
89
+ const adaptableDefaultStructure = this.buildContextMenuDefaultStructure(adaptableMenuItems, menuContext);
90
+ /**
91
+ * Build the context menu
92
+ */
66
93
  // 1. first check if there is a custom context menu defined
67
94
  if (typeof menuOptions.customContextMenu === 'function') {
68
- const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
69
- menuType: 'AgGrid',
70
- name: itemName,
71
- }));
95
+ const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
72
96
  const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
73
97
  const customMenuItems = menuOptions
74
98
  .customContextMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
75
- defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultContextMenuStructure) }))
99
+ defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(adaptableDefaultStructure), defaultAgGridMenuStructure: agGridDefaultStructure }))
76
100
  .filter(Boolean);
77
101
  return customMenuItems
78
102
  .map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
79
103
  .filter(Boolean);
80
104
  }
81
105
  // 2. if not, return the default context menu
82
- const agGridCopyItems = agGridMenuItems.filter((item) => ['copy', 'copyWithHeaders', 'copyWithGroupHeaders', 'cut', 'paste'].includes(item));
83
- const otherAgGridItems = agGridMenuItems.filter((item) => !agGridCopyItems.includes(item) &&
84
- // we provide Adaptable exports in the context menu
85
- !['export', 'csvExport', 'excelExport'].includes(item));
86
106
  const defaultContextMenu = [
87
- this.mapCustomMenuItemToAgGridMenuDefinition({
88
- menuType: 'Group',
89
- label: 'Copy & Paste',
90
- icon: {
91
- name: 'copy',
92
- },
93
- subMenuItems: agGridCopyItems.map((item) => ({
94
- menuType: 'AgGrid',
95
- name: item,
96
- })),
97
- }, menuContext),
98
- ...otherAgGridItems,
107
+ ...agGridDefaultStructure.map((agGridItem) => this.mapCustomMenuItemToAgGridMenuDefinition(agGridItem, menuContext)),
99
108
  'separator',
100
- ...defaultContextMenuStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
109
+ ...adaptableDefaultStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
101
110
  ];
102
111
  return this.removeConsecutiveSeparators(defaultContextMenu);
103
112
  }
113
+ mapAgGridItemTypeToAgGridMenuItem(itemName) {
114
+ return {
115
+ menuType: 'AgGrid',
116
+ name: itemName,
117
+ };
118
+ }
104
119
  // due to entitlements or other reasons, some menu items might be hidden, leading to consecutive separators
105
120
  removeConsecutiveSeparators(menuItems, separator = 'separator') {
106
121
  return menuItems.reduce((acc, item, index, array) => {
@@ -233,7 +248,7 @@ export class AgGridMenuAdapter {
233
248
  // Comment
234
249
  const commentMenuItems = this.getModuleSpecificStructure('Comment', availableMenuItems);
235
250
  // Dashboard
236
- const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems);
251
+ const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems, 'dashboard-group');
237
252
  // DataImport
238
253
  const dataImportMenuItems = this.getModuleSpecificStructure('DataImport', availableMenuItems);
239
254
  // Export
@@ -260,8 +275,7 @@ export class AgGridMenuAdapter {
260
275
  const gridMenuItem = {
261
276
  name: 'grid-group',
262
277
  label: 'Grid',
263
- // TODO
264
- module: 'ColumnInfo',
278
+ module: 'Group',
265
279
  isVisible: true,
266
280
  icon: {
267
281
  name: 'grid',
@@ -278,8 +292,7 @@ export class AgGridMenuAdapter {
278
292
  const editMenuItem = {
279
293
  name: 'edit-group',
280
294
  label: 'Edit',
281
- // TODO
282
- module: 'ColumnInfo',
295
+ module: 'Group',
283
296
  isVisible: true,
284
297
  icon: {
285
298
  name: 'edit-table',
@@ -289,8 +302,7 @@ export class AgGridMenuAdapter {
289
302
  const columnMenuItem = {
290
303
  name: 'column-group',
291
304
  label: 'Column',
292
- // TODO
293
- module: 'ColumnInfo',
305
+ module: 'Group',
294
306
  isVisible: true,
295
307
  icon: {
296
308
  name: 'columns',
@@ -332,11 +344,11 @@ export class AgGridMenuAdapter {
332
344
  /**
333
345
  * Default strategy for menu items: return as is if there is only one item, otherwise group them under a parent item
334
346
  */
335
- getModuleSpecificStructure(module, menuItems) {
347
+ getModuleSpecificStructure(module, menuItems, groupName) {
336
348
  const moduleItems = menuItems.filter((menuItem) => menuItem.module === module);
337
349
  if (moduleItems.length > 1) {
338
350
  const moduleInfo = this.adaptableInstance.ModuleService.getModuleInfoByModule(module);
339
- return [this.buildMenuGroupParent(module, moduleItems)];
351
+ return [this.buildMenuGroupParent(module, moduleItems, { groupName })];
340
352
  }
341
353
  else {
342
354
  return moduleItems;
@@ -352,25 +364,25 @@ export class AgGridMenuAdapter {
352
364
  ? [
353
365
  this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-visual-data-excel')), {
354
366
  label: 'Visual Data',
355
- icon: false,
367
+ icon: 'export-data',
356
368
  }),
357
369
  ]
358
370
  : [];
359
371
  const allDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-all-data')), {
360
372
  label: 'All Data',
361
- icon: false,
373
+ icon: 'export-data',
362
374
  }));
363
375
  const currentDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-current-data')), {
364
376
  label: 'Current Data',
365
- icon: false,
377
+ icon: 'export-data',
366
378
  }));
367
379
  const selectedCellsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-cells')), {
368
380
  label: 'Selected Cells',
369
- icon: false,
381
+ icon: 'export-data',
370
382
  }));
371
383
  const selectedRowsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-rows')), {
372
384
  label: 'Selected Rows',
373
- icon: false,
385
+ icon: 'export-data',
374
386
  }));
375
387
  return this.normalizeMenuGroup(this.buildMenuGroupParent('Export', [
376
388
  ...visualDataExportItems,
@@ -381,6 +393,7 @@ export class AgGridMenuAdapter {
381
393
  ], {
382
394
  label: 'Export',
383
395
  icon: 'export',
396
+ groupName: 'export-group',
384
397
  }));
385
398
  }
386
399
  getLayoutContextMenuStructure(menuItems) {
@@ -398,14 +411,14 @@ export class AgGridMenuAdapter {
398
411
  return [gridActionsItems, otherLayoutItems];
399
412
  }
400
413
  buildMenuGroupParent(module, menuItems, config) {
401
- var _a, _b;
414
+ var _a, _b, _c;
402
415
  const moduleInfo = this.adaptableInstance.ModuleService.getModuleInfoByModule(module);
403
416
  const icon = config && config.icon === false
404
417
  ? undefined
405
418
  : { name: (_a = config === null || config === void 0 ? void 0 : config.icon) !== null && _a !== void 0 ? _a : moduleInfo.Glyph };
406
419
  return {
407
- name: 'menu-group',
408
- label: (_b = config === null || config === void 0 ? void 0 : config.label) !== null && _b !== void 0 ? _b : moduleInfo.FriendlyName,
420
+ name: (_b = config === null || config === void 0 ? void 0 : config.groupName) !== null && _b !== void 0 ? _b : 'menu-group',
421
+ label: (_c = config === null || config === void 0 ? void 0 : config.label) !== null && _c !== void 0 ? _c : moduleInfo.FriendlyName,
409
422
  isVisible: true,
410
423
  module: moduleInfo.ModuleName,
411
424
  icon,
@@ -424,7 +437,7 @@ export class AgGridMenuAdapter {
424
437
  // CustomSort
425
438
  const customSortMenuItems = this.getModuleSpecificStructure('CustomSort', availableMenuItems);
426
439
  // Dashboard
427
- const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems);
440
+ const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems, 'dashboard-group');
428
441
  // DataImport
429
442
  const dataImportMenuItems = this.getModuleSpecificStructure('DataImport', availableMenuItems);
430
443
  // FlashingCell
@@ -451,8 +464,7 @@ export class AgGridMenuAdapter {
451
464
  const gridMenuItem = {
452
465
  name: 'grid-group',
453
466
  label: 'Grid',
454
- // TODO
455
- module: 'ColumnInfo',
467
+ module: 'Group',
456
468
  isVisible: true,
457
469
  icon: {
458
470
  name: 'grid',
@@ -470,8 +482,7 @@ export class AgGridMenuAdapter {
470
482
  const columnMenuItem = {
471
483
  name: 'column-group',
472
484
  label: 'Column',
473
- // TODO
474
- module: 'ColumnInfo',
485
+ module: 'Group',
475
486
  isVisible: true,
476
487
  icon: {
477
488
  name: 'columns',
@@ -489,8 +500,7 @@ export class AgGridMenuAdapter {
489
500
  const createStyleMenuItem = {
490
501
  name: 'styling-group',
491
502
  label: 'Styling',
492
- // TODO
493
- module: 'ColumnInfo',
503
+ module: 'Group',
494
504
  isVisible: true,
495
505
  icon: {
496
506
  name: 'brush',
@@ -549,26 +559,27 @@ export class AgGridMenuAdapter {
549
559
  return styledColumnMenuItems;
550
560
  }
551
561
  mapAdaptableMenuItemToSystemMenuItems(adaptableMenuItems) {
552
- return (adaptableMenuItems !== null && adaptableMenuItems !== void 0 ? adaptableMenuItems : []).map((menuItem) => {
562
+ if (!adaptableMenuItems) {
563
+ return;
564
+ }
565
+ return adaptableMenuItems.map((menuItem) => {
553
566
  if (menuItem === '-') {
554
567
  return menuItem;
555
568
  }
556
- let subItems = menuItem.subItems;
557
- if (subItems && subItems.length > 0) {
558
- subItems = subItems.map((subItem) => this.mapAdaptableMenuItemToSystemMenuItems(subItem.subItems));
559
- }
569
+ // @ts-ignore
570
+ const subItems = this.mapAdaptableMenuItemToSystemMenuItems(menuItem.subItems);
560
571
  return Object.assign(Object.assign({}, menuItem), { menuType: 'Adaptable', subItems });
561
572
  });
562
573
  }
563
574
  createAdaptableColumnMenuItems(menuContext) {
564
- let contextMenuItems = [];
575
+ let columnMenuItems = [];
565
576
  this.adaptableInstance.adaptableModules.forEach((s) => {
566
577
  let menuItems = s.createColumnMenuItems(menuContext.adaptableColumn);
567
578
  if (menuItems) {
568
- contextMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
579
+ columnMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
569
580
  }
570
581
  });
571
- return contextMenuItems;
582
+ return columnMenuItems;
572
583
  }
573
584
  // TODO AFL MIG: pretty sure this logic is duplicated in several other places
574
585
  mapAdaptableIconToAgGridIcon(adaptableIcon, style) {
@@ -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" })));
@@ -36,6 +36,8 @@ import SortAsc from './sort-asc';
36
36
  import SortDesc from './sort-desc';
37
37
  import Calendar from './calendar';
38
38
  import Delete from './delete';
39
+ import CSV from './csv';
40
+ import Excel from './excel';
39
41
  import CheckCircle from './check-circle';
40
42
  import Refresh from './refresh';
41
43
  import Save from './save';
@@ -52,6 +54,7 @@ import CellValidation from './cell-validation';
52
54
  import ColumnFilter from './column-filter';
53
55
  import SystemStatus from './system-status';
54
56
  import DataSet from './data-set';
57
+ import DataObject from './data-object';
55
58
  import FlashingCell from './flashing-cell';
56
59
  import edit from './edit';
57
60
  import Equation from './equation';
@@ -162,6 +165,8 @@ import SelectAll from './select-all';
162
165
  import SelectOff from './select-off';
163
166
  import SelectFwd from './select-fwd';
164
167
  import Copy from './copy';
168
+ import ExpandAll from './expand-all';
169
+ import CollapseAll from './collapse-all';
165
170
  import { IconComponent } from '../Icon';
166
171
  import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
167
172
  export const allIcons = {
@@ -183,6 +188,8 @@ export const allIcons = {
183
188
  news: News,
184
189
  brush: Brush,
185
190
  'data-set': DataSet,
191
+ 'excel': Excel,
192
+ json: DataObject,
186
193
  export: Export,
187
194
  broadcast: Campaign,
188
195
  theme: Theme,
@@ -202,6 +209,7 @@ export const allIcons = {
202
209
  'percent-tag': PercentBar,
203
210
  'spark-line': Sparkline,
204
211
  resume: Resume,
212
+ csv: CSV,
205
213
  'pie-chart': PieChart,
206
214
  'add-circle': PlusMinus,
207
215
  reminder: Reminder,
@@ -327,6 +335,8 @@ export const allIcons = {
327
335
  note: Note,
328
336
  comments: Comments,
329
337
  rows: Rows,
338
+ 'expand-all': ExpandAll,
339
+ 'collapse-all': CollapseAll,
330
340
  };
331
341
  Object.keys(allIcons).forEach((name) => {
332
342
  const ReactCmp = allIcons[name];
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1712828124306 || Date.now(),
4
- VERSION: "18.0.0-canary.32" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1712926394596 || Date.now(),
4
+ VERSION: "18.0.0-canary.34" || '--current-version--',
5
5
  };
@@ -357,6 +357,11 @@ export declare const ADAPTABLE_METAMODEL: {
357
357
  desc: string;
358
358
  }[];
359
359
  };
360
+ AdaptableColumnMenuItem: {
361
+ name: string;
362
+ kind: string;
363
+ desc: string;
364
+ };
360
365
  AdaptableColumnPredicate: {
361
366
  name: string;
362
367
  kind: string;
@@ -413,6 +418,11 @@ export declare const ADAPTABLE_METAMODEL: {
413
418
  ref: string;
414
419
  }[];
415
420
  };
421
+ AdaptableContextMenuItem: {
422
+ name: string;
423
+ kind: string;
424
+ desc: string;
425
+ };
416
426
  AdaptableCoordinate: {
417
427
  name: string;
418
428
  kind: string;