@adaptabletools/adaptable 19.0.0-canary.0 → 19.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +1 -2
  2. package/base.css +1 -1
  3. package/base.css.map +1 -1
  4. package/index.css +1 -1
  5. package/index.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  8. package/src/Api/AlertApi.d.ts +8 -0
  9. package/src/Api/ColumnApi.d.ts +4 -0
  10. package/src/Api/CustomSortApi.d.ts +8 -0
  11. package/src/Api/Events/LiveDataChanged.d.ts +1 -1
  12. package/src/Api/FlashingCellApi.d.ts +25 -12
  13. package/src/Api/FormatColumnApi.d.ts +8 -0
  14. package/src/Api/GridApi.d.ts +0 -20
  15. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -0
  16. package/src/Api/Implementation/AlertApiImpl.js +6 -0
  17. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  18. package/src/Api/Implementation/ColumnApiImpl.js +6 -0
  19. package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -0
  20. package/src/Api/Implementation/CustomSortApiImpl.js +6 -0
  21. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -0
  22. package/src/Api/Implementation/FlashingCellApiImpl.js +9 -0
  23. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -0
  24. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -0
  25. package/src/Api/Implementation/GridApiImpl.d.ts +0 -4
  26. package/src/Api/Implementation/GridApiImpl.js +0 -17
  27. package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -0
  28. package/src/Api/Implementation/ShortcutApiImpl.js +6 -0
  29. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +2 -0
  30. package/src/Api/Implementation/StyledColumnApiImpl.js +6 -0
  31. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -2
  32. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -9
  33. package/src/Api/Internal/ExportInternalApi.d.ts +3 -3
  34. package/src/Api/Internal/ExportInternalApi.js +17 -13
  35. package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
  36. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  37. package/src/Api/ShortcutApi.d.ts +8 -0
  38. package/src/Api/StyledColumnApi.d.ts +8 -0
  39. package/src/Api/UserInterfaceApi.d.ts +0 -10
  40. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
  41. package/src/PredefinedConfig/Common/RowScope.d.ts +1 -1
  42. package/src/PredefinedConfig/FormatColumnState.d.ts +0 -4
  43. package/src/Redux/ActionsReducers/SystemRedux.js +3 -8
  44. package/src/Strategy/DashboardModule.js +11 -7
  45. package/src/View/Dashboard/DashboardPopup.js +4 -3
  46. package/src/View/Dashboard/DashboardViewPanel.js +2 -1
  47. package/src/View/Layout/Wizard/getGridFilterPreview.js +1 -1
  48. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  49. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  50. package/src/agGrid/AdaptableAgGrid.js +4 -3
  51. package/src/agGrid/AgGridColumnAdapter.js +2 -1
  52. package/src/agGrid/AgGridMenuAdapter.js +14 -14
  53. package/src/agGrid/PercentBarRenderer.js +1 -1
  54. package/src/env.js +2 -2
  55. package/src/metamodel/adaptable.metamodel.js +1 -1
  56. package/tsconfig.esm.tsbuildinfo +1 -1
  57. package/src/PredefinedConfig/QueryState.d.ts +0 -18
  58. package/src/PredefinedConfig/QueryState.js +0 -1
