@adaptabletools/adaptable 18.0.0-canary.31 → 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 (90) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  3. package/src/Api/AdaptableApi.d.ts +2 -2
  4. package/src/Api/{ScopeApi.d.ts → ColumnScopeApi.d.ts} +2 -2
  5. package/src/Api/GridApi.d.ts +6 -1
  6. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  7. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  8. package/src/Api/Implementation/AlertApiImpl.js +3 -3
  9. package/src/Api/Implementation/ApiBase.d.ts +2 -2
  10. package/src/Api/Implementation/ApiBase.js +2 -2
  11. package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -1
  12. package/src/Api/Implementation/{ScopeApiImpl.d.ts → ColumnScopeApiImpl.d.ts} +2 -2
  13. package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +2 -2
  14. package/src/Api/Implementation/FlashingCellApiImpl.js +1 -1
  15. package/src/Api/Implementation/FormatColumnApiImpl.js +3 -3
  16. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  17. package/src/Api/Implementation/GridApiImpl.js +5 -0
  18. package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
  19. package/src/Api/Implementation/NoteApiImpl.js +2 -2
  20. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -3
  21. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  22. package/src/Api/Internal/AlertInternalApi.js +3 -3
  23. package/src/Api/Internal/CustomSortInternalApi.js +1 -1
  24. package/src/Api/Internal/ExportInternalApi.js +1 -1
  25. package/src/Api/Internal/ExpressionInternalApi.js +1 -1
  26. package/src/Api/Internal/FormatColumnInternalApi.js +12 -13
  27. package/src/Api/Internal/StyledColumnInternalApi.js +1 -1
  28. package/src/Api/NoteApi.d.ts +1 -1
  29. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  30. package/src/PredefinedConfig/Common/RowScope.d.ts +2 -2
  31. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  32. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  33. package/src/Redux/ActionsReducers/NoteRedux.d.ts +1 -1
  34. package/src/Redux/ActionsReducers/NoteRedux.js +3 -3
  35. package/src/Strategy/AlertModule.js +2 -2
  36. package/src/Strategy/ExportModule.js +21 -4
  37. package/src/Strategy/FlashingCellModule.js +4 -4
  38. package/src/Strategy/FormatColumnModule.js +2 -2
  39. package/src/Strategy/NoteModule.js +3 -3
  40. package/src/Strategy/PlusMinusModule.js +3 -3
  41. package/src/Strategy/ShortcutModule.js +1 -1
  42. package/src/Strategy/StyledColumnModule.js +4 -4
  43. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +1 -1
  44. package/src/Utilities/Services/CellPopupService.js +4 -4
  45. package/src/Utilities/Services/ReportService.js +2 -2
  46. package/src/Utilities/Services/ValidationService.js +2 -2
  47. package/src/View/Alert/AlertEntityRow.js +1 -1
  48. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -2
  49. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  50. package/src/View/ColumnInfo/ColumnInfo.js +1 -1
  51. package/src/View/Components/NewScopeComponent.js +2 -2
  52. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +3 -6
  53. package/src/View/Components/RangesComponent.js +1 -1
  54. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
  55. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  56. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  57. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
  58. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
  59. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +5 -5
  60. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
  61. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
  62. package/src/View/PlusMinus/PlusMinusSummary.js +2 -2
  63. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +5 -7
  64. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  65. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +5 -5
  66. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -1
  67. package/src/agGrid/ActionColumnRenderer.js +10 -11
  68. package/src/agGrid/AdaptableAgGrid.js +2 -3
  69. package/src/agGrid/AgGridColumnAdapter.js +10 -10
  70. package/src/agGrid/AgGridMenuAdapter.js +5 -5
  71. package/src/agGrid/BadgeRenderer.js +6 -7
  72. package/src/agGrid/PercentBarRenderer.js +1 -1
  73. package/src/components/Accordion.d.ts +7 -0
  74. package/src/components/Accordion.js +36 -0
  75. package/src/components/icons/collapse-all.d.ts +3 -0
  76. package/src/components/icons/collapse-all.js +4 -0
  77. package/src/components/icons/csv.d.ts +3 -0
  78. package/src/components/icons/csv.js +4 -0
  79. package/src/components/icons/data-object.d.ts +3 -0
  80. package/src/components/icons/data-object.js +4 -0
  81. package/src/components/icons/excel.d.ts +3 -0
  82. package/src/components/icons/excel.js +5 -0
  83. package/src/components/icons/expand-all.d.ts +3 -0
  84. package/src/components/icons/expand-all.js +4 -0
  85. package/src/components/icons/index.js +10 -0
  86. package/src/env.js +2 -2
  87. package/src/metamodel/adaptable.metamodel.js +1 -1
  88. package/src/types.d.ts +1 -1
  89. package/tsconfig.esm.tsbuildinfo +1 -1
  90. /package/src/Api/{ScopeApi.js → ColumnScopeApi.js} +0 -0
