@adaptabletools/adaptable 13.0.10 → 13.1.0-canary.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 (98) hide show
  1. package/base.css +92 -0
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +179 -177
  4. package/index.css +107 -0
  5. package/index.css.map +1 -1
  6. package/package.json +2 -2
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -2
  10. package/src/AdaptableOptions/ActionOptions.d.ts +52 -34
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
  12. package/src/AdaptableOptions/ChartingOptions.d.ts +27 -0
  13. package/src/AdaptableOptions/ChartingOptions.js +2 -0
  14. package/src/AdaptableOptions/FinancePluginOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -2
  16. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  17. package/src/Api/ChartingApi.d.ts +38 -1
  18. package/src/Api/ColumnApi.d.ts +1 -2
  19. package/src/Api/Implementation/AlertApiImpl.js +4 -0
  20. package/src/Api/Implementation/ChartingApiImpl.d.ts +9 -1
  21. package/src/Api/Implementation/ChartingApiImpl.js +35 -6
  22. package/src/Api/Implementation/GridApiImpl.js +3 -2
  23. package/src/PredefinedConfig/AlertState.d.ts +7 -3
  24. package/src/PredefinedConfig/ChartingState.d.ts +13 -4
  25. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  26. package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +6 -6
  27. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  28. package/src/PredefinedConfig/Common/Types.js +3 -0
  29. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -2
  30. package/src/PredefinedConfig/SystemState.d.ts +9 -0
  31. package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -5
  32. package/src/Redux/ActionsReducers/ChartingRedux.js +45 -5
  33. package/src/Redux/ActionsReducers/SystemRedux.d.ts +7 -0
  34. package/src/Redux/ActionsReducers/SystemRedux.js +22 -4
  35. package/src/Strategy/ChartingModule.d.ts +7 -1
  36. package/src/Strategy/ChartingModule.js +97 -0
  37. package/src/Strategy/FlashingCellModule.js +6 -2
  38. package/src/Strategy/Interface/IModule.d.ts +1 -0
  39. package/src/Strategy/LayoutModule.js +1 -1
  40. package/src/Strategy/StyledColumnModule.js +0 -3
  41. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -10
  42. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
  43. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  44. package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
  45. package/src/Utilities/ObjectFactory.d.ts +5 -4
  46. package/src/Utilities/ObjectFactory.js +9 -14
  47. package/src/Utilities/Services/ChartingService.d.ts +10 -0
  48. package/src/Utilities/Services/ChartingService.js +100 -0
  49. package/src/Utilities/Services/Interface/IChartingService.d.ts +5 -0
  50. package/src/Utilities/Services/Interface/IChartingService.js +2 -0
  51. package/src/Utilities/Services/Interface/IRowEditService.d.ts +3 -3
  52. package/src/Utilities/Services/ModuleService.js +2 -0
  53. package/src/Utilities/Services/RowEditService.d.ts +3 -3
  54. package/src/Utilities/Services/RowEditService.js +4 -4
  55. package/src/View/AdaptableViewFactory.js +2 -0
  56. package/src/View/Alert/Wizard/AlertButtonsEditor.js +1 -1
  57. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -5
  58. package/src/View/Components/Charting/ChartingStatusBarPopover.d.ts +2 -0
  59. package/src/View/Components/Charting/ChartingStatusBarPopover.js +23 -0
  60. package/src/View/Components/Charting/ChartingViewPanel.d.ts +3 -0
  61. package/src/View/Components/Charting/ChartingViewPanel.js +79 -0
  62. package/src/View/Components/Charting/ChartingWizard/ChartingWizard.d.ts +6 -0
  63. package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +37 -0
  64. package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.d.ts +6 -0
  65. package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.js +34 -0
  66. package/src/View/Components/Charting/ChartingWizard/SettingsSection.d.ts +8 -0
  67. package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +53 -0
  68. package/src/View/Components/Charting/ShowChartButton.d.ts +5 -0
  69. package/src/View/Components/Charting/ShowChartButton.js +38 -0
  70. package/src/View/Components/Charting/useChartState.d.ts +9 -0
  71. package/src/View/Components/Charting/useChartState.js +71 -0
  72. package/src/View/Components/ExpressionWizard.js +1 -1
  73. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +8 -7
  74. package/src/View/Components/Popups/AdaptableToaster.js +2 -0
  75. package/src/View/Components/RangesComponent.js +1 -1
  76. package/src/View/Components/StyleComponent.d.ts +1 -0
  77. package/src/View/Components/StyleComponent.js +6 -6
  78. package/src/View/Components/ToolPanel/ToolPanelPopup.js +0 -1
  79. package/src/View/Layout/Wizard/LayoutWizard.js +1 -2
  80. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +1 -1
  81. package/src/agGrid/Adaptable.d.ts +8 -4
  82. package/src/agGrid/Adaptable.js +47 -12
  83. package/src/agGrid/agGridHelper.js +0 -1
  84. package/src/{View → components/ColorPicker}/ColorPicker.d.ts +3 -2
  85. package/src/{View → components/ColorPicker}/ColorPicker.js +19 -6
  86. package/src/components/ColorPicker/index.d.ts +1 -0
  87. package/src/components/ColorPicker/index.js +4 -0
  88. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  89. package/src/components/icons/index.js +0 -2
  90. package/src/metamodel/adaptable.metamodel.d.ts +70 -16
  91. package/src/metamodel/adaptable.metamodel.js +1 -1
  92. package/src/types.d.ts +3 -2
  93. package/version.d.ts +1 -1
  94. package/version.js +1 -1
  95. package/src/Strategy/ConditionalStyleModule.d.ts +0 -6
  96. package/src/Strategy/ConditionalStyleModule.js +0 -12
  97. package/src/components/icons/conditional-style.d.ts +0 -3
  98. package/src/components/icons/conditional-style.js +0 -7