@@ -43,7 +43,7 @@ export interface NumberFormatterOptions extends BaseFormatterOptions {
43
43
  */
44
44
  Suffix?: string;
45
45
  /**
46
- * Replaces cell value with supplied value (that can contain placeholders)
46
+ * Replaces cell value with supplied value (that can contain Template Literals)
47
47
  */
48
48
  Content?: string | number;
49
49
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Defines which types of Rows to exclude when rendering Format Columns, Action Columns, Badges
2
+ * Defines which types of Rows to exclude when rendering Format Columns, Action Columns and Badges
3
3
  */
4
4
  export type RowScope = {
5
5
  /**
@@ -45,10 +45,6 @@ export interface FormatColumn extends SuspendableObject {
45
45
  * Which types of Rows should be formatted (data, grouped, summary)
46
46
  */
47
47
  RowScope?: RowScope;
48
- /**
49
- * @deprecated FormatColumns now apply to Group Rows by default; use RowScope for more control
50
- */
51
- IncludeGroupedRows?: never;
52
48
  }
53
49
  /**
54
50
  * The Format Column Rule - can be either a Predicate or a BooleanExpression
@@ -463,10 +463,8 @@ export const SystemReducer = (state = initialState, action) => {
463
463
  });
464
464
  const AdaptableFlashingCellsMap = Object.assign({}, state.AdaptableFlashingCellsMap);
465
465
  AdaptableFlashingCellsMap[FlashingCell.Uuid] = FlashingCell;
466
- return Object.assign({}, state, {
467
- AdaptableFlashingCells: AdaptableFlashingCells,
468
- AdaptableFlashingCellsMap: AdaptableFlashingCellsMap,
469
- });
466
+ return Object.assign(Object.assign({}, state), { AdaptableFlashingCells,
467
+ AdaptableFlashingCellsMap });
470
468
  }
471
469
  case SYSTEM_FLASHING_CELL_DELETE: {
472
470
  const { flashingCell: FlashingCell } = action;
@@ -490,10 +488,7 @@ export const SystemReducer = (state = initialState, action) => {
490
488
  return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: AdaptableFlashingCells, AdaptableFlashingCellsMap: AdaptableFlashingCellsMap });
491
489
  }
492
490
  case SYSTEM_FLASHING_CELL_DELETE_ALL: {
493
- return Object.assign({}, state, {
494
- AdaptableFlashingCells: {},
495
- AdaptableFlashingCellsMap: {},
496
- });
491
+ return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: {}, AdaptableFlashingCellsMap: {} });
497
492
  }
498
493
  case SYSTEM_HIGHLIGHT_CELL_ADD: {
499
494
  const actionTypedAdd = action;
@@ -1,6 +1,7 @@
1
1
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
2
  import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
3
3
  import * as DashboardRedux from '../Redux/ActionsReducers/DashboardRedux';
4
+ import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
4
5
  export class DashboardModule extends AdaptableModuleBase {
5
6
  constructor(api) {
6
7
  super(ModuleConstants.DashboardModuleId, ModuleConstants.DashboardFriendlyName, 'dashboard', 'DashboardPopup', 'The Dashboard - usually placed above the Grid - is designed to provide quick access to commonly required AdapTable functionalty', api);
@@ -26,22 +27,25 @@ export class DashboardModule extends AdaptableModuleBase {
26
27
  buildMenuItems() {
27
28
  if (this.isModuleAvailable()) {
28
29
  let menuItems = [];
30
+ const dashboardState = this.api.dashboardApi.getDashboardState();
29
31
  if (this.isModuleEditable()) {
30
32
  menuItems.push(this.createMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
31
33
  }
32
- if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
33
- menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
34
+ if (ArrayExtensions.IsNotNullOrEmpty(dashboardState.Tabs)) {
35
+ if (dashboardState.IsCollapsed) {
36
+ menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
37
+ }
38
+ else {
39
+ menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
40
+ }
34
41
  }
35
- else {
36
- menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
37
- }
38
- if (this.api.dashboardApi.getDashboardState().IsFloating) {
42
+ if (dashboardState.IsFloating) {
39
43
  menuItems.push(this.createMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
40
44
  }
41
45
  else if (this.api.optionsApi.getDashboardOptions().canFloat) {
42
46
  menuItems.push(this.createMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
43
47
  }
44
- if (this.api.dashboardApi.getDashboardState().IsHidden) {
48
+ if (dashboardState.IsHidden) {
45
49
  menuItems.push(this.createMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
46
50
  }
47
51
  else {
@@ -72,9 +72,10 @@ class DashboardPopupComponent extends React.Component {
72
72
  React.createElement(CheckBox, { "data-name": "hidden", className: `${baseClassName}__settings-option`, checked: this.props.IsHidden, onChange: (checked) => this.props.onSetDashboardHidden(checked) }, "Hidden"))),
73
73
  React.createElement(Panel, { header: 'Dashboard Contents', style: { borderBottom: '1px solid var(--ab-color-primary)' }, variant: "default", borderRadius: "none", marginTop: 4 },
74
74
  React.createElement(Flex, { className: `${baseClassName}__contents-selector`, flexDirection: "row", padding: 2 },
75
- React.createElement(Radio, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Tabs & Toolbars"),
76
- React.createElement(Radio, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons"),
77
- React.createElement(Radio, { marginLeft: 3, value: DashboardConfigView.PinnedToolbars, checked: this.state.DashboardConfigView == DashboardConfigView.PinnedToolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Pinned Toolbars")),
75
+ React.createElement(Radio, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Tabbed Toolbars"),
76
+ React.createElement(Radio, { marginLeft: 3, value: DashboardConfigView.PinnedToolbars, checked: this.state.DashboardConfigView == DashboardConfigView.PinnedToolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Pinned Toolbars"),
77
+ ' ',
78
+ React.createElement(Radio, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
78
79
  React.createElement(Box, { className: `${baseClassName}__Module-Selector`, "data-name": this.state.DashboardConfigView === DashboardConfigView.Toolbars
79
80
  ? 'toolbars'
80
81
  : 'buttons', style: { minHeight: 0, flex: '1 1 0' }, padding: 2 },
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { CheckBox } from '../../components/CheckBox';
4
4
  import { connect } from 'react-redux';
5
5
  import { Flex } from 'rebass';
6
+ import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
6
7
  class DashboardViewPanelComponent extends React.Component {
7
8
  constructor(props) {
8
9
  super(props);
@@ -11,7 +12,7 @@ class DashboardViewPanelComponent extends React.Component {
11
12
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
12
13
  return (React.createElement(Flex, { flexDirection: "row", className: `ab-${elementType}__Dashboard__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
13
14
  ' ',
14
- React.createElement(CheckBox, { className: `ab-${elementType}__Dashboard__collapsed-check`, marginTop: 0, fontSize: 2, padding: 1, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
15
+ ArrayExtensions.IsNotNullOrEmpty(this.props.api.dashboardApi.getDashboardState().Tabs) && (React.createElement(CheckBox, { className: `ab-${elementType}__Dashboard__collapsed-check`, marginTop: 0, fontSize: 2, padding: 1, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse")),
15
16
  '',
16
17
  this.props.api.optionsApi.getDashboardOptions().canFloat && (React.createElement(CheckBox, { className: `ab-${elementType}__Dashboard__collapsed-check`, marginTop: 0, fontSize: 2, padding: 1, checked: this.props.IsFloating, onChange: (checked) => this.props.onSetDashboardFloating(checked) }, "Float")),
17
18
  ' ',
@@ -4,7 +4,7 @@ import { Tag } from '../../../components/Tag';
4
4
  export const getGridFilterViewItems = (layout) => {
5
5
  var _a;
6
6
  return {
7
- name: 'Grid Filters',
7
+ name: 'Grid Filter',
8
8
  view: (React.createElement(Tag, null,
9
9
  React.createElement(ExpressionPreview, { query: { BooleanExpression: (_a = layout.GridFilter) === null || _a === void 0 ? void 0 : _a.Expression } }))),
10
10
  };
@@ -185,7 +185,7 @@ const ColumnRow = (props) => {
185
185
  export const ColumnsSection = (props) => {
186
186
  const adaptable = useAdaptable();
187
187
  const { data: layout } = useOnePageAdaptableWizardContext();
188
- const allColumns = adaptable.api.columnApi.getColumns();
188
+ const allColumns = adaptable.api.columnApi.getStandardColumns();
189
189
  const sortedColumns = React.useMemo(() => {
190
190
  return ArrayExtensions.sortArrayWithOrder(allColumns.map((col) => col.columnId), layout.Columns, { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
191
191
  }, [layout, allColumns]);
@@ -33,7 +33,7 @@ export const GridFilterSection = (props) => {
33
33
  props.onChange(Object.assign(Object.assign({}, layout), { GridFilter: Object.assign(Object.assign({}, layout.GridFilter), { Expression: expression }) }));
34
34
  }, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })));
35
35
  return (React.createElement(Tabs, { style: { height: '100%' } },
36
- React.createElement(Tabs.Tab, null, "Grid Filters"),
36
+ React.createElement(Tabs.Tab, null, "Grid Filter"),
37
37
  React.createElement(Tabs.Content, null,
38
38
  React.createElement(Panel, null, expressionEditorContent))));
39
39
  };
@@ -969,12 +969,13 @@ export class AdaptableAgGrid {
969
969
  /**
970
970
  * `processPivotResultColDef`
971
971
  */
972
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', () => {
972
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', (original_processPivotResultColDef) => {
973
973
  return (colDef) => {
974
974
  if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
975
975
  colDef.floatingFilter = false;
976
976
  colDef.filter = false;
977
977
  }
978
+ original_processPivotResultColDef === null || original_processPivotResultColDef === void 0 ? void 0 : original_processPivotResultColDef(colDef);
978
979
  };
