@adaptabletools/adaptable 20.0.0-canary.2 → 20.0.0-canary.21
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/base.css +1288 -898
- package/base.css.map +1 -1
- package/index.css +428 -898
- package/index.css.map +1 -1
- package/package.json +4 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
- package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
- package/src/AdaptableOptions/EditOptions.d.ts +14 -3
- package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
- package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
- package/src/Api/ExportApi.d.ts +1 -6
- package/src/Api/Fdc3Api.d.ts +5 -3
- package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
- package/src/Api/Implementation/ExportApiImpl.js +17 -10
- 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/PredicateApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +3 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
- package/src/Api/Internal/AdaptableInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +1 -2
- package/src/Api/Internal/EventInternalApi.js +6 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
- package/src/Api/Internal/ExportInternalApi.js +105 -136
- package/src/Api/Internal/RowFormInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +13 -29
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +6 -2
- package/src/PredefinedConfig/ExportState.d.ts +10 -17
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +17 -17
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +4 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +3 -3
- package/src/Strategy/ColumnFilterModule.js +4 -4
- package/src/Strategy/StyledColumnModule.js +6 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -13
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +10 -0
- package/src/Utilities/Helpers/DateHelper.js +1 -2
- package/src/Utilities/Helpers/FormatHelper.js +18 -5
- package/src/Utilities/ObjectFactory.js +1 -0
- 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/ColumnInfo/ColumnInfo.js +0 -1
- package/src/View/Comments/CommentsEditor.js +5 -2
- package/src/View/Comments/CommentsPopup.js +5 -2
- package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.js +4 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -1
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +6 -2
- package/src/View/Components/ColumnFilter/utils.js +2 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +3 -3
- package/src/View/Dashboard/CustomToolbar.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/Filter/FilterSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
- package/src/View/Note/NotePopup.js +5 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +7 -5
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +4 -8
- package/src/agGrid/AdaptableAgGrid.js +72 -118
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +7 -8
- package/src/agGrid/AgGridColumnAdapter.js +5 -10
- package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
- package/src/agGrid/AgGridExportAdapter.js +24 -25
- package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
- package/src/agGrid/AgGridThemeAdapter.js +122 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +1 -1
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/DatepickerContext.d.ts +1 -0
- package/src/components/Datepicker/index.d.ts +1 -0
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +30 -7
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +23 -15
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade20.d.ts +3 -0
- package/src/migration/VersionUpgrade20.js +140 -12
- package/src/types.d.ts +3 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
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
|
*/
|
|
@@ -82,7 +82,7 @@ export class ColumnFilterApiImpl extends ApiBase {
|
|
|
82
82
|
.filter(Boolean);
|
|
83
83
|
}
|
|
84
84
|
clearColumnFilter(columnFilter) {
|
|
85
|
-
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilter));
|
|
85
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilter.ColumnId));
|
|
86
86
|
}
|
|
87
87
|
clearColumnFiltersForColumns(columns) {
|
|
88
88
|
columns.forEach((c) => {
|
|
@@ -95,7 +95,7 @@ export class ColumnFilterApiImpl extends ApiBase {
|
|
|
95
95
|
clearColumnFilterForColumn(columnId) {
|
|
96
96
|
let columnFilterForColumn = this.getColumnFilterForColumn(columnId);
|
|
97
97
|
if (columnFilterForColumn) {
|
|
98
|
-
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilterForColumn));
|
|
98
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilterForColumn.ColumnId));
|
|
99
99
|
this._adaptable.clearColumnFilteringForColumns([columnId]);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -115,7 +115,7 @@ export class ColumnFilterApiImpl extends ApiBase {
|
|
|
115
115
|
return ('[' +
|
|
116
116
|
friendlyName +
|
|
117
117
|
'] ' +
|
|
118
|
-
this.getPredicateApi().predicatesToString(columnFilter.Predicates, columnFilter.
|
|
118
|
+
this.getPredicateApi().predicatesToString(columnFilter.Predicates, columnFilter.PredicatesOperator));
|
|
119
119
|
}
|
|
120
120
|
columnFiltersToString(columnFilters) {
|
|
121
121
|
return columnFilters.map((cf) => this.columnFilterToString(cf)).join(', ');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExportApi } from '../ExportApi';
|
|
2
|
-
import { ExportState, Report,
|
|
2
|
+
import { ExportState, Report, ReportFormatType, ReportNameType, SystemReportFormat, SystemReportName } from '../../PredefinedConfig/ExportState';
|
|
3
3
|
import { ApiBase } from './ApiBase';
|
|
4
4
|
import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
5
5
|
import { CustomDestination, ExportDestinationType, ExportFormContext, ExportResultData, ExternalReport, SystemExportDestination } from '../../AdaptableOptions/ExportOptions';
|
|
@@ -36,7 +36,6 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
36
36
|
getCustomReports(): Report[];
|
|
37
37
|
getExternalReports(): ExternalReport[];
|
|
38
38
|
isExternalReport(report: Report): boolean;
|
|
39
|
-
runExternalReport(externalReportName: string): ReportData | undefined;
|
|
40
39
|
isColumnExportable(adaptableColumn: AdaptableColumn): boolean;
|
|
41
40
|
getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];
|
|
42
41
|
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType): void;
|
|
@@ -132,21 +132,14 @@ export class ExportApiImpl extends ApiBase {
|
|
|
132
132
|
isExternalReport(report) {
|
|
133
133
|
return this.getExternalReports()?.find((cr) => cr.name == report.Name) != null;
|
|
134
134
|
}
|
|
135
|
-
runExternalReport(externalReportName) {
|
|
136
|
-
const externalReport = this.getExternalReports()?.find((cr) => cr.name == externalReportName);
|
|
137
|
-
if (!externalReport) {
|
|
138
|
-
this.logWarn(`External Report '${externalReportName}' not found!`);
|
|
139
|
-
return undefined;
|
|
140
|
-
}
|
|
141
|
-
return externalReport.onRunReport();
|
|
142
|
-
}
|
|
143
135
|
isColumnExportable(adaptableColumn) {
|
|
144
136
|
const isExportableFn = this.getExportOptions().isColumnExportable;
|
|
145
137
|
if (typeof isExportableFn === 'function') {
|
|
146
|
-
|
|
138
|
+
const adaptableColumnContext = {
|
|
147
139
|
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
148
140
|
column: adaptableColumn,
|
|
149
|
-
}
|
|
141
|
+
};
|
|
142
|
+
return isExportableFn(adaptableColumnContext);
|
|
150
143
|
}
|
|
151
144
|
return true;
|
|
152
145
|
}
|
|
@@ -167,6 +160,20 @@ export class ExportApiImpl extends ApiBase {
|
|
|
167
160
|
exportReport(reportName, format, destination = 'Download') {
|
|
168
161
|
let report = this.getReportByName(reportName);
|
|
169
162
|
if (this.checkItemExists(report, reportName, 'Report')) {
|
|
163
|
+
if (this.isExternalReport(report)) {
|
|
164
|
+
// Handle external report
|
|
165
|
+
this.internalApi
|
|
166
|
+
.getExternalReportData(reportName, format, destination)
|
|
167
|
+
.then((reportData) => {
|
|
168
|
+
if (reportData) {
|
|
169
|
+
this.internalApi.sendReportToDestination(reportData, report, format, destination);
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
.catch((error) => {
|
|
173
|
+
this.logWarn(`Failed to get external report data for '${reportName}': ${error}`);
|
|
174
|
+
});
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
170
177
|
this._adaptable.agGridExportAdapter
|
|
171
178
|
.exportData({
|
|
172
179
|
report,
|
|
@@ -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;
|
|
@@ -44,17 +44,17 @@ export class Fdc3ApiImpl extends ApiBase {
|
|
|
44
44
|
}
|
|
45
45
|
return this.raiseIntentForContextFromRow(rowNode, contextType, appIdentifier);
|
|
46
46
|
}
|
|
47
|
-
broadcastFromRow(rowNode, contextType) {
|
|
47
|
+
broadcastFromRow(rowNode, contextType, channel) {
|
|
48
48
|
const contextData = this.buildContextDataFromRow(contextType, rowNode);
|
|
49
|
-
return this.getFdc3Service().broadcast(contextData);
|
|
49
|
+
return this.getFdc3Service().broadcast(contextData, channel);
|
|
50
50
|
}
|
|
51
|
-
broadcastFromPrimaryKey(primaryKeyValue, contextType) {
|
|
51
|
+
broadcastFromPrimaryKey(primaryKeyValue, contextType, channel) {
|
|
52
52
|
const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
|
|
53
53
|
if (!rowNode) {
|
|
54
54
|
this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
|
|
55
55
|
return undefined;
|
|
56
56
|
}
|
|
57
|
-
return this.broadcastFromRow(rowNode, contextType);
|
|
57
|
+
return this.broadcastFromRow(rowNode, contextType, channel);
|
|
58
58
|
}
|
|
59
59
|
getContextLabel(contextType) {
|
|
60
60
|
return this.isStandardContextType(contextType)
|
|
@@ -3,6 +3,7 @@ import { isPivotLayoutModel } from '../../layout-manager/src/isPivotLayoutModel'
|
|
|
3
3
|
import { normalizeTableLayoutModel, normalizePivotLayoutModel, } from '../../layout-manager/src/normalizeLayoutModel';
|
|
4
4
|
import { simplifyTableLayoutModel, simplifyPivotLayoutModel, } from '../../layout-manager/src/simplifyLayoutModel';
|
|
5
5
|
import { isWeightedAverageAggregation, WEIGHTED_AVERAGE_AGG_FN_NAME, isWeightedAverageAggFuncName, } from '../../PredefinedConfig/Common/AggregationColumns';
|
|
6
|
+
import { removeAdaptableObjectPrimitivesInline } from '../../Utilities/Helpers/AdaptableHelper';
|
|
6
7
|
export const layoutStateToLayoutModel = (layout) => {
|
|
7
8
|
if (isPivotLayout(layout)) {
|
|
8
9
|
return pivotLayoutToPivotLayoutModel(layout);
|
|
@@ -18,44 +19,23 @@ export const layoutModelToLayoutState = (layoutModel, defaults) => {
|
|
|
18
19
|
function cleanupAdaptableObjectPrimitives(layout) {
|
|
19
20
|
if (layout.TableAggregationColumns) {
|
|
20
21
|
layout.TableAggregationColumns.forEach((AggValue) => {
|
|
21
|
-
|
|
22
|
-
delete AggValue.Source;
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
delete AggValue.Uuid;
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
delete AggValue.AdaptableVersion;
|
|
22
|
+
removeAdaptableObjectPrimitivesInline(AggValue);
|
|
27
23
|
if (typeof AggValue.AggFunc === 'object' && AggValue.AggFunc) {
|
|
28
|
-
|
|
29
|
-
delete AggValue.AggFunc.Source;
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
delete AggValue.AggFunc.Uuid;
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
delete AggValue.AggFunc.AdaptableVersion;
|
|
24
|
+
removeAdaptableObjectPrimitivesInline(AggValue.AggFunc);
|
|
34
25
|
}
|
|
35
26
|
});
|
|
36
27
|
}
|
|
37
28
|
if (layout.ColumnHeaders) {
|
|
38
|
-
|
|
39
|
-
delete layout.ColumnHeaders.Uuid;
|
|
40
|
-
delete layout.ColumnHeaders.AdaptableVersion;
|
|
29
|
+
removeAdaptableObjectPrimitivesInline(layout.ColumnHeaders);
|
|
41
30
|
}
|
|
42
31
|
if (layout.ColumnVisibility) {
|
|
43
|
-
|
|
44
|
-
delete layout.ColumnVisibility.Uuid;
|
|
45
|
-
delete layout.ColumnVisibility.AdaptableVersion;
|
|
32
|
+
removeAdaptableObjectPrimitivesInline(layout.ColumnVisibility);
|
|
46
33
|
}
|
|
47
34
|
if (layout.ColumnWidths) {
|
|
48
|
-
|
|
49
|
-
delete layout.ColumnWidths.Uuid;
|
|
50
|
-
delete layout.ColumnWidths.AdaptableVersion;
|
|
35
|
+
removeAdaptableObjectPrimitivesInline(layout.ColumnWidths);
|
|
51
36
|
}
|
|
52
37
|
if (layout.RowGroupValues) {
|
|
53
|
-
|
|
54
|
-
delete layout.RowGroupValues.Source;
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
delete layout.RowGroupValues.Uuid;
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
delete layout.RowGroupValues.AdaptableVersion;
|
|
38
|
+
removeAdaptableObjectPrimitivesInline(layout.RowGroupValues);
|
|
59
39
|
}
|
|
60
40
|
}
|
|
61
41
|
/**
|
|
@@ -258,6 +238,7 @@ export const tableLayoutModelToTableLayout = (layoutModel, defaults) => {
|
|
|
258
238
|
else {
|
|
259
239
|
delete tableLayout.TableAggregationColumns;
|
|
260
240
|
}
|
|
241
|
+
cleanupAdaptableObjectPrimitives(tableLayout);
|
|
261
242
|
return tableLayout;
|
|
262
243
|
};
|
|
263
244
|
function toAggregationColumnValue(columnAggregationModel) {
|
|
@@ -117,7 +117,7 @@ export class PredicateApiImpl extends ApiBase {
|
|
|
117
117
|
if (predicates === undefined || predicates === null || predicates?.length === 0) {
|
|
118
118
|
return this.handlePredicate(undefined, params, defaultReturn);
|
|
119
119
|
}
|
|
120
|
-
if (params.
|
|
120
|
+
if (params.predicatesOperator && params.predicatesOperator === 'OR') {
|
|
121
121
|
return predicates?.some((p) => this.handlePredicate(p, params, defaultReturn));
|
|
122
122
|
}
|
|
123
123
|
return predicates?.every((p) => this.handlePredicate(p, params, defaultReturn));
|
|
@@ -159,7 +159,7 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
159
159
|
}
|
|
160
160
|
else if (scheduleType == 'Report') {
|
|
161
161
|
const reportSchedule = schedule;
|
|
162
|
-
this.getExportApi().exportReport(reportSchedule.ReportName, reportSchedule.ReportFormat, 'Download');
|
|
162
|
+
this.getExportApi().exportReport(reportSchedule.ReportName, reportSchedule.ReportFormat, reportSchedule.ExportDestination ?? 'Download');
|
|
163
163
|
}
|
|
164
164
|
else if (scheduleType == 'ipushpull') {
|
|
165
165
|
const ippApi = this.getAdaptableApi().pluginsApi.getipushpullPluginApi();
|
|
@@ -35,7 +35,7 @@ export class StyledColumnApiImpl extends ApiBase {
|
|
|
35
35
|
if (!column) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
|
-
return !!this.getStyledColumns().find((styledColumn) => !!styledColumn.
|
|
38
|
+
return !!this.getStyledColumns().find((styledColumn) => !!styledColumn.SparklineStyle && styledColumn.ColumnId === column.columnId);
|
|
39
39
|
}
|
|
40
40
|
getActiveStyledColumnForColumn(column) {
|
|
41
41
|
const styledColumns = this.getActiveStyledColumns();
|
|
@@ -4,6 +4,7 @@ import { ApiBase } from './ApiBase';
|
|
|
4
4
|
import { StaticThemes } from '../../themes';
|
|
5
5
|
import { ThemeInternalApi } from '../Internal/ThemeInternalApi';
|
|
6
6
|
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
7
|
+
import { logDeprecation } from '../../Utilities/logDeprecation';
|
|
7
8
|
export class ThemeApiImpl extends ApiBase {
|
|
8
9
|
constructor(_adaptable) {
|
|
9
10
|
super(_adaptable);
|
|
@@ -70,7 +71,8 @@ export class ThemeApiImpl extends ApiBase {
|
|
|
70
71
|
this.showModulePopup(ModuleConstants.ThemeModuleId);
|
|
71
72
|
}
|
|
72
73
|
getAgGridCurrentThemeName() {
|
|
73
|
-
|
|
74
|
+
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/`);
|
|
75
|
+
return this._adaptable.agGridThemeAdapter.getAgGridCurrentThemeClassNames();
|
|
74
76
|
}
|
|
75
77
|
editTheme(theme) {
|
|
76
78
|
this.dispatchAction(ThemeRedux.ThemeEdit(theme));
|
|
@@ -78,13 +78,14 @@ export class ActionColumnInternalApi extends ApiBase {
|
|
|
78
78
|
return { actionButtons, actionColumn };
|
|
79
79
|
}
|
|
80
80
|
updateAllActionColumnButtons(actionButtons) {
|
|
81
|
-
return actionButtons.map((actionButton) =>
|
|
82
|
-
...actionButton
|
|
83
|
-
Uuid
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
return actionButtons.map((actionButton) => {
|
|
82
|
+
actionButton = { ...actionButton };
|
|
83
|
+
actionButton.Uuid = createUuid();
|
|
84
|
+
if (actionButton.command) {
|
|
85
|
+
this.updateActionButtonCommand(actionButton);
|
|
86
|
+
}
|
|
87
|
+
return actionButton;
|
|
88
|
+
});
|
|
88
89
|
}
|
|
89
90
|
updateActionButtonCommand(button) {
|
|
90
91
|
switch (button.command) {
|
|
@@ -93,7 +94,7 @@ export class ActionColumnInternalApi extends ApiBase {
|
|
|
93
94
|
this.getRowFormApi().displayCreateRowForm();
|
|
94
95
|
};
|
|
95
96
|
button.tooltip = button.tooltip ? button.tooltip : 'Create Row';
|
|
96
|
-
button.icon = {
|
|
97
|
+
button.icon = button.icon ?? {
|
|
97
98
|
name: 'add',
|
|
98
99
|
};
|
|
99
100
|
break;
|
|
@@ -102,7 +103,7 @@ export class ActionColumnInternalApi extends ApiBase {
|
|
|
102
103
|
this.getRowFormApi().displayCloneRowForm(context.primaryKeyValue);
|
|
103
104
|
};
|
|
104
105
|
button.tooltip = button.tooltip ? button.tooltip : 'Clone Row';
|
|
105
|
-
button.icon = {
|
|
106
|
+
button.icon = button.icon ?? {
|
|
106
107
|
name: 'clone',
|
|
107
108
|
};
|
|
108
109
|
break;
|
|
@@ -117,22 +118,18 @@ export class ActionColumnInternalApi extends ApiBase {
|
|
|
117
118
|
this.getRowFormOptions().onRowFormSubmit?.(eventInfo);
|
|
118
119
|
};
|
|
119
120
|
button.tooltip = button.tooltip ? button.tooltip : 'Delete Row';
|
|
120
|
-
button.icon = button.icon
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
name: 'delete',
|
|
124
|
-
};
|
|
121
|
+
button.icon = button.icon ?? {
|
|
122
|
+
name: 'delete',
|
|
123
|
+
};
|
|
125
124
|
break;
|
|
126
125
|
case 'edit':
|
|
127
126
|
button.onClick = (button, context) => {
|
|
128
127
|
this.getRowFormApi().displayEditRowForm(context.primaryKeyValue);
|
|
129
128
|
};
|
|
130
129
|
button.tooltip = button.tooltip ? button.tooltip : 'Edit Row';
|
|
131
|
-
button.icon = button.icon
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
name: 'edit',
|
|
135
|
-
};
|
|
130
|
+
button.icon = button.icon ?? {
|
|
131
|
+
name: 'edit',
|
|
132
|
+
};
|
|
136
133
|
break;
|
|
137
134
|
}
|
|
138
135
|
}
|
|
@@ -187,7 +187,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
187
187
|
if (firstRowNode == undefined) {
|
|
188
188
|
return {};
|
|
189
189
|
}
|
|
190
|
-
const firstRowData = { ...firstRowNode?.data }
|
|
190
|
+
const firstRowData = firstRowNode?.data ? { ...firstRowNode?.data } : {};
|
|
191
191
|
// handle CalcCols which are not persisted in the rowModel
|
|
192
192
|
this.getCalculatedColumnApi()
|
|
193
193
|
.getCalculatedColumns()
|
|
@@ -92,7 +92,7 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
92
92
|
displayValue: gridCell.displayValue,
|
|
93
93
|
node,
|
|
94
94
|
column,
|
|
95
|
-
|
|
95
|
+
predicatesOperator: columnFilter.PredicatesOperator,
|
|
96
96
|
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
97
97
|
};
|
|
98
98
|
return this.getPredicateApi().handlePredicates(columnFilter.Predicates, predicateDefHandlerContext, true);
|
|
@@ -115,7 +115,7 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
115
115
|
const isNewAndActive = action.type === LayoutRedux.LAYOUT_COLUMN_FILTER_ADD &&
|
|
116
116
|
this.getColumnFilterApi().isColumnFilterActive(action.columnFilter);
|
|
117
117
|
const isClearAndPreviousWasActive = action.type === LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR &&
|
|
118
|
-
this.getColumnFilterApi().
|
|
118
|
+
!!this.getColumnFilterApi().getColumnFilterForColumn(action.columnId);
|
|
119
119
|
const isClearAllAtLeastOneActiveFilter = action.type === LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR_ALL &&
|
|
120
120
|
this.getColumnFilterApi()
|
|
121
121
|
.getColumnFilters()
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
2
|
import { AG_GRID_GROUPED_COLUMN } from '../../Utilities/Constants/GeneralConstants';
|
|
3
3
|
import uniq from 'lodash/uniq';
|
|
4
|
-
import { isArray } from 'lodash';
|
|
5
4
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
6
5
|
export function getAutoRowGroupColumnIdFor(columnId) {
|
|
7
6
|
return `${AG_GRID_GROUPED_COLUMN}-${columnId}`;
|
|
@@ -23,7 +22,7 @@ export class ColumnInternalApi extends ApiBase {
|
|
|
23
22
|
.getColumns()
|
|
24
23
|
.forEach((c) => {
|
|
25
24
|
const agGridColType = this.getAgGridColumnType(c.columnId);
|
|
26
|
-
if (isArray(agGridColType)) {
|
|
25
|
+
if (Array.isArray(agGridColType)) {
|
|
27
26
|
colTypes.push(...agGridColType);
|
|
28
27
|
}
|
|
29
28
|
else {
|
|
@@ -59,7 +59,12 @@ export class EventInternalApi extends ApiBase {
|
|
|
59
59
|
isToolbarStateChangedToHidden,
|
|
60
60
|
};
|
|
61
61
|
if (!isEqual(oldDashboardState, newDashboardState)) {
|
|
62
|
-
setTimeout(() =>
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
const eventApi = this.getEventApi();
|
|
64
|
+
if (eventApi) {
|
|
65
|
+
eventApi.emit('DashboardChanged', dashboardChangedInfo);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
fireAlertFiredEvent(alertToFire) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
2
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
3
3
|
import { Report, ReportData, ReportFormatType, ReportNameType, SystemReportName } from '../../PredefinedConfig/ExportState';
|
|
4
|
-
import { IRowNode } from 'ag-grid-enterprise';
|
|
4
|
+
import { CsvCell, ExcelCell, ExcelDataType, IRowNode } from 'ag-grid-enterprise';
|
|
5
5
|
import { AdaptableColumn, AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
6
6
|
import { BaseExportContext, DataFormatType, ExportDestinationType, ExportResultData } from '../../AdaptableOptions/ExportOptions';
|
|
7
7
|
export declare class ExportInternalApi extends ApiBase {
|
|
@@ -21,12 +21,7 @@ export declare class ExportInternalApi extends ApiBase {
|
|
|
21
21
|
getReportColumnScopeShortDescription(report: Report): string[];
|
|
22
22
|
getReportColumnScopeLongDescription(report: Report): string;
|
|
23
23
|
getReportExpressionDescription(report: Report, cols: AdaptableColumn[]): string;
|
|
24
|
-
getReportDataColumns(report: Report, includePrimaryKey?: boolean): AdaptableColumn[];
|
|
25
|
-
getReportDataRows(report: Report, columns: AdaptableColumn[], includePrimaryKey?: boolean): Record<string, any>[];
|
|
26
|
-
getReportData(report: Report, includePrimaryKey?: boolean): ReportData;
|
|
27
|
-
getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
|
|
28
24
|
convertReportDataToArray(reportData: ReportData): any[][];
|
|
29
|
-
getRowObjectForColumnIds(rowNode: IRowNode, columnIds: string[], reportName: string): Record<string, any>;
|
|
30
25
|
publishLiveLiveDataChangedEvent(reportDestination: 'ipushpull' | 'OpenFin', liveDataTrigger: 'Connected' | 'Disconnected' | 'SnapshotSent' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
|
|
31
26
|
getCellExportValueFromRowNode(rowNode: IRowNode, columnId: string, isVisualReport?: boolean): any;
|
|
32
27
|
getCellExportValueFromRawValue(rowNode: IRowNode, cellRawValue: any, columnId: string, isVisualReport?: boolean): any;
|
|
@@ -36,4 +31,13 @@ export declare class ExportInternalApi extends ApiBase {
|
|
|
36
31
|
sendReportToDestination(reportResult: ExportResultData, report: Report, format: ReportFormatType, destination: ExportDestinationType): void;
|
|
37
32
|
private sendReportToCustomDestination;
|
|
38
33
|
buildBaseExportContext(reportName: ReportNameType, reportFormat: ReportFormatType, exportDestination?: ExportDestinationType): BaseExportContext;
|
|
34
|
+
createCellCsv(cellContent: any): CsvCell;
|
|
35
|
+
createCellExcel(cellContent: any, cellType: ExcelDataType): ExcelCell;
|
|
36
|
+
createCellHeader(cellContent: any): ExcelCell;
|
|
37
|
+
getExternalReportData(externalReportName: ReportNameType, reportFormat: ReportFormatType, exportDestination: ExportDestinationType): Promise<ExportResultData | undefined>;
|
|
38
|
+
private buildGridReportColumns;
|
|
39
|
+
private buildExcelConverter;
|
|
40
|
+
private buildCsvConverter;
|
|
41
|
+
private executeGridExport;
|
|
42
|
+
private buildCsvExportParams;
|
|
39
43
|
}
|