@adaptabletools/adaptable 18.0.0-canary.30 → 18.0.0-canary.32

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/package.json +1 -1
  2. package/src/AdaptableOptions/ActionColumnOptions.d.ts +3 -2
  3. package/src/AdaptableOptions/CustomSortOptions.d.ts +2 -2
  4. package/src/AdaptableOptions/FormatColumnOptions.d.ts +2 -2
  5. package/src/AdaptableOptions/PredicateOptions.d.ts +2 -2
  6. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  7. package/src/Api/AdaptableApi.d.ts +2 -2
  8. package/src/Api/{ScopeApi.d.ts → ColumnScopeApi.d.ts} +28 -28
  9. package/src/Api/FlashingCellApi.d.ts +2 -2
  10. package/src/Api/GridApi.d.ts +5 -0
  11. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  12. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  13. package/src/Api/Implementation/AlertApiImpl.js +3 -3
  14. package/src/Api/Implementation/ApiBase.d.ts +2 -2
  15. package/src/Api/Implementation/ApiBase.js +2 -2
  16. package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -1
  17. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +33 -0
  18. package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +2 -2
  19. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -2
  20. package/src/Api/Implementation/FlashingCellApiImpl.js +1 -1
  21. package/src/Api/Implementation/FormatColumnApiImpl.js +3 -3
  22. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  23. package/src/Api/Implementation/GridApiImpl.js +5 -0
  24. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -3
  25. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  26. package/src/Api/Internal/AlertInternalApi.d.ts +2 -2
  27. package/src/Api/Internal/AlertInternalApi.js +3 -3
  28. package/src/Api/Internal/CustomSortInternalApi.js +1 -1
  29. package/src/Api/Internal/ExportInternalApi.js +1 -1
  30. package/src/Api/Internal/ExpressionInternalApi.js +1 -1
  31. package/src/Api/Internal/FormatColumnInternalApi.d.ts +2 -2
  32. package/src/Api/Internal/FormatColumnInternalApi.js +24 -14
  33. package/src/Api/Internal/PredicateInternalApi.d.ts +6 -6
  34. package/src/Api/Internal/StyledColumnInternalApi.d.ts +2 -2
  35. package/src/Api/Internal/StyledColumnInternalApi.js +4 -5
  36. package/src/PredefinedConfig/AlertState.d.ts +2 -2
  37. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +4 -4
  38. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
  39. package/src/PredefinedConfig/Common/{AdaptableScope.d.ts → ColumnScope.d.ts} +1 -1
  40. package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
  41. package/src/PredefinedConfig/Common/RowScope.js +1 -0
  42. package/src/PredefinedConfig/ExportState.d.ts +2 -2
  43. package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
  44. package/src/PredefinedConfig/FormatColumnState.d.ts +7 -8
  45. package/src/PredefinedConfig/PlusMinusState.d.ts +2 -2
  46. package/src/PredefinedConfig/ShortcutState.d.ts +2 -2
  47. package/src/PredefinedConfig/StyledColumnState.d.ts +5 -10
  48. package/src/Strategy/AlertModule.js +2 -2
  49. package/src/Strategy/ExportModule.js +2 -2
  50. package/src/Strategy/FlashingCellModule.js +4 -4
  51. package/src/Strategy/FormatColumnModule.js +2 -2
  52. package/src/Strategy/PlusMinusModule.js +3 -3
  53. package/src/Strategy/ShortcutModule.js +1 -1
  54. package/src/Strategy/StyledColumnModule.js +7 -5
  55. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -3
  56. package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
  57. package/src/Utilities/ObjectFactory.js +1 -1
  58. package/src/Utilities/Services/ReportService.js +2 -2
  59. package/src/Utilities/Services/ValidationService.js +2 -2
  60. package/src/View/Alert/AlertEntityRow.js +1 -1
  61. package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +2 -2
  62. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -1
  63. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -2
  64. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  65. package/src/View/ColumnInfo/ColumnInfo.js +1 -1
  66. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts +3 -3
  67. package/src/View/Components/EntityRulesEditor/index.d.ts +3 -3
  68. package/src/View/Components/NewScopeComponent.d.ts +5 -5
  69. package/src/View/Components/NewScopeComponent.js +2 -2
  70. package/src/View/Components/RangesComponent.d.ts +2 -2
  71. package/src/View/Components/RangesComponent.js +1 -1
  72. package/src/View/Components/SharedProps/WizardScopeState.d.ts +2 -2
  73. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
  74. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +4 -1
  75. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
  76. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  77. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
  78. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
  79. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +24 -13
  80. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
  81. package/src/View/PlusMinus/PlusMinusSummary.js +2 -2
  82. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  83. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +32 -12
  84. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -1
  85. package/src/agGrid/ActionColumnRenderer.js +40 -4
  86. package/src/agGrid/AdaptableAgGrid.js +2 -3
  87. package/src/agGrid/AgGridColumnAdapter.js +11 -10
  88. package/src/agGrid/BadgeRenderer.d.ts +2 -2
  89. package/src/agGrid/BadgeRenderer.js +23 -16
  90. package/src/agGrid/PercentBarRenderer.js +0 -1
  91. package/src/env.js +2 -2
  92. package/src/metamodel/adaptable.metamodel.d.ts +19 -26
  93. package/src/metamodel/adaptable.metamodel.js +1 -1
  94. package/src/types.d.ts +3 -2
  95. package/tsconfig.esm.tsbuildinfo +1 -1
  96. package/src/Api/Implementation/ScopeApiImpl.d.ts +0 -33
  97. /package/src/Api/{ScopeApi.js → ColumnScopeApi.js} +0 -0
  98. /package/src/PredefinedConfig/Common/{AdaptableScope.js → ColumnScope.js} +0 -0