@@ -2,7 +2,6 @@ import SimpleButton from '../components/SimpleButton';
2
2
  import * as React from 'react';
3
3
  import { useRerender } from '../components/utils/useRerender';
4
4
  import { renderWithAdaptableContext } from '../View/renderWithAdaptableContext';
5
- import { ROW_SUMMARY_ROW_ID } from '../PredefinedConfig/Common/RowSummary';
6
5
  const ActionButtons = (props) => {
7
6
  const { buttons, adaptableApi, context, rerender } = props;
8
7
  return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
@@ -33,7 +32,7 @@ const ActionButtons = (props) => {
33
32
  })));
34
33
  };
35
34
  export const ReactActionColumnRenderer = (props) => {
36
- var _a, _b, _c, _d;
35
+ var _a, _b, _c;
37
36
  const rerender = useRerender();
38
37
  const adaptable = props.context.__adaptable;
39
38
  const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(props.colDef);
@@ -41,20 +40,20 @@ export const ReactActionColumnRenderer = (props) => {
41
40
  return null;
42
41
  }
43
42
  const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(props.node);
44
- const isSummaryRow = (_a = props === null || props === void 0 ? void 0 : props.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID];
43
+ const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
45
44
  let shouldRender = true;
46
45
  if (isGroupedRow) {
47
- if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows) {
46
+ if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
48
47
  shouldRender = false;
49
48
  }
50
49
  }
51
50
  else if (isSummaryRow) {
52
- if ((_c = actionColumn.rowScope) === null || _c === void 0 ? void 0 : _c.ExcludeSummaryRows) {
51
+ if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
53
52
  shouldRender = false;
54
53
  }
55
54
  }
