@adaptabletools/adaptable-cjs 18.1.2 → 18.1.4-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
  3. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -13
  4. package/src/AdaptableOptions/CommentOptions.d.ts +5 -0
  5. package/src/AdaptableOptions/NoteOptions.d.ts +6 -0
  6. package/src/Api/CommentApi.d.ts +4 -0
  7. package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -0
  8. package/src/Api/Implementation/CommentsApiImpl.js +3 -0
  9. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +3 -8
  10. package/src/Api/Internal/AlertInternalApi.d.ts +1 -0
  11. package/src/Api/Internal/AlertInternalApi.js +9 -8
  12. package/src/Api/UserInterfaceApi.d.ts +4 -8
  13. package/src/PredefinedConfig/Common/CustomWindowConfig.d.ts +13 -0
  14. package/src/PredefinedConfig/Common/CustomWindowConfig.js +2 -0
  15. package/src/PredefinedConfig/Common/ProgressIndicatorConfig.d.ts +23 -0
  16. package/src/PredefinedConfig/Common/ProgressIndicatorConfig.js +2 -0
  17. package/src/PredefinedConfig/Common/RowSummary.d.ts +8 -1
  18. package/src/PredefinedConfig/SystemState.d.ts +3 -5
  19. package/src/Redux/ActionsReducers/SystemRedux.d.ts +4 -9
  20. package/src/Redux/ActionsReducers/SystemRedux.js +5 -7
  21. package/src/Strategy/LayoutModule.js +4 -2
  22. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
  23. package/src/Utilities/Extensions/ObjectExtensions.d.ts +3 -0
  24. package/src/Utilities/Extensions/ObjectExtensions.js +11 -1
  25. package/src/Utilities/Services/QueryLanguageService.js +1 -0
  26. package/src/Utilities/Services/RowSummaryService.js +12 -3
  27. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +9 -1
  28. package/src/View/Comments/CommentsEditor.js +13 -1
  29. package/src/View/Layout/Wizard/sections/RowSummarySection.js +39 -11
  30. package/src/View/Note/NoteEditor.js +12 -5
  31. package/src/agGrid/AdaptableAgGrid.d.ts +3 -3
  32. package/src/agGrid/AdaptableAgGrid.js +8 -4
  33. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
  34. package/src/agGrid/defaultAdaptableOptions.js +6 -0
  35. package/src/components/ExpressionEditor/ExpressionPreview.js +12 -6
  36. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +17 -5
  37. package/src/env.js +2 -2
  38. package/src/metamodel/adaptable.metamodel.d.ts +24 -0
  39. package/src/metamodel/adaptable.metamodel.js +1 -1
  40. package/src/parser/src/types.d.ts +12 -8
  41. package/src/types.d.ts +3 -1
  42. package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-cjs",
3
- "version": "18.1.2",
3
+ "version": "18.1.4-canary.0",
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 { AdaptableSystemIconName, BaseContext } from '../types';
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
@@ -53,4 +53,8 @@ export interface CommentApi {
53
53
  * Clear all Comment Threads in the grid
54
54
  */
55
55
  clearGridComments(): void;
56
+ /**
57
+ * Close the Comment Popup
58
+ */
59
+ hideCommentsPopup(): void;
56
60
  }
@@ -15,4 +15,5 @@ export declare class CommentsApiImpl extends ApiBase implements CommentApi {
15
15
  deleteCommentThread(cellAddress: CellAddress): void;
16
16
  setGridComments(cellComments: CommentThread[]): void;
17
17
  clearGridComments(): void;
18
+ hideCommentsPopup(): void;
18
19
  }
@@ -48,5 +48,8 @@ class CommentsApiImpl extends ApiBase_1.ApiBase {
48
48
  clearGridComments() {
49
49
  this.setGridComments([]);
50
50
  }
51
+ hideCommentsPopup() {
52
+ this.adaptable.api.internalApi.getCellPopupService().hidePopup();
53
+ }
51
54
  }