979
980
  });
980
981
  /**
@@ -3216,7 +3217,7 @@ export class AdaptableAgGrid {
3216
3217
  rawValue = dateRawValue;
3217
3218
  }
3218
3219
  }
3219
- return this.api.exportApi.internalApi.getCellExportValueFromRawValue(rowNode, rawValue, columnId);
3220
+ return this.api.exportApi.internalApi.getCellExportValueFromRawValue(rowNode, rawValue, columnId, GeneralConstants.VISUAL_DATA_REPORT);
3220
3221
  }
3221
3222
  processCellForExcelExport(rowNode, columnId) {
3222
3223
  if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
@@ -3227,7 +3228,7 @@ export class AdaptableAgGrid {
3227
3228
  return isoFormattedDate;
3228
3229
  }
3229
3230
  }
3230
- return this.api.exportApi.internalApi.getCellExportValueFromRowNode(rowNode, columnId);
3231
+ return this.api.exportApi.internalApi.getCellExportValueFromRowNode(rowNode, columnId, GeneralConstants.VISUAL_DATA_REPORT);
3231
3232
  }
3232
3233
  isQuickFilterAvailable() {
3233
3234
  if (this.api.layoutApi.isCurrentLayoutPivot() &&
@@ -696,7 +696,7 @@ export class AgGridColumnAdapter {
696
696
  if (styledColumn && !(styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.IsSuspended)) {
697
697
  const styledCellStyle = this.getStyledColumnStyle(styledColumn, gridCell.column, params);
698
698
  // for percentbar we want to merge
699
- if (styledColumn.PercentBarStyle || styledColumn.BadgeStyle) {
699
+ if (styledColumn.PercentBarStyle || styledColumn.BadgeStyle || styledColumn.GradientStyle) {
700
700
  styledColumnStyle = styledCellStyle;
701
701
  }
702
702
  else {
@@ -705,6 +705,7 @@ export class AgGridColumnAdapter {
705
705
  }
706
706
  }
707
707
  const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(gridCell.column);
708
+ // background color of styledColumn.GradientStyle has precedence and wins over FormatColumn
708
709
  return Object.assign(Object.assign({}, this.getFormatColumnCellStyle(gridCell.column, activeFormatColumnsWithStyle, params)), styledColumnStyle);
709
710
  }
710
711
  getStyledColumnStyle(styledColumn, abColumn, params) {
@@ -376,11 +376,11 @@ export class AgGridMenuAdapter {
376
376
  icon: 'export-data',
377
377
  }));
378
378
  return this.normalizeMenuGroup(this.buildMenuGroupParent('Export', [
379
- ...visualDataExportItems,
380
379
  ...allDataExportItems,
381
380
  ...currentDataExportItems,
382
381
  ...selectedCellsExportItems,
383
382
  ...selectedRowsExportItems,
383
+ ...visualDataExportItems,
384
384
  ], {
385
385
  label: 'Export',
386
386
  icon: 'export',
@@ -471,19 +471,19 @@ export class AgGridMenuAdapter {
471
471
  ],
472
472
  };
473
473
  /*
474
- const calculatedColumnMenuItem: AdaptableMenuItem = {
475
- name: 'calculated-column-group',
476
- label: 'Calculated Column',
477
- module: 'CalculatedColumn',
478
- isVisible: true,
479
- icon: {
480
- name: 'columns',
481
- },
482
- subItems: [
483
- ...calculatedColumnMenuItems,
484
- ],
485
- };
486
- */
474
+ const calculatedColumnMenuItem: AdaptableMenuItem = {
475
+ name: 'calculated-column-group',
476
+ label: 'Calculated Column',
477
+ module: 'CalculatedColumn',
478
+ isVisible: true,
479
+ icon: {
480
+ name: 'columns',
481
+ },
482
+ subItems: [
483
+ ...calculatedColumnMenuItems,
484
+ ],
485
+ };
486
+ */
487
487
  const columnMenuItem = {
488
488
  name: 'column-group',
489
489
  label: 'Column',
@@ -63,7 +63,7 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
63
63
  textEl.innerText = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value;
64
64
  }
65
65
  if (percentBarStyle.CellText.includes('PercentageValue')) {
66
- textEl.innerText += ' ' + `(${percentageValue.toFixed(0)}%)`;
66
+ textEl.innerText += ' ' + `${percentageValue.toFixed(0)}%`;
67
67
  }
68
68
  switch (percentBarStyle.CellTextPosition) {
69
69
  case 'Above':
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: 1724333931127 || Date.now(),
4
- VERSION: "19.0.0-canary.0" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1726230070583 || Date.now(),
4
+ VERSION: "19.0.1" || '--current-version--',
5
5
  };