@adaptabletools/adaptable 19.0.5 → 19.1.0-canary.0

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 (33) hide show
  1. package/package.json +2 -2
  2. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
  3. package/src/Api/ColumnApi.d.ts +9 -0
  4. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
  5. package/src/Api/Implementation/ColumnApiImpl.js +11 -3
  6. package/src/Api/Implementation/ConfigApiImpl.js +1 -0
  7. package/src/Api/Implementation/FlashingCellApiImpl.js +8 -6
  8. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  9. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  10. package/src/Api/Internal/AdaptableInternalApi.js +4 -1
  11. package/src/Api/Internal/ColumnInternalApi.d.ts +0 -1
  12. package/src/Api/Internal/ColumnInternalApi.js +1 -4
  13. package/src/Api/Internal/FlashingCellInternalApi.js +4 -2
  14. package/src/PredefinedConfig/SystemState.d.ts +0 -6
  15. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -17
  16. package/src/Redux/ActionsReducers/SystemRedux.js +0 -59
  17. package/src/Redux/Store/AdaptableStore.js +1 -19
  18. package/src/Strategy/FlashingCellModule.d.ts +2 -3
  19. package/src/Strategy/FlashingCellModule.js +6 -3
  20. package/src/Utilities/Services/FlashingCellService.d.ts +21 -0
  21. package/src/Utilities/Services/FlashingCellService.js +65 -0
  22. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +3 -3
  23. package/src/View/AdaptableWizardView/helper.js +1 -1
  24. package/src/View/Components/NewScopeComponent.js +1 -1
  25. package/src/View/Components/Popups/AdaptablePopup/CustomSettingsPanelView.js +1 -1
  26. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  27. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -1
  28. package/src/agGrid/ActionColumnRenderer.js +2 -2
  29. package/src/agGrid/AdaptableAgGrid.d.ts +5 -2
  30. package/src/agGrid/AdaptableAgGrid.js +37 -25
  31. package/src/agGrid/AgGridAdapter.js +1 -1
  32. package/src/env.js +2 -2
  33. package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "19.0.5",
3
+ "version": "19.1.0-canary.0",
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",
@@ -62,7 +62,7 @@
62
62
  "react-toastify": "9.1.3"
63
63
  },
64
64
  "peerDependencies": {
65
- "@ag-grid-community/core": ">=32.1.0"
65
+ "@ag-grid-community/core": ">=32.3.0"
66
66
  },
67
67
  "publishTimestamp": 0,
68
68
  "type": "module",
@@ -30,6 +30,7 @@ import { AgGridAdapter } from '../agGrid/AgGridAdapter';
30
30
  import { AgGridColumnAdapter } from '../agGrid/AgGridColumnAdapter';
31
31
  import { AgGridMenuAdapter } from '../agGrid/AgGridMenuAdapter';
32
32
  import { RowEditService } from '../Utilities/Services/RowEditService';
33
+ import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
33
34
  /**
34
35
  * Contains AG Grid Options and Modules - used when instantiating AdapTable vanilla
35
36
  */
