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

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 (54) 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/FlashingCellApi.d.ts +2 -2
  8. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -2
  9. package/src/Api/Implementation/ScopeApiImpl.d.ts +26 -26
  10. package/src/Api/Internal/AlertInternalApi.d.ts +2 -2
  11. package/src/Api/Internal/FormatColumnInternalApi.d.ts +2 -2
  12. package/src/Api/Internal/FormatColumnInternalApi.js +18 -7
  13. package/src/Api/Internal/PredicateInternalApi.d.ts +6 -6
  14. package/src/Api/Internal/StyledColumnInternalApi.d.ts +2 -2
  15. package/src/Api/Internal/StyledColumnInternalApi.js +3 -4
  16. package/src/Api/ScopeApi.d.ts +26 -26
  17. package/src/PredefinedConfig/AlertState.d.ts +2 -2
  18. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +4 -4
  19. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
  20. package/src/PredefinedConfig/Common/{AdaptableScope.d.ts → ColumnScope.d.ts} +1 -1
  21. package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
  22. package/src/PredefinedConfig/Common/RowScope.js +1 -0
  23. package/src/PredefinedConfig/ExportState.d.ts +2 -2
  24. package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
  25. package/src/PredefinedConfig/FormatColumnState.d.ts +7 -8
  26. package/src/PredefinedConfig/PlusMinusState.d.ts +2 -2
  27. package/src/PredefinedConfig/ShortcutState.d.ts +2 -2
  28. package/src/PredefinedConfig/StyledColumnState.d.ts +5 -10
  29. package/src/Strategy/StyledColumnModule.js +4 -2
  30. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -3
  31. package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
  32. package/src/Utilities/ObjectFactory.js +1 -1
  33. package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +2 -2
  34. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -1
  35. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts +3 -3
  36. package/src/View/Components/EntityRulesEditor/index.d.ts +3 -3
  37. package/src/View/Components/NewScopeComponent.d.ts +5 -5
  38. package/src/View/Components/RangesComponent.d.ts +2 -2
  39. package/src/View/Components/SharedProps/WizardScopeState.d.ts +2 -2
  40. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +4 -1
  41. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
  42. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +24 -13
  43. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +32 -12
  44. package/src/agGrid/ActionColumnRenderer.js +41 -4
  45. package/src/agGrid/AgGridColumnAdapter.js +5 -4
  46. package/src/agGrid/BadgeRenderer.d.ts +2 -2
  47. package/src/agGrid/BadgeRenderer.js +21 -13
  48. package/src/agGrid/PercentBarRenderer.js +0 -1
  49. package/src/env.js +2 -2
  50. package/src/metamodel/adaptable.metamodel.d.ts +19 -26
  51. package/src/metamodel/adaptable.metamodel.js +1 -1
  52. package/src/types.d.ts +2 -1
  53. package/tsconfig.esm.tsbuildinfo +1 -1
  54. /package/src/PredefinedConfig/Common/{AdaptableScope.js → ColumnScope.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "18.0.0-canary.30",
3
+ "version": "18.0.0-canary.31",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,4 +1,5 @@
1
1
  import { IRowNode } from '@ag-grid-community/core';
2
+ import { RowScope } from "../PredefinedConfig/Common/RowScope";
2
3
  import { AdaptableButton, AdaptableObject, BaseContext } from '../types';
3
4
  /**
4
5
  * Options related to Action Columns in AdapTable
@@ -27,9 +28,9 @@ export interface ActionColumn<TData = any> extends AdaptableObject {
27
28
  */
28
29
  actionColumnButton: AdaptableButton<ActionColumnContext<TData>> | AdaptableButton<ActionColumnContext<TData>>[];
29
30
  /**
30
- * Shows Action Column also in grouped rows
31
+ * Which types of Rows should contain buttons (data, grouped, summary)
31
32
  */
32
- includeGroupedRows?: boolean;
33
+ rowScope?: RowScope;
33
34
  /**
34
35
  * Additional optional properties for Column (e.g. filterable, resizable)
35
36
  */
@@ -1,4 +1,4 @@
1
- import { AdaptableScope } from '../../types';
1
+ import { ColumnScope } from '../../types';
2
2
  import { AdaptableComparerFunction } from '../PredefinedConfig/Common/AdaptableComparerFunction';
3
3
  /**
4
4
  * Options for providing Custom Sorts comparers
@@ -16,7 +16,7 @@ export interface ColumnValuesComparer<TData = any> {
16
16
  /**
17
17
  * Column for which to compare values
18
18
  */
19
- scope: AdaptableScope;
19
+ scope: ColumnScope;
20
20
  /**
21
21
  * Comparer function to use
22
22
  */
@@ -1,4 +1,4 @@
1
- import { AdaptableScope } from '../PredefinedConfig/Common/AdaptableScope';
1
+ import { ColumnScope } from '../PredefinedConfig/Common/ColumnScope';
2
2
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { BaseContext } from '../../types';
4
4
  import { IRowNode } from '@ag-grid-community/core';
@@ -30,7 +30,7 @@ export interface CustomDisplayFormatter {
30
30
  /**
31
31
  * Where Custom Display Format can be applied
32
32
  */
33
- scope: AdaptableScope;
33
+ scope: ColumnScope;
34
34
  }
35
35
  /**
36
36
  * Context used in handler of CustomDisplayFormatter
@@ -1,4 +1,4 @@
1
- import { AdaptablePredicateDef, AdaptableScope, BaseContext, PredicateModuleScope, SystemAlertPredicateId, SystemAlertPredicateIds, SystemBadgeStylePredicateId, SystemBadgeStylePredicateIds, SystemFilterPredicateId, SystemFilterPredicateIds, SystemFlashingCellPredicateId, SystemFlashingCellPredicateIds, SystemFormatColumnPredicateId, SystemFormatColumnPredicateIds } from '../types';
1
+ import { AdaptablePredicateDef, ColumnScope, BaseContext, PredicateModuleScope, SystemAlertPredicateId, SystemAlertPredicateIds, SystemBadgeStylePredicateId, SystemBadgeStylePredicateIds, SystemFilterPredicateId, SystemFilterPredicateIds, SystemFlashingCellPredicateId, SystemFlashingCellPredicateIds, SystemFormatColumnPredicateId, SystemFormatColumnPredicateIds } from '../types';
2
2
  /**
3
3
  * Options for managing Adaptable Predicates using AdaptableQL
4
4
  */
@@ -51,5 +51,5 @@ export interface SystemPredicatesContext<PREDICATE_TYPE = string> extends BaseCo
51
51
  /**
52
52
  * Current Scope where Predicates are being used
53
53
  */
54
- columnScope: AdaptableScope;
54
+ columnScope: ColumnScope;
55
55
  }