52
55
  exports.CommentsApiImpl = CommentsApiImpl;
@@ -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 { AdaptableFrameworkComponent, AdaptableObjectTag, CustomRenderFunction, CustomWindowConfig, GridCell } from '../../types';
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]
@@ -606,14 +606,15 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
606
606
  // (i.e. to be able to display the AlertForm with the default buttons when the user has not defined any buttons)
607
607
  return {
608
608
  fields: [],
609
- Buttons: [
610
- {
611
- Label: 'OK',
612
- ButtonStyle: {
613
- variant: 'raised',
614
- },
615
- },
616
- ],
609
+ Buttons: [this.getDefaultButton()],
610
+ };
611
+ }
612
+ getDefaultButton() {
613
+ return {
614
+ Label: 'OK',
615
+ ButtonStyle: {
616
+ variant: 'raised',
617
+ },
617
618
  };
618
619
  }
619
620
  /**
@@ -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 { AdaptableFrameworkComponent, AdaptableIcon } from '../types';
7
- import { CustomRenderFunction, CustomWindowConfig } from '../AdaptableOptions/AdaptableFrameworkComponent';
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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 SummarySupportedExpression = (typeof summarySupportedExpressions)[number];
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 { AdaptableFrameworkComponent, CellAddress, CellDataChangedInfo, CustomRenderFunction, GridCell, SmartEditOperation } from '../types';
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, CustomRenderFunction, AdaptableFrameworkComponent } from '../../types';
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
- text?: string;
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: (config: {
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;
@@ -257,11 +257,9 @@ const SystemCellSummaryChangeOperation = (cellSummaryOperation) => ({
257
257
  cellSummaryOperation: cellSummaryOperation,
258
258
  });
259
259
  exports.SystemCellSummaryChangeOperation = SystemCellSummaryChangeOperation;
260
- const SystemProgressIndicatorShow = (config) => ({
260
+ const SystemProgressIndicatorShow = (progressIndicatorConfig) => ({
261
261
  type: exports.SYSTEM_PROGRESS_INDICATOR_SHOW,
262
- text: config.text,
263
- render: config.render,
264
- frameworkComponent: config.frameworkComponent,
262
+ progressIndicatorConfig: progressIndicatorConfig,
265
263
  });
266
264
  exports.SystemProgressIndicatorShow = SystemProgressIndicatorShow;
267
265
  const SystemProgressIndicatorHide = () => ({
@@ -702,9 +700,9 @@ const SystemReducer = (state = initialState, action) => {
702
700
  const updatedState = {
703
701
  ProgressIndicator: {
704
702
  active: true,
705
- text: actionTypedAdd.text,
706
- render: actionTypedAdd.render,
707
- frameworkComponent: actionTypedAdd.frameworkComponent,
703
+ text: actionTypedAdd.progressIndicatorConfig.text,
704
+ render: actionTypedAdd.progressIndicatorConfig.render,
705
+ frameworkComponent: actionTypedAdd.progressIndicatorConfig.frameworkComponent,
708
706
  },
709
707
  };
710
708
  return Object.assign({}, state, updatedState);
@@ -393,8 +393,10 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
393
393
  .getModuleById('Schedule')
394
394
  .setUpScheduleJobs();
395
395
  // CustomSort, FlashingCell, FormatColumn
396
- // we need to refresh the column defs, as some configs may have changed
397
- this.api.internalApi.getAdaptableInstance().updateColumnModelAndRefreshGrid();
396
+ // we need to re-setup the column defs, as some colDefs properties may be changed
397
+ this.api.internalApi
398
+ .getAdaptableInstance()
399
+ .updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
398
400
  }
399
401
  getReferencedNamedQueryNames(layout) {
400
402
  var _a;
@@ -6,7 +6,7 @@ const getFilterPreview = (columnFilter, api) => {
6
6
  const columnIdToFriendlyName = (columnId) => {
7
7
  return api.columnApi.getFriendlyNameForColumnId(columnId);
8
8
  };
9
- 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 : [])
9
+ 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 : [])
10
10
  .map((input) => {
11
11
  if (typeof input === 'string') {
12
12
  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)[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deepClone = exports.isObjectEmpty = exports.setInPath = void 0;
3
+ exports.diff = exports.deepClone = exports.isObjectEmpty = exports.setInPath = void 0;
4
4
  /**
5
5
  * Returns a new object with the property updated.
6
6
  * The property is identified by the path.
@@ -26,3 +26,13 @@ const deepClone = (obj) => {
26
26
  return JSON.parse(JSON.stringify(obj));
27
27
  };
28
28
  exports.deepClone = deepClone;
29
+ const diff = (obj1, obj2) => {
30
+ let changed = [];
31
+ for (const key of Object.keys(obj1)) {
32
+ if (obj1[key] !== obj2[key]) {
33
+ changed.push(key);
34
+ }
35
+ }
36
+ return changed;
37
+ };
38
+ exports.diff = diff;
@@ -441,6 +441,7 @@ class QueryLanguageService {
441
441
  },
442
442
  description: customExpressionDefinition.description,
443
443
  signatures: customExpressionDefinition.signatures,
444
+ inputs: customExpressionDefinition.inputTypes,
444
445
  };
445
446
  acc[expressionName] = expression;
446
447
  return acc;
@@ -100,7 +100,10 @@ class RowSummaryService {
100
100
  const rowSummaries = (_a = this.api.layoutApi.getCurrentLayout().RowSummaries) !== null && _a !== void 0 ? _a : [];
101
101
  const rowSummariesResults = rowSummaries
102
102
  .filter((rowSummary) => !rowSummary.IsSuspended)
103
- .map(({ ColumnsMap, Position }) => {
103
+ .map((rowSummary) => {
104
+ const { ColumnsMap, Position,
105
+ // it defaults to true
106
+ IncludeOnlyFilteredRows = true, } = rowSummary;
104
107
  return {
105
108
  Position,
106
109
  RowData: Object.entries(ColumnsMap !== null && ColumnsMap !== void 0 ? ColumnsMap : {}).reduce((acc, [columnId, expression]) => {
@@ -108,7 +111,7 @@ class RowSummaryService {
108
111
  if (columnId === 'Uuid' || columnId === 'Source') {
109
112
  return acc;
110
113
  }
111
- const key = `${columnId}-${expression}`;
114
+ const key = `${columnId}-${expression}-IncludeOnlyFilteredRows=${IncludeOnlyFilteredRows ? 'filtered' : 'all'}`;
112
115
  let expressionLiveValue = this.cachedCellSummary.get(key);
113
116
  if (expressionLiveValue) {
114
117
  if (!reason) {
@@ -134,7 +137,13 @@ class RowSummaryService {
134
137
  expressionLiveValue = new AggregatedScalarLiveValue_1.AggregatedScalarLiveValue({
135
138
  aggregatedScalarExpression,
136
139
  }, ModuleConstants.LayoutModuleId, this.api, () => {
137
- return this.api.gridApi.getVisibleRowNodes();
140
+ var _a;
141
+ if ((_a = rowSummary.IncludeOnlyFilteredRows) !== null && _a !== void 0 ? _a : true) {
142
+ return this.api.gridApi.getVisibleRowNodes();
143
+ }
144
+ else {
145
+ return this.api.gridApi.getAllRowNodes();
146
+ }
138
147
  });
139
148
  }
140
149
  catch (e) {
@@ -29,9 +29,10 @@ const AlertPreview = (_a) => {
29
29
  return button;
30
30
  }, [alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.MessageType]);
31
31
  const alertToPreview = React.useMemo(() => {
32
+ var _a;
32
33
  const alertForm = alertDefinition.AlertForm || api.alertApi.internalApi.getDefaultAlertNotificationForm();
33
34
  if (typeof alertForm !== 'string') {
34
- alertForm.Buttons = alertForm.Buttons.map(mapButtons);
35
+ alertForm.Buttons = ((_a = alertForm.Buttons) !== null && _a !== void 0 ? _a : []).map(mapButtons);
35
36
  }
36
37
  const result = {
37
38
  alertType: 'generic',
@@ -62,6 +63,7 @@ const AlertNotificationWizardSection = (props) => {
62
63
  React.createElement(Tabs_1.Tabs.Tab, null, "Notification Options"),
63
64
  React.createElement(Tabs_1.Tabs.Content, null,
64
65
  React.createElement(CheckBox_1.CheckBox, { checked: (_a = data.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification, onChange: (DisplayNotification) => {
66
+ var _a, _b, _c;
65
67
  const newAlertDefinition = Object.assign(Object.assign({}, data), { AlertProperties: Object.assign(Object.assign({}, data.AlertProperties), { DisplayNotification }) });
66
68
  if (!DisplayNotification && typeof newAlertDefinition.AlertForm === 'object') {
67
69
  delete newAlertDefinition.AlertForm.Buttons;
@@ -70,6 +72,12 @@ const AlertNotificationWizardSection = (props) => {
70
72
  newAlertDefinition.AlertForm =
71
73
  api.alertApi.internalApi.getDefaultAlertNotificationForm();
72
74
  }
75
+ // make sure we have at least one button
76
+ 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)) {
77
+ newAlertDefinition.AlertForm.Buttons = [
78
+ api.alertApi.internalApi.getDefaultButton()
79
+ ];
80
+ }
73
81
  props.onChange(newAlertDefinition);
74
82
  } }, "Display a Notification when Alert is triggered (with action buttons)"),
75
83
  ((_b = data.AlertProperties) === null || _b === void 0 ? void 0 : _b.DisplayNotification) ? (typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Alert buttons cannot be customized because form is dynamically driven")) : (React.createElement(AlertButtonsEditor_1.AlertButtonsEditor, { alertType: props.alertType, AlertButtons: (_c = data.AlertForm) === null || _c === void 0 ? void 0 : _c.Buttons, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
@@ -22,7 +22,9 @@ const AdaptableInput_1 = tslib_1.__importDefault(require("../Components/Adaptabl
22
22
  // [text]
23
23
  // [show-all-comments-button]
24
24
  const CommentsEditor = (props) => {
25
+ var _a, _b;
25
26
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
27
+ const showCloseButton = (_b = (_a = adaptable.adaptableOptions.commentOptions) === null || _a === void 0 ? void 0 : _a.showPopupCloseButton) !== null && _b !== void 0 ? _b : true;
26
28
  const cellAddress = (0, react_redux_1.useSelector)((state) => (0, SystemRedux_1.SystemCommentsAndNotesSelector)(state.System));
27
29
  const userId = React.useMemo(() => {
28
30
  return adaptable.api.optionsApi.getUserName();
@@ -52,7 +54,17 @@ const CommentsEditor = (props) => {
52
54
  if (!commentThread) {
53
55
  return null;
54
56
  }
55
- return (React.createElement(Panel_1.default, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup" },
57
+ return (React.createElement(Panel_1.default, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup", onKeyDown: (event) => {
58
+ if (event.key === 'Escape') {
59
+ adaptable.api.commentApi.hideCommentsPopup();
60
+ }
61
+ } },
62
+ showCloseButton && (React.createElement(rebass_1.Flex, null,
63
+ React.createElement(rebass_1.Box, { flex: 1 }),
64
+ React.createElement(SimpleButton_1.default, { onClick: (event) => {
65
+ event.stopPropagation();
66
+ adaptable.api.commentApi.hideCommentsPopup();
67
+ }, variant: "text", icon: "close" }))),
56
68
  React.createElement(rebass_1.Flex, { style: {
57
69
  overflow: 'auto',
58
70
  maxHeight: 300,