@@ -88,6 +89,7 @@ export interface IAdaptable {
88
89
  RowEditService: RowEditService;
89
90
  Fdc3Service: Fdc3Service;
90
91
  CellPopupService: CellPopupService;
92
+ FlashingCellService: FlashingCellService;
91
93
  _PRIVATE_adaptableJSXElement: JSX.Element;
92
94
  /**
93
95
  * INTERNAL ADAPTABLE EVENTS
@@ -140,6 +142,7 @@ export interface IAdaptable {
140
142
  redrawRow(rowNode: IRowNode): void;
141
143
  redrawRows(rowNodes?: IRowNode[]): void;
142
144
  refreshCells(rowNodes: IRowNode[], columns: (string | any)[], forceUpdate: boolean, suppressFlash?: boolean): void;
145
+ refreshAllCells(forceUpdate?: boolean): void;
143
146
  refreshColumns(columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
144
147
  refreshSelectedCellsState(): SelectedCellInfo | undefined;
145
148
  refreshSelectedRowsState(): SelectedRowInfo | undefined;
@@ -12,6 +12,10 @@ export interface ColumnApi {
12
12
  * Returns all standard Columns (i.e. not Action Rows)
13
13
  */
14
14
  getStandardColumns(): AdaptableColumn[];
15
+ /**
16
+ * Returns all columns excluding Action Rows, Acction Columns, FreeTextColumn and CalculatedColumn
17
+ */
18
+ getNonSpecialColumns(): AdaptableColumn[];
15
19
  /**
16
20
  * Returns all visible Columns
17
21
  */
@@ -167,6 +171,11 @@ export interface ColumnApi {
167
171
  * @param columnId ColumnId to check
168
172
  */
169
173
  isActionColumn(columnId: string): boolean;
174
+ /**
175
+ * Checks if Column with given ColumnId is an Action Row Button Column
176
+ * @param columnId ColumnId to check
177
+ */
178
+ isActionRowButtonColumn(columnId: string): boolean;
170
179
  /**
171
180
  * Checks if the Column with the given `columnId` has DataType Number
172
181
  * @param columnId Column ID
@@ -11,6 +11,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
11
11
  constructor(adaptable: IAdaptable);
12
12
  getColumns(): AdaptableColumn[];
13
13
  getStandardColumns(): AdaptableColumn[];
14
+ getNonSpecialColumns(): AdaptableColumn[];
14
15
  getVisibleColumns(): AdaptableColumn[];
15
16
  selectColumn(columnId: string): void;
16
17
  selectColumns(columnIds: string[]): void;
@@ -24,6 +25,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
24
25
  showColumn(columnId: string): void;
25
26
  isAutoRowGroupColumn(columnId: string): boolean;
26
27
  isAutoPivotColumn(columnId: string): boolean;
28
+ isActionRowButtonColumn(columnId: string): boolean;
27
29
  isCalculatedColumn(columnId: string): boolean;
28
30
  isFreeTextColumn(columnId: string): boolean;
29
31
  isActionColumn(columnId: string): boolean;
@@ -5,6 +5,7 @@ import { ColumnInternalApi } from '../Internal/ColumnInternalApi';
5
5
  import { createBaseContext } from '../../Utilities/ObjectFactory';
6
6
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
7
7
  import { logDeprecationExternal } from '../../Utilities/logDeprecation';
8
+ import { ADAPTABLE_ROW_ACTION_BUTTONS } from '../../Utilities/Constants/GeneralConstants';
8
9
  export function isAutoRowGroupColumn(columnId) {
9
10
  // put this here as there might be other indicators we are not aware of
10
11
  // perhaps with non auto groups ?
@@ -25,9 +26,13 @@ export class ColumnApiImpl extends ApiBase {
25
26
  return (_a = this.getAdaptableApi().gridApi.getGridState().Columns) !== null && _a !== void 0 ? _a : [];
26
27
  }
27
28
  getStandardColumns() {
28
- const cols = this.getAdaptableApi()
29
- .gridApi.getGridState()
30
- .Columns.filter((c) => !this.internalApi.isActionRowButtonColumn(c.columnId));
29
+ var _a;
30
+ const cols = (_a = this.getColumns()) === null || _a === void 0 ? void 0 : _a.filter((c) => !this.isActionRowButtonColumn(c.columnId));
31
+ return cols !== null && cols !== void 0 ? cols : [];
32
+ }
33
+ getNonSpecialColumns() {
34
+ var _a;
35
+ const cols = (_a = this.getStandardColumns()) === null || _a === void 0 ? void 0 : _a.filter((c) => !this.getColumnApi().isSpecialColumn(c.columnId));
31
36
  return cols !== null && cols !== void 0 ? cols : [];
32
37
  }
33
38
  getVisibleColumns() {
@@ -74,6 +79,9 @@ export class ColumnApiImpl extends ApiBase {
74
79
  isAutoPivotColumn(columnId) {
75
80
  return isAutoPivotColumn(columnId);
76
81
  }
82
+ isActionRowButtonColumn(columnId) {
83
+ return columnId === ADAPTABLE_ROW_ACTION_BUTTONS;
84
+ }
77
85
  isCalculatedColumn(columnId) {
78
86
  return (this.getAdaptableApi()
79
87
  .calculatedColumnApi.getCalculatedColumns()
@@ -147,6 +147,7 @@ export class ConfigApiImpl extends ApiBase {
147
147
  preemptiveColumnStateRefresh: true,
148
148
  });
149
149
  this.adaptable.setLayout();
150
+ this.adaptable.applyColumnFiltering();
150
151
  })
151
152
  .then(() => {
152
153
  // resolve main(result) promise
@@ -1,4 +1,3 @@
1
- import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
2
1
  import * as FlashingCellRedux from '../../Redux/ActionsReducers/FlashingCellRedux';
3
2
  import { ApiBase } from './ApiBase';
4
3
  import { FlashingCellInternalApi } from '../Internal/FlashingCellInternalApi';
@@ -39,11 +38,15 @@ export class FlashingCellApiImpl extends ApiBase {
39
38
  return endResult && aResult !== false;
40
39
  }, true);
41
40
  if (shouldShow) {
42
- this.dispatchAction(SystemRedux.SystemFlashingCellAdd(flashingCellToShow));
41
+ this.getAdaptableApi()
42
+ .internalApi.getFlashingCellService()
43
+ .addGridCellFlash(flashingCellToShow);
43
44
  const { FlashDuration: FlashDuration } = flashingCellToShow.flashingCellDefinition;
44
45
  if (FlashDuration && FlashDuration !== 'always') {
45
46
  setTimeout(() => {
46
- this.dispatchAction(SystemRedux.SystemFlashingCellDelete(flashingCellToShow));
47
+ this.getAdaptableApi()
48
+ .internalApi.getFlashingCellService()
49
+ .clearGridCellFlash(flashingCellToShow);
47
50
  }, FlashDuration);
48
51
  }
49
52
  }
@@ -91,11 +94,10 @@ export class FlashingCellApiImpl extends ApiBase {
91
94
  .filter((predicateDef) => this.getAdaptableApi().columnScopeApi.isScopeInScope(scope, predicateDef.columnScope));
92
95
  }
93
96
  clearAllFlashingCells() {
94
- this.dispatchAction(SystemRedux.SystemFlashingCellDeleteAll());
97
+ this.getAdaptableApi().internalApi.getFlashingCellService().clearAllGridCellFlashes();
95
98
  }
96
99
  isAnyFlashingCellActive() {
97
- const currentFlashingCells = this.getAdaptableState().System.AdaptableFlashingCells;
98
- return currentFlashingCells.keys != null;
100
+ return this.getAdaptableApi().internalApi.getFlashingCellService().isAnyFlashingCellActive();
99
101
  }
100
102
  findFlashingCellDefinitions(criteria) {
101
103
  return this.getAdaptableApi().internalApi.findAdaptableObjectsByLookupCriteria(criteria, this.getFlashingCellDefinitions({
@@ -51,7 +51,7 @@ export class ActionRowInternalApi extends ApiBase {
51
51
  // if there is NO rowNode, do NOT display the non-editable fields as they will be empty
52
52
  return !!rowNode || this.isCellEditable(column, rowNode);
53
53
  })
54
- .filter((column) => !this.getAdaptableApi().columnApi.internalApi.isActionRowButtonColumn(column.columnId) &&
54
+ .filter((column) => !this.getAdaptableApi().columnApi.isActionRowButtonColumn(column.columnId) &&
55
55
  this.showColumnInActionRowForm(column, actionRowType));
56
56
  return relevantColumns.map((column) => this.buildFormField(actionRowType, column, rowNode));
57
57
  }
@@ -26,6 +26,7 @@ import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedCo
26
26
  import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
27
27
  import { CellPopupService } from '../../Utilities/Services/CellPopupService';
28
28
  import { RowEditService } from '../../Utilities/Services/RowEditService';
29
+ import { FlashingCellService } from '../../Utilities/Services/FlashingCellService';
29
30
  export declare class AdaptableInternalApi extends ApiBase {
30
31
  getSystemState(): SystemState;
31
32
  getAdaptableJSXElement(): JSX.Element;
@@ -64,6 +65,7 @@ export declare class AdaptableInternalApi extends ApiBase {
64
65
  getMetamodelService(): IMetamodelService;
65
66
  getRowEditService(): RowEditService;
66
67
  getFdc3Service(): Fdc3Service;
68
+ getFlashingCellService(): FlashingCellService;
67
69
  getModules(): IModuleCollection;
68
70
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
69
71
  forAllRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
@@ -117,6 +117,9 @@ export class AdaptableInternalApi extends ApiBase {
117
117
  getFdc3Service() {
118
118
  return this.adaptable.Fdc3Service;
119
119
  }
120
+ getFlashingCellService() {
121
+ return this.adaptable.FlashingCellService;
122
+ }
120
123
  getModules() {
121
124
  return this.adaptable.adaptableModules;
122
125
  }
@@ -445,7 +448,7 @@ export class AdaptableInternalApi extends ApiBase {
445
448
  getActionButtonsAndActionColumn(colDef) {
446
449
  var _a;
447
450
  let actionColumn;
448
- if (this.getAdaptableApi().columnApi.internalApi.isActionRowButtonColumn(colDef.colId)) {
451
+ if (this.getAdaptableApi().columnApi.isActionRowButtonColumn(colDef.colId)) {
449
452
  const actionButtons = this.getActionRowApi().internalApi.getActionRowButtonDefs();
450
453
  actionColumn = {
451
454
  columnId: ADAPTABLE_ROW_ACTION_BUTTONS,
@@ -27,6 +27,5 @@ export declare class ColumnInternalApi extends ApiBase {
27
27
  * @param columnId columnId to look up
28
28
  */
29
29
  getAgGridColumnForAdaptableColumn(columnId: string): Column;
30
- isActionRowButtonColumn(columnId: string): boolean;
31
30
  getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (valueA: any, valueB: any, nodeA?: IRowNode, nodeB?: IRowNode, isInverted?: boolean) => number | undefined;
32
31
  }
@@ -1,5 +1,5 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
- import { ADAPTABLE_ROW_ACTION_BUTTONS, AG_GRID_GROUPED_COLUMN, } from '../../Utilities/Constants/GeneralConstants';
2
+ import { AG_GRID_GROUPED_COLUMN, } from '../../Utilities/Constants/GeneralConstants';
3
3
  export function getAutoRowGroupColumnIdFor(columnId) {
4
4
  return `${AG_GRID_GROUPED_COLUMN}-${columnId}`;
5
5
  }
@@ -42,9 +42,6 @@ export class ColumnInternalApi extends ApiBase {
42
42
  getAgGridColumnForAdaptableColumn(columnId) {
43
43
  return this.adaptable.getAgGridColumnForColumnId(columnId);
44
44
  }
45
- isActionRowButtonColumn(columnId) {
46
- return columnId === ADAPTABLE_ROW_ACTION_BUTTONS;
47
- }
48
45
  getActiveColumnComparator(columnId, customSort, customSortComparer) {
49
46
  if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
50
47
  // defaults to AG-Grid column definition comparator if no CustomSort is defined&active
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { cloneObject } from '../../Utilities/Helpers/Helper';
3
- import { FLASHING_CELL_ROW_KEY } from '../../Redux/ActionsReducers/SystemRedux';
4
3
  import * as AlertRedux from '../../Redux/ActionsReducers/AlertRedux';
4
+ import { FLASHING_CELL_ROW_KEY } from '../../Utilities/Services/FlashingCellService';
5
5
  export class FlashingCellInternalApi extends ApiBase {
6
6
  /**
7
7
  * Merges a Flashing Cell Definition with default values
@@ -33,7 +33,9 @@ export class FlashingCellInternalApi extends ApiBase {
33
33
  }
34
34
  getAdaptableFlashingCellFor(primaryKey, columnId) {
35
35
  var _a;
36
- const { AdaptableFlashingCells: AdaptableFlashingAlerts, AdaptableFlashingCellsMap: AdaptableFlashingAlertsMap, } = this.getAdaptableState().System;
36
+ const flashingCellService = this.getAdaptableApi().internalApi.getFlashingCellService();
37
+ const AdaptableFlashingAlerts = flashingCellService.gridCellsCurrentlyFlashing;
38
+ const AdaptableFlashingAlertsMap = flashingCellService.flashingCellsMapping;
37
39
  const forPrimaryKey = (_a = AdaptableFlashingAlerts[primaryKey]) !== null && _a !== void 0 ? _a : {};
38
40
  const toFlashingAlert = (uuid) => { var _a; return uuid ? (_a = AdaptableFlashingAlertsMap[uuid]) !== null && _a !== void 0 ? _a : null : null; };
39
41
  const adaptableFlashingCell = columnId
@@ -8,8 +8,6 @@ import { AdaptableAlert } from './Common/AdaptableAlert';
8
8
  import { CellHighlightInfo } from './Common/CellHighlightInfo';
9
9
  import { RowHighlightInfo } from './Common/RowHighlightInfo';
10
10
  import { SystemStatusMessageInfo } from './Common/SystemStatusMessageInfo';
11
- import { AdaptableFlashingCell } from './Common/AdaptableFlashingCell';
12
- import { TypeUuid } from './Uuid';
13
11
  import { SummaryOperation } from './Common/Enums';
14
12
  import { ChartModel } from '@ag-grid-community/core';
15
13
  import { ExternalChartDefinition } from './ChartingState';
@@ -17,8 +15,6 @@ import { CachedQuery } from './NamedQueryState';
17
15
  import { ProgressIndicatorConfig } from './Common/ProgressIndicatorConfig';
18
16
  export type { IPushPullReport, IPushPullDomain };
19
17
  export type { OpenFinReport };
20
- type ROW_PRIMARY_KEY = string;
21
- type COLUMN_ID_OR_WHOLE_ROW_LABEL = string;
22
18
  export type DataChangeHistoryMode = 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
23
19
  export type SystemRowSummary = {
24
20
  Position: 'Top' | 'Bottom';
@@ -29,8 +25,6 @@ export type SystemRowSummary = {
29
25
  */
30
26
  export interface SystemState extends InternalState, IPushPullState, OpenFinState {
31
27
  AdaptableAlerts: AdaptableAlert[];
32
- AdaptableFlashingCells: Record<ROW_PRIMARY_KEY, Record<COLUMN_ID_OR_WHOLE_ROW_LABEL, TypeUuid>>;
33
- AdaptableFlashingCellsMap: Record<TypeUuid, AdaptableFlashingCell>;
34
28
  SystemStatusMessages: SystemStatusMessageInfo[];
35
29
  HighlightedCells: CellHighlightInfo[];
36
30
  HighlightedRows: RowHighlightInfo[];
@@ -8,24 +8,19 @@ import { BulkUpdateValidationResult } from '../../Strategy/Interface/IBulkUpdate
8
8
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
9
9
  import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
10
10
  import { SystemStatusMessageInfo } from '../../PredefinedConfig/Common/SystemStatusMessageInfo';
11
- import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
12
11
  import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
13
12
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
13
  import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
15
14
  import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
16
- import { DataImportedInfo, DataSet, CellAddress } from '../../types';
15
+ import { CellAddress, DataImportedInfo, DataSet } from '../../types';
17
16
  import { ChartModel } from '@ag-grid-community/core';
18
17
  import { CachedQuery } from '../../PredefinedConfig/NamedQueryState';
19
18
  import { ProgressIndicatorConfig } from '../../PredefinedConfig/Common/ProgressIndicatorConfig';
20
- export declare const FLASHING_CELL_ROW_KEY = "__ROW";
21
19
  export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
22
20
  export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
23
21
  export declare const SYSTEM_ALERT_DELETE_ALL = "SYSTEM_ALERT_DELETE_ALL";
24
22
  export declare const SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = "SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT";
25
23
  export declare const SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT = "SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT";
26
- export declare const SYSTEM_FLASHING_CELL_ADD = "SYSTEM_FLASHING_CELL_ADD";
27
- export declare const SYSTEM_FLASHING_CELL_DELETE = "SYSTEM_FLASHING_CELL_DELETE";
28
- export declare const SYSTEM_FLASHING_CELL_DELETE_ALL = "SYSTEM_FLASHING_CELL_DELETE_ALL";
29
24
  export declare const SYSTEM_STATUS_MESSAGE_INFO_ADD = "SYSTEM_STATUS_MESSAGE_INFO_ADD";
30
25
  export declare const SYSTEM_STATUS_MESSAGE_INFO_DELETE = "SYSTEM_STATUS_MESSAGE_INFO_DELETE";
31
26
  export declare const SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = "SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL";
@@ -122,14 +117,6 @@ export interface SystemAlertRemoveCellHighlightAction extends Redux.Action {
122
117
  export interface SystemAlertRemoveRowHighlightAction extends Redux.Action {
123
118
  alert: AdaptableAlert;
124
119
  }
125
- export interface SystemFlashingCellAddAction extends Redux.Action {
126
- flashingCell: AdaptableFlashingCell;
127
- }
128
- export interface SystemFlashingCellDeleteAction extends Redux.Action {
129
- flashingCell: AdaptableFlashingCell;
130
- }
131
- export interface SystemFlashingCellDeleteAllAction extends Redux.Action {
132
- }
133
120
  export interface SystemStatusMessageInfoAddAction extends Redux.Action {
134
121
  systemStatusMessageInfo: SystemStatusMessageInfo;
135
122
  maxSystemStatusMessagesInStore: number;
@@ -285,9 +272,6 @@ export declare const SystemAlertDelete: (alert: AdaptableAlert) => SystemAlertDe
285
272
  export declare const SystemAlertDeleteAll: (alerts: AdaptableAlert[]) => SystemAlertDeleteAllAction;
286
273
  export declare const SystemAlertRemoveCellHighlight: (alert: AdaptableAlert) => SystemAlertRemoveCellHighlightAction;
287
274
  export declare const SystemAlertRemoveRowHighlight: (alert: AdaptableAlert) => SystemAlertRemoveRowHighlightAction;
288
- export declare const SystemFlashingCellAdd: (flashingCell: AdaptableFlashingCell) => SystemFlashingCellAddAction;
289
- export declare const SystemFlashingCellDelete: (flashingCell: AdaptableFlashingCell) => SystemFlashingCellDeleteAction;
290
- export declare const SystemFlashingCellDeleteAll: () => SystemFlashingCellDeleteAllAction;
291
275
  export declare const SystemStatusMessageInfoAdd: (SystemStatusMessageInfo: SystemStatusMessageInfo, MaxSystemStatusMessagesInStore: number) => SystemStatusMessageInfoAddAction;
292
276
  export declare const SystemStatusMessageInfoDelete: (SystemStatusMessageInfo: SystemStatusMessageInfo) => SystemStatusMessageInfoDeleteAction;
293
277
  export declare const SystemStatusMessageInfoDeleteAll: () => SystemStatusMessageInfoDeleteAllAction;
@@ -7,17 +7,12 @@ Bit of a mixed bag of actions but essentially its those that are related to Stra
7
7
  This allows us to keep the other reducers pure in terms of everything persists
8
8
  Not sure if its a good idea or not and perhaps we need 2 stores but I think its better than it was...
9
9
  */
10
- export const FLASHING_CELL_ROW_KEY = '__ROW';
11
10
  // Alerts
12
11
  export const SYSTEM_ALERT_ADD = 'SYSTEM_ALERT_ADD';
13
12
  export const SYSTEM_ALERT_DELETE = 'SYSTEM_ALERT_DELETE';
14
13
  export const SYSTEM_ALERT_DELETE_ALL = 'SYSTEM_ALERT_DELETE_ALL';
15
14
  export const SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = 'SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT';
16
15
  export const SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT = 'SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT';
17
- // Flashing Cells
18
- export const SYSTEM_FLASHING_CELL_ADD = 'SYSTEM_FLASHING_CELL_ADD';
19
- export const SYSTEM_FLASHING_CELL_DELETE = 'SYSTEM_FLASHING_CELL_DELETE';
20
- export const SYSTEM_FLASHING_CELL_DELETE_ALL = 'SYSTEM_FLASHING_CELL_DELETE_ALL';
21
16
  // Status Message
22
17
  export const SYSTEM_STATUS_MESSAGE_INFO_ADD = 'SYSTEM_STATUS_MESSAGE_INFO_ADD';
23
18
  export const SYSTEM_STATUS_MESSAGE_INFO_DELETE = 'SYSTEM_STATUS_MESSAGE_INFO_DELETE';
@@ -147,17 +142,6 @@ export const SystemAlertRemoveRowHighlight = (alert) => ({
147
142
  type: SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT,
148
143
  alert: alert,
149
144
  });
150
- export const SystemFlashingCellAdd = (flashingCell) => ({
151
- type: SYSTEM_FLASHING_CELL_ADD,
152
- flashingCell: flashingCell,
153
- });
154
- export const SystemFlashingCellDelete = (flashingCell) => ({
155
- type: SYSTEM_FLASHING_CELL_DELETE,
156
- flashingCell: flashingCell,
157
- });
158
- export const SystemFlashingCellDeleteAll = () => ({
159
- type: SYSTEM_FLASHING_CELL_DELETE_ALL,
160
- });
161
145
  export const SystemStatusMessageInfoAdd = (SystemStatusMessageInfo, MaxSystemStatusMessagesInStore) => ({
162
146
  type: SYSTEM_STATUS_MESSAGE_INFO_ADD,
163
147
  systemStatusMessageInfo: SystemStatusMessageInfo,
@@ -356,8 +340,6 @@ export const DataImportCompleted = (dataImportedInfo) => ({
356
340
  });
357
341
  const initialState = {
358
342
  AdaptableAlerts: EMPTY_ARRAY,
359
- AdaptableFlashingCells: {},
360
- AdaptableFlashingCellsMap: {},
361
343
  SystemStatusMessages: EMPTY_ARRAY,
362
344
  HighlightedCells: EMPTY_ARRAY,
363
345
  HighlightedRows: EMPTY_ARRAY,
@@ -449,47 +431,6 @@ export const SystemReducer = (state = initialState, action) => {
449
431
  return abObject;
450
432
  }) });
451
433
  }
452
- case SYSTEM_FLASHING_CELL_ADD: {
453
- const { flashingCell: FlashingCell } = action;
454
- const { rowPrimaryKey } = FlashingCell;
455
- const AdaptableFlashingCells = Object.assign({}, state.AdaptableFlashingCells);
456
- AdaptableFlashingCells[rowPrimaryKey] = Object.assign({}, AdaptableFlashingCells[rowPrimaryKey]);
457
- const secondaryIds = Object.keys(FlashingCell.flashColumnIds);
458
- if (FlashingCell.flashTarget === 'row' || FlashingCell.flashTarget.includes('row')) {
459
- secondaryIds.push(FLASHING_CELL_ROW_KEY);
460
- }
461
- secondaryIds.forEach((COL_ID) => {
462
- AdaptableFlashingCells[rowPrimaryKey][COL_ID] = FlashingCell.Uuid;
463
- });
464
- const AdaptableFlashingCellsMap = Object.assign({}, state.AdaptableFlashingCellsMap);
465
- AdaptableFlashingCellsMap[FlashingCell.Uuid] = FlashingCell;
466
- return Object.assign(Object.assign({}, state), { AdaptableFlashingCells,
467
- AdaptableFlashingCellsMap });
468
- }
469
- case SYSTEM_FLASHING_CELL_DELETE: {
470
- const { flashingCell: FlashingCell } = action;
471
- const { rowPrimaryKey } = FlashingCell;
472
- const AdaptableFlashingCells = Object.assign({}, state.AdaptableFlashingCells);
473
- const AdaptableFlashingCellsMap = Object.assign({}, state.AdaptableFlashingCellsMap);
474
- AdaptableFlashingCells[rowPrimaryKey] = Object.assign({}, AdaptableFlashingCells[rowPrimaryKey]);
475
- const secondaryIds = Object.keys(FlashingCell.flashColumnIds);
476
- if (FlashingCell.flashTarget === 'row' || FlashingCell.flashTarget.includes('row')) {
477
- secondaryIds.push(FLASHING_CELL_ROW_KEY);
478
- }
479
- secondaryIds.forEach((COL_ID) => {
480
- if (AdaptableFlashingCells[rowPrimaryKey][COL_ID] === FlashingCell.Uuid) {
481
- delete AdaptableFlashingCells[rowPrimaryKey][COL_ID];
482
- }
483
- });
484
- if (!Object.keys(AdaptableFlashingCells[rowPrimaryKey]).length) {
485
- delete AdaptableFlashingCells[rowPrimaryKey];
486
- }
487
- delete AdaptableFlashingCellsMap[FlashingCell.Uuid];
488
- return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: AdaptableFlashingCells, AdaptableFlashingCellsMap: AdaptableFlashingCellsMap });
489
- }
490
- case SYSTEM_FLASHING_CELL_DELETE_ALL: {
491
- return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: {}, AdaptableFlashingCellsMap: {} });
492
- }
493
434
  case SYSTEM_HIGHLIGHT_CELL_ADD: {
494
435
  const actionTypedAdd = action;
495
436
  return Object.assign({}, state, {
@@ -316,24 +316,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
316
316
  adaptable.api.layoutApi.internalApi.setupRowSummaries();
317
317
  return nextAction;
318
318
  }
319
- /*******************
320
- * FLASHING CELL ACTIONS
321
- *******************/
322
- case SystemRedux.SYSTEM_FLASHING_CELL_ADD:
323
- case SystemRedux.SYSTEM_FLASHING_CELL_DELETE: {
324
- const { flashingCell: FlashingCell } = action;
325
- const { cellDataChangedInfo: cellDataChangedInfo } = FlashingCell;
326
- let ret = next(action);
327
- if (cellDataChangedInfo) {
328
- adaptable.refreshCells([cellDataChangedInfo.rowNode], Object.keys(FlashingCell.flashColumnIds), true);
329
- }
330
- return ret;
331
- }
332
- case SystemRedux.SYSTEM_FLASHING_CELL_DELETE_ALL: {
333
- let ret = next(action);
334
- adaptable.redrawBody();
335
- return ret;
336
- }
337
319
  /*******************
338
320
  * ALERT ACTIONS
339
321
  *******************/
@@ -683,7 +665,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
683
665
  */
684
666
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
685
667
  let returnAction = next(action);
686
- adaptable.redrawBody();
668
+ adaptable.refreshAllCells(true);
687
669
  // if set then return a query on the text
688
670
  if (adaptable.adaptableOptions.quickSearchOptions.filterResultsAfterQuickSearch) {
689
671
  const actionTyped = action;
@@ -1,9 +1,8 @@
1
1
  import { AdaptableApi } from '../Api/AdaptableApi';
2
2
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
4
- import { ContextMenuContext } from '../PredefinedConfig/Common/Menu';
4
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
5
5
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
6
- import { MenuItemShowPopup } from '../Utilities/MenuItem';
7
6
  import { AdaptableModuleBase } from './AdaptableModuleBase';
8
7
  import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
9
8
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
@@ -17,7 +16,7 @@ export declare class FlashingCellModule extends AdaptableModuleBase implements I
17
16
  getExplicitlyReferencedColumnIds(alertDefinition: FlashingCellDefinition): string[];
18
17
  getReferencedNamedQueryNames(alertDefinition: FlashingCellDefinition): string[];
19
18
  createColumnMenuItems(column: AdaptableColumn): import("../Utilities/MenuItem").MenuItemDoReduxAction<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-bar-hide" | "column-filter-bar-show" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "custom-sort-add" | "custom-sort-edit" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "flashing-cell-add" | "flashing-cell-delete" | "format-column-add" | "format-column-edit" | "free-text-column-edit" | "grid-group" | "grid-info-show" | "layout-column-caption-change" | "layout-column-hide" | "layout-edit" | "layout-column-select" | "layout-column-select-preserve" | "layout-column-select-reset" | "layout-grid-select" | "plus-minus-add" | "settings-panel-open" | "styling-group" | "styled-column-badge-add" | "styled-column-badge-edit" | "styled-column-gradient-add" | "styled-column-gradient-edit" | "styled-column-percent-bar-add" | "styled-column-percent-bar-edit" | "styled-column-sparkline-add" | "styled-column-sparkline-edit" | "system-status-show" | "_navbar">[];
20
- createContextMenuItems(menuContext: ContextMenuContext): MenuItemShowPopup<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-visual-data" | "export-visual-data-excel" | "export-all-data-excel" | "export-all-data" | "export-all-data-csv" | "export-all-data-clipboard" | "export-all-data-json" | "export-all-data-table" | "export-current-data" | "export-current-data-excel" | "export-current-data-csv" | "export-current-data-clipboard" | "export-current-data-json" | "export-current-data-table" | "export-selected-cells" | "export-selected-cells-excel" | "export-selected-cells-csv" | "export-selected-cells-clipboard" | "export-selected-cells-json" | "export-selected-cells-table" | "export-selected-rows" | "export-selected-rows-excel" | "export-selected-rows-csv" | "export-selected-rows-clipboard" | "export-selected-rows-json" | "export-selected-rows-table" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
19
+ createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-visual-data" | "export-visual-data-excel" | "export-all-data-excel" | "export-all-data" | "export-all-data-csv" | "export-all-data-clipboard" | "export-all-data-json" | "export-all-data-table" | "export-current-data" | "export-current-data-excel" | "export-current-data-csv" | "export-current-data-clipboard" | "export-current-data-json" | "export-current-data-table" | "export-selected-cells" | "export-selected-cells-excel" | "export-selected-cells-csv" | "export-selected-cells-clipboard" | "export-selected-cells-json" | "export-selected-cells-table" | "export-selected-rows" | "export-selected-rows-excel" | "export-selected-rows-csv" | "export-selected-rows-clipboard" | "export-selected-rows-json" | "export-selected-rows-table" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
21
20
  protected handleCellDataChanged(cellDataChangedInfo: CellDataChangedInfo): void;
22
21
  private showFlashingCellsForDefinitions;
23
22
  private isFlashingTargetOnlyAggChange;
@@ -1,5 +1,4 @@
1
1
  import * as FlashingCellRedux from '../Redux/ActionsReducers/FlashingCellRedux';
2
- import * as SystemRedux from '../Redux/ActionsReducers/SystemRedux';
3
2
  import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
4
3
  import { ArrayExtensions } from '../Utilities/Extensions/ArrayExtensions';
5
4
  import { AdaptableModuleBase } from './AdaptableModuleBase';
@@ -95,11 +94,15 @@ export class FlashingCellModule extends AdaptableModuleBase {
95
94
  if (flashingCellForRow.flashTarget === 'row' ||
96
95
  (Array.isArray(flashingCellForRow === null || flashingCellForRow === void 0 ? void 0 : flashingCellForRow.flashTarget) &&
97
96
  flashingCellForRow.flashTarget.includes('row'))) {
98
- items.push(this.createMenuItemReduxAction('flashing-row-clear', 'Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
97
+ items.push(this.createMenuItemClickFunction('flashing-row-clear', 'Clear Flashing Row', this.moduleInfo.Glyph, () => this.api.internalApi
98
+ .getFlashingCellService()
99
+ .clearGridCellFlash(flashingCellForRow)));
99
100
  }
100
101
  }
101
102
  else if (flashingCellForCell && flashingCellForCell.flashTarget === 'cell') {
102
- items.push(this.createMenuItemReduxAction('flashing-cell-clear', 'Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
103
+ items.push(this.createMenuItemClickFunction('flashing-cell-clear', 'Clear Flashing Cell', this.moduleInfo.Glyph, () => this.api.internalApi
104
+ .getFlashingCellService()
105
+ .clearGridCellFlash(flashingCellForCell)));
103
106
  }
104
107
  }
105
108
  }
@@ -0,0 +1,21 @@
1
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
+ import { AdaptableApi, AdaptableFlashingCell } from '../../types';
3
+ import { TypeUuid } from '../../PredefinedConfig/Uuid';
4
+ import { IAdaptableService } from './Interface/IAdaptableService';
5
+ export declare const FLASHING_CELL_ROW_KEY = "__ROW";
6
+ /**
7
+ * This service controls the interaction between notes and comments
8
+ */
9
+ export declare class FlashingCellService implements IAdaptableService {
10
+ private api;
11
+ adaptable: IAdaptable;
12
+ gridCellsCurrentlyFlashing: Record<string, Record<string, TypeUuid>>;
13
+ flashingCellsMapping: Record<TypeUuid, AdaptableFlashingCell>;
14
+ constructor(api: AdaptableApi);
15
+ destroy(): void;
16
+ addGridCellFlash(flashingCell: AdaptableFlashingCell): void;
17
+ clearGridCellFlash(flashingCell: AdaptableFlashingCell): void;
18
+ clearAllGridCellFlashes(): void;
19
+ isAnyFlashingCellActive(): boolean;
20
+ private refreshGridCells;
21
+ }
@@ -0,0 +1,65 @@
1
+ export const FLASHING_CELL_ROW_KEY = '__ROW';
2
+ /**
3
+ * This service controls the interaction between notes and comments
4
+ */
5
+ export class FlashingCellService {
6
+ constructor(api) {
7
+ this.api = api;
8
+ this.adaptable = api.internalApi.getAdaptableInstance();
9
+ this.gridCellsCurrentlyFlashing = {};
10
+ this.flashingCellsMapping = {};
11
+ }
12
+ destroy() {
13
+ this.gridCellsCurrentlyFlashing = {};
14
+ this.flashingCellsMapping = {};
15
+ }
16
+ addGridCellFlash(flashingCell) {
17
+ const { rowPrimaryKey } = flashingCell;
18
+ this.gridCellsCurrentlyFlashing[rowPrimaryKey] =
19
+ this.gridCellsCurrentlyFlashing[rowPrimaryKey] || {};
20
+ const columnIds = Object.keys(flashingCell.flashColumnIds);
21
+ if (flashingCell.flashTarget === 'row' || flashingCell.flashTarget.includes('row')) {
22
+ columnIds.push(FLASHING_CELL_ROW_KEY);
23
+ }
24
+ columnIds.forEach((colId) => {
25
+ this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId] = flashingCell.Uuid;
26
+ });
27
+ this.flashingCellsMapping[flashingCell.Uuid] = flashingCell;
28
+ this.refreshGridCells(flashingCell);
29
+ }
30
+ clearGridCellFlash(flashingCell) {
31
+ const { rowPrimaryKey } = flashingCell;
32
+ const columnIds = Object.keys(flashingCell.flashColumnIds);
33
+ if (flashingCell.flashTarget === 'row' || flashingCell.flashTarget.includes('row')) {
34
+ columnIds.push(FLASHING_CELL_ROW_KEY);
35
+ }
36
+ // for high frequency rates, we might have multiple flashes for the same cell
37
+ if (this.gridCellsCurrentlyFlashing[rowPrimaryKey]) {
38
+ columnIds.forEach((colId) => {
39
+ if (this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId] === flashingCell.Uuid) {
40
+ delete this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId];
41
+ }
42
+ });
43
+ if (!Object.keys(this.gridCellsCurrentlyFlashing[rowPrimaryKey]).length) {
44
+ delete this.gridCellsCurrentlyFlashing[rowPrimaryKey];
45
+ }
46
+ }
47
+ delete this.flashingCellsMapping[flashingCell.Uuid];
48
+ this.refreshGridCells(flashingCell);
49
+ }
50
+ clearAllGridCellFlashes() {
51
+ this.gridCellsCurrentlyFlashing = {};
52
+ this.flashingCellsMapping = {};
53
+ this.adaptable.refreshAllCells(true);
54
+ }
55
+ isAnyFlashingCellActive() {
56
+ return Object.keys(this.gridCellsCurrentlyFlashing).length > 0;
57
+ }
58
+ refreshGridCells(flashingCell) {
59
+ const { cellDataChangedInfo } = flashingCell;
60
+ if (!cellDataChangedInfo) {
61
+ return;
62
+ }
63
+ this.adaptable.refreshCells([cellDataChangedInfo.rowNode], Object.keys(flashingCell.flashColumnIds), true);
64
+ }
65
+ }
@@ -9,9 +9,9 @@ const GridOptionsForm = (props) => {
9
9
  return (React.createElement(Box, { p: 2 },
10
10
  React.createElement(HelpBlock, null, "Grid Options"),
11
11
  React.createElement(FormLayout, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
12
- React.createElement(FormRow, { label: "Enable Range Selection" },
13
- React.createElement(CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
14
- gridOptions = Object.assign(Object.assign({}, gridOptions), { enableRangeSelection: enableRangeSelection });
12
+ React.createElement(FormRow, { label: "Enable Cell Selection" },
13
+ React.createElement(CheckBox, { checked: !!gridOptions.cellSelection, onChange: (enableCellSelection) => {
14
+ gridOptions = Object.assign(Object.assign({}, gridOptions), { cellSelection: enableCellSelection });
15
15
  props.onChangedGridOptions(gridOptions);
16
16
  } })),
17
17
  React.createElement(FormRow, { label: "Show Filter Bar" },
@@ -78,6 +78,6 @@ export const prepareGridOptions = (dataSourceInfo, defaultGridOptions) => {
78
78
  });
79
79
  const gridOptions = Object.assign(Object.assign({}, defaultGridOptions), { defaultColDef: {
80
80
  floatingFilter: true,
81
- }, rowData: dataSourceInfo.data, columnDefs, enableRangeSelection: true, rowSelection: 'multiple', rowHeight: 30 });
81
+ }, rowData: dataSourceInfo.data, columnDefs, cellSelection: true, rowSelection: 'multiple', rowHeight: 30 });
82
82
  return gridOptions;
83
83
  };