@adaptabletools/adaptable 20.2.11 → 20.3.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +4 -0
- package/agGrid.js +5 -1
- package/base.css +6 -6
- package/base.css.map +1 -1
- package/index.css +6 -6
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +3 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +1 -0
- package/src/AdaptableOptions/PredicateOptions.d.ts +2 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +5 -3
- package/src/AdaptableState/Common/AdaptableColumn.js +7 -0
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptableObject.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptablePredicate.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptablePredicate.js +32 -3
- package/src/AdaptableState/Common/ColumnScope.d.ts +1 -1
- package/src/AdaptableState/Common/CustomWindowConfig.d.ts +40 -0
- package/src/AdaptableState/Common/ProgressIndicatorConfig.d.ts +8 -1
- package/src/AdaptableState/Common/RowScope.d.ts +4 -0
- package/src/AdaptableState/FormatColumnState.d.ts +10 -0
- package/src/AdaptableState/StyledColumnState.d.ts +4 -0
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/GridApi.d.ts +8 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ColumnApiImpl.js +17 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +25 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +3 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +6 -0
- package/src/Api/Internal/ColumnInternalApi.d.ts +3 -1
- package/src/Api/Internal/ColumnInternalApi.js +7 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +13 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +33 -6
- package/src/Api/UserInterfaceApi.d.ts +16 -4
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +7 -3
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -0
- package/src/Strategy/StyledColumnModule.js +8 -3
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +6 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +1 -0
- package/src/Utilities/Helpers/FormatHelper.js +3 -0
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/Utilities/getScopeViewItems.js +1 -1
- package/src/View/Components/ColumnFilter/utils.js +9 -4
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -4
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +3 -4
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +16 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +67 -23
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +34 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +18 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +22 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +6 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +29 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +30 -3
- package/src/agGrid/AgGridAdapter.js +2 -6
- package/src/agGrid/AgGridColumnAdapter.d.ts +4 -1
- package/src/agGrid/AgGridColumnAdapter.js +111 -10
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +14 -2
- package/src/agGrid/cellRenderers/BadgeRenderer.js +27 -13
- package/src/components/ProgressIndicator/ProgressIndicator.js +18 -4
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +43 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -25,6 +25,12 @@ export interface FormatColumn extends SuspendableObject {
|
|
|
25
25
|
* Where Format will be applied: whole Row, some Columns, or Columns of DataType
|
|
26
26
|
*/
|
|
27
27
|
Scope: ColumnScope;
|
|
28
|
+
/**
|
|
29
|
+
* Which part of the Column to apply Format to: `cell`, `column header`
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue ['cell']
|
|
32
|
+
*/
|
|
33
|
+
Target?: FormatColumnTarget[];
|
|
28
34
|
/**
|
|
29
35
|
* Rule to decide whether to apply Format; if undefined Format is always applied
|
|
30
36
|
*/
|
|
@@ -51,6 +57,10 @@ export interface FormatColumn extends SuspendableObject {
|
|
|
51
57
|
*/
|
|
52
58
|
ColumnGroupScope?: ColumnGroupScope;
|
|
53
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Target for Format Column: Specifies which visual elements of the column receive formatting
|
|
62
|
+
*/
|
|
63
|
+
export type FormatColumnTarget = 'cell' | 'columnHeader';
|
|
54
64
|
/**
|
|
55
65
|
* Defines Column Group Scope
|
|
56
66
|
*/
|
|
@@ -178,6 +178,10 @@ export interface BadgeStyleDefinition {
|
|
|
178
178
|
* Position of Icon in the Badge - 'Start' or 'End'
|
|
179
179
|
*/
|
|
180
180
|
IconPosition?: 'Start' | 'End';
|
|
181
|
+
/**
|
|
182
|
+
* Only show an Icon and no Cell text
|
|
183
|
+
*/
|
|
184
|
+
IconOnly?: boolean;
|
|
181
185
|
}
|
|
182
186
|
/**
|
|
183
187
|
* Collection of Badge Style Definitions to display in a Badge Styled Column
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -323,4 +323,10 @@ export interface ColumnApi {
|
|
|
323
323
|
* @param columnId Column to use
|
|
324
324
|
*/
|
|
325
325
|
getAGGridColumnForColumnId(columnId: string): Column;
|
|
326
|
+
/**
|
|
327
|
+
* Checks if the Column with given Column Identifier (columnId or ColDef) has a specific Column Type
|
|
328
|
+
* @param columnIdentifier - ColumnId or ColDef to check
|
|
329
|
+
* @param columnType - Column Type to check for
|
|
330
|
+
*/
|
|
331
|
+
hasColumnType(columnIdentifier: string | ColDef, columnType: string): boolean;
|
|
326
332
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -382,9 +382,14 @@ export interface GridApi {
|
|
|
382
382
|
*/
|
|
383
383
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
384
384
|
/**
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
* Whether given Row Node is a Grand Total Row
|
|
386
|
+
* @param rowNode Node to check
|
|
387
|
+
*/
|
|
388
|
+
isGrandTotalRowNode(rowNode: IRowNode): boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Whether given Row Node is visible
|
|
391
|
+
* @param rowNode Node to check
|
|
392
|
+
*/
|
|
388
393
|
isVisibleRowNode(rowNode: IRowNode): boolean;
|
|
389
394
|
/**
|
|
390
395
|
* Whether given Row Node is in a Summary Row
|
|
@@ -78,10 +78,11 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
78
78
|
getPrimaryKeyColumn(): AdaptableColumn<any>;
|
|
79
79
|
getDefaultAggFunc(columnId: string): string;
|
|
80
80
|
openColumnInfoSettingsPanel(): void;
|
|
81
|
-
getColumnTypes(): string[];
|
|
81
|
+
getColumnTypes(): import("../../AdaptableState/Common/Types").TypeHint<string, import("../../types").AdaptableColumnType>[];
|
|
82
82
|
getColumnsByColumnType(columnType: string): AdaptableColumn[];
|
|
83
83
|
getRowGroupedColumns(): AdaptableColumn[];
|
|
84
84
|
setColumnCaption(columnId: string, caption: string): void;
|
|
85
85
|
getAGGridColDefForColumnId(columnId: string): ColDef | ColGroupDef;
|
|
86
86
|
getAGGridColumnForColumnId(columnId: string): Column;
|
|
87
|
+
hasColumnType(columnIdentifier: string | ColDef, columnType: string): boolean;
|
|
87
88
|
}
|
|
@@ -500,4 +500,21 @@ export class ColumnApiImpl extends ApiBase {
|
|
|
500
500
|
getAGGridColumnForColumnId(columnId) {
|
|
501
501
|
return this.getAgGridApi().getColumn(columnId);
|
|
502
502
|
}
|
|
503
|
+
hasColumnType(columnIdentifier, columnType) {
|
|
504
|
+
if (!columnIdentifier) {
|
|
505
|
+
return false;
|
|
506
|
+
}
|
|
507
|
+
const colDef = typeof columnIdentifier === 'string'
|
|
508
|
+
? this.getAgGridApi().getColumnDef(columnIdentifier)
|
|
509
|
+
: columnIdentifier;
|
|
510
|
+
if (!colDef?.type) {
|
|
511
|
+
return false;
|
|
512
|
+
}
|
|
513
|
+
if (Array.isArray(colDef.type)) {
|
|
514
|
+
return colDef.type.includes(columnType);
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
return colDef.type === columnType;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
503
520
|
}
|
|
@@ -99,6 +99,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
99
99
|
isMasterDetailGrid(): boolean;
|
|
100
100
|
isTreeDataGrid(): boolean;
|
|
101
101
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
102
|
+
isGrandTotalRowNode(rowNode: IRowNode): boolean;
|
|
102
103
|
isVisibleRowNode(rowNode: IRowNode): boolean;
|
|
103
104
|
isSummaryNode(rowNode: IRowNode): boolean;
|
|
104
105
|
isQuickFilterAvailable(): boolean;
|
|
@@ -382,6 +382,9 @@ export class GridApiImpl extends ApiBase {
|
|
|
382
382
|
isGroupRowNode(rowNode) {
|
|
383
383
|
return this._adaptable.isGroupRowNode(rowNode);
|
|
384
384
|
}
|
|
385
|
+
isGrandTotalRowNode(rowNode) {
|
|
386
|
+
return this._adaptable.isGrandTotalRowNode(rowNode);
|
|
387
|
+
}
|
|
385
388
|
isVisibleRowNode(rowNode) {
|
|
386
389
|
return this._adaptable.isRowNodeVisible(rowNode);
|
|
387
390
|
}
|
|
@@ -9,7 +9,7 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
|
9
9
|
getPredicateDefs(): AdaptablePredicateDef<string>[];
|
|
10
10
|
getSystemPredicateDefs(): AdaptablePredicateDef<string>[];
|
|
11
11
|
getSystemPredicateDefsByModuleScope<PREDICATE_TYPE extends string = string>(moduleScope: PredicateModuleScope): AdaptablePredicateDef<PREDICATE_TYPE>[];
|
|
12
|
-
getCustomPredicateDefs(): AdaptablePredicateDef
|
|
12
|
+
getCustomPredicateDefs(): AdaptablePredicateDef[];
|
|
13
13
|
getPredicateDefsByModuleScope(moduleScope: PredicateModuleScope): AdaptablePredicateDef[];
|
|
14
14
|
getPredicateDefById(predicateId: string): AdaptablePredicateDef;
|
|
15
15
|
getSystemPredicateDefById(predicateId: string): AdaptablePredicateDef;
|
|
@@ -18,7 +18,31 @@ export class PredicateApiImpl extends ApiBase {
|
|
|
18
18
|
return SystemPredicateDefs.filter((p) => p.moduleScope.includes(moduleScope));
|
|
19
19
|
}
|
|
20
20
|
getCustomPredicateDefs() {
|
|
21
|
-
|
|
21
|
+
const predicateDefsMap = new Map(this.getSystemPredicateDefs().map((p) => [p.id, p]));
|
|
22
|
+
const customPredicateDefs = this.getPredicateOptions().customPredicateDefs || [];
|
|
23
|
+
return customPredicateDefs
|
|
24
|
+
.map((p) => {
|
|
25
|
+
if ('extends' in p) {
|
|
26
|
+
const foundPredicateDef = predicateDefsMap.get(p.extends);
|
|
27
|
+
if (!foundPredicateDef) {
|
|
28
|
+
this.logWarn(`Custom predicate with ID '${p.id}' references a missing 'extends' target '${p.extends}'. No such system or custom predicate found.`);
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const { extends: _, ...rest } = p;
|
|
33
|
+
const result = {
|
|
34
|
+
...foundPredicateDef,
|
|
35
|
+
...rest,
|
|
36
|
+
id: rest.id,
|
|
37
|
+
};
|
|
38
|
+
predicateDefsMap.set(result.id, result);
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
predicateDefsMap.set(p.id, p);
|
|
43
|
+
return p;
|
|
44
|
+
})
|
|
45
|
+
.filter((p) => p !== null);
|
|
22
46
|
}
|
|
23
47
|
getPredicateDefsByModuleScope(moduleScope) {
|
|
24
48
|
return this.getPredicateDefs().filter((p) => p.moduleScope.includes(moduleScope));
|
|
@@ -17,7 +17,9 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
17
17
|
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
18
18
|
getAdaptableObjectsWithTag(tag: AdaptableObjectTag, adaptableModule?: AdaptableModule): AdaptableObject[] | undefined;
|
|
19
19
|
getCustomIconDefinition(iconName: string): import("../../types").AdaptableIcon | import("../../types").CustomIcon;
|
|
20
|
-
showProgressIndicator(config: ProgressIndicatorConfig):
|
|
20
|
+
showProgressIndicator(config: ProgressIndicatorConfig): {
|
|
21
|
+
close: () => void;
|
|
22
|
+
};
|
|
21
23
|
hideProgressIndicator(): void;
|
|
22
24
|
openCustomWindowPopup(config: CustomWindowConfig): {
|
|
23
25
|
close: () => void;
|
|
@@ -83,6 +83,9 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
83
83
|
return customIcon;
|
|
84
84
|
}
|
|
85
85
|
showProgressIndicator(config) {
|
|
86
|
+
const close = () => {
|
|
87
|
+
this.hideProgressIndicator();
|
|
88
|
+
};
|
|
86
89
|
if (config.delay) {
|
|
87
90
|
this.showProgressIndicatorTimeout = setTimeout(() => {
|
|
88
91
|
this.dispatchAction(ProgressIndicatorShow(config));
|
|
@@ -91,6 +94,7 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
91
94
|
else {
|
|
92
95
|
this.dispatchAction(ProgressIndicatorShow(config));
|
|
93
96
|
}
|
|
97
|
+
return { close };
|
|
94
98
|
}
|
|
95
99
|
hideProgressIndicator() {
|
|
96
100
|
if (this.showProgressIndicatorTimeout) {
|
|
@@ -111,6 +115,8 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
111
115
|
render: config.render,
|
|
112
116
|
frameworkComponent: config.frameworkComponent,
|
|
113
117
|
onFrameworkComponentDestroyed: config.onFrameworkComponentDestroyed,
|
|
118
|
+
size: config.size,
|
|
119
|
+
position: config.position,
|
|
114
120
|
},
|
|
115
121
|
Icon: config.icon,
|
|
116
122
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
-
import { Column, HeaderValueGetterParams, IRowNode } from 'ag-grid-enterprise';
|
|
2
|
+
import { ColDef, Column, HeaderValueGetterParams, IRowNode } from 'ag-grid-enterprise';
|
|
3
3
|
import { CustomSort } from '../../AdaptableState/CustomSortState';
|
|
4
4
|
import { ColumnValuesComparer } from '../../AdaptableOptions/CustomSortOptions';
|
|
5
5
|
import { AdaptableColumn } from '../../types';
|
|
@@ -33,5 +33,7 @@ export declare class ColumnInternalApi extends ApiBase {
|
|
|
33
33
|
isSpecialColumn(columnId: string, column?: AdaptableColumn): boolean;
|
|
34
34
|
getColumnHeaderName(params: HeaderValueGetterParams): string;
|
|
35
35
|
private buildColumnHeaderContext;
|
|
36
|
+
hasArrayDataType(column: AdaptableColumn): boolean;
|
|
36
37
|
getQueryableColumnsForUIEditor(): AdaptableColumn[];
|
|
38
|
+
isAlwaysHiddenColumn(columnIdentifier: string | ColDef): boolean;
|
|
37
39
|
}
|
|
@@ -6,6 +6,7 @@ import { isPivotGrandTotal, isPivotResultColumn } from '../Implementation/Column
|
|
|
6
6
|
import { destructurePivotColumnId } from '../../layout-manager/src/destructurePivotColumnId';
|
|
7
7
|
import { isPivotColumnTotal } from '../../layout-manager/src/isPivotColumnTotal';
|
|
8
8
|
import { isPivotAggTotalColumn } from '../../layout-manager/src/isPivotAggTotalColumn';
|
|
9
|
+
import { HIDDEN_COLUMN_TYPE } from '../../AdaptableState/Common/AdaptableColumn';
|
|
9
10
|
export function getAutoRowGroupColumnIdFor(columnId) {
|
|
10
11
|
return `${AG_GRID_GROUPED_COLUMN}-${columnId}`;
|
|
11
12
|
}
|
|
@@ -282,9 +283,15 @@ export class ColumnInternalApi extends ApiBase {
|
|
|
282
283
|
// if nothing matched, we skip this column[group]
|
|
283
284
|
return 'skip';
|
|
284
285
|
}
|
|
286
|
+
hasArrayDataType(column) {
|
|
287
|
+
return ['textArray', 'numberArray', 'tupleArray', 'objectArray'].includes(column.dataType);
|
|
288
|
+
}
|
|
285
289
|
getQueryableColumnsForUIEditor() {
|
|
286
290
|
return this.getColumnApi()
|
|
287
291
|
.getQueryableColumns()
|
|
288
292
|
.filter((column) => !column.isGeneratedPivotResultColumn && !column.isGeneratedRowGroupColumn);
|
|
289
293
|
}
|
|
294
|
+
isAlwaysHiddenColumn(columnIdentifier) {
|
|
295
|
+
return this.getColumnApi().hasColumnType(columnIdentifier, HIDDEN_COLUMN_TYPE);
|
|
296
|
+
}
|
|
290
297
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
-
import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, StringFormatterOptions } from '../../types';
|
|
2
|
+
import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, FormatColumnTarget, StringFormatterOptions } from '../../types';
|
|
3
3
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
4
4
|
export declare class FormatColumnInternalApi extends ApiBase {
|
|
5
5
|
/**
|
|
@@ -28,7 +28,8 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
28
28
|
* @param config
|
|
29
29
|
* @returns list of FormatColumn
|
|
30
30
|
*/
|
|
31
|
-
getFormatColumnsWithStyleForColumn(column: AdaptableColumn, config
|
|
31
|
+
getFormatColumnsWithStyleForColumn(column: AdaptableColumn, config: {
|
|
32
|
+
target: FormatColumnTarget;
|
|
32
33
|
includeSuspended?: boolean;
|
|
33
34
|
}): FormatColumn[];
|
|
34
35
|
/**
|
|
@@ -36,8 +37,9 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
36
37
|
* @param column The Column for which to retrieve the Format Column
|
|
37
38
|
* @returns format columns
|
|
38
39
|
*/
|
|
39
|
-
getFormatColumnWithStyleClassNameForColumn(column: AdaptableColumn, config
|
|
40
|
+
getFormatColumnWithStyleClassNameForColumn(column: AdaptableColumn, config: {
|
|
40
41
|
includeSuspended?: boolean;
|
|
42
|
+
target: FormatColumnTarget;
|
|
41
43
|
}): FormatColumn[];
|
|
42
44
|
getFormatColumnWithColumnInScope(formatColumns: FormatColumn[], column: AdaptableColumn): FormatColumn[];
|
|
43
45
|
private getFormatColumnInColumnScope;
|
|
@@ -85,7 +87,14 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
85
87
|
* @param column
|
|
86
88
|
* @param params
|
|
87
89
|
*/
|
|
88
|
-
|
|
90
|
+
formatColumnShouldRenderInCell(formatColumn: FormatColumn, column: AdaptableColumn, rowNode: IRowNode, cellValue: any): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Checks if format column is relevant for a given Column Header
|
|
93
|
+
*
|
|
94
|
+
* @param formatColumn
|
|
95
|
+
* @param column
|
|
96
|
+
*/
|
|
97
|
+
formatColumnShouldRenderInHeader(formatColumn: FormatColumn, column: AdaptableColumn): boolean;
|
|
89
98
|
private evaluatePredicate;
|
|
90
99
|
private evaluateExpression;
|
|
91
100
|
/**
|
|
@@ -75,7 +75,13 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
75
75
|
* @returns list of FormatColumn
|
|
76
76
|
*/
|
|
77
77
|
getFormatColumnsWithStyleForColumn(column, config) {
|
|
78
|
-
const formatColumns = this.getAllFormatColumnWithStyleAndCellAlignment()
|
|
78
|
+
const formatColumns = this.getAllFormatColumnWithStyleAndCellAlignment()
|
|
79
|
+
.filter((formatColumn) => {
|
|
80
|
+
// FormatColumn default target is 'cell', so if no target is specified, we assume 'cell'
|
|
81
|
+
const fcTarget = formatColumn.Target ?? ['cell'];
|
|
82
|
+
return fcTarget.includes(config.target);
|
|
83
|
+
})
|
|
84
|
+
.filter((formatColumn) => config?.includeSuspended || !formatColumn.IsSuspended);
|
|
79
85
|
return this.getFormatColumnWithColumnInScope(formatColumns, column);
|
|
80
86
|
}
|
|
81
87
|
/**
|
|
@@ -210,15 +216,20 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
210
216
|
* @param column
|
|
211
217
|
* @param params
|
|
212
218
|
*/
|
|
213
|
-
|
|
219
|
+
formatColumnShouldRenderInCell(formatColumn, column, rowNode, cellValue) {
|
|
214
220
|
// suspended is important to be first
|
|
215
221
|
if (formatColumn.IsSuspended) {
|
|
216
222
|
return false;
|
|
217
223
|
}
|
|
218
224
|
const isSummaryNode = this.getGridApi().isSummaryNode(rowNode);
|
|
219
225
|
const isGroupedRowNode = this.getGridApi().isGroupRowNode(rowNode);
|
|
220
|
-
|
|
221
|
-
if (
|
|
226
|
+
const isGrandTotalRowNode = this.getGridApi().isGrandTotalRowNode(rowNode);
|
|
227
|
+
if (isGrandTotalRowNode) {
|
|
228
|
+
if (formatColumn.RowScope?.ExcludeTotalRows) {
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else if (isSummaryNode) {
|
|
222
233
|
if (formatColumn.RowScope?.ExcludeSummaryRows) {
|
|
223
234
|
return false;
|
|
224
235
|
}
|
|
@@ -258,6 +269,22 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
258
269
|
// nothing has passed then return false
|
|
259
270
|
return false;
|
|
260
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* Checks if format column is relevant for a given Column Header
|
|
274
|
+
*
|
|
275
|
+
* @param formatColumn
|
|
276
|
+
* @param column
|
|
277
|
+
*/
|
|
278
|
+
formatColumnShouldRenderInHeader(formatColumn, column) {
|
|
279
|
+
if (formatColumn.IsSuspended) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
if (formatColumn.ColumnGroupScope &&
|
|
283
|
+
!this.getFormatColumnApi().internalApi.formatColumnWithColumnGroupScopeShouldRender(formatColumn, column)) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
261
288
|
evaluatePredicate(formatColumn, predicateDefHandlerContext) {
|
|
262
289
|
return this.getPredicateApi().handleColumnPredicates(formatColumn.Rule?.Predicates, predicateDefHandlerContext, false);
|
|
263
290
|
}
|
|
@@ -282,7 +309,7 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
282
309
|
* @param params
|
|
283
310
|
*/
|
|
284
311
|
getFormatColumnsRelevantForColumn(formatColumns, column, params) {
|
|
285
|
-
return formatColumns.filter((formatColumn) => this.
|
|
312
|
+
return formatColumns.filter((formatColumn) => this.formatColumnShouldRenderInCell(formatColumn, column, params.node, params.value));
|
|
286
313
|
}
|
|
287
314
|
/**
|
|
288
315
|
* Extract from the given FormatColumns the one which is the most relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
@@ -292,7 +319,7 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
292
319
|
* @param params
|
|
293
320
|
*/
|
|
294
321
|
getMostRelevantFormatColumnForColumn(formatColumns, column, params) {
|
|
295
|
-
return formatColumns.find((formatColumn) => this.
|
|
322
|
+
return formatColumns.find((formatColumn) => this.formatColumnShouldRenderInCell(formatColumn, column, params.node, params.value));
|
|
296
323
|
}
|
|
297
324
|
/**
|
|
298
325
|
* Retrieves all Format Columns which have an Expression
|
|
@@ -46,17 +46,29 @@ export interface UserInterfaceApi {
|
|
|
46
46
|
* Displays a progress indicator
|
|
47
47
|
* @param config.progressText - text to display in the progress indicator
|
|
48
48
|
* @param config.render - render function for a custom progress indicator (if not using a framework component)
|
|
49
|
-
* @param config.frameworkComponent - the framework (React/Angular) component to render as progress indicator
|
|
49
|
+
* @param config.frameworkComponent - the framework (React/Angular/Vue) component to render as progress indicator
|
|
50
|
+
* @param config.renderMode - how to render the custom component ('content' or 'dialog'). Applies to both render and frameworkComponent.
|
|
50
51
|
* @param config.delay - delay before showing the progress indicator (in milliseconds)
|
|
52
|
+
* @returns An object with a close method to close the window
|
|
51
53
|
*/
|
|
52
|
-
showProgressIndicator(config: ProgressIndicatorConfig):
|
|
54
|
+
showProgressIndicator(config: ProgressIndicatorConfig): {
|
|
55
|
+
close: () => void;
|
|
56
|
+
};
|
|
53
57
|
/**
|
|
54
58
|
* Hides the progress indicator
|
|
55
59
|
*/
|
|
56
60
|
hideProgressIndicator(): void;
|
|
57
61
|
/**
|
|
58
|
-
* Opens
|
|
59
|
-
* @param config
|
|
62
|
+
* Opens a custom window popup
|
|
63
|
+
* @param config - The configuration for the custom window
|
|
64
|
+
* @param config.id - Unique identifier for the custom window
|
|
65
|
+
* @param config.title - Title of the custom window
|
|
66
|
+
* @param config.icon - Icon to display in the custom window heading
|
|
67
|
+
* @param config.render - Render function to display custom content in the window (if not using a framework component)
|
|
68
|
+
* @param config.frameworkComponent - A React, Angular or Vue Framework component to use for the custom window content
|
|
69
|
+
* @param config.onFrameworkComponentDestroyed - Callback function to be called when the framework component is destroyed
|
|
70
|
+
* @param config.renderMode - How to render the custom component ('content' or 'dialog'). Applies to both render and frameworkComponent.
|
|
71
|
+
* @returns An object with a close method to close the window
|
|
60
72
|
*/
|
|
61
73
|
openCustomWindowPopup(config: CustomWindowConfig): {
|
|
62
74
|
close: () => void;
|
|
@@ -169,12 +169,16 @@ export declare const getColumnFilterSelector: (state: AdaptableState, columnId:
|
|
|
169
169
|
PredicatesOperator?: import("../../types").PredicatesOperator;
|
|
170
170
|
IsSuspended?: boolean;
|
|
171
171
|
Uuid?: string;
|
|
172
|
+
/**
|
|
173
|
+
* @ReduxAction Layout Module is ready
|
|
174
|
+
*/
|
|
172
175
|
Source?: "InitialState" | "User";
|
|
176
|
+
/**
|
|
177
|
+
* @ReduxAction A Layout has been edited
|
|
178
|
+
*/
|
|
173
179
|
AdaptableVersion?: `${string}.${string}.${string}`;
|
|
174
180
|
IsReadOnly?: boolean;
|
|
175
181
|
Tags?: string[];
|
|
176
|
-
Metadata?: any;
|
|
177
|
-
* @ReduxAction A Column Filter has been edited
|
|
178
|
-
*/
|
|
182
|
+
Metadata?: any;
|
|
179
183
|
};
|
|
180
184
|
export declare const LayoutReducer: Redux.Reducer<LayoutState>;
|
|
@@ -318,6 +318,7 @@ export const PopupReducer = (state = initialState, action) => {
|
|
|
318
318
|
text: actionTypedAdd.progressIndicatorConfig.text,
|
|
319
319
|
render: actionTypedAdd.progressIndicatorConfig.render,
|
|
320
320
|
frameworkComponent: actionTypedAdd.progressIndicatorConfig.frameworkComponent,
|
|
321
|
+
renderMode: actionTypedAdd.progressIndicatorConfig.renderMode,
|
|
321
322
|
},
|
|
322
323
|
};
|
|
323
324
|
return Object.assign({}, state, updatedState);
|
|
@@ -6,6 +6,7 @@ import { renderStyledColumnStyleSummary } from '../View/StyledColumn/Wizard/Styl
|
|
|
6
6
|
import ObjectFactory from '../Utilities/ObjectFactory';
|
|
7
7
|
import { StyledColumnBadgePreview } from '../View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview';
|
|
8
8
|
import { getObjectTagsViewItems } from '../Utilities/getObjectTagsViewItems';
|
|
9
|
+
import { StyledColumnBadgeSettings } from '../View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings';
|
|
9
10
|
export class StyledColumnModule extends AdaptableModuleBase {
|
|
10
11
|
constructor(api) {
|
|
11
12
|
super(ModuleConstants.StyledColumnModuleId, ModuleConstants.StyledColumnFriendlyName, 'brush', 'StyledColumnPopup', // to change
|
|
@@ -143,9 +144,8 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
143
144
|
returnColumnMenuItems.push(...[newGrandientButton, newPercentBarButton, newBadgeButton]);
|
|
144
145
|
break;
|
|
145
146
|
case 'text':
|
|
146
|
-
returnColumnMenuItems.push(newBadgeButton);
|
|
147
|
-
break;
|
|
148
147
|
case 'textArray':
|
|
148
|
+
case 'numberArray':
|
|
149
149
|
returnColumnMenuItems.push(newBadgeButton);
|
|
150
150
|
break;
|
|
151
151
|
}
|
|
@@ -188,15 +188,20 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
188
188
|
}
|
|
189
189
|
if (styledColumn.BadgeStyle) {
|
|
190
190
|
specificTypeItems.push({
|
|
191
|
-
name: '
|
|
191
|
+
name: 'Rows',
|
|
192
192
|
values: [
|
|
193
193
|
`Data Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeDataRows ? 'No' : 'Yes'}`,
|
|
194
194
|
`Group Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeGroupRows ? 'No' : 'Yes'}`,
|
|
195
195
|
`Summary Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeSummaryRows ? 'No' : 'Yes'}`,
|
|
196
|
+
`Total Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeTotalRows ? 'No' : 'Yes'}`,
|
|
196
197
|
],
|
|
197
198
|
});
|
|
198
199
|
}
|
|
199
200
|
if (styledColumn.BadgeStyle) {
|
|
201
|
+
specificTypeItems.push({
|
|
202
|
+
name: 'Settings',
|
|
203
|
+
view: StyledColumnBadgeSettings,
|
|
204
|
+
});
|
|
200
205
|
specificTypeItems.push({
|
|
201
206
|
name: 'Preview',
|
|
202
207
|
view: StyledColumnBadgePreview,
|
|
@@ -13,6 +13,12 @@ export const getFormatColumnSettingsViewItems = (formatColumn) => {
|
|
|
13
13
|
if (formatColumn.RowScope.ExcludeSummaryRows) {
|
|
14
14
|
values.push('Exclude Summary Rows');
|
|
15
15
|
}
|
|
16
|
+
if (formatColumn.RowScope.ExcludeTotalRows) {
|
|
17
|
+
values.push('Exclude Total Rows');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (formatColumn.ColumnGroupScope) {
|
|
21
|
+
values.push(`Column Groups: ${formatColumn.ColumnGroupScope === 'Both' ? 'Always' : formatColumn.ColumnGroupScope}`);
|
|
16
22
|
}
|
|
17
23
|
return {
|
|
18
24
|
name: 'Settings',
|
|
@@ -26,6 +26,7 @@ export declare const AG_GRID_SELECTION_COLUMN: string;
|
|
|
26
26
|
export declare const AG_GRID_PIVOT_COLUMN: string;
|
|
27
27
|
export declare const AG_GRID_PIVOT_GRAND_TOTAL_COLUMN: string;
|
|
28
28
|
export declare const AG_GRID_CHART_WINDOW = "AG Grid Window";
|
|
29
|
+
export declare const AG_GRID_GRAND_TOTAL_ROW_ID = "rowGroupFooter_ROOT_NODE_ID";
|
|
29
30
|
export declare const ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = "(FDC3ActionColumn)";
|
|
30
31
|
export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
|
|
31
32
|
export declare const DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME = "dd-MM-yyyy HH:mm:ss";
|
|
@@ -26,6 +26,7 @@ export const AG_GRID_SELECTION_COLUMN = 'ag-Grid-SelectionColumn';
|
|
|
26
26
|
export const AG_GRID_PIVOT_COLUMN = 'pivot_';
|
|
27
27
|
export const AG_GRID_PIVOT_GRAND_TOTAL_COLUMN = 'PivotRowTotal_pivot_';
|
|
28
28
|
export const AG_GRID_CHART_WINDOW = 'AG Grid Window';
|
|
29
|
+
export const AG_GRID_GRAND_TOTAL_ROW_ID = 'rowGroupFooter_ROOT_NODE_ID';
|
|
29
30
|
export const ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = '(FDC3ActionColumn)';
|
|
30
31
|
// FIXME AFL - load this from DateInputOptions
|
|
31
32
|
export const DEFAULT_DATE_FORMAT_PATTERN = 'dd-MM-yyyy';
|
|
@@ -60,6 +60,9 @@ export function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
60
60
|
if (options.Floor) {
|
|
61
61
|
n = Math.floor(n);
|
|
62
62
|
}
|
|
63
|
+
if (options.Empty) {
|
|
64
|
+
return ' ';
|
|
65
|
+
}
|
|
63
66
|
let s;
|
|
64
67
|
let digitsToUse;
|
|
65
68
|
if (options.Truncate || options.Ceiling || options.Round || options.Floor) {
|
|
@@ -103,7 +103,7 @@ export class ModuleService {
|
|
|
103
103
|
case 'ColumnFilter':
|
|
104
104
|
return learnUrl + 'handbook-column-filter';
|
|
105
105
|
case 'ColumnInfo':
|
|
106
|
-
return learnUrl + 'dev-guide-
|
|
106
|
+
return learnUrl + 'dev-guide-column-grid-column-info';
|
|
107
107
|
case 'Comment':
|
|
108
108
|
return learnUrl + 'handbook-comments';
|
|
109
109
|
case 'CustomSort':
|
|
@@ -129,7 +129,7 @@ export class ModuleService {
|
|
|
129
129
|
case 'GridFilter':
|
|
130
130
|
return learnUrl + 'handbook-grid-filter';
|
|
131
131
|
case 'GridInfo':
|
|
132
|
-
return learnUrl + 'dev-guide-
|
|
132
|
+
return learnUrl + 'dev-guide-column-grid-column-info';
|
|
133
133
|
case 'Layout':
|
|
134
134
|
return learnUrl + 'handbook-layouts';
|
|
135
135
|
case 'NamedQuery':
|
|
@@ -14,10 +14,15 @@ dataType) => {
|
|
|
14
14
|
const inputs = (adaptablePredicateDef?.inputs ?? [])?.map((input) => {
|
|
15
15
|
return input.type;
|
|
16
16
|
});
|
|
17
|
-
if (
|
|
18
|
-
['text', 'number', 'date'].includes(dataType)) {
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
if (adaptablePredicateDef.id === 'In' || adaptablePredicateDef.id === 'NotIn') {
|
|
18
|
+
if (['text', 'number', 'date'].includes(dataType)) {
|
|
19
|
+
// add array type
|
|
20
|
+
inputs.push(`${dataType}[]`);
|
|
21
|
+
}
|
|
22
|
+
if (['text[]', 'number[]'].includes(dataType)) {
|
|
23
|
+
// add array type
|
|
24
|
+
inputs.push(dataType);
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
const qlPredicateDef = {
|
|
23
28
|
operator: adaptablePredicateDef.id,
|
|
@@ -53,8 +53,7 @@ export const AdaptablePopupConfirmation = (props) => {
|
|
|
53
53
|
props.showInputBox && (React.createElement(Box, { padding: 2, "data-name": "body" },
|
|
54
54
|
React.createElement("p", null, "Please enter a comment to confirm"),
|
|
55
55
|
React.createElement(Input, { marginTop: 2, width: '100%', value: promptText, type: "string", placeholder: "Enter text", onChange: (e) => changeContent(e) }))),
|
|
56
|
-
React.createElement(Flex, { marginTop: 3, padding: 2, "data-name": "footer" },
|
|
57
|
-
React.createElement(SimpleButton, {
|
|
58
|
-
React.createElement("
|
|
59
|
-
props.cancelButtonText != null ? (React.createElement(SimpleButton, { "data-name": "cancel", tone: "neutral", variant: "raised", onClick: () => onCancelForm() }, props.cancelButtonText)) : null)))));
|
|
56
|
+
React.createElement(Flex, { marginTop: 3, padding: 2, "data-name": "footer", justifyContent: "space-between" },
|
|
57
|
+
props.cancelButtonText != null ? (React.createElement(SimpleButton, { "data-name": "cancel", tone: "neutral", variant: "raised", onClick: () => onCancelForm() }, props.cancelButtonText)) : (React.createElement("div", null)),
|
|
58
|
+
React.createElement(SimpleButton, { tone: "error", "data-name": "delete", variant: "raised", disabled: !canConfirm(), onClick: () => onConfirmmForm() }, props.confirmButtonText))))));
|
|
60
59
|
};
|
|
@@ -36,8 +36,7 @@ export const AdaptablePopupPrompt = (props) => {
|
|
|
36
36
|
})))),
|
|
37
37
|
React.createElement(Input, { autoFocus: true, marginTop: 3, mx: 3, value: promptText, type: "string", placeholder: "Enter text", onChange: (e) => changeContent(e) }),
|
|
38
38
|
React.createElement(Box, { marginTop: 3 },
|
|
39
|
-
React.createElement(Flex, { padding: 2 },
|
|
40
|
-
React.createElement(SimpleButton, { tone: "
|
|
41
|
-
React.createElement("
|
|
42
|
-
React.createElement(SimpleButton, { tone: "neutral", variant: "raised", onClick: () => onCloseForm(), "data-name": "cancel" }, "Cancel"))))));
|
|
39
|
+
React.createElement(Flex, { padding: 2, "data-name": "footer", justifyContent: "space-between" },
|
|
40
|
+
React.createElement(SimpleButton, { tone: "neutral", variant: "raised", onClick: () => onCloseForm(), "data-name": "cancel" }, "Cancel"),
|
|
41
|
+
React.createElement(SimpleButton, { tone: "accent", "data-name": "ok", variant: "raised", disabled: StringExtensions.IsNullOrEmpty(promptText), onClick: () => onConfirmForm() }, "OK"))))));
|
|
43
42
|
};
|
|
@@ -31,11 +31,7 @@ export const WindowPopups = () => {
|
|
|
31
31
|
let componentNode = null;
|
|
32
32
|
if (!Component &&
|
|
33
33
|
(windowItem.PopupProps.render || windowItem.PopupProps.frameworkComponent)) {
|
|
34
|
-
componentNode = (React.createElement(ExternalRenderer
|
|
35
|
-
// TODO AFL: add configurable width&height for custom popups
|
|
36
|
-
, {
|
|
37
|
-
// TODO AFL: add configurable width&height for custom popups
|
|
38
|
-
style: { height: '100%' }, render: windowItem.PopupProps.render, frameworkComponent: windowItem.PopupProps.frameworkComponent, onDestroy: windowItem.PopupProps.onFrameworkComponentDestroyed }));
|
|
34
|
+
componentNode = (React.createElement(ExternalRenderer, { style: { height: '100%' }, render: windowItem.PopupProps.render, frameworkComponent: windowItem.PopupProps.frameworkComponent, onDestroy: windowItem.PopupProps.onFrameworkComponentDestroyed }));
|
|
39
35
|
}
|
|
40
36
|
else {
|
|
41
37
|
Component = Component ?? NoopComponent;
|
|
@@ -97,6 +97,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, adaptableContainerId, agGr
|
|
|
97
97
|
rowScope: {
|
|
98
98
|
ExcludeGroupRows: true,
|
|
99
99
|
ExcludeSummaryRows: true,
|
|
100
|
+
ExcludeTotalRows: true,
|
|
100
101
|
},
|
|
101
102
|
actionColumnSettings: { suppressMenu: true, suppressMovable: true },
|
|
102
103
|
actionColumnButton,
|
|
@@ -28,7 +28,7 @@ export const renderReportColumnsSummary = (report) => {
|
|
|
28
28
|
};
|
|
29
29
|
export const ReportColumnsWizardSection = (props) => {
|
|
30
30
|
const { api, data } = useOnePageAdaptableWizardContext();
|
|
31
|
-
return (React.createElement(Flex, { flexDirection: "column", style: { height: '100%' }
|
|
31
|
+
return (React.createElement(Flex, { flexDirection: "column", style: { height: '100%' } },
|
|
32
32
|
React.createElement(Tabs, { m: 2, value: data.ReportColumnScope, onValueChange: (ReportColumnScope) => {
|
|
33
33
|
const report = {
|
|
34
34
|
...data,
|