@adaptabletools/adaptable 11.0.0-canary.2 → 11.0.0-canary.3

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 (82) hide show
  1. package/base.css +5 -1
  2. package/bundle.cjs.js +93 -89
  3. package/index.css +6 -1
  4. package/package.json +31 -31
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
  9. package/src/Api/GridApi.d.ts +3 -3
  10. package/src/Api/Implementation/DashboardApiImpl.js +1 -1
  11. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
  12. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  13. package/src/Api/Implementation/GridApiImpl.js +4 -0
  14. package/src/Api/Implementation/LayoutApiImpl.js +1 -1
  15. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
  16. package/src/PredefinedConfig/FlashingCellState.d.ts +2 -1
  17. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  18. package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
  19. package/src/Redux/Store/AdaptableStore.js +11 -0
  20. package/src/Strategy/AlertModule.js +1 -1
  21. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  22. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  23. package/src/Strategy/FlashingCellModule.js +32 -16
  24. package/src/Strategy/TeamSharingModule.js +1 -1
  25. package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
  26. package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
  27. package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
  28. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  29. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  30. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  31. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  32. package/src/Utilities/ObjectFactory.js +4 -2
  33. package/src/Utilities/Services/LicenseService.js +1 -1
  34. package/src/Utilities/Services/ReportService.js +1 -1
  35. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
  36. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
  37. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +1 -3
  38. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +15 -4
  39. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
  40. package/src/View/Components/ModuleValueSelector/index.js +1 -1
  41. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -3
  42. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
  43. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
  44. package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
  45. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  46. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  47. package/src/View/Components/ToolPanel/ToolPanelPopup.js +4 -4
  48. package/src/View/Components/ValueSelector/index.d.ts +2 -1
  49. package/src/View/Components/ValueSelector/index.js +5 -5
  50. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +10 -5
  51. package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
  52. package/src/View/Dashboard/Dashboard.js +3 -2
  53. package/src/View/Dashboard/DashboardPopup.js +5 -5
  54. package/src/View/Export/Wizard/NewReportWizard.js +13 -3
  55. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
  56. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
  57. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
  58. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  59. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  60. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
  61. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
  62. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
  63. package/src/View/Query/QueryViewPanel.js +12 -9
  64. package/src/View/Query/Wizard/NamedQueryWizard.js +3 -1
  65. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  66. package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
  67. package/src/View/SpecialColumnSettingsWizardStep.js +3 -2
  68. package/src/View/Wizard/AdaptableWizard.js +1 -1
  69. package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
  70. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  71. package/src/agGrid/Adaptable.d.ts +0 -2
  72. package/src/agGrid/Adaptable.js +42 -28
  73. package/src/agGrid/agGridHelper.js +1 -1
  74. package/src/agGrid/agGridMenuHelper.js +1 -1
  75. package/src/components/Dashboard/DashboardManager.d.ts +5 -3
  76. package/src/components/Dashboard/DashboardManager.js +33 -27
  77. package/src/components/DropdownButton/renderItem.js +1 -1
  78. package/src/components/FormLayout/index.js +1 -1
  79. package/src/components/OverlayTrigger/Overlay.js +1 -1
  80. package/src/metamodel/adaptable.metamodel.js +1 -1
  81. package/version.d.ts +1 -1
  82. package/version.js +1 -1
package/index.css CHANGED
@@ -3339,7 +3339,8 @@ input[type="number"].ab-Input:hover::-webkit-inner-spin-button:active {
3339
3339
 
3340
3340
  .ab-Tag {
3341
3341
  display: inline-flex;
3342
- font-size: var(--ab-cmp-Tag__font-size); }
3342
+ font-size: var(--ab-cmp-Tag__font-size);
3343
+ max-width: 100%; }
3343
3344
 
3344
3345
  .ab-AdaptableOptions {
3345
3346
  background: var(--ab-cmp-adaptable-options__background-color); }
@@ -3610,6 +3611,10 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
3610
3611
  .ab-Adaptable-Object-List__Item__edit-property {
3611
3612
  visibility: hidden; }
3612
3613
 
