@adaptabletools/adaptable-cjs 18.0.0-canary.17 → 18.0.0-canary.19

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 (55) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/AdaptableOptions.d.ts +2 -2
  3. package/src/AdaptableOptions/CommentOptions.d.ts +9 -6
  4. package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
  5. package/src/AdaptableOptions/NoteOptions.d.ts +4 -4
  6. package/src/Api/Events/GridDataChanged.d.ts +1 -1
  7. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  8. package/src/Api/Implementation/ApiBase.js +3 -0
  9. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
  10. package/src/Api/Internal/ColumnFilterInternalApi.js +12 -0
  11. package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
  12. package/src/Api/Internal/GridFilterInternalApi.js +6 -0
  13. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +1 -5
  14. package/src/PredefinedConfig/Common/Menu.d.ts +9 -4
  15. package/src/PredefinedConfig/Common/Menu.js +62 -36
  16. package/src/PredefinedConfig/NoteState.d.ts +1 -1
  17. package/src/Redux/Store/AdaptableStore.js +25 -10
  18. package/src/Strategy/AdaptableModuleBase.d.ts +5 -5
  19. package/src/Strategy/AdaptableModuleBase.js +3 -3
  20. package/src/Strategy/AlertModule.js +1 -1
  21. package/src/Strategy/CalculatedColumnModule.js +1 -1
  22. package/src/Strategy/ColumnFilterModule.d.ts +1 -1
  23. package/src/Strategy/ColumnFilterModule.js +44 -41
  24. package/src/Strategy/ColumnInfoModule.js +2 -2
  25. package/src/Strategy/CommentModule.js +7 -16
  26. package/src/Strategy/CustomSortModule.js +1 -1
  27. package/src/Strategy/DashboardModule.js +8 -8
  28. package/src/Strategy/DataImportModule.js +1 -1
  29. package/src/Strategy/ExportModule.js +3 -3
  30. package/src/Strategy/Fdc3Module.js +1 -1
  31. package/src/Strategy/FlashingCellModule.js +4 -4
  32. package/src/Strategy/FormatColumnModule.js +6 -6
  33. package/src/Strategy/FreeTextColumnModule.js +1 -1
  34. package/src/Strategy/GridInfoModule.js +2 -2
  35. package/src/Strategy/LayoutModule.js +13 -13
  36. package/src/Strategy/NoteModule.js +8 -11
  37. package/src/Strategy/PlusMinusModule.js +1 -1
  38. package/src/Strategy/SettingsPanelModule.js +3 -3
  39. package/src/Strategy/StyledColumnModule.js +13 -10
  40. package/src/Strategy/SystemStatusModule.js +1 -1
  41. package/src/Utilities/MenuItem.d.ts +7 -7
  42. package/src/View/Comments/CommentsEditor.js +7 -6
  43. package/src/View/Comments/CommentsPopup.js +2 -1
  44. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  45. package/src/View/Note/NotePopup.js +5 -3
  46. package/src/agGrid/AdaptableAgGrid.js +0 -20
  47. package/src/agGrid/defaultAdaptableOptions.js +0 -1
  48. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
  49. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  50. package/src/components/Select/Select.d.ts +1 -1
  51. package/src/components/Select/Select.js +1 -1
  52. package/src/env.js +2 -2
  53. package/src/metamodel/adaptable.metamodel.d.ts +13 -16
  54. package/src/metamodel/adaptable.metamodel.js +1 -1
  55. 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.0.0-canary.17",
