@adaptabletools/adaptable 18.1.2 → 18.1.3
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 +1 -1
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -13
- package/src/AdaptableOptions/CommentOptions.d.ts +5 -0
- package/src/AdaptableOptions/NoteOptions.d.ts +6 -0
- package/src/Api/CommentApi.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +3 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +3 -8
- package/src/Api/Internal/AlertInternalApi.d.ts +1 -0
- package/src/Api/Internal/AlertInternalApi.js +9 -8
- package/src/Api/UserInterfaceApi.d.ts +4 -8
- package/src/PredefinedConfig/Common/CustomWindowConfig.d.ts +13 -0
- package/src/PredefinedConfig/Common/CustomWindowConfig.js +1 -0
- package/src/PredefinedConfig/Common/ProgressIndicatorConfig.d.ts +23 -0
- package/src/PredefinedConfig/Common/ProgressIndicatorConfig.js +1 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +8 -1
- package/src/PredefinedConfig/SystemState.d.ts +3 -5
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +4 -9
- package/src/Redux/ActionsReducers/SystemRedux.js +5 -7
- package/src/Strategy/LayoutModule.js +4 -2
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +3 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +9 -0
- package/src/Utilities/Services/QueryLanguageService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +12 -3
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +9 -1
- package/src/View/Comments/CommentsEditor.js +13 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +39 -11
- package/src/View/Note/NoteEditor.js +12 -5
- package/src/agGrid/AdaptableAgGrid.d.ts +3 -3
- package/src/agGrid/AdaptableAgGrid.js +9 -5
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
- package/src/agGrid/defaultAdaptableOptions.js +6 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +12 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +17 -5
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +24 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +12 -8
- package/src/types.d.ts +3 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.3",
|
|
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",
|
|
@@ -49,7 +49,7 @@ export interface DistinctColumnValuesParams {
|
|
|
49
49
|
skipRowNode?: IRowNode;
|
|
50
50
|
permittedValues?: any[];
|
|
51
51
|
}
|
|
52
|
-
export type AdaptableVariant = 'vanilla' | 'react' | 'angular';
|
|
52
|
+
export type AdaptableVariant = 'vanilla' | 'react' | 'angular' | 'vue';
|
|
53
53
|
/**
|
|
54
54
|
* The only interface for Adaptable
|
|
55
55
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseContext } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Base Component for Bespoke Components - Can be Angular or React
|
|
6
6
|
*/
|
|
7
|
-
export type AdaptableFrameworkComponent = AngularFrameworkComponent | ReactFrameworkComponent;
|
|
7
|
+
export type AdaptableFrameworkComponent = AngularFrameworkComponent | ReactFrameworkComponent | VueFrameworkComponent;
|
|
8
8
|
/**
|
|
9
9
|
* Angular component defined by its type and (optional) initialisation callback
|
|
10
10
|
*/
|
|
@@ -31,6 +31,9 @@ export type AngularFrameworkComponent<T = unknown> = {
|
|
|
31
31
|
export type ReactFrameworkComponent = ({ adaptableApi, }: {
|
|
32
32
|
adaptableApi: AdaptableApi;
|
|
33
33
|
}) => ReactElement;
|
|
34
|
+
export type VueFrameworkComponent<Component extends unknown = unknown> = ({ adaptableApi, }: {
|
|
35
|
+
adaptableApi: AdaptableApi;
|
|
36
|
+
}) => Component;
|
|
34
37
|
/**
|
|
35
38
|
* Context provided for any custom rendering
|
|
36
39
|
*/
|
|
@@ -59,14 +62,3 @@ export interface CustomRenderFunction {
|
|
|
59
62
|
*/
|
|
60
63
|
(customRenderContext: CustomRenderContext): string | null;
|
|
61
64
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Config used to open a custom window
|
|
64
|
-
*/
|
|
65
|
-
export interface CustomWindowConfig {
|
|
66
|
-
id: string;
|
|
67
|
-
title?: string;
|
|
68
|
-
icon?: AdaptableSystemIconName;
|
|
69
|
-
render?: (customRenderContext: CustomRenderContext) => string | null;
|
|
70
|
-
frameworkComponent?: AdaptableFrameworkComponent;
|
|
71
|
-
onFrameworkComponentDestroyed?: () => void;
|
|
72
|
-
}
|
|
@@ -22,6 +22,11 @@ export interface CommentOptions<TData = any> {
|
|
|
22
22
|
* @defaultValue 'dd-MM-yyyy HH:mm:ss'
|
|
23
23
|
*/
|
|
24
24
|
dateFormat?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Show the Close Button in the Comments Popup
|
|
27
|
+
* @defaultValue true
|
|
28
|
+
*/
|
|
29
|
+
showPopupCloseButton?: boolean;
|
|
25
30
|
}
|
|
26
31
|
/**
|
|
27
32
|
* Context used when determining if a cell can show Comments
|
|
@@ -13,6 +13,12 @@ export interface NoteOptions<TData = any> {
|
|
|
13
13
|
* @defaultValue 'dd-MM-yyyy HH:mm:ss'
|
|
14
14
|
*/
|
|
15
15
|
dateFormat?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Show the Close Button in the Notes Popup
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue true
|
|
20
|
+
*/
|
|
21
|
+
showPopupCloseButton?: boolean;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
24
|
* Context used when determining if a Note can be added to a Cell
|
package/src/Api/CommentApi.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
2
2
|
import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
|
|
3
3
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
|
|
5
|
-
import {
|
|
5
|
+
import { AdaptableObjectTag, CustomWindowConfig, GridCell } from '../../types';
|
|
6
6
|
import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
|
|
7
7
|
import { UserInterfaceApi } from '../UserInterfaceApi';
|
|
8
|
+
import { ProgressIndicatorConfig } from '../../PredefinedConfig/Common/ProgressIndicatorConfig';
|
|
8
9
|
import { ApiBase } from './ApiBase';
|
|
9
10
|
export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfaceApi {
|
|
10
11
|
internalApi: UserInterfaceInternalApi;
|
|
@@ -30,13 +31,7 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
30
31
|
getCustomIconDefinition(iconName: string): import("../../types").AdaptableIcon | import("../../types").CustomIcon;
|
|
31
32
|
showLoadingScreen(): void;
|
|
32
33
|
hideLoadingScreen(): void;
|
|
33
|
-
showProgressIndicator(config:
|
|
34
|
-
text: string;
|
|
35
|
-
message?: string;
|
|
36
|
-
render?: CustomRenderFunction;
|
|
37
|
-
frameworkComponent?: AdaptableFrameworkComponent;
|
|
38
|
-
delay?: number;
|
|
39
|
-
}): void;
|
|
34
|
+
showProgressIndicator(config: ProgressIndicatorConfig): void;
|
|
40
35
|
hideProgressIndicator(): void;
|
|
41
36
|
openCustomWindowPopup(config: CustomWindowConfig): {
|
|
42
37
|
close: () => void;
|
|
@@ -145,6 +145,7 @@ export declare class AlertInternalApi extends ApiBase {
|
|
|
145
145
|
showAlertsForGridDataChanges(gridDataChangedInfo: GridDataChangedInfo, alertDefinitions: AlertDefinition[]): void;
|
|
146
146
|
shouldFireAlertOnClient(alertDefinition: AlertDefinition): boolean;
|
|
147
147
|
getDefaultAlertNotificationForm(): AlertButtonForm;
|
|
148
|
+
getDefaultButton(): AlertButton<AlertFormContext<any>>;
|
|
148
149
|
/**
|
|
149
150
|
* Supported tokens:
|
|
150
151
|
* - column-that-changed-name -> [column]
|
|
@@ -602,14 +602,15 @@ export class AlertInternalApi extends ApiBase {
|
|
|
602
602
|
// (i.e. to be able to display the AlertForm with the default buttons when the user has not defined any buttons)
|
|
603
603
|
return {
|
|
604
604
|
fields: [],
|
|
605
|
-
Buttons: [
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
605
|
+
Buttons: [this.getDefaultButton()],
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
getDefaultButton() {
|
|
609
|
+
return {
|
|
610
|
+
Label: 'OK',
|
|
611
|
+
ButtonStyle: {
|
|
612
|
+
variant: 'raised',
|
|
613
|
+
},
|
|
613
614
|
};
|
|
614
615
|
}
|
|
615
616
|
/**
|
|
@@ -3,8 +3,9 @@ import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
|
3
3
|
import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../AdaptableOptions/UserInterfaceOptions';
|
|
4
4
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
5
5
|
import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { AdaptableIcon } from '../types';
|
|
7
|
+
import { CustomWindowConfig } from '../PredefinedConfig/Common/CustomWindowConfig';
|
|
8
|
+
import { ProgressIndicatorConfig } from '../PredefinedConfig/Common/ProgressIndicatorConfig';
|
|
8
9
|
/**
|
|
9
10
|
* Functions relating to User Interface section of Adaptable State
|
|
10
11
|
*/
|
|
@@ -87,12 +88,7 @@ export interface UserInterfaceApi {
|
|
|
87
88
|
* @param config.frameworkComponent - the framework (React/Angular) component to render as progress indicator
|
|
88
89
|
* @param config.delay - delay before showing the progress indicator (in milliseconds)
|
|
89
90
|
*/
|
|
90
|
-
showProgressIndicator(config:
|
|
91
|
-
text?: string;
|
|
92
|
-
render?: CustomRenderFunction;
|
|
93
|
-
frameworkComponent?: AdaptableFrameworkComponent;
|
|
94
|
-
delay?: number;
|
|
95
|
-
}): void;
|
|
91
|
+
showProgressIndicator(config: ProgressIndicatorConfig): void;
|
|
96
92
|
/**
|
|
97
93
|
* Hides the progress indicator
|
|
98
94
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AdaptableSystemIconName } from '../../types';
|
|
2
|
+
import { CustomRenderContext, AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFrameworkComponent';
|
|
3
|
+
/**
|
|
4
|
+
* Config used to open a custom window
|
|
5
|
+
*/
|
|
6
|
+
export interface CustomWindowConfig {
|
|
7
|
+
id: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
icon?: AdaptableSystemIconName;
|
|
10
|
+
render?: (customRenderContext: CustomRenderContext) => string | null;
|
|
11
|
+
frameworkComponent?: AdaptableFrameworkComponent;
|
|
12
|
+
onFrameworkComponentDestroyed?: () => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AdaptableFrameworkComponent } from '../../types';
|
|
2
|
+
import { CustomRenderFunction } from '../../AdaptableOptions/AdaptableFrameworkComponent';
|
|
3
|
+
/**
|
|
4
|
+
* Config when displaying a Progress Indicator
|
|
5
|
+
*/
|
|
6
|
+
export interface ProgressIndicatorConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Text to display
|
|
9
|
+
*/
|
|
10
|
+
text?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Render function
|
|
13
|
+
*/
|
|
14
|
+
render?: CustomRenderFunction;
|
|
15
|
+
/**
|
|
16
|
+
* A React or Angular Framework component to use
|
|
17
|
+
*/
|
|
18
|
+
frameworkComponent?: AdaptableFrameworkComponent;
|
|
19
|
+
/**
|
|
20
|
+
* Length of Delay
|
|
21
|
+
*/
|
|
22
|
+
delay?: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SuspendableObject } from './SuspendableObject';
|
|
2
|
+
import { TypeHint } from './Types';
|
|
2
3
|
export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
|
|
3
4
|
export declare const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = "WEIGHTED_AVERAGE";
|
|
4
5
|
export declare const summarySupportedExpressions: readonly ["MIN", "MAX", "SUM", "AVG", "COUNT", "MEDIAN", "MODE", "DISTINCT", "ONLY", "STD_DEVIATION", "WEIGHTED_AVERAGE"];
|
|
5
|
-
export type
|
|
6
|
+
export type SystemSummarySupportedExpression = (typeof summarySupportedExpressions)[number];
|
|
7
|
+
export type SummarySupportedExpression = TypeHint<string, SystemSummarySupportedExpression>;
|
|
6
8
|
/**
|
|
7
9
|
* Position of Row Summary - 'Top' or 'Bottom'
|
|
8
10
|
*/
|
|
@@ -19,4 +21,9 @@ export interface RowSummary extends SuspendableObject {
|
|
|
19
21
|
* Map of Columns with Summary Expressions
|
|
20
22
|
*/
|
|
21
23
|
ColumnsMap: Record<string, SummarySupportedExpression>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to include only filtered rows in the summary.
|
|
26
|
+
* @defauts true
|
|
27
|
+
*/
|
|
28
|
+
IncludeOnlyFilteredRows?: boolean;
|
|
22
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PreviewInfo } from '../Utilities/Interface/Preview';
|
|
2
2
|
import { InternalState } from './InternalState';
|
|
3
3
|
import { BulkUpdateValidationResult } from '../Strategy/Interface/IBulkUpdateModule';
|
|
4
|
-
import {
|
|
4
|
+
import { CellAddress, CellDataChangedInfo, GridCell, SmartEditOperation } from '../types';
|
|
5
5
|
import type { IPushPullState, IPushPullReport, IPushPullDomain } from './IPushPullState';
|
|
6
6
|
import { OpenFinState, OpenFinReport } from './OpenFinState';
|
|
7
7
|
import { AdaptableAlert } from './Common/AdaptableAlert';
|
|
@@ -14,6 +14,7 @@ import { SummaryOperation } from './Common/Enums';
|
|
|
14
14
|
import { ChartModel } from '@ag-grid-community/core';
|
|
15
15
|
import { ExternalChartDefinition } from './ChartingState';
|
|
16
16
|
import { CachedQuery } from './NamedQueryState';
|
|
17
|
+
import { ProgressIndicatorConfig } from './Common/ProgressIndicatorConfig';
|
|
17
18
|
export type { IPushPullReport, IPushPullDomain };
|
|
18
19
|
export type { OpenFinReport };
|
|
19
20
|
type ROW_PRIMARY_KEY = string;
|
|
@@ -110,9 +111,6 @@ export interface SystemState extends InternalState, IPushPullState, OpenFinState
|
|
|
110
111
|
rowSummaries?: SystemRowSummary[];
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
|
-
export interface ProgressIndicator {
|
|
114
|
+
export interface ProgressIndicator extends ProgressIndicatorConfig {
|
|
114
115
|
active: boolean;
|
|
115
|
-
text?: string;
|
|
116
|
-
render?: CustomRenderFunction;
|
|
117
|
-
frameworkComponent?: AdaptableFrameworkComponent;
|
|
118
116
|
}
|
|
@@ -13,9 +13,10 @@ import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
|
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
14
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
15
15
|
import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
16
|
-
import { DataImportedInfo, DataSet, CellAddress
|
|
16
|
+
import { DataImportedInfo, DataSet, CellAddress } from '../../types';
|
|
17
17
|
import { ChartModel } from '@ag-grid-community/core';
|
|
18
18
|
import { CachedQuery } from '../../PredefinedConfig/NamedQueryState';
|
|
19
|
+
import { ProgressIndicatorConfig } from '../../PredefinedConfig/Common/ProgressIndicatorConfig';
|
|
19
20
|
export declare const FLASHING_CELL_ROW_KEY = "__ROW";
|
|
20
21
|
export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
|
|
21
22
|
export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
|
|
@@ -200,9 +201,7 @@ export interface SystemCellSummaryChangeOperationAction extends Redux.Action {
|
|
|
200
201
|
cellSummaryOperation: SummaryOperation | string;
|
|
201
202
|
}
|
|
202
203
|
export interface SystemProgressIndicatorShowAction extends Redux.Action {
|
|
203
|
-
|
|
204
|
-
render?: CustomRenderFunction;
|
|
205
|
-
frameworkComponent?: AdaptableFrameworkComponent;
|
|
204
|
+
progressIndicatorConfig: ProgressIndicatorConfig;
|
|
206
205
|
}
|
|
207
206
|
export interface SystemProgressIndicatorHideAction extends Redux.Action {
|
|
208
207
|
}
|
|
@@ -304,11 +303,7 @@ export declare const SetNewColumnListOrder: (VisibleColumnList: string[]) => Set
|
|
|
304
303
|
export declare const SetLastAppliedShortcut: (gridCell: GridCell | undefined) => SetLastAppliedShortcutAction;
|
|
305
304
|
export declare const SystemCachedQueryAdd: (cachedQuery: CachedQuery) => SystemCachedQueryAddAction;
|
|
306
305
|
export declare const SystemCellSummaryChangeOperation: (cellSummaryOperation: SummaryOperation | string) => SystemCellSummaryChangeOperationAction;
|
|
307
|
-
export declare const SystemProgressIndicatorShow: (
|
|
308
|
-
text?: string;
|
|
309
|
-
render?: CustomRenderFunction;
|
|
310
|
-
frameworkComponent?: AdaptableFrameworkComponent;
|
|
311
|
-
}) => SystemProgressIndicatorShowAction;
|
|
306
|
+
export declare const SystemProgressIndicatorShow: (progressIndicatorConfig: ProgressIndicatorConfig) => SystemProgressIndicatorShowAction;
|
|
312
307
|
export declare const SystemProgressIndicatorHide: () => SystemProgressIndicatorHideAction;
|
|
313
308
|
export declare const SystemLicenseShowWatermark: (text: string) => SystemLicenseShowWatermarkAction;
|
|
314
309
|
export declare const SystemLicenseDisablePersistence: () => SystemLicenseDisablePersistenceAction;
|
|
@@ -220,11 +220,9 @@ export const SystemCellSummaryChangeOperation = (cellSummaryOperation) => ({
|
|
|
220
220
|
type: SYSTEM_CELL_SUMMARY_CHANGE_OPERATION,
|
|
221
221
|
cellSummaryOperation: cellSummaryOperation,
|
|
222
222
|
});
|
|
223
|
-
export const SystemProgressIndicatorShow = (
|
|
223
|
+
export const SystemProgressIndicatorShow = (progressIndicatorConfig) => ({
|
|
224
224
|
type: SYSTEM_PROGRESS_INDICATOR_SHOW,
|
|
225
|
-
|
|
226
|
-
render: config.render,
|
|
227
|
-
frameworkComponent: config.frameworkComponent,
|
|
225
|
+
progressIndicatorConfig: progressIndicatorConfig,
|
|
228
226
|
});
|
|
229
227
|
export const SystemProgressIndicatorHide = () => ({
|
|
230
228
|
type: SYSTEM_PROGRESS_INDICATOR_HIDE,
|
|
@@ -629,9 +627,9 @@ export const SystemReducer = (state = initialState, action) => {
|
|
|
629
627
|
const updatedState = {
|
|
630
628
|
ProgressIndicator: {
|
|
631
629
|
active: true,
|
|
632
|
-
text: actionTypedAdd.text,
|
|
633
|
-
render: actionTypedAdd.render,
|
|
634
|
-
frameworkComponent: actionTypedAdd.frameworkComponent,
|
|
630
|
+
text: actionTypedAdd.progressIndicatorConfig.text,
|
|
631
|
+
render: actionTypedAdd.progressIndicatorConfig.render,
|
|
632
|
+
frameworkComponent: actionTypedAdd.progressIndicatorConfig.frameworkComponent,
|
|
635
633
|
},
|
|
636
634
|
};
|
|
637
635
|
return Object.assign({}, state, updatedState);
|
|
@@ -389,8 +389,10 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
389
389
|
.getModuleById('Schedule')
|
|
390
390
|
.setUpScheduleJobs();
|
|
391
391
|
// CustomSort, FlashingCell, FormatColumn
|
|
392
|
-
// we need to
|
|
393
|
-
this.api.internalApi
|
|
392
|
+
// we need to re-setup the column defs, as some colDefs properties may be changed
|
|
393
|
+
this.api.internalApi
|
|
394
|
+
.getAdaptableInstance()
|
|
395
|
+
.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
|
|
394
396
|
}
|
|
395
397
|
getReferencedNamedQueryNames(layout) {
|
|
396
398
|
var _a;
|
|
@@ -3,7 +3,7 @@ export const getFilterPreview = (columnFilter, api) => {
|
|
|
3
3
|
const columnIdToFriendlyName = (columnId) => {
|
|
4
4
|
return api.columnApi.getFriendlyNameForColumnId(columnId);
|
|
5
5
|
};
|
|
6
|
-
return `[${columnIdToFriendlyName(columnFilter.ColumnId)}: ${(_a = columnFilter === null || columnFilter === void 0 ? void 0 : columnFilter.Predicate) === null || _a === void 0 ? void 0 : _a.PredicateId}
|
|
6
|
+
return `[${columnIdToFriendlyName(columnFilter.ColumnId)}: ${(_a = columnFilter === null || columnFilter === void 0 ? void 0 : columnFilter.Predicate) === null || _a === void 0 ? void 0 : _a.PredicateId}${((_c = (_b = columnFilter.Predicate) === null || _b === void 0 ? void 0 : _b.Inputs) !== null && _c !== void 0 ? _c : [])
|
|
7
7
|
.map((input) => {
|
|
8
8
|
if (typeof input === 'string') {
|
|
9
9
|
return input;
|
|
@@ -10,3 +10,6 @@
|
|
|
10
10
|
export declare function setInPath<T>(obj: any, path: string[], value: any): T;
|
|
11
11
|
export declare function isObjectEmpty(obj?: any): boolean;
|
|
12
12
|
export declare const deepClone: (obj: any) => any;
|
|
13
|
+
export declare const diff: <T extends {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}>(obj1: T, obj2: T) => (keyof T)[];
|
|
@@ -20,3 +20,12 @@ export function isObjectEmpty(obj) {
|
|
|
20
20
|
export const deepClone = (obj) => {
|
|
21
21
|
return JSON.parse(JSON.stringify(obj));
|
|
22
22
|
};
|
|
23
|
+
export const diff = (obj1, obj2) => {
|
|
24
|
+
let changed = [];
|
|
25
|
+
for (const key of Object.keys(obj1)) {
|
|
26
|
+
if (obj1[key] !== obj2[key]) {
|
|
27
|
+
changed.push(key);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return changed;
|
|
31
|
+
};
|
|
@@ -437,6 +437,7 @@ export class QueryLanguageService {
|
|
|
437
437
|
},
|
|
438
438
|
description: customExpressionDefinition.description,
|
|
439
439
|
signatures: customExpressionDefinition.signatures,
|
|
440
|
+
inputs: customExpressionDefinition.inputTypes,
|
|
440
441
|
};
|
|
441
442
|
acc[expressionName] = expression;
|
|
442
443
|
return acc;
|
|
@@ -96,7 +96,10 @@ export class RowSummaryService {
|
|
|
96
96
|
const rowSummaries = (_a = this.api.layoutApi.getCurrentLayout().RowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
97
97
|
const rowSummariesResults = rowSummaries
|
|
98
98
|
.filter((rowSummary) => !rowSummary.IsSuspended)
|
|
99
|
-
.map((
|
|
99
|
+
.map((rowSummary) => {
|
|
100
|
+
const { ColumnsMap, Position,
|
|
101
|
+
// it defaults to true
|
|
102
|
+
IncludeOnlyFilteredRows = true, } = rowSummary;
|
|
100
103
|
return {
|
|
101
104
|
Position,
|
|
102
105
|
RowData: Object.entries(ColumnsMap !== null && ColumnsMap !== void 0 ? ColumnsMap : {}).reduce((acc, [columnId, expression]) => {
|
|
@@ -104,7 +107,7 @@ export class RowSummaryService {
|
|
|
104
107
|
if (columnId === 'Uuid' || columnId === 'Source') {
|
|
105
108
|
return acc;
|
|
106
109
|
}
|
|
107
|
-
const key = `${columnId}-${expression}`;
|
|
110
|
+
const key = `${columnId}-${expression}-IncludeOnlyFilteredRows=${IncludeOnlyFilteredRows ? 'filtered' : 'all'}`;
|
|
108
111
|
let expressionLiveValue = this.cachedCellSummary.get(key);
|
|
109
112
|
if (expressionLiveValue) {
|
|
110
113
|
if (!reason) {
|
|
@@ -130,7 +133,13 @@ export class RowSummaryService {
|
|
|
130
133
|
expressionLiveValue = new AggregatedScalarLiveValue({
|
|
131
134
|
aggregatedScalarExpression,
|
|
132
135
|
}, ModuleConstants.LayoutModuleId, this.api, () => {
|
|
133
|
-
|
|
136
|
+
var _a;
|
|
137
|
+
if ((_a = rowSummary.IncludeOnlyFilteredRows) !== null && _a !== void 0 ? _a : true) {
|
|
138
|
+
return this.api.gridApi.getVisibleRowNodes();
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
return this.api.gridApi.getAllRowNodes();
|
|
142
|
+
}
|
|
134
143
|
});
|
|
135
144
|
}
|
|
136
145
|
catch (e) {
|
|
@@ -25,9 +25,10 @@ export const AlertPreview = (_a) => {
|
|
|
25
25
|
return button;
|
|
26
26
|
}, [alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.MessageType]);
|
|
27
27
|
const alertToPreview = React.useMemo(() => {
|
|
28
|
+
var _a;
|
|
28
29
|
const alertForm = alertDefinition.AlertForm || api.alertApi.internalApi.getDefaultAlertNotificationForm();
|
|
29
30
|
if (typeof alertForm !== 'string') {
|
|
30
|
-
alertForm.Buttons = alertForm.Buttons.map(mapButtons);
|
|
31
|
+
alertForm.Buttons = ((_a = alertForm.Buttons) !== null && _a !== void 0 ? _a : []).map(mapButtons);
|
|
31
32
|
}
|
|
32
33
|
const result = {
|
|
33
34
|
alertType: 'generic',
|
|
@@ -57,6 +58,7 @@ export const AlertNotificationWizardSection = (props) => {
|
|
|
57
58
|
React.createElement(Tabs.Tab, null, "Notification Options"),
|
|
58
59
|
React.createElement(Tabs.Content, null,
|
|
59
60
|
React.createElement(CheckBox, { checked: (_a = data.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification, onChange: (DisplayNotification) => {
|
|
61
|
+
var _a, _b, _c;
|
|
60
62
|
const newAlertDefinition = Object.assign(Object.assign({}, data), { AlertProperties: Object.assign(Object.assign({}, data.AlertProperties), { DisplayNotification }) });
|
|
61
63
|
if (!DisplayNotification && typeof newAlertDefinition.AlertForm === 'object') {
|
|
62
64
|
delete newAlertDefinition.AlertForm.Buttons;
|
|
@@ -65,6 +67,12 @@ export const AlertNotificationWizardSection = (props) => {
|
|
|
65
67
|
newAlertDefinition.AlertForm =
|
|
66
68
|
api.alertApi.internalApi.getDefaultAlertNotificationForm();
|
|
67
69
|
}
|
|
70
|
+
// make sure we have at least one button
|
|
71
|
+
if (typeof newAlertDefinition.AlertForm === 'object' && (!((_a = newAlertDefinition.AlertForm) === null || _a === void 0 ? void 0 : _a.Buttons) || ((_c = (_b = newAlertDefinition.AlertForm) === null || _b === void 0 ? void 0 : _b.Buttons) === null || _c === void 0 ? void 0 : _c.length) === 0)) {
|
|
72
|
+
newAlertDefinition.AlertForm.Buttons = [
|
|
73
|
+
api.alertApi.internalApi.getDefaultButton()
|
|
74
|
+
];
|
|
75
|
+
}
|
|
68
76
|
props.onChange(newAlertDefinition);
|
|
69
77
|
} }, "Display a Notification when Alert is triggered (with action buttons)"),
|
|
70
78
|
((_b = data.AlertProperties) === null || _b === void 0 ? void 0 : _b.DisplayNotification) ? (typeof data.AlertForm === 'string' ? (React.createElement(Text, { fontSize: 2 }, "Alert buttons cannot be customized because form is dynamically driven")) : (React.createElement(AlertButtonsEditor, { alertType: props.alertType, AlertButtons: (_c = data.AlertForm) === null || _c === void 0 ? void 0 : _c.Buttons, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
|
|
@@ -18,7 +18,9 @@ import AdaptableInput from '../Components/AdaptableInput';
|
|
|
18
18
|
// [text]
|
|
19
19
|
// [show-all-comments-button]
|
|
20
20
|
export const CommentsEditor = (props) => {
|
|
21
|
+
var _a, _b;
|
|
21
22
|
const adaptable = useAdaptable();
|
|
23
|
+
const showCloseButton = (_b = (_a = adaptable.adaptableOptions.commentOptions) === null || _a === void 0 ? void 0 : _a.showPopupCloseButton) !== null && _b !== void 0 ? _b : true;
|
|
22
24
|
const cellAddress = useSelector((state) => SystemCommentsAndNotesSelector(state.System));
|
|
23
25
|
const userId = React.useMemo(() => {
|
|
24
26
|
return adaptable.api.optionsApi.getUserName();
|
|
@@ -48,7 +50,17 @@ export const CommentsEditor = (props) => {
|
|
|
48
50
|
if (!commentThread) {
|
|
49
51
|
return null;
|
|
50
52
|
}
|
|
51
|
-
return (React.createElement(Panel, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup"
|
|
53
|
+
return (React.createElement(Panel, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup", onKeyDown: (event) => {
|
|
54
|
+
if (event.key === 'Escape') {
|
|
55
|
+
adaptable.api.commentApi.hideCommentsPopup();
|
|
56
|
+
}
|
|
57
|
+
} },
|
|
58
|
+
showCloseButton && (React.createElement(Flex, null,
|
|
59
|
+
React.createElement(Box, { flex: 1 }),
|
|
60
|
+
React.createElement(SimpleButton, { onClick: (event) => {
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
adaptable.api.commentApi.hideCommentsPopup();
|
|
63
|
+
}, variant: "text", icon: "close" }))),
|
|
52
64
|
React.createElement(Flex, { style: {
|
|
53
65
|
overflow: 'auto',
|
|
54
66
|
maxHeight: 300,
|