@@ -1,4 +1,5 @@
1
1
  import { ChartModel, ChartRef } from '@ag-grid-community/core';
2
+ import { ChartDefinition } from '../types';
2
3
  /**
3
4
  * Provides run-time access to Charting Module and related State
4
5
  */
@@ -10,11 +11,24 @@ export interface ChartingApi {
10
11
  /**
11
12
  * Retrieves current user-generated Charts
12
13
  */
13
- getCurrentCharts(): ChartModel[];
14
+ getCurrentChartModels(): ChartModel[];
14
15
  /**
15
16
  * Retrieves persisted Charts from Adaptable State
16
17
  */
17
18
  getPersistedCharts(): ChartModel[];
19
+ /**
20
+ * Retrieves all adaptable chart definitions
21
+ */
22
+ getAllChartDefinitions(): ChartDefinition[];
23
+ /**
24
+ * Retrieves chart definition by uuid
25
+ * @param uuid chart uuid
26
+ */
27
+ getChartDefinitionByUuid(uuid: string): ChartDefinition | undefined;
28
+ /**
29
+ * Retrieves chartRef by chartId
30
+ */
31
+ getChartRef(chartId: string): ChartRef | undefined;
18
32
  /**
19
33
  * Saves all current Charts into Adaptable State
20
34
  */
@@ -23,4 +37,27 @@ export interface ChartingApi {
23
37
  * Displays all persisted Charts
24
38
  */
25
39
  showPersistedCharts(): ChartRef[];
40
+ /**
41
+ * Opens a Chart Definition
42
+ *
43
+ * @param chartDefinition chart definition
44
+ */
45
+ showChartDefinition(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
46
+ /**
47
+ * Open a Chart definition.
48
+ * If the chart is already opened a second chart is not opened.
49
+ *
50
+ * @param chartDefinition chart definition
51
+ */
52
+ showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
53
+ /**
54
+ * Edit existing chart
55
+ * @param chartDefinition
56
+ */
57
+ editChartDefinition(chartDefinition: ChartDefinition): void;
58
+ /**
59
+ * Add new chart
60
+ * @param chartDefinition
61
+ */
62
+ addChartDefinition(chartDefinition: ChartDefinition): void;
26
63
  }
@@ -303,8 +303,7 @@ export interface ColumnApi {
303
303
  */
304
304
  isColumnReferencedInExpression(columnId: string, expression: string): boolean;
305
305
  /**
306
- * Checks if a column is a ActionRowButton column (see UserInterfaceOptions.ActionOptions)
307
- *
306
+ * Checks if a column is a ActionRowButton column
308
307
  * @param columnId Column to Check
309
308
  */
310
309
  isActionRowButtonColumn(columnId: string): boolean;
@@ -53,6 +53,10 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
53
53
  executeAlertButton(button, context) {
54
54
  if (button.Action) {
55
55
  let actions = button.Action;
56
+ if (typeof actions === 'function') {
57
+ actions(context);
58
+ return;
59
+ }
56
60
  if (!Array.isArray(actions)) {
57
61
  actions = [actions];
58
62
  }
@@ -2,10 +2,18 @@ import { ChartModel } from '@ag-grid-community/core';
2
2
  import { ChartingApi } from '../ChartingApi';
3
3
  import { ApiBase } from './ApiBase';
4
4
  import { ChartRef } from '@ag-grid-community/core';
5
+ import { ChartDefinition } from '../../types';
5
6
  export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
6
7
  isChartingEnabled(): boolean;
7
- getCurrentCharts(): ChartModel[];
8
+ getCurrentChartModels(): ChartModel[];
9
+ getChartRef(chartId: string): ChartRef;
8
10
  saveCurrentCharts(): void;
9
11
  getPersistedCharts(): ChartModel[];
12
+ getAllChartDefinitions(): ChartDefinition[];
13
+ getChartDefinitionByUuid(uuid: string): ChartDefinition;
10
14
  showPersistedCharts(): ChartRef[];
15
+ showChartDefinition(chartDefiniton: ChartDefinition, container?: HTMLElement): ChartRef;
16
+ showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
17
+ editChartDefinition(editedChartDefinition: ChartDefinition): void;
18
+ addChartDefinition(chart: ChartDefinition): void;
11
19
  }
@@ -5,23 +5,52 @@ const tslib_1 = require("tslib");
5
5
  const ApiBase_1 = require("./ApiBase");
6
6
  const ChartingRedux = tslib_1.__importStar(require("./../../Redux/ActionsReducers/ChartingRedux"));
7
7
  const ChartingRedux_1 = require("./../../Redux/ActionsReducers/ChartingRedux");
8
+ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
8
9
  class ChartingApiImpl extends ApiBase_1.ApiBase {
9
10
  isChartingEnabled() {
10
11
  return this.adaptable.canGenerateCharts();
11
12
  }
12
- getCurrentCharts() {
13
+ getCurrentChartModels() {
13
14
  return this.adaptable.getChartModels();
14
15
  }
16
+ getChartRef(chartId) {
17
+ return this.adaptable.getChartRef(chartId);
18
+ }
15
19
  saveCurrentCharts() {
16
- const currentCharts = this.getCurrentCharts();
17
- this.dispatchAction(ChartingRedux.ChartingSetChartModels(currentCharts));
20
+ const currentCharts = this.getCurrentChartModels();
21
+ const chartDefinitions = currentCharts.map((chart) => ObjectFactory_1.default.CreateEmptyChartDefinition({
22
+ Name: chart.chartId,
23
+ Model: chart,
24
+ }));
25
+ this.dispatchAction(ChartingRedux.ChartingSetChartModels(chartDefinitions));
18
26
  }
19
27
  getPersistedCharts() {
20
- return (0, ChartingRedux_1.ChartingGetChartModels)(this.getAdaptableState()).map((chart) => chart.model);
28
+ return this.getAllChartDefinitions().map((chart) => chart.Model);
29
+ }
30
+ getAllChartDefinitions() {
31
+ return (0, ChartingRedux_1.ChartingGetChartModels)(this.getAdaptableState());
32
+ }
33
+ getChartDefinitionByUuid(uuid) {
34
+ return this.getAllChartDefinitions().find((c) => c.Uuid == uuid);
21
35
  }
22
36
  showPersistedCharts() {
23
- const persistedCharts = this.getPersistedCharts();
24
- return this.adaptable.showCharts(persistedCharts);
37
+ return this.adaptable.showCharts(this.getAllChartDefinitions());
38
+ }
39
+ showChartDefinition(chartDefiniton, container) {
40
+ return this.adaptable.showChart(chartDefiniton, container);
41
+ }
42
+ showChartDefinitionOnce(chartDefinition, container) {
43
+ const chartRef = this.adaptable.api.chartingApi.getChartRef(chartDefinition.Model.chartId);
44
+ if (chartRef) {
45
+ return;
46
+ }
47
+ return this.showChartDefinition(chartDefinition, container);
48
+ }
49
+ editChartDefinition(editedChartDefinition) {
50
+ this.dispatchAction(ChartingRedux.ChartingEditChart(editedChartDefinition));
51
+ }
52
+ addChartDefinition(chart) {
53
+ this.dispatchAction(ChartingRedux.ChartingAddChart(chart));
25
54
  }
26
55
  }
27
56
  exports.ChartingApiImpl = ChartingApiImpl;
@@ -204,8 +204,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
204
204
  return this.adaptable.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
205
205
  }
206
206
  getNormalisedValueFromRowNode(rowNode, columnId) {
207
- const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
208
- return gridCell ? gridCell.normalisedValue : undefined;
207
+ const rawValue = this.adaptable.getRawValueFromRowNode(rowNode, columnId);
208
+ const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
209
+ return this.adaptable.getNormalisedValueFromRawValue(rawValue, abColumn);
209
210
  }
210
211
  getRowNodesForPrimaryKeys(primaryKeyValues) {
211
212
  return this.adaptable.getRowNodesForPrimaryKeys(primaryKeyValues);
@@ -10,7 +10,7 @@ import { AdaptableStyle } from './Common/AdaptableStyle';
10
10
  import { XOR } from '../Utilities/Extensions/TypeExtensions';
11
11
  import { AdaptableAggregatedBooleanQuery, AdaptableBooleanQuery, AdaptableObservableQuery } from './Common/AdaptableQuery';
12
12
  import { ButtonStyle } from './Common/ButtonStyle';
13
- import { AlertFormContext, BaseContext } from '../types';
13
+ import { AlertFormContext, BaseContext, NotificationsOptions } from '../types';
14
14
  /**
15
15
  * Predefined Configuration for Alert Module
16
16
  */
@@ -49,7 +49,7 @@ export interface AlertDefinition extends SuspendableObject {
49
49
  */
50
50
  AlertForm?: string | AlertButtonForm;
51
51
  }
52
- export declare type AlertButtonForm = Omit<AdaptableForm<AlertFormContext>, 'title' | 'buttons' | 'fields' | 'description'> & {
52
+ export declare type AlertButtonForm = Omit<AdaptableForm<AlertFormContext>, 'title' | 'buttons' | 'description'> & {
53
53
  Buttons?: AlertButton<AlertFormContext>[];
54
54
  };
55
55
  export interface AlertDefinitionPredicate extends AdaptablePredicate {
@@ -73,7 +73,7 @@ export interface AlertButton<AlertFormContext> extends Omit<AdaptableButton<Base
73
73
  /**
74
74
  * Predefined Action(s) to trigger when button is clicked; but the implementation in `actionHandlers` property of Alert Options
75
75
  */
76
- Action?: AdaptableAlertAction | AdaptableAlertAction[] | string | string[];
76
+ Action?: AdaptableAlertAction | AdaptableAlertAction[] | string | string[] | ((context: AlertFormContext) => void);
77
77
  /**
78
78
  * Label to show in the Button
79
79
  */
@@ -96,6 +96,10 @@ export interface AlertProperties {
96
96
  * Displays a notification when Alert is triggered
97
97
  */
98
98
  DisplayNotification?: boolean;
99
+ /**
100
+ * Notifiction duration, it defaults to NotificationOptions.duration
101
+ */
102
+ NotificationDuration?: NotificationsOptions['duration'];
99
103
  /**
100
104
  * Colours updated cell using `MessageType` property of triggering Alert Definition
101
105
  */
@@ -1,20 +1,29 @@
1
1
  import { ChartModel } from '@ag-grid-community/core';
2
+ import { AdaptableObject } from '../types';
2
3
  import { ConfigState } from './ConfigState';
3
4
  /**
4
5
  * Wraps an AG Grid Chart Model
5
6
  */
6
- export interface ChartDefinition {
7
+ export interface ChartDefinition extends AdaptableObject {
8
+ /**
9
+ * Name of the Chart
10
+ */
11
+ Name: string;
7
12
  /**
8
13
  * AG Grid Chart Model
9
14
  */
10
- model: ChartModel;
15
+ Model: ChartModel;
11
16
  }
12
17
  /**
13
- * Used for persisting AG Grids in Adaptable State
18
+ * Persists AG Grid Charts in Adaptable State
14
19
  */
15
20
  export interface ChartingState extends ConfigState {
16
21
  /**
17
- * Charting Definitions - wrap AG Grid Chart Models
22
+ * Wrappers around AG Grid Chart Models
18
23
  */
19
24
  ChartDefinitions?: ChartDefinition[];
20
25
  }
26
+ /**
27
+ * Aggregation function used in the Chart
28
+ */
29
+ export declare type ChartingAggFunc = 'sum' | 'min' | 'max' | 'count' | 'avg' | 'first' | 'last';
@@ -51,4 +51,4 @@ export interface AdaptableBaseIcon {
51
51
  /**
52
52
  * All AdapTable internal icon names
53
53
  */
54
- export declare type AdaptableInternalIconName = 'add' | 'add-row' | 'alert' | 'align-justify' | 'analysis' | 'application' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrowexpand' | 'attach-file' | 'blanks' | 'boolean-list' | 'broadcast' | 'brush' | 'build' | 'bulk-update' | 'calculated-column' | 'calendar' | 'call' | 'campaign' | 'cell-summary' | 'cell-validation' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clear' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'column-chooser' | 'column-filter' | 'comment' | 'conditional-style' | 'contains' | 'custom-sort' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equal' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'flashing-cell' | 'folder' | 'folder-open' | 'folder-shared' | 'format-column' | 'freetext-column' | 'function' | 'gradient-column' | 'greater-than' | 'greater-than-or-equal' | 'hide-column' | 'history' | 'home' | 'import-export' | 'info' | 'instrument' | 'invalid' | 'ipushpull' | 'justify' | 'layout' | 'less-than' | 'less-than-or-equal' | 'list' | 'login' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'non-blanks' | 'not-contains' | 'not-equal' | 'ok' | 'pause' | 'percent' | 'percent-bar' | 'person' | 'pie-chart' | 'play' | 'plus' | 'plus-minus' | 'query' | 'quick-search' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'shortcut' | 'show-column' | 'smart-edit' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'state-management' | 'statusbar' | 'stop' | 'system-status' | 'tab-unselected' | 'team-share' | 'theme' | 'tool-panel' | 'track-changes' | 'trash' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'updated-row' | 'upload' | 'warning';
54
+ export declare type AdaptableInternalIconName = 'add' | 'add-row' | 'alert' | 'align-justify' | 'analysis' | 'application' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrowexpand' | 'attach-file' | 'blanks' | 'boolean-list' | 'broadcast' | 'brush' | 'build' | 'bulk-update' | 'calculated-column' | 'calendar' | 'call' | 'campaign' | 'cell-summary' | 'cell-validation' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clear' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'column-chooser' | 'column-filter' | 'comment' | 'contains' | 'custom-sort' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equal' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'flashing-cell' | 'folder' | 'folder-open' | 'folder-shared' | 'format-column' | 'freetext-column' | 'function' | 'gradient-column' | 'greater-than' | 'greater-than-or-equal' | 'hide-column' | 'history' | 'home' | 'import-export' | 'info' | 'instrument' | 'invalid' | 'ipushpull' | 'justify' | 'layout' | 'less-than' | 'less-than-or-equal' | 'list' | 'login' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'non-blanks' | 'not-contains' | 'not-equal' | 'ok' | 'pause' | 'percent' | 'percent-bar' | 'person' | 'pie-chart' | 'play' | 'plus' | 'plus-minus' | 'query' | 'quick-search' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'shortcut' | 'show-column' | 'smart-edit' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'state-management' | 'statusbar' | 'stop' | 'system-status' | 'tab-unselected' | 'team-share' | 'theme' | 'tool-panel' | 'track-changes' | 'trash' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'updated-row' | 'upload' | 'warning';
@@ -3,13 +3,17 @@
3
3
  */
4
4
  export interface AdaptableStyle {
5
5
  /**
6
- * Colour background of cell: provide hex value or name
6
+ * Colour background of cell: hex, rgb(a) or name
7
7
  */
8
8
  BackColor?: string;
9
9
  /**
10
- * Font colour in cell: provide hex value or name
10
+ * Font colour in cell: hex, rgb(a) or name
11
11
  */
12
12
  ForeColor?: string;
13
+ /**
14
+ * Colour of cell border: hex, rgb(a) or name
15
+ */
16
+ BorderColor?: string;
13
17
  /**
14
18
  * Weight of font: `Normal` or `Bold`
15
19
  */
@@ -22,10 +26,6 @@ export interface AdaptableStyle {
22
26
  * Size of font: `XSmall`, `Small`, `Medium`, `Large` or `XLarge`
23
27
  */
24
28
  FontSize?: 'XSmall' | 'Small' | 'Medium' | 'Large' | 'XLarge';
25
- /**
26
- * Colour of cell border: provide hex value or name
27
- */
28
- BorderColor?: string;
29
29
  /**
30
30
  * Existing CSS Class; use instead of setting other object properties
31
31
  */
@@ -6,12 +6,12 @@ export declare type AdaptableDashboardToolbars = AdaptableDashboardToolbar[];
6
6
  /**
7
7
  * List of all the Toolbars that Adaptable provides
8
8
  */
9
- export declare type AdaptableDashboardToolbar = 'Alert' | 'BulkUpdate' | 'CellSummary' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'Glue42' | 'IPushPull' | 'Layout' | 'OpenFin' | 'Query' | 'QuickSearch' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'Theme';
9
+ export declare type AdaptableDashboardToolbar = 'Alert' | 'BulkUpdate' | 'CellSummary' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'Glue42' | 'IPushPull' | 'Layout' | 'OpenFin' | 'Query' | 'QuickSearch' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'Theme' | 'Charting';
10
10
  export declare const ALL_TOOLBARS: AdaptableDashboardToolbar[];
11
- export declare type AdaptableStatusBarPanel = 'CellSummary' | 'Alert' | 'GridInfo' | 'Dashboard' | 'ToolPanel' | 'StatusBar' | 'StateManagement' | 'Alert' | 'CalculatedColumn' | 'ConditionalStyle' | 'CustomSort' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'SystemStatus' | 'DataChangeHistory' | 'TeamSharing' | 'Theme' | 'BulkUpdate' | 'SettingsPanel' | 'SmartEdit';
11
+ export declare type AdaptableStatusBarPanel = 'CellSummary' | 'Alert' | 'GridInfo' | 'Dashboard' | 'ToolPanel' | 'StatusBar' | 'StateManagement' | 'Alert' | 'CalculatedColumn' | 'ConditionalStyle' | 'CustomSort' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'SystemStatus' | 'DataChangeHistory' | 'TeamSharing' | 'Theme' | 'BulkUpdate' | 'SettingsPanel' | 'SmartEdit' | 'Charting';
12
12
  export declare const ALL_STATUS_SUB_PANELS: AdaptableStatusBarPanel[];
13
13
  export declare type AdaptableToolPanels = AdaptableToolPanel[];
14
- export declare type AdaptableToolPanel = 'Alert' | 'BulkUpdate' | 'CellSummary' | 'Dashboard' | 'DataChangeHistory' | 'Export' | 'Filter' | 'IPushPull' | 'Layout' | 'OpenFin' | 'Query' | 'QuickSearch' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'Theme';
14
+ export declare type AdaptableToolPanel = 'Alert' | 'BulkUpdate' | 'CellSummary' | 'Dashboard' | 'DataChangeHistory' | 'Export' | 'Filter' | 'IPushPull' | 'Layout' | 'OpenFin' | 'Query' | 'QuickSearch' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'Theme' | 'Charting';
15
15
  export declare const ALL_TOOL_PANELS: AdaptableToolPanels;
16
16
  /**
17
17
  * Adaptable Module Button collection
@@ -30,7 +30,7 @@ export declare type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFi
30
30
  */
31
31
  export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
32
32
  export declare const ALL_MODULES: AdaptableModule[];
33
- export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
33
+ export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Charting';
34
34
  export declare type TypeHint<Base, Literals> = (Base & {
35
35
  __subType?: true;
36
36
  }) | Literals;
@@ -10,6 +10,7 @@ exports.ALL_TOOLBARS = [
10
10
  'Alert',
11
11
  'BulkUpdate',
12
12
  'CellSummary',
13
+ 'Charting',
13
14
  'DataChangeHistory',
14
15
  'DataSet',
15
16
  'Export',
@@ -32,6 +33,7 @@ exports.ALL_STATUS_SUB_PANELS = [
32
33
  'CellSummary',
33
34
  'ConditionalStyle',
34
35
  'CustomSort',
36
+ 'Charting',
35
37
  'Dashboard',
36
38
  'DataChangeHistory',
37
39
  'DataSet',
@@ -73,6 +75,7 @@ exports.ALL_TOOL_PANELS = [
73
75
  'StateManagement',
74
76
  'SystemStatus',
75
77
  'Theme',
78
+ 'Charting',
76
79
  ];
77
80
  exports.ALL_MODULES = [
78
81
  ModuleConstants.AlertModuleId,
@@ -36,7 +36,6 @@ export interface PredefinedConfig {
36
36
  */
37
37
  CalculatedColumn?: CalculatedColumnState;
38
38
  /**
39
- * Supplies a collection of *ConditionalStyle* objects to provides columns and rows with a particular style when the data matches a given rule
40
39
  * @deprecated use `FormatColumn` instead
41
40
  */
42
41
  ConditionalStyle?: ConditionalStyleState;
@@ -57,7 +56,7 @@ export interface PredefinedConfig {
57
56
  */
58
57
  FlashingCell?: FlashingCellState;
59
58
  /**
60
- * Supplies a collection of *FormatColumn* objects that will style an entire column in a single way (and not subject to a rule like with Conditional Style).
59
+ * Supplies a collection of *FormatColumn* objects that will style an entire column either fully or using a Condition
61
60
  */
62
61
  FormatColumn?: FormatColumnState;
63
62
  /**
@@ -13,6 +13,7 @@ import { CachedQuery } from './QueryState';
13
13
  import { AdaptableFlashingCell } from './Common/AdaptableFlashingCell';
14
14
  import { TypeUuid } from './Uuid';
15
15
  import { SummaryOperation } from './Common/Enums';
16
+ import { ChartModel } from '@ag-grid-community/core';
16
17
  export type { IPushPullReport, IPushPullDomain };
17
18
  export type { Glue42Report };
18
19
  export type { OpenFinReport };
@@ -71,6 +72,14 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
71
72
  DashboardRevision: number;
72
73
  IsQuickFilterVisible: boolean;
73
74
  CurrentDataSet: string;
75
+ /**
76
+ * Chart modes are saved here for every chart event.
77
+ * This way any part of the application can listen to chart-model changes without
78
+ * directly listening to ag-grid events.
79
+ */
80
+ Charting: {
81
+ currentChartModels: ChartModel[];
82
+ };
74
83
  }
75
84
  export interface ProgressIndicator {
76
85
  active: boolean;
@@ -1,7 +1,6 @@
1
- import { ChartModel } from '@ag-grid-community/core';
2
1
  import * as Redux from 'redux';
3
2
  import { AdaptableState } from '../../../types';
4
- import { ChartingState } from '../../PredefinedConfig/ChartingState';
3
+ import { ChartDefinition, ChartingState } from '../../PredefinedConfig/ChartingState';
5
4
  /**
6
5
  * @ReduxAction Set AG Grid Charting Models
7
6
  */
@@ -10,14 +9,38 @@ export declare const SET_CHARTING_CHARTS = "SET_CHARTING_CHARTS";
10
9
  * @ReduxAction Charting Module is ready
11
10
  */
12
11
  export declare const CHARTING_READY = "CHARTING_READY";
12
+ /**
13
+ * @ReduxAction Edit chart definition
14
+ */
15
+ export declare const CHARTING_EDIT_CHART = "CHARTING_EDIT_CHART";
16
+ /**
17
+ * @ReduxAction Add chart definition
18
+ */
19
+ export declare const CHARTING_ADD_CHART = "CHARTING_ADD_CHART";
20
+ /**
21
+ * @ReduxAction Deelte chart definition
22
+ */
23
+ export declare const CHARTING_DELETE_CHART = "CHARTING_DELETE_CHART";
13
24
  export interface ChartingSetChartModelsAction extends Redux.Action {
14
- charts: ChartModel[];
25
+ charts: ChartDefinition[];
15
26
  }
16
27
  export interface ChartingReadyAction extends Redux.Action {
17
28
  chartingState: ChartingState;
18
29
  }
19
- export declare const ChartingSetChartModels: (charts: ChartModel[]) => ChartingSetChartModelsAction;
30
+ export interface ChartingEditChartAction extends Redux.Action {
31
+ chartDefinition: ChartDefinition;
32
+ }
33
+ export interface ChartingAddChartAction extends Redux.Action {
34
+ chartDefinition: ChartDefinition;
35
+ }
36
+ export interface ChartingDeleteChartAction extends Redux.Action {
37
+ chartName: ChartDefinition['Name'];
38
+ }
39
+ export declare const ChartingSetChartModels: (charts: ChartDefinition[]) => ChartingSetChartModelsAction;
20
40
  export declare const ChartingReady: (chartingState: ChartingState) => ChartingReadyAction;
41
+ export declare const ChartingEditChart: (chartDefinition: ChartDefinition) => ChartingEditChartAction;
42
+ export declare const ChartingAddChart: (chartDefinition: ChartDefinition) => ChartingAddChartAction;
43
+ export declare const ChartingDeleteChart: (chartName: ChartDefinition['Name']) => ChartingDeleteChartAction;
21
44
  export declare const initialState: ChartingState;
22
- export declare const ChartingGetChartModels: (state: AdaptableState) => ChartingState['ChartDefinitions'];
45
+ export declare const ChartingGetChartModels: (state: AdaptableState) => ChartDefinition[];
23
46
  export declare const ChartingReducer: Redux.Reducer<ChartingState>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChartingReducer = exports.ChartingGetChartModels = exports.initialState = exports.ChartingReady = exports.ChartingSetChartModels = exports.CHARTING_READY = exports.SET_CHARTING_CHARTS = void 0;
3
+ exports.ChartingReducer = exports.ChartingGetChartModels = exports.initialState = exports.ChartingDeleteChart = exports.ChartingAddChart = exports.ChartingEditChart = exports.ChartingReady = exports.ChartingSetChartModels = exports.CHARTING_DELETE_CHART = exports.CHARTING_ADD_CHART = exports.CHARTING_EDIT_CHART = exports.CHARTING_READY = exports.SET_CHARTING_CHARTS = void 0;
4
+ const Uuid_1 = require("../../PredefinedConfig/Uuid");
4
5
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
5
6
  /**
6
7
  * @ReduxAction Set AG Grid Charting Models
@@ -10,6 +11,18 @@ exports.SET_CHARTING_CHARTS = 'SET_CHARTING_CHARTS';
10
11
  * @ReduxAction Charting Module is ready
11
12
  */
12
13
  exports.CHARTING_READY = 'CHARTING_READY';
14
+ /**
15
+ * @ReduxAction Edit chart definition
16
+ */
17
+ exports.CHARTING_EDIT_CHART = 'CHARTING_EDIT_CHART';
18
+ /**
19
+ * @ReduxAction Add chart definition
20
+ */
21
+ exports.CHARTING_ADD_CHART = 'CHARTING_ADD_CHART';
22
+ /**
23
+ * @ReduxAction Deelte chart definition
24
+ */
25
+ exports.CHARTING_DELETE_CHART = 'CHARTING_DELETE_CHART';
13
26
  const ChartingSetChartModels = (charts) => ({
14
27
  charts,
15
28
  type: exports.SET_CHARTING_CHARTS,
@@ -20,6 +33,21 @@ const ChartingReady = (chartingState) => ({
20
33
  chartingState,
21
34
  });
22
35
  exports.ChartingReady = ChartingReady;
36
+ const ChartingEditChart = (chartDefinition) => ({
37
+ type: exports.CHARTING_EDIT_CHART,
38
+ chartDefinition,
39
+ });
40
+ exports.ChartingEditChart = ChartingEditChart;
41
+ const ChartingAddChart = (chartDefinition) => ({
42
+ type: exports.CHARTING_ADD_CHART,
43
+ chartDefinition,
44
+ });
45
+ exports.ChartingAddChart = ChartingAddChart;
46
+ const ChartingDeleteChart = (chartName) => ({
47
+ type: exports.CHARTING_DELETE_CHART,
48
+ chartName,
49
+ });
50
+ exports.ChartingDeleteChart = ChartingDeleteChart;
23
51
  exports.initialState = {
24
52
  ChartDefinitions: GeneralConstants_1.EMPTY_ARRAY,
25
53
  };
@@ -28,10 +56,22 @@ exports.ChartingGetChartModels = ChartingGetChartModels;
28
56
  const ChartingReducer = (state = exports.initialState, action) => {
29
57
  switch (action.type) {
30
58
  case exports.SET_CHARTING_CHARTS:
31
- const newCharts = action.charts.map((chartModel) => ({
32
- model: chartModel,
33
- }));
34
- return Object.assign(Object.assign({}, state), { ChartDefinitions: newCharts });
59
+ return Object.assign(Object.assign({}, state), { ChartDefinitions: action.charts });
60
+ case exports.CHARTING_EDIT_CHART:
61
+ return Object.assign(Object.assign({}, state), { ChartDefinitions: state.ChartDefinitions.map((chartDefinition) => {
62
+ if (chartDefinition.Uuid === action.chartDefinition.Uuid) {
63
+ return action.chartDefinition;
64
+ }
65
+ return chartDefinition;
66
+ }) });
67
+ case exports.CHARTING_ADD_CHART:
68
+ let chartDefinition = action.chartDefinition;
69
+ if (!('Uuid' in chartDefinition)) {
70
+ chartDefinition = Object.assign(Object.assign({}, chartDefinition), { Uuid: (0, Uuid_1.createUuid)() });
71
+ }
72
+ return Object.assign(Object.assign({}, state), { ChartDefinitions: [...state.ChartDefinitions, chartDefinition] });
73
+ case exports.CHARTING_DELETE_CHART:
74
+ return Object.assign(Object.assign({}, state), { ChartDefinitions: state.ChartDefinitions.filter((chartDefinition) => chartDefinition.Name !== action.chartName) });
35
75
  }
36
76
  return state;
37
77
  };
@@ -15,6 +15,7 @@ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChang
15
15
  import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
16
16
  import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
17
17
  import { DataSet } from '../../types';
18
+ import { ChartModel } from '@ag-grid-community/core';
18
19
  export declare const FLASHING_CELL_ROW_KEY = "__ROW";
19
20
  export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
20
21
  export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
@@ -66,6 +67,7 @@ export declare const SYSTEM_FILTER_FORM_HIDE = "SYSTEM_FILTER_FORM_HIDE";
66
67
  export declare const SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = "SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS";
67
68
  export declare const DASHBOARD_REFRESH = "DASHBOARD_REFRESH";
68
69
  export declare const SYSTEM_DATA_SET_SELECT = "SYSTEM_DATA_SET_SELECT";
70
+ export declare const SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = "SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS";
69
71
  export interface SystemHighlightCellAddAction extends Redux.Action {
70
72
  cellHighlightInfo: CellHighlightInfo;
71
73
  }
@@ -225,6 +227,9 @@ export interface SystemLayoutShowNotAssociatedObjectsAction extends Redux.Action
225
227
  export interface SystemDataSetSelectAction extends Redux.Action {
226
228
  dataSet: DataSet;
227
229
  }
230
+ export interface SystemChartingSetCurrentChartModelsAction extends Redux.Action {
231
+ chartModels: ChartModel[];
232
+ }
228
233
  export declare const SystemHighlightCellAdd: (cellHighlightInfo: CellHighlightInfo) => SystemHighlightCellAddAction;
229
234
  export declare const SystemHighlightCellDelete: (primaryKeyValue: CellHighlightInfo['primaryKeyValue'], columnId: CellHighlightInfo['columnId']) => SystemHighlightCellDeleteAction;
230
235
  export declare const SystemHighlightCellDeleteAll: () => SystemHighlightCellDeleteAllAction;
@@ -274,4 +279,6 @@ export declare const SystemFilterFormHide: () => SystemFilterFormHideAction;
274
279
  export declare const SystemLayoutShowNotAssociatedObjects: (showNotAssociatedObjects: boolean) => SystemLayoutShowNotAssociatedObjectsAction;
275
280
  export declare const SystemDashboardRefresh: () => SystemDashboardRefreshAction;
276
281
  export declare const SystemDataSetSelect: (dataSet: DataSet) => SystemDataSetSelectAction;
282
+ export declare const SystemChartingSetCurrentChartModels: (chartModels: ChartModel[]) => SystemChartingSetCurrentChartModelsAction;
283
+ export declare const SystemChartingCurrentChartModelsSelector: (state: SystemState) => ChartModel[];
277
284
  export declare const SystemReducer: Redux.Reducer<SystemState>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = exports.SYSTEM_FILTER_FORM_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_SHOW = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROWS_ADD = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT = exports.SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
4
- exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_DATA_SET_SELECT = void 0;
5
- exports.SystemReducer = void 0;
4
+ exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = void 0;
5
+ exports.SystemReducer = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = void 0;
6
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
7
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
8
8
  const Helper_1 = require("../../Utilities/Helpers/Helper");
@@ -79,6 +79,8 @@ exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = 'SYSTEM_LAYOUT_SHOW_NOT_ASSO
79
79
  exports.DASHBOARD_REFRESH = 'DASHBOARD_REFRESH';
80
80
  // DataSet
81
81
  exports.SYSTEM_DATA_SET_SELECT = 'SYSTEM_DATA_SET_SELECT';
82
+ // Charting
83
+ exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = 'SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS';
82
84
  const SystemHighlightCellAdd = (cellHighlightInfo) => ({
83
85
  type: exports.SYSTEM_HIGHLIGHT_CELL_ADD,
84
86
  cellHighlightInfo: cellHighlightInfo,
@@ -312,6 +314,15 @@ const SystemDataSetSelect = (dataSet) => ({
312
314
  dataSet: dataSet,
313
315
  });
314
316
  exports.SystemDataSetSelect = SystemDataSetSelect;
317
+ const SystemChartingSetCurrentChartModels = (chartModels) => ({
318
+ type: exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS,
319
+ chartModels,
320
+ });
321
+ exports.SystemChartingSetCurrentChartModels = SystemChartingSetCurrentChartModels;
322
+ const SystemChartingCurrentChartModelsSelector = (state) => {
323
+ return state.Charting.currentChartModels;
324
+ };
325
+ exports.SystemChartingCurrentChartModelsSelector = SystemChartingCurrentChartModelsSelector;
315
326
  const initialState = {
316
327
  AdaptableAlerts: GeneralConstants_1.EMPTY_ARRAY,
317
328
  AdaptableFlashingCells: {},
@@ -347,6 +358,9 @@ const initialState = {
347
358
  DashboardRevision: 1,
348
359
  IsQuickFilterVisible: true,
349
360
  CurrentDataSet: GeneralConstants_1.EMPTY_STRING,
361
+ Charting: {
362
+ currentChartModels: [],
363
+ },
350
364
  };
351
365
  const SystemReducer = (state = initialState, action) => {
352
366
  let alerts;
@@ -401,7 +415,7 @@ const SystemReducer = (state = initialState, action) => {
401
415
  const AdaptableFlashingCells = Object.assign({}, state.AdaptableFlashingCells);
402
416
  AdaptableFlashingCells[rowPrimaryKey] = Object.assign({}, AdaptableFlashingCells[rowPrimaryKey]);
403
417
  const secondaryIds = Object.keys(FlashingCell.flashColumnIds);
404
- if (FlashingCell.flashTarget === 'row') {
418
+ if (FlashingCell.flashTarget === 'row' || FlashingCell.flashTarget.includes('row')) {
405
419
  secondaryIds.push(exports.FLASHING_CELL_ROW_KEY);
406
420
  }
407
421
  secondaryIds.forEach((COL_ID) => {
@@ -421,7 +435,7 @@ const SystemReducer = (state = initialState, action) => {
421
435
  const AdaptableFlashingCellsMap = Object.assign({}, state.AdaptableFlashingCellsMap);
422
436
  AdaptableFlashingCells[rowPrimaryKey] = Object.assign({}, AdaptableFlashingCells[rowPrimaryKey]);
423
437
  const secondaryIds = Object.keys(FlashingCell.flashColumnIds);
424
- if (FlashingCell.flashTarget === 'row') {
438
+ if (FlashingCell.flashTarget === 'row' || FlashingCell.flashTarget.includes('row')) {
425
439
  secondaryIds.push(exports.FLASHING_CELL_ROW_KEY);
426
440
  }
427
441
  secondaryIds.forEach((COL_ID) => {
@@ -646,6 +660,10 @@ const SystemReducer = (state = initialState, action) => {
646
660
  case exports.DASHBOARD_REFRESH: {
647
661
  return Object.assign(Object.assign({}, state), { DashboardRevision: state.DashboardRevision + 1 });
648
662
  }
663
+ case exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS: {
664
+ const typedAction = action;
665
+ return Object.assign(Object.assign({}, state), { Charting: Object.assign(Object.assign({}, state.Charting), { currentChartModels: typedAction.chartModels }) });
666
+ }
649
667
  default:
650
668
  return state;
651
669
  }