@@ -1,6 +1,6 @@
1
1
  import { AdaptableIcon } from '../PredefinedConfig/Common/AdaptableIcon';
2
2
  import { DateInputOptions } from './DateInputOptions';
3
- import { AdaptableScope } from '../PredefinedConfig/Common/AdaptableScope';
3
+ import { ColumnScope } from '../PredefinedConfig/Common/ColumnScope';
4
4
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
5
5
  import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
6
6
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
@@ -136,7 +136,7 @@ export interface BasePermittedValues {
136
136
  /**
137
137
  * Scope where Values will appear (Mandatory property)
138
138
  */
139
- scope: AdaptableScope;
139
+ scope: ColumnScope;
140
140
  }
141
141
  /**
142
142
  * Permitted/possible values, when column values can be selected (e.g. sort, bulk-update)
@@ -1,6 +1,6 @@
1
1
  import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
2
2
  import { AdaptablePredicateDef } from '../PredefinedConfig/Common/AdaptablePredicate';
3
- import { AdaptableScope } from '../PredefinedConfig/Common/AdaptableScope';
3
+ import { ColumnScope } from '../PredefinedConfig/Common/ColumnScope';
4
4
  import { FlashingCellDefinition, FlashingCellState } from '../PredefinedConfig/FlashingCellState';
5
5
  import { AdaptableObjectLookupCriteria } from '../PredefinedConfig/Common/AdaptableObject';
6
6
  /**
@@ -83,7 +83,7 @@ export interface FlashingCellApi {
83
83
  * Retrieves all Predicate Defs that match given Scope
84
84
  * @param scope the Scope to check
85
85
  */