3
+ "version": "18.0.0-canary.19",
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",
@@ -134,11 +134,11 @@ export interface AdaptableOptions<TData = any> {
134
134
  */
135
135
  containerOptions?: ContainerOptions;
136
136
  /**
137
- * Options for managing Notes
137
+ * Options for managing personal Notes
138
138
  */
139
139
  noteOptions?: NoteOptions;
140
140
  /**
141
- * Options for managing AdapTable Comments
141
+ * Options for managing collaborative Comments
142
142
  */
143
143
  commentOptions?: CommentOptions<TData>;
144
144
  /**
@@ -1,18 +1,18 @@
1
- import { CommentThread, BaseContext, CellAddress } from '../../types';
1
+ import { CommentThread, BaseContext, GridCell } from '../types';
2
2
  /**
3
3
  * Options for managing Comments and Comment Threads in AdapTable
4
4
  */
5
5
  export interface CommentOptions<TData = any> {
6
6
  /**
7
- * Whether a cell can be receive Comments
7
+ * Whether a cell can contain Comments
8
8
  */
9
9
  isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
10
10
  /**
11
- * Loads initial Comments
11
+ * Loads Comments
12
12
  */
13
13
  loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
14
14
  /**
15
- * Called when Comments change
15
+ * Called when Comments change and need to be saved
16
16
  * @param commentThreads
17
17
  */
18
18
  persistCommentThreads?(commentThreads: CommentThread[]): void;
@@ -22,9 +22,12 @@ export interface CommentOptions<TData = any> {
22
22
  */
23
23
  export interface CommentableCellContext extends BaseContext {
24
24
  /**
25
- * Cell in AdapTable which might receive a Comment
25
+ * Grid Cell in AdapTable which has been clicked
26
26
  */
27
- cellAddress: CellAddress;
27
+ gridCell: GridCell;
28
28
  }
29
+ /**
30
+ * Context used when loading Comments
31
+ */
29
32
  export interface CommentLoadContext extends BaseContext {
30
33
  }
@@ -4,13 +4,6 @@ import { KeyCreatorParams } from '@ag-grid-community/core';
4
4
  * Options for managing Row and Column Groups in AdapTable
5
5
  */
6
6
  export interface GroupingOptions<TData = any> {
7
- /**
8
- * Show aggregated totals row at top of Grid when row grouping
9
- *
10
- * @defaultValue false
11
- * @gridInfoItem
12
- */
13
- showGroupingTotalsAsHeader?: boolean;
14
7
  /**
15
8
  * Value to use for 'Balanced Groups' (string columns only)
16
9
  */
@@ -1,4 +1,4 @@
1
- import { BaseContext, CellAddress } from '../../types';
1
+ import { BaseContext, GridCell } from '../../types';
2
2
  /**
3
3
  * Options for managing AdapTable Notes
4
4
  */
@@ -13,7 +13,7 @@ export interface NoteOptions<TData = any> {
13
13
  */
14
14
  export interface NotableCellContext extends BaseContext {
15
15
  /**
16
- * Cell which should contain the Note
17
- */
18
- address: CellAddress;
16
+ * Grid Cell in AdapTable which has been clicked
17
+ */
18
+ gridCell: GridCell;
19
19
  }
@@ -13,7 +13,7 @@ export type GridDataChangeTrigger = 'Add' | 'Edit' | 'Delete' | 'Load';
13
13
  */
14
14
  dataRows: TData[];
15
15
  /**
16
- * Trigger for row change: 'Add', 'Edit', 'Delete', 'Load'
16
+ * Trigger for row change: Load, Add, Edit, or Delete
17
17
  */
18
18
  rowTrigger: GridDataChangeTrigger;
19
19
  /**
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
7
7
  import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
8
8
  import { AdaptableApi } from '../AdaptableApi';
9
9
  import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
10
- import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions } from '../../types';
10
+ import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, CommentOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions } from '../../types';
11
11
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
12
12
  export declare abstract class ApiBase {
13
13
  protected adaptable: IAdaptable;
@@ -53,6 +53,7 @@ export declare abstract class ApiBase {
53
53
  protected getActionColumnOptions(): ActionColumnOptions;
54
54
  protected getActionRowOptions(): ActionRowOptions;
55
55
  protected getColumnOptions(): ColumnOptions;
56
+ protected getCommentOptions(): CommentOptions;
56
57
  protected getNoteOptions(): NoteOptions;
57
58
  protected getCustomSortOptions(): CustomSortOptions;
58
59
  protected getDataSetOptions(): DataSetOptions;
@@ -105,6 +105,9 @@ class ApiBase {
105
105
  getColumnOptions() {
106
106
  return this.getOptions().columnOptions;
107
107
  }
108
+ getCommentOptions() {
109
+ return this.getOptions().commentOptions;
110
+ }
108
111
  getNoteOptions() {
109
112
  return this.getOptions().noteOptions;
110
113
  }
@@ -49,6 +49,7 @@ export declare class ColumnFilterInternalApi extends ApiBase {
49
49
  * Fires Column Filter Applied Event - typically used to enable filtering on the server
50
50
  */
51
51
  fireColumnFilterAppliedEvent(): void;
52
+ fireGridFilterAppliedEvent(): void;
52
53
  /**
53
54
  * Compares to sets of Column Filters to see if they are identical
54
55
  * @param filters1
@@ -186,6 +186,18 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
186
186
  this.adaptable.api.eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
187
187
  }
188
188
  }
189
+ fireGridFilterAppliedEvent() {
190
+ if (this.adaptable.isReady) {
191
+ const adaptableApi = this.getAdaptableApi();
192
+ const gridFilterAppliedInfo = {
193
+ columnFilters: this.getColumnFilterApi().getColumnFilters(),
194
+ adaptableApi: adaptableApi,
195
+ userName: adaptableApi.optionsApi.getUserName(),
196
+ adaptableId: adaptableApi.optionsApi.getAdaptableId(),
197
+ };
198
+ this.adaptable.api.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
199
+ }
200
+ }
189
201
  /**
190
202
  * Compares to sets of Column Filters to see if they are identical
191
203
  * @param filters1
@@ -1,4 +1,9 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { GridFilter } from '../../types';
2
3
  export declare class GridFilterInternalApi extends ApiBase {
3
4
  fireGridFilterAppliedEvent(): void;
5
+ /**
6
+ * Compares to Grid Filters to see if they are identical
7
+ */
8
+ isGridFilterDifferent(oldFilter: GridFilter, newFilter: GridFilter): boolean;
4
9
  }
@@ -19,5 +19,11 @@ class GridFilterInternalApi extends ApiBase_1.ApiBase {
19
19
  adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
20
20
  }
21
21
  }
22
+ /**
23
+ * Compares to Grid Filters to see if they are identical
24
+ */
25
+ isGridFilterDifferent(oldFilter, newFilter) {
26
+ return (oldFilter === null || oldFilter === void 0 ? void 0 : oldFilter.Expression) === (newFilter === null || newFilter === void 0 ? void 0 : newFilter.Expression);
27
+ }
22
28
  }
23
29
  exports.GridFilterInternalApi = GridFilterInternalApi;
@@ -7,11 +7,7 @@ export interface DataUpdateConfig {
7
7
  */
8
8
  runAsync?: boolean;
9
9
  /**
10
- * Whether to flush async updates.
11
- *
12
- * If `true`, any async transactions will be flushed.
13
- * This flag can be true even if you runAsync is `false`.
14
- * So even if the currenct transaction/operation is synchronous, this will flush existing async transactions.
10
+ * Whether to flush async updates
15
11
  */
16
12
  flushAsync?: boolean;
17
13
  /**
@@ -5,11 +5,16 @@ import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
5
5
  import { SelectedRowInfo } from '../Selection/SelectedRowInfo';
6
6
  import { Column, IRowNode } from '@ag-grid-community/core';
7
7
  import { AdaptableIcon, BaseContext } from '../../types';
8
+ export type AdaptableColumnMenuItemName = (typeof ADAPTABLE_COLUMN_MENU_ITEMS)[number];
9
+ export type AdaptableContextMenuItemName = (typeof ADAPTABLE_CONTEXT_MENU_ITEMS)[number];
8
10
  /**
9
- * List of Shipped Adaptable Menu Items
11
+ * List of Shipped Adaptable Column Menu Items
10
12
  */
11
- export declare const ADAPTABLE_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-info", "comment-add", "comment-remove", "custom-sort-add", "custom-sort-edit", "dashboard", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3", "fdc3-broadcast", "fdc3-raise-intent", "filter", "filter-bar-visbility", "filter-clear", "filter-suspend", "filter-cell-value", "flashing-cell-add", "flashing-cell-clear", "flashing-cell-delete", "flashing-row-clear", "format-column", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid", "layout-select", "layout-select-all", "note-add", "note-remove", "plus-minus-add", "smart-edit-apply", "settings-panel-open", "styled-column-badge", "styled-column", "styled-column-gradient", "styled-column-percent-bar", "styled-column-sparkline", "system-status-show", "internal"];
12
- export type AdaptableMenuItemName = typeof ADAPTABLE_MENU_ITEMS[number];
13
+ export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal", "parent"];
14
+ /**
15
+ * List of Shipped Adaptable Context Menu Items
16
+ */
17
+ export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
13
18
  /**
14
19
  * Menu item used by Adaptable in both Column and Context Menus
15
20
  */
@@ -17,7 +22,7 @@ export interface AdaptableMenuItem {
17
22
  /**
18
23
  * Unique name for the Menu Item
19
24
  */
20
- name: AdaptableMenuItemName;
25
+ name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
21
26
  /**
22
27
  * Text that appears in the menu
23
28
  */
@@ -1,20 +1,73 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADAPTABLE_MENU_ITEMS = void 0;
3
+ exports.ADAPTABLE_CONTEXT_MENU_ITEMS = exports.ADAPTABLE_COLUMN_MENU_ITEMS = void 0;
4
4
  /**
5
- * List of Shipped Adaptable Menu Items
5
+ * List of Shipped Adaptable Column Menu Items
6
6
  */
7
- exports.ADAPTABLE_MENU_ITEMS = [
7
+ exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
8
+ 'calculated-column-edit',
9
+ 'cell-summary-show',
10
+ 'column-filter-bar-hide',
11
+ 'column-filter-bar-show',
12
+ 'column-filter-clear',
13
+ 'column-filter-on-cell-value',
14
+ 'column-filter-suspend',
15
+ 'column-filter-unsuspend',
16
+ 'column-info-show',
17
+ 'custom-sort-add',
18
+ 'custom-sort-edit',
19
+ 'dashboard-collapse',
20
+ 'dashboard-configure',
21
+ 'dashboard-dock',
22
+ 'dashboard-expand',
23
+ 'dashboard-float',
24
+ 'dashboard-hide',
25
+ 'dashboard-show',
26
+ 'data-import',
27
+ 'flashing-cell-add',
28
+ 'flashing-cell-delete',
29
+ 'format-column-add',
30
+ 'format-column-edit',
31
+ 'free-text-column-edit',
32
+ 'grid-info-show',
33
+ 'layout-column-caption-change',
34
+ 'layout-column-hide',
35
+ 'layout-column-select',
36
+ 'layout-column-select-preserve',
37
+ 'layout-column-select-reset',
38
+ 'layout-edit',
39
+ 'layout-grid-parent',
40
+ 'layout-select-parent',
41
+ 'layout-select-all',
42
+ 'plus-minus-add',
43
+ 'settings-panel-open',
44
+ 'styled-column-badge-add',
45
+ 'styled-column-badge-edit',
46
+ 'styled-column-gradient-add',
47
+ 'styled-column-gradient-edit',
48
+ 'styled-column-percent-bar-add',
49
+ 'styled-column-percent-bar-edit',
50
+ 'styled-column-sparkline-add',
51
+ 'styled-column-sparkline-edit',
52
+ 'system-status-show',
53
+ 'internal',
54
+ 'parent',
55
+ ];
56
+ /**
57
+ * List of Shipped Adaptable Context Menu Items
58
+ */
59
+ exports.ADAPTABLE_CONTEXT_MENU_ITEMS = [
8
60
  'alert-clear',
9
61
  'bulk-update-apply',
10
62
  'calculated-column-edit',
11
63
  'cell-summary-show',
12
- 'column-info',
64
+ 'column-filter-on-cell-value',
65
+ 'column-filter-clear',
66
+ 'column-filter-suspend',
67
+ 'column-filter-unsuspend',
68
+ 'column-info-show',
13
69
  'comment-add',
14
70
  'comment-remove',
15
- 'custom-sort-add',
16
- 'custom-sort-edit',
17
- 'dashboard',
18
71
  'dashboard-collapse',
19
72
  'dashboard-configure',
20
73
  'dashboard-dock',
@@ -23,52 +76,25 @@ exports.ADAPTABLE_MENU_ITEMS = [
23
76
  'dashboard-hide',
24
77
  'dashboard-show',
25
78
  'data-import',
26
- 'export',
27
79
  'export-clipboard',
28
80
  'export-csv',
29
81
  'export-excel',
30
82
  'export-json',
31
83
  'export-table',
32
84
  'export-custom-destination',
33
- 'fdc3',
34
85
  'fdc3-broadcast',
35
86
  'fdc3-raise-intent',
36
- 'filter',
37
- 'filter-bar-visbility',
38
- 'filter-clear',
39
- 'filter-suspend',
40
- 'filter-cell-value',
41
- 'flashing-cell-add',
42
87
  'flashing-cell-clear',
43
- 'flashing-cell-delete',
44
88
  'flashing-row-clear',
45
- 'format-column',
46
- 'format-column-add',
47
- 'format-column-edit',
48
- 'free-text-column-edit',
49
- 'grid-info',
89
+ 'grid-info-show',
50
90
  'layout-aggregated-view',
51
91
  'layout-auto-size',
52
92
  'layout-clear-selection',
53
- 'layout-column-caption-change',
54
- 'layout-column-hide',
55
- 'layout-column-select',
56
- 'layout-column-select-preserve',
57
- 'layout-column-select-reset',
58
93
  'layout-edit',
59
- 'layout-grid',
60
- 'layout-select',
61
94
  'layout-select-all',
62
95
  'note-add',
63
96
  'note-remove',
64
- 'plus-minus-add',
65
- 'smart-edit-apply',
66
97
  'settings-panel-open',
67
- 'styled-column-badge',
68
- 'styled-column',
69
- 'styled-column-gradient',
70
- 'styled-column-percent-bar',
71
- 'styled-column-sparkline',
98
+ 'smart-edit-apply',
72
99
  'system-status-show',
73
- 'internal' // used by AdapTable in Settings Panel
74
100
  ];
@@ -16,7 +16,7 @@ export interface AdaptableNote extends AdaptableObject {
16
16
  /**
17
17
  * When Note was made
18
18
  */
19
- Timestamp: number;
19
+ Timestamp?: number;
20
20
  /**
21
21
  * Content of the Note
22
22
  */
@@ -269,7 +269,7 @@ exports.AdaptableStore = AdaptableStore;
269
269
  const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
270
270
  return function (next) {
271
271
  return function (action) {
272
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
272
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
273
273
  switch (action.type) {
274
274
  /*******************
275
275
  * NAMED QUERY ACTIONS
@@ -777,7 +777,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
777
777
  draftLayoutAction = GridRedux.LayoutDraftColumnFilterUnsuspendAll();
778
778
  break;
779
779
  }
780
- // GRID FILTER
781
780
  returnAction = next(draftLayoutAction);
782
781
  }
783
782
  setTimeout(() => {
@@ -797,17 +796,27 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
797
796
  case LayoutRedux.LAYOUT_GRID_FILTER_CLEAR:
798
797
  case LayoutRedux.LAYOUT_GRID_FILTER_SUSPEND:
799
798
  case LayoutRedux.LAYOUT_GRID_FILTER_UNSUSPEND: {
800
- setTimeout(() => adaptable.applyGridFiltering(), 5);
801
- adaptable.api.gridFilterApi.internalApi.fireGridFilterAppliedEvent();
802
- adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, null, middlewareAPI.getState().Layout);
803
799
  const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
804
800
  let returnAction;
801
+ // - calls GridFilterApplied - examples
802
+ adaptable.api.gridFilterApi.internalApi.fireGridFilterAppliedEvent();
803
+ // - layout change event, row summary is triggered
804
+ adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, null, middlewareAPI.getState().Layout);
805
+ setTimeout(() => {
806
+ // - agGridApi.onFilterChanged
807
+ // - internal 'AdapTableFiltersApplied' event - evaluates row summary
808
+ // - refresh selected cells and rows
809
+ adaptable.applyGridFiltering();
810
+ }, 5);
805
811
  if (((_h = adaptable.adaptableOptions.layoutOptions) === null || _h === void 0 ? void 0 : _h.autoSaveLayouts) &&
806
812
  !currentLayout.IsReadOnly) {
807
- returnAction = action;
813
+ return next(action);
808
814
  }
809
815
  else {
810
- // save in draft
816
+ if (!middlewareAPI.getState().Grid.CurrentLayout) {
817
+ const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
818
+ middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
819
+ }
811
820
  switch (action.type) {
812
821
  case LayoutRedux.LAYOUT_GRID_FILTER_SET:
813
822
  returnAction = GridRedux.LayoutDraftGridFilterSet(Object.assign(Object.assign({}, currentLayout.GridFilter), { Expression: action.gridFilter }));
@@ -1018,12 +1027,18 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1018
1027
  let returnAction = next(action);
1019
1028
  const newLayoutState = middlewareAPI.getState().Layout;
1020
1029
  adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
1030
+ // Tell Grid to apply column filtering if filters have been changed in a loaded Layout
1021
1031
  const oldFilters = (_k = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
1022
1032
  const newFilters = (_l = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _l === void 0 ? void 0 : _l.ColumnFilters;
1023
- // Tell Grid to apply filtering if filters have been changed in a loaded Layout
1024
1033
  if (adaptable.api.columnFilterApi.internalApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
1025
1034
  adaptable.applyColumnFiltering();
1026
1035
  }
1036
+ // Tell Grid to apply filtering if filters have been changed in a loaded Layout
1037
+ const oldGridFilter = (_m = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _m === void 0 ? void 0 : _m.GridFilter;
1038
+ const newGridFilter = (_o = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _o === void 0 ? void 0 : _o.GridFilter;
1039
+ if (adaptable.api.gridFilterApi.internalApi.isGridFilterDifferent(oldGridFilter, newGridFilter)) {
1040
+ adaptable.applyGridFiltering();
1041
+ }
1027
1042
  if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
1028
1043
  returnAction.type == LayoutRedux.LAYOUT_DELETE ||
1029
1044
  returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
@@ -1036,7 +1051,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1036
1051
  // tell grid the layout has been selected
1037
1052
  adaptable.setLayout(currentLayout);
1038
1053
  }
1039
- if (!((_m = adaptable.adaptableOptions.layoutOptions) === null || _m === void 0 ? void 0 : _m.autoSaveLayouts)) {
1054
+ if (!((_p = adaptable.adaptableOptions.layoutOptions) === null || _p === void 0 ? void 0 : _p.autoSaveLayouts)) {
1040
1055
  middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
1041
1056
  }
1042
1057
  }
@@ -1044,7 +1059,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1044
1059
  returnAction.type == LayoutRedux.LAYOUT_SAVE) {
1045
1060
  const actionTyped = action;
1046
1061
  // if autosave is false
1047
- if (!((_o = adaptable.adaptableOptions.layoutOptions) === null || _o === void 0 ? void 0 : _o.autoSaveLayouts)) {
1062
+ if (!((_q = adaptable.adaptableOptions.layoutOptions) === null || _q === void 0 ? void 0 : _q.autoSaveLayouts)) {
1048
1063
  // and the current layout is saved, make sure we also update the draft
1049
1064
  if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
1050
1065
  middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
@@ -3,7 +3,7 @@ import { Action } from 'redux';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
5
5
  import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
6
- import { AdaptableMenuItem, AdaptableMenuItemName, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
+ import { AdaptableMenuItem, AdaptableContextMenuItemName, ContextMenuContext, AdaptableColumnMenuItemName } from '../PredefinedConfig/Common/Menu';
7
7
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
8
8
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
9
9
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
@@ -41,15 +41,15 @@ export declare abstract class AdaptableModuleBase implements IModule {
41
41
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
42
42
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
43
43
  createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }: {
44
- Name: AdaptableMenuItemName;
44
+ Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
45
45
  Label: string;
46
46
  ComponentName: string;
47
47
  Icon: AdaptableSystemIconName;
48
48
  PopupParams?: ModuleParams;
49
49
  }): MenuItemShowPopup;
50
- createColumnMenuItemClickFunction(Name: AdaptableMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
51
- createColumnMenuItemReduxAction(Name: AdaptableMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
52
- createColumnMenuItemShowPopup(Name: AdaptableMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
50
+ createMenuItemClickFunction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
51
+ createMenuItemReduxAction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
52
+ createMenuItemShowPopup(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
53
53
  getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
54
54
  getModuleNamedQueryReferences(): string[];
55
55
  getModuleCalculatedColumnReferences(): CalculatedColumn[];
@@ -107,15 +107,15 @@ class AdaptableModuleBase {
107
107
  return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
108
108
  }
109
109
  // creates a menu item for the column menu to perform a function
110
- createColumnMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
110
+ createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
111
111
  return new MenuItem_1.MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
112
112
  }
113
113
  // creates a menu item for the column menu to enact a Redux action
114
- createColumnMenuItemReduxAction(Name, Label, Icon, Action) {
114
+ createMenuItemReduxAction(Name, Label, Icon, Action) {
115
115
  return new MenuItem_1.MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
116
116
  }
117
117
  // popups called by the column menu - invisible if module is hidden or readonly
118
- createColumnMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
118
+ createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
119
119
  return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
120
120
  }
121
121
  getTeamSharingAction() {
@@ -87,7 +87,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
87
87
  relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
88
88
  }
89
89
  if (relevantAlert) {
90
- items.push(this.createColumnMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
90
+ items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
91
91
  }
92
92
  }
93
93
  }
@@ -61,7 +61,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
61
61
  source: 'ColumnMenu',
62
62
  };
63
63
  return [
64
- this.createColumnMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
64
+ this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
65
65
  ];
66
66
  }
67
67
  getTeamSharingAction() {
@@ -13,8 +13,8 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
13
13
  getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
14
14
  hasNamedQueryReferences(): boolean;
15
15
  onAdaptableReady(): void;
16
- addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
17
16
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
17
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
18
18
  private getExistingColumnFilter;
19
19
  getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
20
20
  toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;