3614
+ .ab-Adaptable-Object-List__Item__values {
3615
+ min-width: 0;
3616
+ word-break: break-all; }
3617
+
3613
3618
  .ab-Adaptable-Object-List__Item__buttons {
3614
3619
  padding-left: var(--ab-space-2);
3615
3620
  min-width: 80px;
package/package.json CHANGED
@@ -1,15 +1,41 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "11.0.0-canary.2",
3
+ "version": "11.0.0-canary.3",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
- "main": "index.js",
6
- "typings": "index.d.ts",
5
+ "keywords": [
6
+ "web-components",
7
+ "datagrid",
8
+ "fintech",
9
+ "grid",
10
+ "data",
11
+ "table",
12
+ "data-table",
13
+ "openfin",
14
+ "ag-grid",
15
+ "infinite-table",
16
+ "adaptable",
17
+ "blotter"
18
+ ],
19
+ "homepage": "http://www.adaptabletools.com/",
20
+ "license": "SEE LICENSE IN LICENSE.md",
21
+ "author": {
22
+ "name": "Jonny Wolfson",
23
+ "email": "jonny.wolfson@adaptabletools.com"
24
+ },
25
+ "maintainers": [
26
+ {
27
+ "name": "JonnyAdaptableTools",
28
+ "email": "jonny.wolfson@adaptabletools.com"
29
+ }
30
+ ],
31
+ "main": "agGrid.js",
32
+ "typings": "types.d.ts",
7
33
  "dependencies": {
8
34
  "@infinite-table/infinite-react": "0.0.1-canary.11",
9
35
  "date-fns": "2.22.1",
10
36
  "debug": "^4.3.1",
11
37
  "isomorphic-fetch": "^2.2.1",
12
- "lodash-es": "^4.17.15",
38
+ "lodash": "^4.17.15",
13
39
  "normalize.css": "^8.0.1",
14
40
  "prop-types": "^15.6.2",
15
41
  "re-resizable": "^6.9.1",
@@ -31,31 +57,5 @@
31
57
  },
32
58
  "peerDependencies": {
33
59
  "@ag-grid-community/all-modules": ">=26.2.0"
34
- },
35
- "keywords": [
36
- "web-components",
37
- "datagrid",
38
- "fintech",
39
- "grid",
40
- "data",
41
- "table",
42
- "data-table",
43
- "openfin",
44
- "ag-grid",
45
- "infinite-table",
46
- "adaptable",
47
- "blotter"
48
- ],
49
- "maintainers": [
50
- {
51
- "name": "JonnyAdaptableTools",
52
- "email": "jonny.wolfson@adaptabletools.com"
53
- }
54
- ],
55
- "author": {
56
- "name": "Jonny Wolfson",
57
- "email": "jonny.wolfson@adaptabletools.com"
58
- },
59
- "homepage": "http://www.adaptabletools.com/",
60
- "license": "SEE LICENSE IN LICENSE.md"
60
+ }
61
61
  }