86
- getFlashingCellPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
86
+ getFlashingCellPredicateDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
87
87
  /**
88
88
  * Clears all Cells and Rows which have been flashed (primarily used if duration is 'Always')
89
89
  */
@@ -3,7 +3,7 @@ import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFl
3
3
  import { FlashingCellApi } from '../FlashingCellApi';
4
4
  import { FlashingCellDefinition, FlashingCellState } from '../../PredefinedConfig/FlashingCellState';
5
5
  import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
6
- import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
6
+ import { ColumnScope } from '../../PredefinedConfig/Common/ColumnScope';
7
7
  import { FlashingCellInternalApi } from '../Internal/FlashingCellInternalApi';
8
8
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
9
9
  import { AdaptableObjectLookupCriteria } from '../../types';
@@ -23,7 +23,7 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
23
23
  unSuspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
24
24
  addFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
25
25
  editFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
26
- getFlashingCellPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
26
+ getFlashingCellPredicateDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
27
27
  clearAllFlashingCells(): void;
28
28
  isAnyFlashingCellActive(): boolean;
29
29
  findFlashingCellDefinitions(criteria: AdaptableObjectLookupCriteria): FlashingCellDefinition[];
@@ -1,33 +1,33 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
- import { AdaptableScope, ScopeDataType } from '../../PredefinedConfig/Common/AdaptableScope';
3
+ import { ColumnScope, ScopeDataType } from '../../PredefinedConfig/Common/ColumnScope';
4
4
  import { ScopeApi } from '../ScopeApi';
5
5
  import { CellColorRange } from '../../PredefinedConfig/StyledColumnState';
6
6
  export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
7
- isColumnInScope(column: AdaptableColumn | undefined, scope: AdaptableScope | undefined): boolean;
8
- getColumnsForScope(scope: AdaptableScope): AdaptableColumn[];
9
- getScopeDescription(scope: AdaptableScope): string;
10
- scopeIsEmpty(scope: AdaptableScope): boolean;
11
- scopeIsAll(scope: AdaptableScope): boolean;
12
- scopeHasDataType(scope: AdaptableScope): boolean;
13
- scopeHasColumnType(scope: AdaptableScope): boolean;
14
- scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
15
- scopeHasColumns(scope: AdaptableScope): boolean;
16
- isSingleColumnScope(scope: AdaptableScope): boolean;
17
- getSingleColumnInScope(scope: AdaptableScope): string | undefined;
18
- isSingleNumericColumnScope(scope: AdaptableScope): boolean;
19
- isSingleBooleanColumnScope(scope: AdaptableScope): boolean;
20
- areAllBooleanColumnsInScope(scope: AdaptableScope): boolean;
21
- isColumnInScopeColumns(column: AdaptableColumn, scope: AdaptableScope): boolean;
22
- isPrimaryKeyColumnInScopeColumns(scope: AdaptableScope): boolean;
23
- getScopeToString(scope: AdaptableScope): string;
24
- getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
25
- getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
26
- getDataTypesInScope(scope: AdaptableScope): ScopeDataType[] | undefined;
27
- isColumnInNumericScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
28
- isColumnInStringsScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
29
- isColumnInDateScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
30
- isScopeInScope(a: AdaptableScope, b: AdaptableScope): boolean;
31
- createCellColorRangesForScope(scope: AdaptableScope): CellColorRange[];
7
+ isColumnInScope(column: AdaptableColumn | undefined, scope: ColumnScope | undefined): boolean;
8
+ getColumnsForScope(scope: ColumnScope): AdaptableColumn[];
9
+ getScopeDescription(scope: ColumnScope): string;
10
+ scopeIsEmpty(scope: ColumnScope): boolean;
11
+ scopeIsAll(scope: ColumnScope): boolean;
12
+ scopeHasDataType(scope: ColumnScope): boolean;
13
+ scopeHasColumnType(scope: ColumnScope): boolean;
14
+ scopeHasOnlyBooleanDataType(scope: ColumnScope): boolean;
15
+ scopeHasColumns(scope: ColumnScope): boolean;
16
+ isSingleColumnScope(scope: ColumnScope): boolean;
17
+ getSingleColumnInScope(scope: ColumnScope): string | undefined;
18
+ isSingleNumericColumnScope(scope: ColumnScope): boolean;
19
+ isSingleBooleanColumnScope(scope: ColumnScope): boolean;
20
+ areAllBooleanColumnsInScope(scope: ColumnScope): boolean;
21
+ isColumnInScopeColumns(column: AdaptableColumn, scope: ColumnScope): boolean;
22
+ isPrimaryKeyColumnInScopeColumns(scope: ColumnScope): boolean;
23
+ getScopeToString(scope: ColumnScope): string;
24
+ getColumnIdsInScope(scope: ColumnScope): string[] | undefined;
25
+ getColumnTypesInScope(scope: ColumnScope): string[] | undefined;
26
+ getDataTypesInScope(scope: ColumnScope): ScopeDataType[] | undefined;
27
+ isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;
28
+ isColumnInStringsScope(column: AdaptableColumn, scope: ColumnScope): boolean;
29
+ isColumnInDateScope(column: AdaptableColumn, scope: ColumnScope): boolean;
30
+ isScopeInScope(a: ColumnScope, b: ColumnScope): boolean;
31
+ createCellColorRangesForScope(scope: ColumnScope): CellColorRange[];
32
32
  private distinctColumnValuesAreEmpty;