@@ -209,7 +209,7 @@ export class AlertInternalApi extends ApiBase {
209
209
  getAlertPredicateDefsForScope(scope) {
210
210
  return this.getPredicateApi()
211
211
  .internalApi.getAlertPredicateDefs(scope)
212
- .filter((predicateDef) => this.getScopeApi().isScopeInScope(scope, predicateDef.columnScope));
212
+ .filter((predicateDef) => this.getColumnScopeApi().isScopeInScope(scope, predicateDef.columnScope));
213
213
  }
214
214
  /**
215
215
  * Returns a description of an Alert Definition
@@ -223,7 +223,7 @@ export class AlertInternalApi extends ApiBase {
223
223
  if (alertDefinition.MessageText != null) {
224
224
  return alertDefinition.MessageText;
225
225
  }
226
- let scopeDescription = this.getScopeApi().getScopeDescription(alertDefinition.Scope);
226
+ let scopeDescription = this.getColumnScopeApi().getScopeDescription(alertDefinition.Scope);
227
227
  let ruleDescription = this.getAlertRuleDescription(alertDefinition);
228
228
  return scopeDescription + ' - ' + ruleDescription;
229
229
  }
@@ -415,7 +415,7 @@ export class AlertInternalApi extends ApiBase {
415
415
  getAlertDefinitionsForCellDataChange(dataChangedEvent) {
416
416
  const allActiveNonReactiveDefinitions = this.getActiveNonReactiveAlertDefinitions();
417
417
  let relatedAlertDefinitions = allActiveNonReactiveDefinitions
418
- .filter((v) => this.getAdaptableApi().scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
418
+ .filter((v) => this.getAdaptableApi().columnScopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
419
419
  .filter((alertDefinition) => !isReactiveQuery(alertDefinition.Rule));
420
420
  let triggeredAlerts = [];
421
421
  if (ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
@@ -3,7 +3,7 @@ export class CustomSortInternalApi extends ApiBase {
3
3
  getCustomSortComparer(columnId) {
4
4
  var _a;
5
5
  const column = this.getColumnApi().getColumnWithColumnId(columnId);
6
- return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.getAdaptableApi().scopeApi.isColumnInScope(column, csc.scope));
6
+ return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.getAdaptableApi().columnScopeApi.isColumnInScope(column, csc.scope));
7
7
  }
8
8
  getDefaultCustomSortComparer(columnId, columnValues) {
9
9
  // have to return a function that may not have access to this
@@ -21,7 +21,7 @@ export class ExportInternalApi extends ApiBase {
21
21
  break;
22
22
  case 'ScopeColumns':
23
23
  // use the Scope object which will tell us if the Column is relevant
24
- if (!this.getAdaptableApi().scopeApi.isColumnInScopeColumns(cellDataChangedInfo.column, report.Scope)) {
24
+ if (!this.getAdaptableApi().columnScopeApi.isColumnInScopeColumns(cellDataChangedInfo.column, report.Scope)) {
25
25
  return false;
26
26
  }
27
27
  break;
@@ -41,7 +41,7 @@ export class ExpressionInternalApi extends ApiBase {
41
41
  context.predicates = predicates;
42
42
  // need to find a way to get the columns in the predicates
43
43
  // cand do later
44
- // this.getAdaptableApi().scopeApi.getColumnsForScope();
44
+ // this.getAdaptableApi().columnScopeApi.getColumnsForScope();
45
45
  }
46
46
  return !evaluateExpressionExternallyFn(context);
47
47
  }
@@ -1,4 +1,4 @@
1
- import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, AdaptableScope, FormatColumn, StringFormatterOptions } from '../../types';
1
+ import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, StringFormatterOptions } from '../../types';
2
2
  import { ApiBase } from '../Implementation/ApiBase';
3
3
  import { IRowNode } from '@ag-grid-community/core';
4
4
  export declare class FormatColumnInternalApi extends ApiBase {
@@ -76,7 +76,7 @@ export declare class FormatColumnInternalApi extends ApiBase {
76
76
  * Returns all Predicates appropriate for the given Scope
77
77
  * @param scope Scope to check
78
78
  */
79
- getFormatColumnDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
79
+ getFormatColumnDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
80
80
  /**
81
81
  * Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
82
82
  *
@@ -3,7 +3,6 @@ import StringExtensions from '../../Utilities/Extensions/StringExtensions';
3
3
  import FormatHelper from '../../Utilities/Helpers/FormatHelper';
4
4
  import ObjectFactory from '../../Utilities/ObjectFactory';
5
5
  import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
6
- import { ROW_SUMMARY_ROW_ID } from '../../PredefinedConfig/Common/RowSummary';
7
6
  export class FormatColumnInternalApi extends ApiBase {
8
7
  /**
9
8
  * Retrieves all Format Columns in Adaptable State with the `Style` property set
@@ -60,7 +59,7 @@ export class FormatColumnInternalApi extends ApiBase {
60
59
  return this.getFormatColumnsWithStyleForColumn(column, config).filter((formatColumn) => { var _a; return StringExtensions.IsNotNullOrEmpty((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName); });
61
60
  }
62
61
  getFormatColumnWithColumnInScope(formatColumns, column) {
63
- return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.getAdaptableApi().scopeApi.isColumnInScope(column, scopedFormatColumn.Scope));
62
+ return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.getAdaptableApi().columnScopeApi.isColumnInScope(column, scopedFormatColumn.Scope));
64
63
  }
65
64
  // TODO is this really needed, I don't think it achieves anything
66
65
  getFormatColumnInColumnScope(formatColumns) {
@@ -68,11 +67,11 @@ export class FormatColumnInternalApi extends ApiBase {
68
67
  return formatColumns.filter((fc) => {
69
68
  return (
70
69
  // this.getFormatColumnsWithColumnScope(formatColumns)
71
- (this.getAdaptableApi().scopeApi.scopeHasColumns(fc.Scope) ||
70
+ (this.getAdaptableApi().columnScopeApi.scopeHasColumns(fc.Scope) ||
72
71
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
73
- this.getAdaptableApi().scopeApi.scopeHasDataType(fc.Scope) ||
72
+ this.getAdaptableApi().columnScopeApi.scopeHasDataType(fc.Scope) ||
74
73
  // this.getFormatColumnsWithAllScope(formatColumns)
75
- this.getAdaptableApi().scopeApi.scopeIsAll(fc.Scope) || this.getAdaptableApi().scopeApi.scopeHasColumnType(fc.Scope))
74
+ this.getAdaptableApi().columnScopeApi.scopeIsAll(fc.Scope) || this.getAdaptableApi().columnScopeApi.scopeHasColumnType(fc.Scope))
76
75
  );
77
76
  });
78
77
  }
@@ -145,7 +144,7 @@ export class FormatColumnInternalApi extends ApiBase {
145
144
  getFormatColumnDefsForScope(scope) {
146
145
  return this.getAdaptableApi()
147
146
  .predicateApi.internalApi.getFormatColumnPredicateDefs(scope)
148
- .filter((predicateDef) => this.getAdaptableApi().scopeApi.isScopeInScope(scope, predicateDef.columnScope));
147
+ .filter((predicateDef) => this.getAdaptableApi().columnScopeApi.isScopeInScope(scope, predicateDef.columnScope));
149
148
  }
150
149
  /**
151
150
  * Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
@@ -155,23 +154,34 @@ export class FormatColumnInternalApi extends ApiBase {
155
154
  * @param params
156
155
  */
157
156
  formatColumnShouldRender(formatColumn, column, rowNode, cellValue) {
158
- var _a, _b, _c;
157
+ var _a, _b, _c, _d, _e;
159
158
  // suspended is important to be first
160
159
  if (formatColumn.IsSuspended) {
161
160
  return false;
162
161
  }
163
- if (!formatColumn.IncludeGroupedRows &&
164
- this.getAdaptableApi().gridApi.isGroupRowNode(rowNode)) {
165
- return false;
162
+ const isSummaryNode = this.getAdaptableApi().gridApi.isSummaryNode(rowNode);
163
+ const isGroupedRowNode = this.getAdaptableApi().gridApi.isGroupRowNode(rowNode);
164
+ // For Summary Rows cannot be excluded
165
+ if (isSummaryNode) {
166
+ if ((_a = formatColumn.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeSummaryRows) {
167
+ return false;
168
+ }
166
169
  }
167
- if (!formatColumn.IncludeRowSummaries && ((_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID])) {
168
- return false;
170
+ else if (isGroupedRowNode) {
171
+ if ((_b = formatColumn.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupedRows) {
172
+ return false;
173
+ }
174
+ }
175
+ else {
176
+ if ((_c = formatColumn.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
177
+ return false;
178
+ }
169
179
  }
170
180
  if (!formatColumn.Rule) {
171
181
  return true;
172
182
  }
173
183
  // first run the predicate
174
- if (formatColumn.Rule.Predicates && ((_c = (_b = formatColumn.Rule) === null || _b === void 0 ? void 0 : _b.Predicates) === null || _c === void 0 ? void 0 : _c.length)) {
184
+ if (formatColumn.Rule.Predicates && ((_e = (_d = formatColumn.Rule) === null || _d === void 0 ? void 0 : _d.Predicates) === null || _e === void 0 ? void 0 : _e.length)) {
175
185
  const predicateDefHandlerContext = Object.assign({ value: cellValue, oldValue: null, displayValue: cellValue, node: rowNode, column: column }, this.getAdaptableApi().internalApi.buildBaseContext());
176
186
  return this.evaluatePredicate(formatColumn, predicateDefHandlerContext);
177
187
  } // then run the Expression
@@ -240,7 +250,7 @@ export class FormatColumnInternalApi extends ApiBase {
240
250
  const columnsThatNeedRefresh = new Set();
241
251
  this.getFormatColumnsDependentOnColumns(impactedColumnIds).forEach((formatColumn) => {
242
252
  this.getAdaptableApi()
243
- .scopeApi.getColumnsForScope(formatColumn.Scope)
253
+ .columnScopeApi.getColumnsForScope(formatColumn.Scope)
244
254
  .forEach((col) => {
245
255
  columnsThatNeedRefresh.add(col.columnId);
246
256
  });
@@ -2,7 +2,7 @@ import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { AdaptablePredicate, AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
3
3
  import { SystemFilterPredicateId } from '../../PredefinedConfig/Common/ColumnFilter';
4
4
  import { AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
5
- import { AdaptableScope } from '../../types';
5
+ import { ColumnScope } from '../../types';
6
6
  export declare class PredicateInternalApi extends ApiBase {
7
7
  /**
8
8
  * Returns true if the predicate has a dropdown.
@@ -13,23 +13,23 @@ export declare class PredicateInternalApi extends ApiBase {
13
13
  /**
14
14
  * Get all Filter Predicate Definitions - System and Custom
15
15
  */
16
- getFilterPredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
16
+ getFilterPredicateDefs(scope: ColumnScope): AdaptablePredicateDef[];
17
17
  private getSystemFilterPredicateIds;
18
18
  /**
19
19
  * Get all Alert Predicate Definitions - System and Custom
20
20
  */
21
- getAlertPredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
21
+ getAlertPredicateDefs(scope: ColumnScope): AdaptablePredicateDef[];
22
22
  private getSystemAlertPredicateIds;
23
23
  private getSystemBadgeStylePredicateIds;
24
24
  /**
25
25
  * Get all Format Column Predicate Definitions - System and Custom
26
26
  */
27
- getFormatColumnPredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
27
+ getFormatColumnPredicateDefs(scope: ColumnScope): AdaptablePredicateDef[];
28
28
  private getSystemFormatColumnPredicateIds;
29
29
  /**
30
30
  * Get all Flashing Cell Predicate Definitions - System and Custom
31
31
  */
32
- getFlashingCellPredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
32
+ getFlashingCellPredicateDefs(scope: ColumnScope): AdaptablePredicateDef[];
33
33
  private getSystemFlashingCellPredicateIds;
34
34
  /**
35
35
  * Gets the correct Equality-type System Predicate for a particular DataType
@@ -39,7 +39,7 @@ export declare class PredicateInternalApi extends ApiBase {
39
39
  /**
40
40
  * Get all Badge Style Predicate Definitions - System and Custom
41
41
  */
42
- getBadgeStylePredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
42
+ getBadgeStylePredicateDefs(scope: ColumnScope): AdaptablePredicateDef[];
43
43
  /**
44
44
  * Merges System and Custom Predicate Definitions but ensures that Custom ones take precedence
45
45
  * (i.e. if there is a Custom Predicate with the same Id as a System one, the Custom one is used)
@@ -1,6 +1,6 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
- import { BadgeStyleDefinition, CellColorRange, ColumnComparison, NumericStyledColumn, StyledColumn } from '../../PredefinedConfig/StyledColumnState';
3
+ import { BadgeStyle, BadgeStyleDefinition, CellColorRange, ColumnComparison, NumericStyledColumn, StyledColumn } from '../../PredefinedConfig/StyledColumnState';
4
4
  import { IRowNode } from '@ag-grid-community/core';
5
5
  import { PredicateDefHandlerContext } from '../../types';
6
6
  export declare class StyledColumnInternalApi extends ApiBase {
@@ -57,6 +57,6 @@ export declare class StyledColumnInternalApi extends ApiBase {
57
57
  * @param styledColumn Styled Column to Add
58
58
  */
59
59
  hasStyledColumnRelativeCellRange(styledColumn: StyledColumn): boolean;
60
- getApplicableBadge(styledColumn: StyledColumn, context: PredicateDefHandlerContext): BadgeStyleDefinition | null;
60
+ getApplicableBadge(badgeStyle: BadgeStyle, context: PredicateDefHandlerContext): BadgeStyleDefinition | null;
61
61
  getBadgePredicateDefsForColumn(columnId: string): import("../../types").AdaptablePredicateDef<string>[];
62
62
  }
@@ -241,15 +241,14 @@ export class StyledColumnInternalApi extends ApiBase {
241
241
  return cellColorRange.Min == 'Col-Min' || cellColorRange.Max == 'Col-Max';
242
242
  })))) !== null && _e !== void 0 ? _e : false);
243
243
  }
244
- getApplicableBadge(styledColumn, context) {
245
- var _a, _b;
246
- if (!((_a = styledColumn.BadgeStyle) === null || _a === void 0 ? void 0 : _a.Badges.length)) {
244
+ getApplicableBadge(badgeStyle, context) {
245
+ if (!badgeStyle.Badges.length) {
247
246
  return null;
248
247
  }
249
248
  // first that matches, sort last ones without predicate
250
249
  const badgesWithoutAll = [];
251
250
  const badgesWithAll = [];
252
- for (let badge of (_b = styledColumn.BadgeStyle) === null || _b === void 0 ? void 0 : _b.Badges) {
251
+ for (let badge of badgeStyle.Badges) {
253
252
  if (!badge.Predicate) {
254
253
  badgesWithAll.push(badge);
255
254
  }
@@ -275,6 +274,6 @@ export class StyledColumnInternalApi extends ApiBase {
275
274
  };
276
275
  return this.getAdaptableApi()
277
276
  .predicateApi.internalApi.getBadgeStylePredicateDefs(scope)
278
- .filter((predicate) => this.getAdaptableApi().scopeApi.isColumnInScope(column, predicate.columnScope));
277
+ .filter((predicate) => this.getAdaptableApi().columnScopeApi.isColumnInScope(column, predicate.columnScope));
279
278
  }
280
279
  }
@@ -1,5 +1,5 @@
1
1
  import { ConfigState } from './ConfigState';
2
- import { AdaptableScope } from './Common/AdaptableScope';
2
+ import { ColumnScope } from './Common/ColumnScope';
3
3
  import { AdaptableColumnPredicate } from './Common/AdaptablePredicate';
4
4
  import { TypeHint } from './Common/Types';
5
5
  import { AdaptableMessageType } from './Common/AdaptableMessageType';
@@ -27,7 +27,7 @@ export interface AlertDefinition extends SuspendableObject {
27
27
  /**
28
28
  * Where Alert can be triggered: one, some or all columns or DataTypes
29
29
  */
30
- Scope: AdaptableScope;
30
+ Scope: ColumnScope;
31
31
  /**
32
32
  * When Alert should be triggered
33
33
  */
@@ -1,5 +1,5 @@
1
1
  import { TypeUuid } from '../Uuid';
2
- import { AdaptableScope } from './AdaptableScope';
2
+ import { ColumnScope } from './ColumnScope';
3
3
  /**
4
4
  * Base interface which all other Adaptable State-related objects extend
5
5
  */
@@ -30,9 +30,9 @@ export type AdaptableObjectTag = string;
30
30
  */
31
31
  export interface AdaptableObjectLookupCriteria {
32
32
  /**
33
- * AdaptableScope
33
+ * ColumnScope
34
34
  */
35
- scope?: AdaptableScope;
35
+ scope?: ColumnScope;
36
36
  /**
37
37
  * AdaptableObjectTag
38
38
  */
@@ -43,5 +43,5 @@ export interface AdaptableObjectLookupCriteria {
43
43
  ids?: AdaptableObject['Uuid'][];
44
44
  }
45
45
  export interface AdaptableObjectWithScope extends AdaptableObject {
46
- Scope: AdaptableScope;
46
+ Scope: ColumnScope;
47
47
  }
@@ -1,7 +1,7 @@
1
1
  import { IRowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableIcon, ColumnFilter } from '../../types';
3
3
  import { AdaptableColumn, AdaptableColumnDataType } from './AdaptableColumn';
4
- import { AdaptableScope } from './AdaptableScope';
4
+ import { ColumnScope } from './ColumnScope';
5
5
  import { BaseContext } from './BaseContext';
6
6
  /**
7
7
  * Predicate object used by AdapTableQL - essentially a boolean function
@@ -40,7 +40,7 @@ export interface AdaptablePredicateDef<PREDICATE_TYPE = string> {
40
40
  /**
41
41
  * Columns (or DataTypes) where Predicate is active
42
42
  */
43
- columnScope: AdaptableScope;
43
+ columnScope: ColumnScope;
44
44
  /**
45
45
  * Modules where Predicate can run
46
46
  */
@@ -14,4 +14,4 @@ export type ScopeColumnTypes = {
14
14
  /**
15
15
  * Defines where a given Object / Module is active
16
16
  */
17
- export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds | ScopeColumnTypes;
17
+ export type ColumnScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds | ScopeColumnTypes;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Defines which types of Rows to exclude when rendering Format Columns, Action Columns, Badges
3
+ */
4
+ export type RowScope = {
5
+ /**
6
+ * Exclude regular data rows
7
+ */
8
+ ExcludeDataRows?: boolean;
9
+ /**
10
+ * Exclude Grouped Rows
11
+ */
12
+ ExcludeGroupedRows?: boolean;
13
+ /**
14
+ * Exclude Summary Rows (used in Row Summaries)
15
+ */
16
+ ExcludeSummaryRows?: boolean;
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { ConfigState } from './ConfigState';
2
2
  import { BaseSchedule } from './Common/Schedule';
3
- import { AdaptableScope } from './Common/AdaptableScope';
3
+ import { ColumnScope } from './Common/ColumnScope';
4
4
  import { AdaptableColumnBase } from './Common/AdaptableColumn';
5
5
  import { AdaptableObject } from './Common/AdaptableObject';
6
6
  import { AdaptableFormData } from './Common/AdaptableForm';
@@ -42,7 +42,7 @@ export interface Report extends AdaptableObject {
42
42
  /**
43
43
  * Columns Scope; only required if `ReportColumnScope` is 'ScopeColumns'
44
44
  */
45
- Scope?: AdaptableScope;
45
+ Scope?: ColumnScope;
46
46
  /**
47
47
  * Query to use; only required if `ReportRowScope` is 'ExpressionRows'
48
48
  */
@@ -1,6 +1,6 @@
1
1
  import { ConfigState } from './ConfigState';
2
2
  import { AdaptableStyle } from './Common/AdaptableStyle';
3
- import { AdaptableColumnPredicate, AdaptableScope } from '../types';
3
+ import { AdaptableColumnPredicate, ColumnScope } from '../types';
4
4
  import { XOR } from '../Utilities/Extensions/TypeExtensions';
5
5
  import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
6
6
  import { TypeHint } from './Common/Types';
@@ -34,7 +34,7 @@ export interface FlashingCellDefinition extends SuspendableObject {
34
34
  /**
35
35
  * Where Flashing Cell can display: Column[s] or DataType[s]
36
36
  */
37
- Scope: AdaptableScope;
37
+ Scope: ColumnScope;
38
38
  /**
39
39
  * When Flashing Cell should be triggered
40
40
  */
@@ -1,7 +1,8 @@
1
1
  import { ConfigState } from './ConfigState';
2
2
  import { AdaptableStyle } from './Common/AdaptableStyle';
3
3
  import { AdaptableFormat } from './Common/AdaptableFormat';
4
- import { AdaptableScope } from './Common/AdaptableScope';
4
+ import { ColumnScope } from './Common/ColumnScope';
5
+ import { RowScope } from './Common/RowScope';
5
6
  import { SuspendableObject } from './Common/SuspendableObject';
6
7
  import { XOR } from '../Utilities/Extensions/TypeExtensions';
7
8
  import { TypeHint } from './Common/Types';
@@ -23,7 +24,7 @@ export interface FormatColumn extends SuspendableObject {
23
24
  /**
24
25
  * Where Format will be applied - whole Row, some Columns or all Columns of given DataType
25
26
  */
26
- Scope: AdaptableScope;
27
+ Scope: ColumnScope;
27
28
  /**
28
29
  * Rule used to decide whether to apply the Format; if undefined Format is always applied
29
30
  */
@@ -41,15 +42,13 @@ export interface FormatColumn extends SuspendableObject {
41
42
  */
42
43
  CellAlignment?: 'Left' | 'Right' | 'Center';
43
44
  /**
44
- * Interop.io to Format the Column in Grouped Rows
45
- * @defaultValue false
45
+ * Which types of Rows should be formatted (data, grouped, summary)
46
46
  */
47
- IncludeGroupedRows?: boolean;
47
+ RowScope?: RowScope;
48
48
  /**
49
- * Interop.io to include Row Summary Rows
50
- * @defaultValue false
49
+ * @deprecated FormatColumns now apply to grouped rows by default; use RowScope for more control
51
50
  */
52
- IncludeRowSummaries?: boolean;
51
+ IncludeGroupedRows?: never;
53
52
  }
54
53
  /**
55
54
  * The Format Column Rule - can be either a Predicate or a BooleanExpression
@@ -1,5 +1,5 @@
1
1
  import { ConfigState } from './ConfigState';
2
- import { AdaptableScope } from './Common/AdaptableScope';
2
+ import { ColumnScope } from './Common/ColumnScope';
3
3
  import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
4
4
  import { SuspendableObject } from './Common/SuspendableObject';
5
5
  /**
@@ -18,7 +18,7 @@ export interface PlusMinusNudge extends SuspendableObject {
18
18
  /**
19
19
  * Where Rule is applied
20
20
  */
21
- Scope: AdaptableScope;
21
+ Scope: ColumnScope;
22
22
  /**
23
23
  * Amount by which to update cell when Rule is applied
24
24
  */
@@ -1,5 +1,5 @@
1
1
  import { ConfigState } from './ConfigState';
2
- import { AdaptableScope } from './Common/AdaptableScope';
2
+ import { ColumnScope } from './Common/ColumnScope';
3
3
  import { SuspendableObject } from './Common/SuspendableObject';
4
4
  /**
5
5
  * Predefined Configuration for Shortcut Module
@@ -21,7 +21,7 @@ export interface Shortcut extends SuspendableObject {
21
21
  /**
22
22
  * Numeric Columns where Shortcut is applied
23
23
  */
24
- Scope: AdaptableScope<ShortcutScopeDataType>;
24
+ Scope: ColumnScope<ShortcutScopeDataType>;
25
25
  /**
26
26
  * Key which triggers the Shortcut when pressed
27
27
  */
@@ -3,6 +3,7 @@ import { SuspendableObject } from './Common/SuspendableObject';
3
3
  import { SparklineOptions } from '@ag-grid-community/core';
4
4
  import { AdaptableCustomIcon, AdaptableSystemIcon, AdaptablePredicate, AdaptableStyle } from '../types';
5
5
  import { TypeHint } from './Common/Types';
6
+ import { RowScope } from "./Common/RowScope";
6
7
  /**
7
8
  * Predefined Configuration for Styled Column Module
8
9
  */
@@ -36,16 +37,6 @@ export interface StyledColumn extends SuspendableObject {
36
37
  * Displays cell values in Column as a Badge
37
38
  */
38
39
  BadgeStyle?: BadgeStyle;
39
- /**
40
- * Includes Styled Column in Grouped Rows
41
- * @defaultValue false
42
- */
43
- IncludeGroupedRows?: boolean;
44
- /**
45
- * Includes Row Summaries in Styled Column
46
- * @defaultValue false
47
- */
48
- IncludeRowSummaries?: boolean;
49
40
  }
50
41
  /**
51
42
  * Style used to display Percent Bars in Special Column Style
@@ -195,4 +186,8 @@ export interface BadgeStyle {
195
186
  * Collection of Badge Style Definitions
196
187
  */
197
188
  Badges?: BadgeStyleDefinition[];
189
+ /**
190
+ * Which types of Rows should contain a Badge (data, grouped, summary)
191
+ */
192
+ RowScope?: RowScope;
198
193
  }
@@ -57,8 +57,8 @@ export class AlertModule extends AdaptableModuleBase {
57
57
  if (queryExpression) {
58
58
  return this.api.expressionApi.getColumnsFromExpression(queryExpression);
59
59
  }
60
- else if (this.api.scopeApi.scopeHasColumns(alertDefinition.Scope)) {
61
- return this.api.scopeApi
60
+ else if (this.api.columnScopeApi.scopeHasColumns(alertDefinition.Scope)) {
61
+ return this.api.columnScopeApi
62
62
  .getColumnsForScope(alertDefinition.Scope)
63
63
  .map((adaptableColumn) => adaptableColumn.columnId);
64
64
  }
@@ -27,8 +27,8 @@ export class ExportModule extends AdaptableModuleBase {
27
27
  }
28
28
  getExplicitlyReferencedColumnIds(report) {
29
29
  if (report.ReportColumnScope === 'ScopeColumns' &&
30
- this.api.scopeApi.scopeHasColumns(report.Scope)) {
31
- return this.api.scopeApi
30
+ this.api.columnScopeApi.scopeHasColumns(report.Scope)) {
31
+ return this.api.columnScopeApi
32
32
  .getColumnsForScope(report.Scope)
33
33
  .map((adaptableColumn) => adaptableColumn.columnId);
34
34
  }
@@ -46,8 +46,8 @@ export class FlashingCellModule extends AdaptableModuleBase {
46
46
  if (queryExpression) {
47
47
  return this.api.expressionApi.getColumnsFromExpression(queryExpression);
48
48
  }
49
- else if (this.api.scopeApi.scopeHasColumns(alertDefinition.Scope)) {
50
- return this.api.scopeApi
49
+ else if (this.api.columnScopeApi.scopeHasColumns(alertDefinition.Scope)) {
50
+ return this.api.columnScopeApi
51
51
  .getColumnsForScope(alertDefinition.Scope)
52
52
  .map((adaptableColumn) => adaptableColumn.columnId);
53
53
  }
@@ -65,7 +65,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
65
65
  if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
66
66
  const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
67
67
  const flashingCellForCurrentColumn = flashingCellDefinitions.find((flashingCellDefinition) => {
68
- return this.api.scopeApi.isColumnInScope(column, flashingCellDefinition.Scope);
68
+ return this.api.columnScopeApi.isColumnInScope(column, flashingCellDefinition.Scope);
69
69
  });
70
70
  if (flashingCellForCurrentColumn) {
71
71
  return [
@@ -165,7 +165,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
165
165
  const definitions = this.api.flashingCellApi.getActiveFlashingCellDefinitions();
166
166
  const defaultNoPredicateReturn = false;
167
167
  let relatedFlashingCellsDefinitions = definitions
168
- .filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
168
+ .filter((v) => this.api.columnScopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
169
169
  .filter((flashingCellDefinition) => !isReactiveQuery(flashingCellDefinition.Rule));
170
170
  let triggeredFlashingCells = [];
171
171
  if (ArrayExtensions.IsNotNullOrEmpty(relatedFlashingCellsDefinitions)) {
@@ -22,8 +22,8 @@ export class FormatColumnModule extends AdaptableModuleBase {
22
22
  if (queryExpression) {
23
23
  return this.api.expressionApi.getColumnsFromExpression(queryExpression);
24
24
  }
25
- else if (this.api.scopeApi.scopeHasColumns(formatColumn.Scope)) {
26
- return this.api.scopeApi
25
+ else if (this.api.columnScopeApi.scopeHasColumns(formatColumn.Scope)) {
26
+ return this.api.columnScopeApi
27
27
  .getColumnsForScope(formatColumn.Scope)
28
28
  .map((adaptableColumn) => adaptableColumn.columnId);
29
29
  }
@@ -19,8 +19,8 @@ export class PlusMinusModule extends AdaptableModuleBase {
19
19
  return this.api.plusMinusApi.getAllPlusMinus(config);
20
20
  }
21
21
  getExplicitlyReferencedColumnIds(plusMinusNudge) {
22
- if (this.api.scopeApi.scopeHasColumns(plusMinusNudge.Scope)) {
23
- return this.api.scopeApi
22
+ if (this.api.columnScopeApi.scopeHasColumns(plusMinusNudge.Scope)) {
23
+ return this.api.columnScopeApi
24
24
  .getColumnsForScope(plusMinusNudge.Scope)
25
25
  .map((adaptableColumn) => adaptableColumn.columnId);
26
26
  }
@@ -92,7 +92,7 @@ export class PlusMinusModule extends AdaptableModuleBase {
92
92
  let replacementGridCell;
93
93
  plusMinusNudges.forEach((pmr) => {
94
94
  if (!foundRule) {
95
- if (this.api.scopeApi.isColumnInScope(gridCell.column, pmr.Scope)) {
95
+ if (this.api.columnScopeApi.isColumnInScope(gridCell.column, pmr.Scope)) {
96
96
  if (this.api.gridApi.isCellEditable(gridCell)) {
97
97
  //for aggrid as we are getting strings sometimes
98
98
  if (typeof gridCell.rawValue != 'number') {
@@ -46,7 +46,7 @@ export class ShortcutModule extends AdaptableModuleBase {
46
46
  const matchingShortcut = this.api.shortcutApi
47
47
  .getActiveShortcuts()
48
48
  .find((x) => keyDownEvent.key.toLowerCase() === x.ShortcutKey.toLowerCase() &&
49
- this.api.scopeApi.isColumnInScope(this.api.columnApi.getColumnWithColumnId(columnId), x.Scope));
49
+ this.api.columnScopeApi.isColumnInScope(this.api.columnApi.getColumnWithColumnId(columnId), x.Scope));
50
50
  if (!matchingShortcut || !matchingShortcut.ShortcutValue) {
51
51
  return;
52
52
  }
@@ -15,8 +15,8 @@ export class StyledColumnModule extends AdaptableModuleBase {
15
15
  return this.api.styledColumnApi.getStyledColumns(config);
16
16
  }
17
17
  getExplicitlyReferencedColumnIds(formatColumn) {
18
- if (this.api.scopeApi.scopeHasColumns(formatColumn.Scope)) {
19
- return this.api.scopeApi
18
+ if (this.api.columnScopeApi.scopeHasColumns(formatColumn.Scope)) {
19
+ return this.api.columnScopeApi
20
20
  .getColumnsForScope(formatColumn.Scope)
21
21
  .map((adaptableColumn) => adaptableColumn.columnId);
22
22
  }
@@ -104,7 +104,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
104
104
  // Number
105
105
  // Create Styled Column - Gradient | Percent Bar | Badge
106
106
  case 'Number':
107
- const emptyRanges = this.api.scopeApi.createCellColorRangesForScope({
107
+ const emptyRanges = this.api.columnScopeApi.createCellColorRangesForScope({
108
108
  ColumnIds: [column.columnId],
109
109
  });
110
110
  const newGrandientButton = this.createMenuItemShowPopup('styled-column-gradient-add', 'Create Gradient Column', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
@@ -162,6 +162,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
162
162
  };
163
163
  }
164
164
  toView(styledColumn) {
165
+ var _a, _b, _c, _d, _e, _f;
165
166
  const specificTypeItems = [];
166
167
  if (styledColumn.GradientStyle || styledColumn.PercentBarStyle) {
167
168
  specificTypeItems.push({
@@ -175,8 +176,9 @@ export class StyledColumnModule extends AdaptableModuleBase {
175
176
  specificTypeItems.push({
176
177
  name: 'Settings',
177
178
  values: [
178
- `Include grouped rows: ${styledColumn.IncludeGroupedRows ? 'Yes' : 'No'}`,
179
- `Include row summaries: ${styledColumn.IncludeRowSummaries ? 'Yes' : 'No'}`,
179
+ `Data Rows: ${((_b = (_a = styledColumn.BadgeStyle) === null || _a === void 0 ? void 0 : _a.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeDataRows) ? 'No' : 'Yes'}`,
180
+ `Grouped Rows: ${((_d = (_c = styledColumn.BadgeStyle) === null || _c === void 0 ? void 0 : _c.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeGroupedRows) ? 'No' : 'Yes'}`,
181
+ `Summary Rows: ${((_f = (_e = styledColumn.BadgeStyle) === null || _e === void 0 ? void 0 : _e.RowScope) === null || _f === void 0 ? void 0 : _f.ExcludeSummaryRows) ? 'No' : 'Yes'}`,
180
182
  ],
181
183
  });
182
184
  }