@adaptabletools/adaptable-cjs 20.0.0-canary.4 → 20.0.0-canary.6
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/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +1 -0
- package/src/AdaptableOptions/EditOptions.d.ts +13 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
- package/src/Api/Fdc3Api.d.ts +5 -3
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutHelpers.js +8 -27
- package/src/Api/Implementation/ThemeApiImpl.js +3 -1
- package/src/Api/Internal/RowFormInternalApi.js +1 -1
- package/src/Api/ThemeApi.d.ts +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +0 -16
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +2 -2
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +12 -1
- package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
- package/src/Utilities/Services/Fdc3Service.js +7 -2
- package/src/Utilities/Services/ThemeService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +14 -73
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +2 -6
- package/src/agGrid/AgGridColumnAdapter.js +0 -7
- package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
- package/src/agGrid/AgGridThemeAdapter.js +126 -0
- package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +16 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade20.js +49 -5
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "20.0.0-canary.
|
|
3
|
+
"version": "20.0.0-canary.6",
|
|
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",
|
|
@@ -31,6 +31,7 @@ import { AgGridMenuAdapter } from '../agGrid/AgGridMenuAdapter';
|
|
|
31
31
|
import { RowFormService } from '../Utilities/Services/RowFormService';
|
|
32
32
|
import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
|
|
33
33
|
import { AgGridExportAdapter } from '../agGrid/AgGridExportAdapter';
|
|
34
|
+
import { AgGridThemeAdapter } from '../agGrid/AgGridThemeAdapter';
|
|
34
35
|
/**
|
|
35
36
|
* Contains AG Grid Options and Modules - used when instantiating AdapTable vanilla
|
|
36
37
|
*/
|
|
@@ -66,6 +67,7 @@ export interface IAdaptable {
|
|
|
66
67
|
agGridMenuAdapter: AgGridMenuAdapter;
|
|
67
68
|
agGridColumnAdapter: AgGridColumnAdapter;
|
|
68
69
|
agGridExportAdapter: AgGridExportAdapter;
|
|
70
|
+
agGridThemeAdapter: AgGridThemeAdapter;
|
|
69
71
|
hasAdaptableToolPanel: boolean;
|
|
70
72
|
renderReactRoot: RenderReactRootFn;
|
|
71
73
|
/**
|
|
@@ -244,7 +246,6 @@ export interface IAdaptable {
|
|
|
244
246
|
isGridRangeSelectable(): boolean;
|
|
245
247
|
isGridRowSelectable(): boolean;
|
|
246
248
|
isGridGroupingActive(): boolean;
|
|
247
|
-
getAgGridCurrentThemeName(): string;
|
|
248
249
|
applyAdaptableTheme(theme: AdaptableTheme | string): void;
|
|
249
250
|
setRowGroupColumns(columnIds: string[]): void;
|
|
250
251
|
getAllGridColumns(): Column<any>[];
|
|
@@ -298,6 +298,7 @@ const DefaultAdaptableOptions = {
|
|
|
298
298
|
styleClassNames: GeneralConstants_1.EMPTY_ARRAY,
|
|
299
299
|
showDocumentationLinks: true,
|
|
300
300
|
showAdapTableVersion: true,
|
|
301
|
+
showAgGridVersion: true,
|
|
301
302
|
},
|
|
302
303
|
};
|
|
303
304
|
function applyDefaultAdaptableOptions(adaptableOptions) {
|
|
@@ -39,17 +39,28 @@ export interface EditOptions<TData = any> {
|
|
|
39
39
|
*/
|
|
40
40
|
export interface CustomEditColumnValuesContext<TData = any> extends AdaptableColumnContext<TData> {
|
|
41
41
|
/**
|
|
42
|
-
* Current distinct values in
|
|
42
|
+
* Current distinct values in Column
|
|
43
43
|
*/
|
|
44
44
|
defaultValues: Required<CustomEditColumnValueInfo>[];
|
|
45
|
+
/**
|
|
46
|
+
* Search text in Edit - used when fetching values from server
|
|
47
|
+
*/
|
|
45
48
|
currentSearchValue: string;
|
|
46
49
|
/**
|
|
47
50
|
* Currently edited Grid Cell
|
|
48
51
|
*/
|
|
49
52
|
gridCell: GridCell;
|
|
50
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Information about items in the Edit Controls
|
|
56
|
+
*/
|
|
51
57
|
export interface CustomEditColumnValueInfo {
|
|
52
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Item's label
|
|
60
|
+
*/ label?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Value of Item being shown
|
|
63
|
+
*/
|
|
53
64
|
value: any;
|
|
54
65
|
}
|
|
55
66
|
/**
|
|
@@ -68,6 +68,13 @@ export interface UserInterfaceOptions<TData = any> {
|
|
|
68
68
|
* @gridInfoItem
|
|
69
69
|
*/
|
|
70
70
|
showAdapTableVersion?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Displays the AG Grid version in Grid Info section of Settings Panel
|
|
73
|
+
*
|
|
74
|
+
* @defaultValue true
|
|
75
|
+
* @gridInfoItem
|
|
76
|
+
*/
|
|
77
|
+
showAgGridVersion?: boolean;
|
|
71
78
|
/**
|
|
72
79
|
* English variant to use in AdapTable UI
|
|
73
80
|
*
|
package/src/Api/Fdc3Api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
-
import { AppIdentifier, Context, ContextType, DesktopAgent, Intent, IntentResolution } from '@finos/fdc3';
|
|
2
|
+
import { AppIdentifier, Channel, Context, ContextType, DesktopAgent, Intent, IntentResolution } from '@finos/fdc3';
|
|
3
3
|
/**
|
|
4
4
|
* Provides run-time access to AdapTable's FDC3 functionality
|
|
5
5
|
*/
|
|
@@ -59,14 +59,16 @@ export interface Fdc3Api {
|
|
|
59
59
|
* Broadcasts the given Context from the given Row Node
|
|
60
60
|
* @param rowNode - The Row Node
|
|
61
61
|
* @param contextType - The FDC3 Context Type
|
|
62
|
+
* @param channel - (optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to
|
|
62
63
|
*/
|
|
63
|
-
broadcastFromRow(rowNode: IRowNode, contextType: ContextType): Promise<void>;
|
|
64
|
+
broadcastFromRow(rowNode: IRowNode, contextType: ContextType, channel?: Channel): Promise<void>;
|
|
64
65
|
/**
|
|
65
66
|
* Broadcasts the given Context from the given Row Node with the given Primary Key Value
|
|
66
67
|
* @param primaryKeyValue - The Primary Key Value
|
|
67
68
|
* @param contextType - The FDC3 Context Type
|
|
69
|
+
* @param channel - (optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to
|
|
68
70
|
*/
|
|
69
|
-
broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType): Promise<void> | undefined;
|
|
71
|
+
broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, channel?: Channel): Promise<void> | undefined;
|
|
70
72
|
/**
|
|
71
73
|
* Checks if the given Context Type is a FDC3 standard Context Type
|
|
72
74
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
-
import { Context, ContextType, DesktopAgent, Intent, IntentResolution, StandardContextType, StandardIntent } from '@finos/fdc3';
|
|
2
|
+
import { Channel, Context, ContextType, DesktopAgent, Intent, IntentResolution, StandardContextType, StandardIntent } from '@finos/fdc3';
|
|
3
3
|
import { ApiBase } from './ApiBase';
|
|
4
4
|
import { Fdc3Api } from '../Fdc3Api';
|
|
5
5
|
import { Fdc3InternalApi } from '../Internal/Fdc3InternalApi';
|
|
@@ -15,8 +15,8 @@ export declare class Fdc3ApiImpl extends ApiBase implements Fdc3Api {
|
|
|
15
15
|
raiseIntentFromRow(rowNode: IRowNode, intent: Intent, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
|
|
16
16
|
raiseIntentForContextFromRow(rowNode: IRowNode, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
|
|
17
17
|
raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
|
|
18
|
-
broadcastFromRow(rowNode: IRowNode, contextType: ContextType): Promise<void>;
|
|
19
|
-
broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType): Promise<void> | undefined;
|
|
18
|
+
broadcastFromRow(rowNode: IRowNode, contextType: ContextType, channel?: Channel): Promise<void>;
|
|
19
|
+
broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, channel?: Channel): Promise<void> | undefined;
|
|
20
20
|
getContextLabel(contextType: ContextType): string;
|
|
21
21
|
isStandardContextType(contextType: string): contextType is StandardContextType;
|
|
22
22
|
isStandardIntentType(intentType: string): intentType is StandardIntent;
|
|
@@ -47,17 +47,17 @@ class Fdc3ApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
}
|
|
48
48
|
return this.raiseIntentForContextFromRow(rowNode, contextType, appIdentifier);
|
|
49
49
|
}
|
|
50
|
-
broadcastFromRow(rowNode, contextType) {
|
|
50
|
+
broadcastFromRow(rowNode, contextType, channel) {
|
|
51
51
|
const contextData = this.buildContextDataFromRow(contextType, rowNode);
|
|
52
|
-
return this.getFdc3Service().broadcast(contextData);
|
|
52
|
+
return this.getFdc3Service().broadcast(contextData, channel);
|
|
53
53
|
}
|
|
54
|
-
broadcastFromPrimaryKey(primaryKeyValue, contextType) {
|
|
54
|
+
broadcastFromPrimaryKey(primaryKeyValue, contextType, channel) {
|
|
55
55
|
const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
|
|
56
56
|
if (!rowNode) {
|
|
57
57
|
this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
60
|
-
return this.broadcastFromRow(rowNode, contextType);
|
|
60
|
+
return this.broadcastFromRow(rowNode, contextType, channel);
|
|
61
61
|
}
|
|
62
62
|
getContextLabel(contextType) {
|
|
63
63
|
return this.isStandardContextType(contextType)
|
|
@@ -7,6 +7,7 @@ const isPivotLayoutModel_1 = require("../../layout-manager/src/isPivotLayoutMode
|
|
|
7
7
|
const normalizeLayoutModel_1 = require("../../layout-manager/src/normalizeLayoutModel");
|
|
8
8
|
const simplifyLayoutModel_1 = require("../../layout-manager/src/simplifyLayoutModel");
|
|
9
9
|
const AggregationColumns_1 = require("../../PredefinedConfig/Common/AggregationColumns");
|
|
10
|
+
const AdaptableHelper_1 = require("../../Utilities/Helpers/AdaptableHelper");
|
|
10
11
|
const layoutStateToLayoutModel = (layout) => {
|
|
11
12
|
if ((0, exports.isPivotLayout)(layout)) {
|
|
12
13
|
return (0, exports.pivotLayoutToPivotLayoutModel)(layout);
|
|
@@ -24,44 +25,23 @@ exports.layoutModelToLayoutState = layoutModelToLayoutState;
|
|
|
24
25
|
function cleanupAdaptableObjectPrimitives(layout) {
|
|
25
26
|
if (layout.TableAggregationColumns) {
|
|
26
27
|
layout.TableAggregationColumns.forEach((AggValue) => {
|
|
27
|
-
|
|
28
|
-
delete AggValue.Source;
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
delete AggValue.Uuid;
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
delete AggValue.AdaptableVersion;
|
|
28
|
+
(0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(AggValue);
|
|
33
29
|
if (typeof AggValue.AggFunc === 'object' && AggValue.AggFunc) {
|
|
34
|
-
|
|
35
|
-
delete AggValue.AggFunc.Source;
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
delete AggValue.AggFunc.Uuid;
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
delete AggValue.AggFunc.AdaptableVersion;
|
|
30
|
+
(0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(AggValue.AggFunc);
|
|
40
31
|
}
|
|
41
32
|
});
|
|
42
33
|
}
|
|
43
34
|
if (layout.ColumnHeaders) {
|
|
44
|
-
|
|
45
|
-
delete layout.ColumnHeaders.Uuid;
|
|
46
|
-
delete layout.ColumnHeaders.AdaptableVersion;
|
|
35
|
+
(0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.ColumnHeaders);
|
|
47
36
|
}
|
|
48
37
|
if (layout.ColumnVisibility) {
|
|
49
|
-
|
|
50
|
-
delete layout.ColumnVisibility.Uuid;
|
|
51
|
-
delete layout.ColumnVisibility.AdaptableVersion;
|
|
38
|
+
(0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.ColumnVisibility);
|
|
52
39
|
}
|
|
53
40
|
if (layout.ColumnWidths) {
|
|
54
|
-
|
|
55
|
-
delete layout.ColumnWidths.Uuid;
|
|
56
|
-
delete layout.ColumnWidths.AdaptableVersion;
|
|
41
|
+
(0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.ColumnWidths);
|
|
57
42
|
}
|
|
58
43
|
if (layout.RowGroupValues) {
|
|
59
|
-
|
|
60
|
-
delete layout.RowGroupValues.Source;
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
delete layout.RowGroupValues.Uuid;
|
|
63
|
-
// @ts-ignore
|
|
64
|
-
delete layout.RowGroupValues.AdaptableVersion;
|
|
44
|
+
(0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.RowGroupValues);
|
|
65
45
|
}
|
|
66
46
|
}
|
|
67
47
|
/**
|
|
@@ -271,6 +251,7 @@ const tableLayoutModelToTableLayout = (layoutModel, defaults) => {
|
|
|
271
251
|
else {
|
|
272
252
|
delete tableLayout.TableAggregationColumns;
|
|
273
253
|
}
|
|
254
|
+
cleanupAdaptableObjectPrimitives(tableLayout);
|
|
274
255
|
return tableLayout;
|
|
275
256
|
};
|
|
276
257
|
exports.tableLayoutModelToTableLayout = tableLayoutModelToTableLayout;
|
|
@@ -8,6 +8,7 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
8
8
|
const themes_1 = require("../../themes");
|
|
9
9
|
const ThemeInternalApi_1 = require("../Internal/ThemeInternalApi");
|
|
10
10
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
11
|
+
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
11
12
|
class ThemeApiImpl extends ApiBase_1.ApiBase {
|
|
12
13
|
constructor(_adaptable) {
|
|
13
14
|
super(_adaptable);
|
|
@@ -74,7 +75,8 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
|
|
|
74
75
|
this.showModulePopup(ModuleConstants.ThemeModuleId);
|
|
75
76
|
}
|
|
76
77
|
getAgGridCurrentThemeName() {
|
|
77
|
-
|
|
78
|
+
(0, logDeprecation_1.logDeprecation)(this._adaptable.logger, 'ThemeApi', 'getAgGridCurrentThemeName', null, `This is required only for AG Grid's legacy themes. See https://www.ag-grid.com/javascript-data-grid/theming-v32/`);
|
|
79
|
+
return this._adaptable.agGridThemeAdapter.getAgGridCurrentThemeClassNames();
|
|
78
80
|
}
|
|
79
81
|
editTheme(theme) {
|
|
80
82
|
this.dispatchAction(ThemeRedux.ThemeEdit(theme));
|
|
@@ -190,7 +190,7 @@ class RowFormInternalApi extends ApiBase_1.ApiBase {
|
|
|
190
190
|
}
|
|
191
191
|
const returnValues = this.getGridApi().internalApi.getDistinctDisplayValuesForColumnOld(column.columnId);
|
|
192
192
|
// FIXME add support for asynchronous custom select cell editor values
|
|
193
|
-
// it involves refactoring the AdaptableForm &
|
|
193
|
+
// it involves refactoring the AdaptableForm & adaptableFormComponent
|
|
194
194
|
// await this.getSelectCellEditorValuesForColumn(
|
|
195
195
|
// column,
|
|
196
196
|
// gridCell
|
package/src/Api/ThemeApi.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ export interface ThemeApi {
|
|
|
81
81
|
openThemeSettingsPanel(): void;
|
|
82
82
|
/**
|
|
83
83
|
* Get the name of the current AG Grid theme
|
|
84
|
+
*
|
|
85
|
+
* @deprecated required only for legacy AG Grid themes, see https://www.ag-grid.com/javascript-data-grid/theming-v32/
|
|
84
86
|
*/
|
|
85
87
|
getAgGridCurrentThemeName(): string;
|
|
86
88
|
}
|
|
@@ -150,4 +150,4 @@ export type SystemAlertPredicateIds = SystemAlertPredicateId[];
|
|
|
150
150
|
/**
|
|
151
151
|
* List of System Predicates available for Alerts
|
|
152
152
|
*/
|
|
153
|
-
export type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | '
|
|
153
|
+
export type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'In' | 'NotIn' | 'AnyChange';
|
|
@@ -270,22 +270,6 @@ exports.SystemPredicateDefs = [
|
|
|
270
270
|
toString: ({ inputs }) => `Not Between ${inputs[0] ?? ''}:${inputs[1]}`,
|
|
271
271
|
shortcuts: ['!:'],
|
|
272
272
|
},
|
|
273
|
-
{
|
|
274
|
-
id: 'IsNumeric',
|
|
275
|
-
label: 'Is Numeric',
|
|
276
|
-
icon: { text: '1' },
|
|
277
|
-
columnScope: { DataTypes: ['number'] },
|
|
278
|
-
moduleScope: ['alert', 'flashingcell'],
|
|
279
|
-
handler: ({ value }) => !isNaN(Number(value)),
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
id: 'IsNotNumeric',
|
|
283
|
-
label: 'Is Not Numeric',
|
|
284
|
-
icon: { text: '1' },
|
|
285
|
-
columnScope: { DataTypes: ['number'] },
|
|
286
|
-
moduleScope: ['alert', 'flashingcell'],
|
|
287
|
-
handler: ({ value }) => isNaN(Number(value)),
|
|
288
|
-
},
|
|
289
273
|
// String System Filters
|
|
290
274
|
{
|
|
291
275
|
id: 'Is',
|
|
@@ -72,4 +72,4 @@ export type SystemFlashingCellPredicateIds = SystemFlashingCellPredicateId[];
|
|
|
72
72
|
/**
|
|
73
73
|
* List of System Predicates available for Flashing Cells
|
|
74
74
|
*/
|
|
75
|
-
export type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | '
|
|
75
|
+
export type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'In' | 'NotIn' | 'AnyChange';
|
|
@@ -51,7 +51,7 @@ export interface LayoutBase extends AdaptableObject {
|
|
|
51
51
|
*/
|
|
52
52
|
ColumnHeaders?: ColumnStringMap;
|
|
53
53
|
/**
|
|
54
|
-
* Whether to include aggFunc name in
|
|
54
|
+
* Whether to include aggFunc name in Column header: e.g. 'sum(Price)' becomes 'Price'
|
|
55
55
|
*/
|
|
56
56
|
SuppressAggFuncInHeader?: boolean;
|
|
57
57
|
/**
|
|
@@ -88,7 +88,7 @@ export interface TableLayout extends LayoutBase {
|
|
|
88
88
|
*/
|
|
89
89
|
RowSummaries?: RowSummary[];
|
|
90
90
|
/**
|
|
91
|
-
* Columns showing aggregated values in
|
|
91
|
+
* Columns showing aggregated values in Grouped Rows; a record of ColumnId and aggfunc (e.g. sum) or 'true' (to use default aggfunc)
|
|
92
92
|
*/
|
|
93
93
|
TableAggregationColumns?: TableAggregationColumns;
|
|
94
94
|
/**
|
|
@@ -4,6 +4,7 @@ import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
|
|
|
4
4
|
export declare function initPredefinedConfigWithUuids(predefinedConfig: PredefinedConfig): PredefinedConfig;
|
|
5
5
|
export declare function getAccessLevelForObject(adaptableObject: AdaptableObject, moduleAccessLevel: AccessLevel): AccessLevel;
|
|
6
6
|
export declare function addAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
|
|
7
|
+
export declare function removeAdaptableObjectPrimitivesInline(target: any): any;
|
|
7
8
|
export declare function removeAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
|
|
8
9
|
export declare function isAdaptableObject(object: unknown): object is AdaptableObject;
|
|
9
10
|
export declare const AdaptableHelper: {
|
|
@@ -11,6 +12,7 @@ export declare const AdaptableHelper: {
|
|
|
11
12
|
getAccessLevelForObject: typeof getAccessLevelForObject;
|
|
12
13
|
addAdaptableObjectPrimitives: typeof addAdaptableObjectPrimitives;
|
|
13
14
|
removeAdaptableObjectPrimitives: typeof removeAdaptableObjectPrimitives;
|
|
15
|
+
removeAdaptableObjectPrimitivesInline: typeof removeAdaptableObjectPrimitivesInline;
|
|
14
16
|
isAdaptableObject: typeof isAdaptableObject;
|
|
15
17
|
};
|
|
16
18
|
export default AdaptableHelper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdaptableHelper = exports.isAdaptableObject = exports.removeAdaptableObjectPrimitives = exports.addAdaptableObjectPrimitives = exports.getAccessLevelForObject = exports.initPredefinedConfigWithUuids = void 0;
|
|
3
|
+
exports.AdaptableHelper = exports.isAdaptableObject = exports.removeAdaptableObjectPrimitives = exports.removeAdaptableObjectPrimitivesInline = exports.addAdaptableObjectPrimitives = exports.getAccessLevelForObject = exports.initPredefinedConfigWithUuids = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
|
|
6
6
|
const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
|
|
@@ -50,6 +50,16 @@ function addAdaptableObjectPrimitives(adaptableObject) {
|
|
|
50
50
|
return adaptableObject;
|
|
51
51
|
}
|
|
52
52
|
exports.addAdaptableObjectPrimitives = addAdaptableObjectPrimitives;
|
|
53
|
+
function removeAdaptableObjectPrimitivesInline(target) {
|
|
54
|
+
if (!target || typeof target !== 'object') {
|
|
55
|
+
return target;
|
|
56
|
+
}
|
|
57
|
+
delete target.Source;
|
|
58
|
+
delete target.Uuid;
|
|
59
|
+
delete target.AdaptableVersion;
|
|
60
|
+
return target;
|
|
61
|
+
}
|
|
62
|
+
exports.removeAdaptableObjectPrimitivesInline = removeAdaptableObjectPrimitivesInline;
|
|
53
63
|
function removeAdaptableObjectPrimitives(adaptableObject) {
|
|
54
64
|
const clonedObject = structuredClone(adaptableObject);
|
|
55
65
|
const sanitiseObject = (object) => {
|
|
@@ -79,6 +89,7 @@ exports.AdaptableHelper = {
|
|
|
79
89
|
getAccessLevelForObject,
|
|
80
90
|
addAdaptableObjectPrimitives,
|
|
81
91
|
removeAdaptableObjectPrimitives,
|
|
92
|
+
removeAdaptableObjectPrimitivesInline,
|
|
82
93
|
isAdaptableObject,
|
|
83
94
|
};
|
|
84
95
|
exports.default = exports.AdaptableHelper;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAdaptableService } from './Interface/IAdaptableService';
|
|
2
2
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
3
|
import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
|
|
4
|
-
import { AppIdentifier, DesktopAgent, IntentResolution } from '@finos/fdc3';
|
|
4
|
+
import { AppIdentifier, Channel, DesktopAgent, IntentResolution } from '@finos/fdc3';
|
|
5
5
|
import { Context } from '@finos/fdc3/dist/context/ContextTypes';
|
|
6
6
|
export declare class Fdc3Service implements IAdaptableService {
|
|
7
7
|
private adaptableApi;
|
|
@@ -15,7 +15,7 @@ export declare class Fdc3Service implements IAdaptableService {
|
|
|
15
15
|
destroy(): void;
|
|
16
16
|
raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
|
|
17
17
|
raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
|
|
18
|
-
broadcast(context: Context): Promise<void>;
|
|
18
|
+
broadcast(context: Context, channel?: Channel): Promise<void>;
|
|
19
19
|
private logFdc3Event;
|
|
20
20
|
private logFdc3Error;
|
|
21
21
|
private getFdc3Api;
|
|
@@ -134,7 +134,7 @@ class Fdc3Service {
|
|
|
134
134
|
this.logFdc3Error(error);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
broadcast(context) {
|
|
137
|
+
broadcast(context, channel) {
|
|
138
138
|
if (!this.getDesktopAgent()) {
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
@@ -147,7 +147,12 @@ class Fdc3Service {
|
|
|
147
147
|
context,
|
|
148
148
|
};
|
|
149
149
|
this.adaptableApi.eventApi.emit('Fdc3Message', payload);
|
|
150
|
-
|
|
150
|
+
if (channel) {
|
|
151
|
+
return channel.broadcast(context);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
return this.getDesktopAgent().broadcast(context);
|
|
155
|
+
}
|
|
151
156
|
}
|
|
152
157
|
catch (error) {
|
|
153
158
|
this.logFdc3Error(error);
|
|
@@ -5,10 +5,10 @@ export declare class ThemeService implements IThemeService {
|
|
|
5
5
|
private unsubscribe;
|
|
6
6
|
private styleSheetObject;
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
|
+
destroy(): void;
|
|
8
9
|
subscribe(): void;
|
|
9
10
|
onThemeChanged: () => void;
|
|
10
11
|
applyNewThemeVariables(theme: AdaptableTheme): void;
|
|
11
|
-
destroy(): void;
|
|
12
12
|
showMissingThemeFiles(theme: AdaptableTheme): void;
|
|
13
13
|
getDOMPrefferedColorScheme(): 'dark' | 'light';
|
|
14
14
|
mapOsTheme(theme: AdaptableTheme | string): AdaptableTheme;
|
|
@@ -23,6 +23,11 @@ class ThemeService {
|
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
destroy() {
|
|
27
|
+
this.api = null;
|
|
28
|
+
this.unsubscribe();
|
|
29
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
|
|
30
|
+
}
|
|
26
31
|
subscribe() {
|
|
27
32
|
const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
|
|
28
33
|
const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
|
|
@@ -47,11 +52,6 @@ class ThemeService {
|
|
|
47
52
|
str += '}';
|
|
48
53
|
this.styleSheetObject.replaceSync(str);
|
|
49
54
|
}
|
|
50
|
-
destroy() {
|
|
51
|
-
this.api = null;
|
|
52
|
-
this.unsubscribe();
|
|
53
|
-
document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
|
|
54
|
-
}
|
|
55
55
|
showMissingThemeFiles(theme) {
|
|
56
56
|
// run time defined theme
|
|
57
57
|
// because it may be an empty theme
|
|
@@ -46,6 +46,47 @@ const ConfigurationWizard = (props) => {
|
|
|
46
46
|
delete newColumn.caption;
|
|
47
47
|
return newColumn;
|
|
48
48
|
});
|
|
49
|
+
const columnDefs = adaptableConfig.gridOptions.columnDefs;
|
|
50
|
+
// handle the layout creation
|
|
51
|
+
let Layouts = newAdaptableOptions.predefinedConfig?.Layout?.Layouts || [];
|
|
52
|
+
const NewLayout = {
|
|
53
|
+
TableColumns: columnDefs.map((col) => col.colId ?? col.field),
|
|
54
|
+
Name: 'Default Layout',
|
|
55
|
+
};
|
|
56
|
+
let currentLayoutName = NewLayout.Name;
|
|
57
|
+
let found = false;
|
|
58
|
+
if (!Layouts.length) {
|
|
59
|
+
// no layouts, make this the only one
|
|
60
|
+
Layouts = [NewLayout];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
Layouts = Layouts.map((layout) => {
|
|
64
|
+
if (found) {
|
|
65
|
+
return layout;
|
|
66
|
+
}
|
|
67
|
+
if (layout.TableColumns?.length === 0) {
|
|
68
|
+
// when finding the first empty layout
|
|
69
|
+
// set its column to be those of the new layout
|
|
70
|
+
found = true;
|
|
71
|
+
// and grab the name so we can put it in the Layout.CurrentLayout state
|
|
72
|
+
currentLayoutName = layout.Name;
|
|
73
|
+
layout = { ...layout };
|
|
74
|
+
layout.TableColumns = NewLayout.TableColumns;
|
|
75
|
+
}
|
|
76
|
+
return layout;
|
|
77
|
+
});
|
|
78
|
+
if (!found) {
|
|
79
|
+
Layouts.push(NewLayout);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
newAdaptableOptions.predefinedConfig = {
|
|
83
|
+
...newAdaptableOptions.predefinedConfig,
|
|
84
|
+
Layout: {
|
|
85
|
+
...newAdaptableOptions.predefinedConfig.Layout,
|
|
86
|
+
Layouts: Layouts,
|
|
87
|
+
CurrentLayout: currentLayoutName,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
49
90
|
newAdaptableOptions.primaryKey = columnsHandle.current.getPrimaryKey();
|
|
50
91
|
}
|
|
51
92
|
const newAdaptableConfig = {
|
|
@@ -58,7 +58,10 @@ class DataChangeHistoryPopupComponent extends React.Component {
|
|
|
58
58
|
this.props.api.dataChangeHistoryApi.clearDataChangeHistoryEntry(changeToBeUndone);
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
const
|
|
61
|
+
const agGridThemeMode = this.props.api.internalApi
|
|
62
|
+
.getAdaptableInstance()
|
|
63
|
+
.agGridThemeAdapter.getAgGridThemeMode();
|
|
64
|
+
const currentAgGridTheme = agGridThemeMode === 'legacy' ? this.props.api.themeApi.getAgGridCurrentThemeName() : '';
|
|
62
65
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
63
66
|
React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPopup", flexDirection: "column", style: { height: '100%' } },
|
|
64
67
|
React.createElement(rebass_1.Flex, { style: {
|
|
@@ -14,7 +14,9 @@ const AdaptableObjectRow_1 = require("../../Components/AdaptableObjectRow");
|
|
|
14
14
|
const PopupPanel_1 = require("../../Components/Popups/AdaptablePopup/PopupPanel");
|
|
15
15
|
const AdaptableObjectsSummary_1 = require("./AdaptableObjectsSummary");
|
|
16
16
|
const EnvVars_1 = require("../../../EnvVars");
|
|
17
|
-
const
|
|
17
|
+
const agGridModules_1 = require("../../../agGrid/agGridModules");
|
|
18
|
+
const adaptableVersion = EnvVars_1.ADAPTABLE_VERSION;
|
|
19
|
+
const agGridVersion = agGridModules_1.AG_GRID_VERSION;
|
|
18
20
|
const GridInfoPopup = (props) => {
|
|
19
21
|
const api = props.api;
|
|
20
22
|
const CreateGridSummaries = (colItems) => {
|
|
@@ -37,7 +39,10 @@ const GridInfoPopup = (props) => {
|
|
|
37
39
|
: null;
|
|
38
40
|
const selectedRowInfo = api.gridApi.getSelectedRowInfo();
|
|
39
41
|
if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
|
|
40
|
-
returnRows.push(createReadOnlyColItem(colItems, 'AdapTable Version',
|
|
42
|
+
returnRows.push(createReadOnlyColItem(colItems, 'AdapTable Version', adaptableVersion));
|
|
43
|
+
}
|
|
44
|
+
if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
|
|
45
|
+
returnRows.push(createReadOnlyColItem(colItems, 'AG Grid Version', agGridVersion));
|
|
41
46
|
}
|
|
42
47
|
returnRows.push(createReadOnlyColItem(colItems, 'Sorted Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None'));
|
|
43
48
|
returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
|
|
@@ -29,6 +29,7 @@ import { RowFormService } from '../Utilities/Services/RowFormService';
|
|
|
29
29
|
import { GridCellWithCount } from '../PredefinedConfig/Selection/GridCell';
|
|
30
30
|
import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
|
|
31
31
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
32
|
+
import { AgGridThemeAdapter } from './AgGridThemeAdapter';
|
|
32
33
|
export type AdaptableLifecycleState = 'initial' | 'preprocessOptions' | 'initAdaptableState' | 'setupAgGrid' | 'initAgGrid' | 'agGridReady' | 'available' | 'ready' | 'preDestroyed';
|
|
33
34
|
type RenderAgGridFrameworkComponentResult = false | GridApi;
|
|
34
35
|
interface AdaptableInitInternalConfig<TData = any> {
|
|
@@ -70,6 +71,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
70
71
|
agGridColumnAdapter: AgGridColumnAdapter;
|
|
71
72
|
agGridMenuAdapter: AgGridMenuAdapter;
|
|
72
73
|
agGridExportAdapter: AgGridExportAdapter;
|
|
74
|
+
agGridThemeAdapter: AgGridThemeAdapter;
|
|
73
75
|
private DANGER_USE_GETTER_adaptableContainerElement;
|
|
74
76
|
private DANGER_USE_GETTER_agGridContainerElement;
|
|
75
77
|
api: AdaptableApi;
|
|
@@ -295,8 +297,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
295
297
|
isGridGroupingActive(): boolean;
|
|
296
298
|
setAgGridQuickSearch(searchText: string): void;
|
|
297
299
|
clearAgGridQuickSearch(): void;
|
|
298
|
-
getAgGridCurrentThemeName(): string;
|
|
299
|
-
private getAgGridLightThemeName;
|
|
300
300
|
applyAdaptableTheme(theme: AdaptableTheme | string): void;
|
|
301
301
|
setRowGroupColumns(columnIds: string[]): void;
|
|
302
302
|
getAllGridColumns(): Column<any>[];
|