@@ -1,2 +1,2 @@
1
- declare const _default: 1643751455083;
1
+ declare const _default: 1643989382977;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1643751455083;
3
+ exports.default = 1643989382977;
@@ -11,7 +11,7 @@ export interface EntitlementOptions {
11
11
  */
12
12
  moduleEntitlements?: Entitlement[] | ((adaptableModule: AdaptableModule, userName: string, adaptableId: string, defaultAccessLevel: AccessLevel) => AccessLevel | undefined);
13
13
  /**
14
- * AccessLevel to use when an Entitlement is not explicitly set; may be provided as a hardcoded value or as a function to invoke
14
+ * AccessLevel to use when an Entitlement is not explicitly set; can be hardcoded value or a function to invoke
15
15
  *
16
16
  * @defaultValue 'Full'
17
17
  * @gridInfoItem
@@ -25,7 +25,6 @@ export interface ToolPanelOptions {
25
25
  * Key of icon to be used (beside the label) for Adaptable ToolPanel Component
26
26
  *
27
27
  * @defaultValue 'menu'
28
- * @see https://www.ag-grid.com/javascript-grid/side-bar/#sidebardef-configuration
29
28
  * @gridInfoItem
30
29
  */
31
30
  iconKey?: string;
@@ -41,19 +41,19 @@ export interface GridApi {
41
41
  * @param dataRows rows which have been updated - send whole row and Adaptable will take care of the rest
42
42
  * @param config batch option and callback function to run post update
43
43
  */
44
- updateGridData(dataRows: any[], config?: DataUpdateConfig): void;
44
+ updateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<RowNode[]>;
45
45
  /**
46
46
  * Adds rows to Adaptable (and AG Grid)
47
47
  * @param dataRows rows to add; ensure all 'mandatory' fields are included and Primary Key is unique
48
48
  * @param config batch option and callback function to run post addition
49
49
  */
50
- addGridData(dataRows: any[], config?: DataUpdateConfig): void;
50
+ addGridData(dataRows: any[], config?: DataUpdateConfig): Promise<RowNode[]>;
51
51
  /**
52
52
  * Deletes rows from Adaptable (and AG Grid)
53
53
  * @param dataRows rows which should be deleted
54
54
  * @param config batch option and callback function to run post deletion
55
55
  */
56
- deleteGridData(dataRows: any[], config?: DataUpdateConfig): void;
56
+ deleteGridData(dataRows: any[], config?: DataUpdateConfig): Promise<RowNode[]>;
57
57
  /**
58
58
  * Updates cell in Adaptable (first performs Cell & Server Validation)
59
59
  * @param columnId column to update
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const DashboardRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/DashboardRedux"));
6
6
  const ApiBase_1 = require("./ApiBase");
7
7
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
- const isEqual_1 = tslib_1.__importDefault(require("lodash-es/isEqual"));
8
+ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
9
9
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
10
10
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
11
11
  const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
@@ -45,10 +45,8 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
45
45
  return this.getFlashingCellDefinitions().filter((fc) => !fc.IsSuspended);
46
46
  }
47
47
  getFlashingCellFlashTarget(flashingCellDefinition) {
48
- const flashTarget = flashingCellDefinition.FlashTarget === 'cell' || !flashingCellDefinition.FlashTarget
49
- ? 'cell'
50
- : 'row';
51
- return flashTarget;
48
+ var _a;
49
+ return (_a = flashingCellDefinition.FlashTarget) !== null && _a !== void 0 ? _a : 'cell';
52
50
  }
53
51
  showFlashingCell(flashingCellToShow) {
54
52
  this.addUidToAdaptableObject(flashingCellToShow);
@@ -16,10 +16,10 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
16
16
  getGridData(): any[];
17
17
  getFilteredData(): any[];
18
18
  loadGridData(dataSource: any): void;
19
- updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<void>;
20
- addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<void>;
19
+ updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
20
+ addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
21
21
  undoCellEdit(dataChangedInfo: DataChangedInfo): boolean;
22
- deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<void>;
22
+ deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
23
23
  setCellValue(columnId: string, newValue: any, primaryKeyValue: any): void;
24
24
  setCellsValue(gridCells: {
25
25
  columnId: any;
@@ -25,10 +25,12 @@ class GridApiImpl extends ApiBase_1.ApiBase {
25
25
  async updateGridData(dataRows, dataUpdateConfig) {
26
26
  const rowNodes = await this.adaptable.updateRows(dataRows, dataUpdateConfig);
27
27
  this.fireGridDataChangedEvent(dataRows, rowNodes, 'Edit');
28
+ return rowNodes;
28
29
  }
29
30
  async addGridData(dataRows, dataUpdateConfig) {
30
31
  const rowNodes = await this.adaptable.addRows(dataRows, dataUpdateConfig);
31
32
  this.fireGridDataChangedEvent(dataRows, rowNodes, 'Add');
33
+ return rowNodes;
32
34
  }
33
35
  undoCellEdit(dataChangedInfo) {
34
36
  // for the reason of this hacky solution see the comments in DataService
@@ -40,7 +42,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
40
42
  if (this.checkArrayExists(dataRows)) {
41
43
  const rowNodes = await this.adaptable.deleteRows(dataRows, dataUpdateConfig);
42
44
  this.fireGridDataChangedEvent(dataRows, rowNodes, 'Delete');
45
+ return rowNodes;
43
46
  }
47
+ return [];
44
48
  }
45
49
  setCellValue(columnId, newValue, primaryKeyValue) {
46
50
  const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
@@ -10,7 +10,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectF
10
10
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
11
11
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
12
12
  const Uuid_1 = require("../../PredefinedConfig/Uuid");
13
- const isEqual_1 = tslib_1.__importDefault(require("lodash-es/isEqual"));
13
+ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
14
14
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
15
15
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
16
16
  const ArrayExtensions_1 = require("../../Utilities/Extensions/ArrayExtensions");
@@ -35,7 +35,7 @@ export interface DataChangedInfo {
35
35
  /**
36
36
  * What triggered the change - user, background change or a reverted change?
37
37
  */
38
- trigger?: 'edit' | 'tick' | 'undo';
38
+ trigger?: 'edit' | 'tick' | 'undo' | 'aggChange';
39
39
  }
40
40
  export interface DataChangedScope {
41
41
  wholeRow: boolean;
@@ -24,6 +24,7 @@ export interface FlashingCellState extends ConfigState {
24
24
  */
25
25
  FlashingCellDefinitions?: FlashingCellDefinition[];
26
26
  }
27
+ export declare type FlashTargetTypes = 'row' | 'cell' | 'aggFuncCell';
27
28
  /**
28
29
  * The Flashing Cell Definition
29
30
  */
@@ -40,7 +41,7 @@ export interface FlashingCellDefinition extends SuspendableObject {
40
41
  * Should a cell or whole row flash
41
42
  * @defaultValue 'cell'
42
43
  */
43
- FlashTarget?: 'row' | 'cell';
44
+ FlashTarget?: FlashTargetTypes | FlashTargetTypes[];
44
45
  /**
45
46
  * Style for 'Down' value changes
46
47
  * @defaultValue Red BackColour
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createEngine = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const isomorphic_fetch_1 = tslib_1.__importDefault(require("isomorphic-fetch"));
6
- const debounce_1 = tslib_1.__importDefault(require("lodash-es/debounce"));
6
+ const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
7
7
  const AdaptableReduxMerger_1 = require("./AdaptableReduxMerger");
8
8
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
9
9
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mergeReducer = exports.MergeState = exports.MergeStateFunction = exports.AddStateSource = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const mergeWith_1 = tslib_1.__importDefault(require("lodash-es/mergeWith"));
6
- const merge_1 = tslib_1.__importDefault(require("lodash-es/merge"));
7
- const isArray_1 = tslib_1.__importDefault(require("lodash-es/isArray"));
8
- const extend_1 = tslib_1.__importDefault(require("lodash-es/extend"));
9
- const isObject_1 = tslib_1.__importDefault(require("lodash-es/isObject"));
5
+ const mergeWith_1 = tslib_1.__importDefault(require("lodash/mergeWith"));
6
+ const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
7
+ const isArray_1 = tslib_1.__importDefault(require("lodash/isArray"));
8
+ const extend_1 = tslib_1.__importDefault(require("lodash/extend"));
9
+ const isObject_1 = tslib_1.__importDefault(require("lodash/isObject"));
10
10
  const isAdaptableObject_1 = require("../../Utilities/isAdaptableObject");
11
11
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
12
12
  function customizer(objValue, srcValue) {
@@ -160,6 +160,17 @@ class AdaptableStore {
160
160
  case exports.LOAD_STATE:
161
161
  const { State } = action;
162
162
  Object.keys(State).forEach((key) => {
163
+ // this check should be removed in version 12 !!!
164
+ if (key === 'Chart') {
165
+ LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: AdapTable Charts Plugin is deprecated! AG Grid built-in charts are fully supported & integrated in AdapTable.
166
+
167
+ Please contact 'support@adaptabletools.com' if you require any charting features that are not currently available.`);
168
+ }
169
+ if (key === 'SparklineColumn') {
170
+ LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: AdapTable SparklineColumn is deprecated! AG Grid built-in Sparklines are fully supported & integrated in AdapTable.
171
+
172
+ Please contact 'support@adaptabletools.com' if you require any sparklines features that are not currently available.`);
173
+ }
163
174
  state[key] = State[key];
164
175
  });
165
176
  break;
@@ -19,7 +19,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  constructor(api) {
20
20
  super(ModuleConstants.AlertModuleId, 'Alert', 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
21
21
  this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
22
- if (dataChangedInfo.trigger === 'undo') {
22
+ if (dataChangedInfo.trigger === 'undo' || dataChangedInfo.trigger === 'aggChange') {
23
23
  // do NOT handle reverted changes
24
24
  return;
25
25
  }
@@ -9,7 +9,7 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
9
9
  constructor(api) {
10
10
  super(ModuleConstants.DataChangeHistoryModuleId, 'Data Changes', 'track-changes', 'DataChangeHistoryPopup', 'Provides an overview of all previous changes, giving the possibility to undo specific changes', api);
11
11
  this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
12
- if (dataChangedInfo.trigger !== 'undo') {
12
+ if (dataChangedInfo.trigger !== 'undo' && dataChangedInfo.trigger !== 'aggChange') {
13
13
  if (this.shouldLogDataChange(dataChangedInfo)) {
14
14
  this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemDataChangeHistoryAdd(dataChangedInfo));
15
15
  }
@@ -18,8 +18,8 @@ export declare class FlashingCellModule extends AdaptableModuleBase implements I
18
18
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
19
19
  protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
20
20
  private showFlashingCellsForDefinitions;
21
+ private isFlashingTargetOnlyAggChange;
21
22
  private getFlashingCellDefinitionsForDataChange;
22
- private getBaseAlertDefinitionsForDataChange;
23
23
  private isAlertPredicateTriggered;
24
24
  getTeamSharingAction(): TeamSharingImportInfo<FlashingCellDefinition>;
25
25
  toView(flashingCell: FlashingCellDefinition): AdaptableObjectView;
@@ -123,9 +123,13 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
123
123
  direction = up ? 'up' : down ? 'down' : 'neutral';
124
124
  }
125
125
  flashingCellDefinitions.forEach((flashingCellDefinition) => {
126
- const flashTarget = this.api.flashingCellApi.getFlashingCellFlashTarget(flashingCellDefinition);
126
+ var _a;
127
+ let flashTarget = this.api.flashingCellApi.getFlashingCellFlashTarget(flashingCellDefinition);
127
128
  const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
128
- if (flashTarget === 'row') {
129
+ /**
130
+ * When flashing a row, all columns in that row are marked to flash.
131
+ */
132
+ if (flashTarget === 'row' || ((_a = flashTarget === null || flashTarget === void 0 ? void 0 : flashTarget.includes) === null || _a === void 0 ? void 0 : _a.call(flashTarget, 'row'))) {
129
133
  allColumnIds.forEach((colId) => {
130
134
  flashColumnIds[colId] = true;
131
135
  });
@@ -141,18 +145,30 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
141
145
  });
142
146
  });