33
33
  }
@@ -5,7 +5,7 @@ import { AlertFormContext } from '../../AdaptableOptions/AlertOptions';
5
5
  import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
6
6
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
7
7
  import { GridDataChangedInfo } from '../Events/GridDataChanged';
8
- import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
8
+ import { ColumnScope } from '../../PredefinedConfig/Common/ColumnScope';
9
9
  import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
10
10
  import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
11
11
  import { IRowNode } from '@ag-grid-community/core';
@@ -72,7 +72,7 @@ export declare class AlertInternalApi extends ApiBase {
72
72
  * Retrieves all Predicate Defs that match given Scope
73
73
  * @param scope the Scope to check
74
74
  */
75
- getAlertPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
75
+ getAlertPredicateDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
76
76
  /**
77
77
  * Returns a description of an Alert Definition
78
78
  * @param alertDefinition Alert Definition to use
@@ -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
  *
@@ -155,23 +155,34 @@ export class FormatColumnInternalApi extends ApiBase {
155
155
  * @param params
156
156
  */
157
157
  formatColumnShouldRender(formatColumn, column, rowNode, cellValue) {
158
- var _a, _b, _c;
158
+ var _a, _b, _c, _d, _e, _f;
159
159
  // suspended is important to be first
160
160
  if (formatColumn.IsSuspended) {
161
161
  return false;
162
162
  }
163
- if (!formatColumn.IncludeGroupedRows &&
164
- this.getAdaptableApi().gridApi.isGroupRowNode(rowNode)) {
165
- return false;
163
+ const isSummaryNode = (_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID];
164
+ const isGroupedRowNode = this.getAdaptableApi().gridApi.isGroupRowNode(rowNode);
165
+ // For Summary Rows cannot be excluded
166
+ if (isSummaryNode) {
167
+ if ((_b = formatColumn.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
168
+ return false;
169
+ }
166
170
  }
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;
171
+ else if (isGroupedRowNode) {
172
+ if ((_c = formatColumn.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeGroupedRows) {
173
+ return false;
174
+ }
175
+ }
176
+ else {
177
+ if ((_d = formatColumn.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeDataRows) {
178
+ return false;
179
+ }
169
180
  }
170
181
  if (!formatColumn.Rule) {
171
182
  return true;
172
183
  }
173
184
  // 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)) {
185
+ if (formatColumn.Rule.Predicates && ((_f = (_e = formatColumn.Rule) === null || _e === void 0 ? void 0 : _e.Predicates) === null || _f === void 0 ? void 0 : _f.length)) {
175
186
  const predicateDefHandlerContext = Object.assign({ value: cellValue, oldValue: null, displayValue: cellValue, node: rowNode, column: column }, this.getAdaptableApi().internalApi.buildBaseContext());
176
187
  return this.evaluatePredicate(formatColumn, predicateDefHandlerContext);
177
188
  } // then run the Expression
@@ -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
  }
@@ -1,5 +1,5 @@
1
1
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
2
- import { AdaptableScope, ScopeDataType } from '../PredefinedConfig/Common/AdaptableScope';
2
+ import { ColumnScope, ScopeDataType } from '../PredefinedConfig/Common/ColumnScope';
3
3
  import { CellColorRange } from '../PredefinedConfig/StyledColumnState';
4
4
  /**
5
5
  * Provides access to a suite of functions related to the `Scope` object
@@ -10,116 +10,116 @@ export interface ScopeApi {
10
10
  * @param column Column to check
11
11
  * @param scope The Scope to check
12
12
  */
13
- isColumnInScope(column: AdaptableColumn | undefined, scope: AdaptableScope): boolean;
13
+ isColumnInScope(column: AdaptableColumn | undefined, scope: ColumnScope): boolean;
14
14
  /**
15
15
  * Returns list of all Columns in the given Scope
16
16
  * @param scope the Scope to check
17
17
  */
18
- getColumnsForScope(scope: AdaptableScope): AdaptableColumn[];
18
+ getColumnsForScope(scope: ColumnScope): AdaptableColumn[];
19
19
  /**
20
20
  * True if Scope is empty
21
21
  * @param scope Scope to check
22
22
  */
23
- scopeIsEmpty(scope: AdaptableScope): boolean;
23
+ scopeIsEmpty(scope: ColumnScope): boolean;
24
24
  /**
25
25
  * True if Scope is 'All'
26
26
  * @param scope Scope to check
27
27
  */
28
- scopeIsAll(scope: AdaptableScope): boolean;
28
+ scopeIsAll(scope: ColumnScope): boolean;
29
29
  /**
30
30
  * True if Scope contains DataTypes
31
31
  * @param scope Scope to check
32
32
  */
33
- scopeHasDataType(scope: AdaptableScope): boolean;
33
+ scopeHasDataType(scope: ColumnScope): boolean;
34
34
  /**
35
35
  * True if Scope contains ColumnTypes
36
36
  * @param scope Scope to check
37
37
  */
38
- scopeHasColumnType(scope: AdaptableScope): boolean;
38
+ scopeHasColumnType(scope: ColumnScope): boolean;
39
39
  /**
40
40
  * True if the Scope is DataTypes and contains only Boolean
41
41
  * @param scope Scope to check
42
42
  */
43
- scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
43
+ scopeHasOnlyBooleanDataType(scope: ColumnScope): boolean;
44
44
  /**
45
45
  * True if Scope contains just 1 ColumnId
46
46
  * @param scope Scope to check
47
47
  */
48
- isSingleColumnScope(scope: AdaptableScope): boolean;
48
+ isSingleColumnScope(scope: ColumnScope): boolean;
49
49
  /**
50
50
  * Gets the only Column in given Scope
51
51
  * @param scope Scope to check
52
52
  */
53
- getSingleColumnInScope(scope: AdaptableScope): string | undefined;
53
+ getSingleColumnInScope(scope: ColumnScope): string | undefined;
54
54
  /**
55
55
  * True if Scope contains just 1 numeric Column
56
56
  * @param scope Scope to check
57
57
  */
58
- isSingleNumericColumnScope(scope: AdaptableScope): boolean;
58
+ isSingleNumericColumnScope(scope: ColumnScope): boolean;
59
59
  /**
60
60
  * True if Scope contains just 1 boolean Column
61
61
  * @param scope Scope to check
62
62
  */
63
- isSingleBooleanColumnScope(scope: AdaptableScope): boolean;
63
+ isSingleBooleanColumnScope(scope: ColumnScope): boolean;
64
64
  /**
65
65
  * True if all selected columns are boolean
66
66
  * @param scope Scope to check
67
67
  */
68
- areAllBooleanColumnsInScope(scope: AdaptableScope): boolean;
68
+ areAllBooleanColumnsInScope(scope: ColumnScope): boolean;
69
69
  /**
70
70
  * True if Scope contains ColumnIds
71
71
  * @param scope Scope to check
72
72
  */
73
- scopeHasColumns(scope: AdaptableScope): boolean;
73
+ scopeHasColumns(scope: ColumnScope): boolean;
74
74
  /**
75
75
  * Gets string representation of the Scope
76
76
  * @param scope Scope to check
77
77
  */
78
- getScopeToString(scope: AdaptableScope): string;
78
+ getScopeToString(scope: ColumnScope): string;
79
79
  /**
80
80
  * Whether PK column is included in Scope's column section
81
81
  * @param scope Scope to check
82
82
  */
83
- isPrimaryKeyColumnInScopeColumns(scope: AdaptableScope): boolean;
83
+ isPrimaryKeyColumnInScopeColumns(scope: ColumnScope): boolean;
84
84
  /**
85
85
  * True if Column is in Scope's 'ColumnIds' section
86
86
  * @param column Column to check
87
87
  * @param scope Scope to check
88
88
  */
89
- isColumnInScopeColumns(column: AdaptableColumn, scope: AdaptableScope): boolean;
89
+ isColumnInScopeColumns(column: AdaptableColumn, scope: ColumnScope): boolean;
90
90
  /**
91
91
  * Returns all the ColumnIds in the Scope
92
92
  * @param scope Scope to check
93
93
  */
94
- getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
94
+ getColumnIdsInScope(scope: ColumnScope): string[] | undefined;
95
95
  /**
96
96
  * Returns all the ColumnTypes in the Scope
97
97
  * @param scope Scope to check
98
98
  */
99
- getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
99
+ getColumnTypesInScope(scope: ColumnScope): string[] | undefined;
100
100
  /**
101
101
  * Returns all the DataTypes in the Scope
102
102
  * @param scope Scope to check
103
103
  */
104
- getDataTypesInScope(scope: AdaptableScope): ScopeDataType[] | undefined;
104
+ getDataTypesInScope(scope: ColumnScope): ScopeDataType[] | undefined;
105
105
  /**
106
106
  * True if Scope has Numeric DataType containing Column
107
107
  * @param column Column to check
108
108
  * @param scope Scope to check
109
109
  */
110
- isColumnInNumericScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
110
+ isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;
111
111
  /**
112
112
  * True if Scope has String DataType containing Column
113
113
  * @param column Column to check
114
114
  * @param scope Scope to check
115
115
  */
116
- isColumnInStringsScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
116
+ isColumnInStringsScope(column: AdaptableColumn, scope: ColumnScope): boolean;
117
117
  /**
118
118
  * True if Scope has Data DataType which contains Column
119
119
  * @param column Column to check
120
120
  * @param scope Scope to check
121
121
  */
122
- isColumnInDateScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
122
+ isColumnInDateScope(column: AdaptableColumn, scope: ColumnScope): boolean;
123
123
  /**
124
124
  * True if first scope is in second Scope
125
125
  *
@@ -135,15 +135,15 @@ export interface ScopeApi {
135
135
  * @param scopeA first Scope
136
136
  * @param scopeB second Scope
137
137
  */
138
- isScopeInScope(scopeA: AdaptableScope, scopeB: AdaptableScope): boolean;
138
+ isScopeInScope(scopeA: ColumnScope, scopeB: ColumnScope): boolean;
139
139
  /**
140
140
  * Provides a description for the Scope
141
141
  * @param scope The Scope to check
142
142
  */
143
- getScopeDescription(scope: AdaptableScope): string;
143
+ getScopeDescription(scope: ColumnScope): string;
144
144
  /**
145
145
  * Creates Cell Color Ranges (used in Format Column) for given Scope
146
146
  * @param scope Scope to use
147
147
  */
148
- createCellColorRangesForScope(scope: AdaptableScope): CellColorRange[];
148
+ createCellColorRangesForScope(scope: ColumnScope): CellColorRange[];
149
149
  }
@@ -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
  */