56
55
  else {
57
- if ((_d = actionColumn.rowScope) === null || _d === void 0 ? void 0 : _d.ExcludeDataRows) {
56
+ if ((_c = actionColumn.rowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
58
57
  shouldRender = false;
59
58
  }
60
59
  }
@@ -77,7 +76,7 @@ export const ReactActionColumnRenderer = (props) => {
77
76
  export class ActionColumnRenderer {
78
77
  // gets called once before the renderer is used
79
78
  init(params) {
80
- var _a, _b, _c, _d;
79
+ var _a, _b, _c;
81
80
  const adaptable = params.context.__adaptable;
82
81
  const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(params.colDef);
83
82
  if (!actionColumn || !actionButtons.length) {
@@ -87,20 +86,20 @@ export class ActionColumnRenderer {
87
86
  this.eGui = document.createElement('div');
88
87
  this.eGui.className = 'ab-ActionColumn';
89
88
  const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(params.node);
90
- const isSummaryRow = (_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID];
89
+ const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
91
90
  let shouldRender = true;
92
91
  if (isGroupedRow) {
93
- if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows) {
92
+ if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
94
93
  shouldRender = false;
95
94
  }
96
95
  }
97
96
  else if (isSummaryRow) {
98
- if ((_c = actionColumn.rowScope) === null || _c === void 0 ? void 0 : _c.ExcludeSummaryRows) {
97
+ if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
99
98
  shouldRender = false;
100
99
  }
101
100
  }
102
101
  else {
103
- if ((_d = actionColumn.rowScope) === null || _d === void 0 ? void 0 : _d.ExcludeDataRows) {
102
+ if ((_c = actionColumn.rowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
104
103
  shouldRender = false;
105
104
  }
106
105
  }
@@ -394,7 +394,6 @@ export class AdaptableAgGrid {
394
394
  adaptableApi: this.api,
395
395
  agGridApi: this.agGridAdapter.getAgGridApi(),
396
396
  });
397
- this.api.userInterfaceApi.hideLoadingScreen();
398
397
  perfInitAdaptableAgGrid.end();
399
398
  return Promise.resolve(this.api);
400
399
  }
@@ -3570,12 +3569,12 @@ export class AdaptableAgGrid {
3570
3569
  if (!dataChangedScope.wholeRow) {
3571
3570
  const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
3572
3571
  if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
3573
- if (this.api.scopeApi.scopeIsAll(styleModule.Scope)) {
3572
+ if (this.api.columnScopeApi.scopeIsAll(styleModule.Scope)) {
3574
3573
  dataChangedScope.wholeRow = true;
3575
3574
  return;
3576
3575
  }
3577
3576
  else {
3578
- this.api.scopeApi
3577
+ this.api.columnScopeApi
3579
3578
  .getColumnsForScope(styleModule.Scope)
3580
3579
  .map((c) => c.columnId)
3581
3580
  .forEach((colId) => {
@@ -10,7 +10,6 @@ import UIHelper from '../View/UIHelper';
10
10
  import { getPercentBarRendererForColumn } from './PercentBarRenderer';
11
11
  import { getBadgeRendererForColumn } from './BadgeRenderer';
12
12
  import Helper from '../Utilities/Helpers/Helper';
13
- import { ROW_SUMMARY_ROW_ID } from '../PredefinedConfig/Common/RowSummary';
14
13
  export class AgGridColumnAdapter {
15
14
  constructor(adaptableInstance) {
16
15
  this.adaptableInstance = adaptableInstance;
@@ -349,19 +348,19 @@ export class AgGridColumnAdapter {
349
348
  const options = mostRelevantFormatColumn.DisplayFormat.Options;
350
349
  if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'NumberFormatter') {
351
350
  // change the Number format - if the scope allows it
352
- if (this.adaptableApi.scopeApi.isColumnInNumericScope(abColumn, mostRelevantFormatColumn.Scope)) {
351
+ if (this.adaptableApi.columnScopeApi.isColumnInNumericScope(abColumn, mostRelevantFormatColumn.Scope)) {
353
352
  return this.adaptableApi.formatColumnApi.internalApi.getNumberFormattedValue(params.value, params.node, abColumn, options);
354
353
  }
355
354
  }
356
355
  if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'DateFormatter') {
357
356
  // change the Date format - if the scope allows it
358
- if (this.adaptableApi.scopeApi.isColumnInDateScope(abColumn, mostRelevantFormatColumn.Scope)) {
357
+ if (this.adaptableApi.columnScopeApi.isColumnInDateScope(abColumn, mostRelevantFormatColumn.Scope)) {
359
358
  return this.adaptableApi.formatColumnApi.internalApi.getDateFormattedValue(params.value, params.node, abColumn, options);
360
359
  }
361
360
  }
362
361
  if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'StringFormatter') {
363
362
  // change the String format - if the scope allows it
364
- if (this.adaptableApi.scopeApi.isColumnInStringsScope(abColumn, mostRelevantFormatColumn.Scope)) {
363
+ if (this.adaptableApi.columnScopeApi.isColumnInStringsScope(abColumn, mostRelevantFormatColumn.Scope)) {
365
364
  return this.adaptableApi.formatColumnApi.internalApi.getStringFormattedValue(params.value, params.node, abColumn, options);
366
365
  }
367
366
  }
@@ -379,7 +378,8 @@ export class AgGridColumnAdapter {
379
378
  const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
380
379
  const editableCallback = (params) => {
381
380
  // Adaptable Row Summarie rows are not editable
382
- if (params.node.data[ROW_SUMMARY_ROW_ID]) {
381
+ // if (params.node.data[ROW_SUMMARY_ROW_ID]) {
382
+ if (this.adaptableApi.gridApi.isSummaryNode(params.node)) {
383
383
  return false;
384
384
  }
385
385
  if (!cellEditableFn) {
@@ -403,7 +403,7 @@ export class AgGridColumnAdapter {
403
403
  const preventEditAlertsForColumn = this.adaptableApi.alertApi.internalApi
404
404
  .getAlertDefinitionsWithPreventEdit()
405
405
  .filter((alertDefinition) => {
406
- return this.adaptableApi.scopeApi.isColumnInScope(abColumn, alertDefinition.Scope);
406
+ return this.adaptableApi.columnScopeApi.isColumnInScope(abColumn, alertDefinition.Scope);
407
407
  });
408
408
  const noValidations = !preventEditAlertsForColumn.length && !((_a = this.adaptableOptions.editOptions) === null || _a === void 0 ? void 0 : _a.validateOnServer);
409
409
  if (noValidations) {
@@ -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';
@@ -664,7 +664,7 @@ export class AgGridColumnAdapter {
664
664
  return Object.assign(Object.assign({}, this.getFormatColumnCellStyle(gridCell.column, activeFormatColumnsWithStyle, params)), styledColumnStyle);
665
665
  }
666
666
  getStyledColumnStyle(styledColumn, abColumn, params) {
667
- var _a, _b, _c;
667
+ var _a;
668
668
  let style = {};
669
669
  const gradientStyle = styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.GradientStyle;
670
670
  if (params.value === undefined) {
@@ -689,7 +689,7 @@ export class AgGridColumnAdapter {
689
689
  }
690
690
  if (styledColumn.BadgeStyle &&
691
691
  !((_a = styledColumn.BadgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeSummaryRows) &&
692
- ((_c = (_b = params === null || params === void 0 ? void 0 : params.node) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c[ROW_SUMMARY_ROW_ID])) {
692
+ this.adaptableApi.gridApi.isSummaryNode(params === null || params === void 0 ? void 0 : params.node)) {
693
693
  return style;
694
694
  }
695
695
  if (gradientStyle) {
@@ -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,
@@ -1,7 +1,6 @@
1
1
  import { Badge } from '../View/Components/Badge';
2
2
  import { renderWithAdaptableContext } from '../View/renderWithAdaptableContext';
3
3
  import * as React from 'react';
4
- import { ROW_SUMMARY_ROW_ID } from '../PredefinedConfig/Common/RowSummary';
5
4
  export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
6
5
  return class BadgetRenderer {
7
6
  getAdaptableInstance(params) {
@@ -9,31 +8,31 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
9
8
  return adaptable;
10
9
  }
11
10
  init(params) {
12
- var _a, _b, _c, _d, _e, _f, _g;
11
+ var _a, _b, _c, _d, _e, _f;
13
12
  const adaptable = this.getAdaptableInstance(params);
14
13
  const adapatableApi = adaptable.api;
15
14
  this.eGui = document.createElement('div');
16
15
  this.eGui.className = 'ab-Badge__wrapper';
17
16
  const isGroupedRow = params.node.group;
18
- const isSummaryRow = (_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID];
17
+ const isSummaryRow = adapatableApi.gridApi.isSummaryNode(params.node);
19
18
  let shouldRender = true;
20
19
  if (isGroupedRow) {
21
- if ((_b = badgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows) {
20
+ if ((_a = badgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
22
21
  shouldRender = false;
23
22
  }
24
23
  }
25
24
  else if (isSummaryRow) {
26
- if ((_c = badgeStyle.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeSummaryRows) {
25
+ if ((_b = badgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
27
26
  shouldRender = false;
28
27
  }
29
28
  }
30
29
  else {
31
- if ((_d = badgeStyle.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeDataRows) {
30
+ if ((_c = badgeStyle.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
32
31
  shouldRender = false;
33
32
  }
34
33
  }
35
34
  if (!shouldRender) {
36
- const formattedValue = (_g = (_f = (_e = params.formatValue) === null || _e === void 0 ? void 0 : _e.call(params, params.value)) !== null && _f !== void 0 ? _f : params.value) !== null && _g !== void 0 ? _g : '';
35
+ const formattedValue = (_f = (_e = (_d = params.formatValue) === null || _d === void 0 ? void 0 : _d.call(params, params.value)) !== null && _e !== void 0 ? _e : params.value) !== null && _f !== void 0 ? _f : '';
37
36
  this.eGui.innerHTML = formattedValue;
38
37
  return;
39
38
  }
@@ -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: 1712779308766 || Date.now(),
4
- VERSION: "18.0.0-canary.31" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1712842406643 || Date.now(),
4
+ VERSION: "18.0.0-canary.33" || '--current-version--',
5
5
  };