143
147
  }
144
- getFlashingCellDefinitionsForDataChange(dataChangedEvent) {
145
- return this.getBaseAlertDefinitionsForDataChange(dataChangedEvent, this.api.flashingCellApi.getActiveFlashingCellDefinitions(), true);
148
+ isFlashingTargetOnlyAggChange(flashingCellDefinition) {
149
+ if (flashingCellDefinition.FlashTarget === 'aggFuncCell') {
150
+ return true;
151
+ }
152
+ return (Array.isArray(flashingCellDefinition.FlashTarget) &&
153
+ flashingCellDefinition.FlashTarget.length === 1 &&
154
+ flashingCellDefinition.FlashTarget.includes('aggFuncCell'));
146
155
  }
147
- getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
148
- let relatedAlertDefinitions = definitions
156
+ getFlashingCellDefinitionsForDataChange(dataChangedEvent) {
157
+ const definitions = this.api.flashingCellApi.getActiveFlashingCellDefinitions();
158
+ const defaultNoPredicateReturn = false;
159
+ let relatedFlashingCellsDefinitions = definitions
149
160
  .filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
150
161
  .filter((flashingCellDefinition) => !AdaptableQuery_1.isReactiveQuery(flashingCellDefinition.Rule));
151
- let triggeredAlerts = [];
152
- if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
153
- relatedAlertDefinitions.forEach((alertDefinition) => {
154
- if (alertDefinition.Rule.BooleanExpression) {
155
- let expression = alertDefinition.Rule.BooleanExpression;
162
+ let triggeredFlashingCells = [];
163
+ if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedFlashingCellsDefinitions)) {
164
+ relatedFlashingCellsDefinitions.forEach((flashingCellDefinition) => {
165
+ // for aggregation the data-change needs to be aggChange
166
+ if (dataChangedEvent.trigger !== 'aggChange' &&
167
+ this.isFlashingTargetOnlyAggChange(flashingCellDefinition)) {
168
+ return;
169
+ }
170
+ if (flashingCellDefinition.Rule.BooleanExpression) {
171
+ let expression = flashingCellDefinition.Rule.BooleanExpression;
156
172
  let rowNode = dataChangedEvent.rowNode;
157
173
  if (!rowNode) {
158
174
  rowNode = this.api.gridApi.getRowNodeForPrimaryKey(dataChangedEvent.primaryKeyValue);
@@ -163,15 +179,15 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
163
179
  .getQueryLanguageService()
164
180
  .evaluateBooleanExpression(expression, this.moduleInfo.ModuleName, rowNode);
165
181
  if (isSatisfiedExpression) {
166
- triggeredAlerts.push(alertDefinition);
182
+ triggeredFlashingCells.push(flashingCellDefinition);
167
183
  }
168
184
  }
169
- else if (this.isAlertPredicateTriggered(alertDefinition, dataChangedEvent, defaultNoPredicateReturn)) {
170
- triggeredAlerts.push(alertDefinition);
185
+ else if (this.isAlertPredicateTriggered(flashingCellDefinition, dataChangedEvent, defaultNoPredicateReturn)) {
186
+ triggeredFlashingCells.push(flashingCellDefinition);
171
187
  }
172
188
  });
173
189
  }
174
- return triggeredAlerts;
190
+ return triggeredFlashingCells;
175
191
  }
176
192
  isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
177
193
  return this.api.predicateApi.handlePredicate(alert.Rule.Predicate, {
@@ -194,7 +210,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
194
210
  return {
195
211
  items: [
196
212
  Object.assign(Object.assign({}, getScopeViewItems_1.getScopeViewItems(flashingCell.Scope)), { label: 'Trigger' }),
197
- getRuleViewItems_1.getRuleViewItems(flashingCell.Rule, this.api),
213
+ Object.assign(Object.assign({}, getRuleViewItems_1.getRuleViewItems(flashingCell.Rule, this.api)), { label: 'Rule', name: 'Rule' }),
198
214
  getFlashingCellDurationViewItems_1.getFlashingCellDurationViewItems(flashingCell),
199
215
  getFlashingTargetViewItems_1.getFlashingTargetViewItems(flashingCell),
200
216
  getFlashingCellStyleViewItems_1.getFlashingCellStyleViewItems(),
@@ -7,7 +7,7 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
7
7
  const isAdaptableObject_1 = require("../Utilities/isAdaptableObject");
8
8
  const TeamSharingRedux_1 = require("../Redux/ActionsReducers/TeamSharingRedux");
9
9
  const TeamSharingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/TeamSharingRedux"));
10
- const isEqual_1 = tslib_1.__importDefault(require("lodash-es/isEqual"));
10
+ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
11
11
  const LayoutRedux_1 = require("../Redux/ActionsReducers/LayoutRedux");
12
12
  class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
13
13
  constructor(api) {
@@ -1,5 +1,5 @@
1
1
  import { FlashingCellDefinition } from '../../../types';
2
2
  export declare const getFlashingTargetViewItems: (flashingCell: FlashingCellDefinition) => {
3
3
  name: string;
4
- values: ("cell" | "row")[];
4
+ values: import("../../PredefinedConfig/FlashingCellState").FlashTargetTypes[];
5
5
  };
@@ -4,6 +4,8 @@ exports.getFlashingTargetViewItems = void 0;
4
4
  exports.getFlashingTargetViewItems = (flashingCell) => {
5
5
  return {
6
6
  name: 'Target',
7
- values: [flashingCell.FlashTarget],
7
+ values: Array.isArray(flashingCell.FlashTarget)
8
+ ? flashingCell.FlashTarget
9
+ : [flashingCell.FlashTarget],
8
10
  };
9
11
  };
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.aggregationExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const rxjs_1 = require("rxjs");
6
- const parseInt_1 = tslib_1.__importDefault(require("lodash-es/parseInt"));
6
+ const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
7
7
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
8
8
  const operators_1 = require("rxjs/operators");
9
9
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
6
6
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
7
7
  const operators_1 = require("rxjs/operators");
8
- const toNumber_1 = tslib_1.__importDefault(require("lodash-es/toNumber"));
8
+ const toNumber_1 = tslib_1.__importDefault(require("lodash/toNumber"));
9
9
  const evaluator_1 = require("../../parser/src/evaluator");
10
10
  // string functions may be case (in)sensitive, see internalApi.isTextComparisonCaseSensitive()
11
11
  // if case is insensitive, we convert ALL involved strings to lower case
@@ -4,7 +4,7 @@ exports.observableExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const rxjs_1 = require("rxjs");
6
6
  const operators_1 = require("rxjs/operators");
7
- const parseInt_1 = tslib_1.__importDefault(require("lodash-es/parseInt"));
7
+ const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
8
8
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
9
9
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
10
10
  // numeric value(digits) followed by a single 's', 'm' or 'h' letter (case insensitive)
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StringExtensions = exports.IsNumeric = exports.ReplaceEmptySpacesWithUnderscore = exports.Humanize = exports.CapitaliseFirstLetter = exports.AbbreviateString = exports.NotIncludes = exports.Includes = exports.ToLowerCase = exports.RemoveTrailingComma = exports.CamelCaseToHumanText = exports.IsNotNullOrEmptyOrWhiteSpace = exports.IsNullOrEmptyOrWhiteSpace = exports.IsNotNullOrEmpty = exports.IsNullOrEmpty = exports.IsNotEmpty = exports.IsEmpty = exports.IsNotNull = exports.IsNull = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const startCase_1 = tslib_1.__importDefault(require("lodash-es/startCase"));
5
+ const startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
6
6
  function IsNull(stringToCheck) {
7
7
  return stringToCheck == null || stringToCheck == undefined;
8
8
  }
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdaptableHelper = exports.addAdaptableObjectUuidAndSource = exports.runAdaptableComparerFunction = exports.checkAdaptableOptions = exports.getAppropriateAccessLevel = exports.AdaptableObjectExistsInState = exports.checkValidPrimaryKey = exports.initPredefinedConfigWithUuids = exports.assignAdaptableOptions = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash-es/cloneDeepWith"));
6
- const isPlainObject_1 = tslib_1.__importDefault(require("lodash-es/isPlainObject"));
5
+ const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
6
+ const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
7
7
  const LoggingHelper_1 = require("./LoggingHelper");
8
8
  const Uuid_1 = require("../../PredefinedConfig/Uuid");
9
9
  const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
@@ -85,9 +85,11 @@ exports.CreateEmptyAlertDefinition = CreateEmptyAlertDefinition;
85
85
  function CreateEmptyFlashingCellDefinition() {
86
86
  return {
87
87
  Uuid: Uuid_1.createUuid(),
88
- Scope: { All: true },
88
+ Scope: { ColumnIds: [] },
89
89
  Rule: {
90
- Predicate: undefined,
90
+ Predicate: {
91
+ PredicateId: 'Any',
92
+ },
91
93
  },
92
94
  };
93
95
  }
@@ -6,7 +6,7 @@ const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
6
6
  const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
7
7
  const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
8
8
  const LoggingHelper_1 = require("../Helpers/LoggingHelper");
9
- const clamp_1 = tslib_1.__importDefault(require("lodash-es/clamp"));
9
+ const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
10
10
  const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
11
11
  const decode_1 = require("../license/decode");
12
12
  const EMAIL = 'sales@adaptabletools.com';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReportService = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const groupBy_1 = tslib_1.__importDefault(require("lodash-es/groupBy"));
5
+ const groupBy_1 = tslib_1.__importDefault(require("lodash/groupBy"));
6
6
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
7
7
  const Uuid_1 = require("../../PredefinedConfig/Uuid");
8
8
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
@@ -2,7 +2,7 @@
2
2
  import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
3
3
  declare type AlertRulesWizardSectionProps = {
4
4
  onChange: (data: AlertDefinition) => void;
5
- module: 'alert' | 'flashingCell';
5
+ module: 'alert';
6
6
  };
7
7
  export declare const AlertRulesWizardSection: (props: AlertRulesWizardSectionProps) => JSX.Element;
8
8
  export declare const renderAlertRulesSummary: (alertDefinition: AlertDefinition) => JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { AlertDefinition } from '../../../types';
3
- import { FlashingCellDefinition } from '../../../../types';
4
3
  export interface BaseAlertRulesWizardSectionProps<T> {
5
4
  onChange: (data: T) => void;
6
- module: 'alert' | 'flashingCell';
5
+ module: 'alert';
7
6
  wholeRowScope?: boolean;
8
7
  children?: React.ReactNode;
9
8
  }
10
- export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition | FlashingCellDefinition>(props: BaseAlertRulesWizardSectionProps<T>) => JSX.Element;
9
+ export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition>(props: BaseAlertRulesWizardSectionProps<T>) => JSX.Element;
@@ -8,9 +8,7 @@ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
8
8
  exports.BaseAlertRulesWizardSection = (props) => {
9
9
  const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageWizardContext();
10
10
  const wholeRowScope = props.wholeRowScope != null ? props.wholeRowScope : api.scopeApi.scopeIsAll(data.Scope);
11
- const predicateDefs = props.module == 'alert'
12
- ? api.alertApi.getAlertPredicateDefsForScope(data.Scope)
13
- : api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
11
+ const predicateDefs = api.alertApi.getAlertPredicateDefsForScope(data.Scope);
14
12
  return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
15
13
  selectPredicate: 'Select an Alert Rule - to be applied when data changes',
16
14
  useBooleanQuery: (React.createElement(React.Fragment, null,
@@ -14,15 +14,26 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
14
14
  const react_redux_1 = require("react-redux");
15
15
  const CalculatedColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CalculatedColumnRedux"));
16
16
  exports.CalculatedColumnWizard = (props) => {
17
+ var _a;
17
18
  const adaptable = AdaptableContext_1.useAdaptable();
19
+ const allCalculatedColumns = react_redux_1.useSelector((state) => state.CalculatedColumn.CalculatedColumns);
18
20
  const [calculatedColumn, setCalculatedColumn] = react_1.useState(() => {
19
- return (props === null || props === void 0 ? void 0 : props.data) ? Helper_1.cloneObject(props.data)
20
- : ObjectFactory_1.default.CreateEmptyCalculatedColumn(adaptable.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns);
21
+ var _a;
22
+ if (props.data) {
23
+ return Helper_1.cloneObject(props.data);
24
+ }
25
+ if ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column) {
26
+ const calculatedColumn = allCalculatedColumns.find((calculatedColumn) => calculatedColumn.ColumnId === props.popupParams.column.columnId);
27
+ if (calculatedColumn) {
28
+ return calculatedColumn;
29
+ }
30
+ }
31
+ return ObjectFactory_1.default.CreateEmptyCalculatedColumn(adaptable.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns);
21
32
  });
22
33
  const dispatch = react_redux_1.useDispatch();
23
- const isEdit = Boolean(props.data);
34
+ const isEdit = Boolean(props.data) || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
24
35
  const handleFinish = () => {
25
- if (props.data) {
36
+ if (isEdit) {
26
37
  dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn));
27
38
  }
28
39
  else {