@adaptabletools/adaptable 18.0.0-canary.35 → 18.0.0-canary.36

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "18.0.0-canary.35",
3
+ "version": "18.0.0-canary.36",
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",
@@ -7,7 +7,6 @@ import { UserInterfaceOptions } from './UserInterfaceOptions';
7
7
  import { AdaptablePlugin } from './AdaptablePlugin';
8
8
  import { ExportOptions } from './ExportOptions';
9
9
  import { TeamSharingOptions } from './TeamSharingOptions';
10
- import { MenuOptions } from './MenuOptions';
11
10
  import { EntitlementOptions } from './EntitlementOptions';
12
11
  import { NotificationsOptions } from './NotificationsOptions';
13
12
  import { DashboardOptions } from './DashboardOptions';
@@ -35,6 +34,8 @@ import { DataImportOptions } from './DataImportOptions';
35
34
  import { ColumnFilterOptions } from './ColumnFilterOptions';
36
35
  import { GridFilterOptions } from './GridFilterOptions';
37
36
  import { CommentOptions } from './CommentOptions';
37
+ import { ColumnMenuOptions } from './ColumnMenuOptions';
38
+ import { ContextMenuOptions } from './ContextMenuOptions';
38
39
  /**
39
40
  * Large group of options enabling developers to set up AdapTable at design time to fit precise requirements
40
41
  */
@@ -220,11 +221,17 @@ export interface AdaptableOptions<TData = any> {
220
221
  */
221
222
  layoutOptions?: LayoutOptions;
222
223
  /**
223
- * Options for managing AdapTable menus
224
+ * Options for managing AdapTable Column Menu
224
225
  *
225
226
  * @gridInfoContainer
226
227
  */
227
- menuOptions?: MenuOptions<TData>;
228
+ columnMenuOptions?: ColumnMenuOptions<TData>;
229
+ /**
230
+ * Options for managing AdapTable Context Menu
231
+ *
232
+ * @gridInfoContainer
233
+ */
234
+ contextMenuOptions?: ContextMenuOptions<TData>;
228
235
  /**
229
236
  * Options for managing Notifications in AdapTable
230
237
  *
@@ -0,0 +1,94 @@
1
+ import { AdaptableColumnMenuItemName, AdaptableMenuItem, AgGridMenuItem, ColumnMenuContext } from '../PredefinedConfig/Common/Menu';
2
+ import { AdaptableIcon } from '../types';
3
+ /**
4
+ * Options for managing menus in AdapTable – provided using 2 collections
5
+ */
6
+ export interface ColumnMenuOptions<TData = any> {
7
+ /**
8
+ * Customises Column Menu (default column menu items are available in the provided context)
9
+ */
10
+ customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
11
+ }
12
+ /**
13
+ * Context info provided when building Custom Column Menus
14
+ */
15
+ export interface CustomColumnMenuContext<TData = any> extends ColumnMenuContext<TData> {
16
+ /**
17
+ * Flat list of all available AdapTable Menu Items
18
+ */
19
+ defaultAdaptableMenuItems: AdaptableSystemColumnMenuItem<AdaptableColumnMenuItemName>[];
20
+ /**
21
+ * Flat list of all available AG Grid Menu Items
22
+ */
23
+ defaultAgGridMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
24
+ /**
25
+ * Default structure of Adaptable Menu Items
26
+ */
27
+ defaultAdaptableMenuStructure: (AdaptableSystemColumnMenuItem<AdaptableColumnMenuItemName> | '-')[];
28
+ /**
29
+ * Default structure of AG Grid Menu Items
30
+ */
31
+ defaultAgGridMenuStructure: (AgGridMenuItem<AgGridColumnMenuItemType> | {
32
+ menuType: 'Group';
33
+ label: string;
34
+ subMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
35
+ disabled?: boolean;
36
+ icon?: AdaptableIcon;
37
+ })[];
38
+ }
39
+ /**
40
+ * Custom Column Menu Item
41
+ */
42
+ export type CustomColumnMenuItem = AgGridMenuItem<AgGridColumnMenuItemType> | AdaptableSystemColumnMenuItem<AdaptableColumnMenuItemName> | UserColumnMenuItem | '-' | {
43
+ menuType: 'Group';
44
+ label: string;
45
+ subMenuItems: CustomColumnMenuItem[];
46
+ disabled?: boolean;
47
+ icon?: AdaptableIcon;
48
+ };
49
+ /**
50
+ * System Menu Item that is provided by AdapTable
51
+ */
52
+ export interface AdaptableSystemColumnMenuItem<MENU_TYPE_NAME extends AdaptableColumnMenuItemName> extends AdaptableMenuItem<MENU_TYPE_NAME> {
53
+ /**
54
+ * Type of Menu - always 'Adaptable'
55
+ */
56
+ menuType: 'Adaptable';
57
+ }
58
+ /**
59
+ * Column Menu Item that is provided by User
60
+ */
61
+ export interface UserColumnMenuItem {
62
+ /**
63
+ * Type of Menu - always 'User'
64
+ */
65
+ menuType: 'User';
66
+ /**
67
+ * Text to appear in the Menu Item
68
+ */
69
+ label: string;
70
+ /**
71
+ * Function invoked when the Menu Item is clicked
72
+ */
73
+ onClick?: (menuContext: ColumnMenuContext) => void;
74
+ /**
75
+ * Whether menu item is disabled
76
+ */
77
+ disabled?: boolean;
78
+ /**
79
+ * Whether menu item is hidden
80
+ */
81
+ hidden?: boolean;
82
+ /**
83
+ * Optional icon to display
84
+ */
85
+ icon?: AdaptableIcon;
86
+ /**
87
+ * Array of Menu Items, enabling limitless levels of menus
88
+ */
89
+ subMenuItems?: CustomColumnMenuItem[];
90
+ }
91
+ /**
92
+ * Defines AG Grid Column Menu Items
93
+ */
94
+ export type AgGridColumnMenuItemType = 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'separator';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,94 @@
1
+ import { AdaptableContextMenuItemName, AdaptableMenuItem, AgGridMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
2
+ import { AdaptableIcon } from '../types';
3
+ /**
4
+ * Options for managing menus in AdapTable – provided using 2 collections
5
+ */
6
+ export interface ContextMenuOptions<TData = any> {
7
+ /**
8
+ * Customises Context Menu (default context menu items are available in provided context)
9
+ */
10
+ customContextMenu?: (menuContext: CustomContextMenuContext<TData>) => CustomContextMenuItem[];
11
+ }
12
+ /**
13
+ * Context info provided when building Custom Context Menus
14
+ */
15
+ export interface CustomContextMenuContext<TData = any> extends ContextMenuContext<TData> {
16
+ /**
17
+ * Flat list of all available AdapTable Menu Items
18
+ */
19
+ defaultAdaptableMenuItems: AdaptableSystemContextMenuItem<AdaptableContextMenuItemName>[];
20
+ /**
21
+ * Flat list of all available AG Grid Menu Items
22
+ */
23
+ defaultAgGridMenuItems: AgGridMenuItem<AgGridContextMenuItemType>[];
24
+ /**
25
+ * Default structure of Adaptable Menu Items
26
+ */
27
+ defaultAdaptableMenuStructure: (AdaptableSystemContextMenuItem<AdaptableContextMenuItemName> | '-')[];
28
+ /**
29
+ * Default structure of AG Grid Menu Items
30
+ */
31
+ defaultAgGridMenuStructure: (AgGridMenuItem<AgGridContextMenuItemType> | {
32
+ menuType: 'Group';
33
+ label: string;
34
+ subMenuItems: AgGridMenuItem<AgGridContextMenuItemType>[];
35
+ disabled?: boolean;
36
+ icon?: AdaptableIcon;
37
+ })[];
38
+ }
39
+ /**
40
+ * Custom Context Menu Item
41
+ */
42
+ export type CustomContextMenuItem = AgGridMenuItem<AgGridContextMenuItemType> | AdaptableSystemContextMenuItem<AdaptableContextMenuItemName> | UserContextMenuItem | '-' | {
43
+ menuType: 'Group';
44
+ label: string;
45
+ subMenuItems: CustomContextMenuItem[];
46
+ disabled?: boolean;
47
+ icon?: AdaptableIcon;
48
+ };
49
+ /**
50
+ * System Menu Item that is provided by AdapTable
51
+ */
52
+ export interface AdaptableSystemContextMenuItem<MENU_TYPE_NAME extends AdaptableContextMenuItemName> extends AdaptableMenuItem<MENU_TYPE_NAME> {
53
+ /**
54
+ * Type of Menu - always 'Adaptable'
55
+ */
56
+ menuType: 'Adaptable';
57
+ }
58
+ /**
59
+ * Context Menu Item that is provided by User
60
+ */
61
+ export interface UserContextMenuItem {
62
+ /**
63
+ * Type of Menu - always 'User'
64
+ */
65
+ menuType: 'User';
66
+ /**
67
+ * Text to appear in the Menu Item
68
+ */
69
+ label: string;
70
+ /**
71
+ * Function invoked when the Menu Item is clicked
72
+ */
73
+ onClick?: (menuContext: ContextMenuContext) => void;
74
+ /**
75
+ * Whether menu item is disabled
76
+ */
77
+ disabled?: boolean;
78
+ /**
79
+ * Whether menu item is hidden
80
+ */
81
+ hidden?: boolean;
82
+ /**
83
+ * Optional icon to display
84
+ */
85
+ icon?: AdaptableIcon;
86
+ /**
87
+ * Array of Menu Items, enabling limitless levels of menus
88
+ */
89
+ subMenuItems?: CustomContextMenuItem[];
90
+ }
91
+ /**
92
+ * Defines AG Grid Context Menu Items
93
+ */
94
+ export type AgGridContextMenuItemType = 'autoSizeAll' | 'expandAll' | 'contractAll' | 'copy' | 'copyWithHeaders' | 'copyWithGroupHeaders' | 'cut' | 'paste' | 'resetColumns' | 'export' | 'csvExport' | 'excelExport' | 'chartRange' | 'pivotChart' | 'separator';
@@ -0,0 +1 @@
1
+ export {};
@@ -47,6 +47,8 @@ import { GridFilterApi } from './GridFilterApi';
47
47
  import { NamedQueryApi } from './NamedQueryApi';
48
48
  import { ColumnFilterApi } from './ColumnFilterApi';
49
49
  import { CommentApi } from './CommentApi';
50
+ import { ColumnMenuApi } from './ColumnMenuApi';
51
+ import { ContextMenuApi } from './ContextMenuApi';
50
52
  /**
51
53
  *
52
54
  * The `AdaptableApi` provides developers with run-time access to AdapTable.
@@ -234,6 +236,14 @@ export interface AdaptableApi {
234
236
  * Provides access to the Note Module
235
237
  */
236
238
  noteApi: NoteApi;
239
+ /**
240
+ * Provides access to Column Menu
241
+ */
242
+ columnMenuApi: ColumnMenuApi;
243
+ /**
244
+ * Provides access to Context Menu
245
+ */
246
+ contextMenuApi: ContextMenuApi;
237
247
  /**
238
248
  * Provides access to the Comment Module
239
249
  */
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Provides run-time access to Column Menu
3
+ */
4
+ export interface ColumnMenuApi {
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Provides run-time access to Context Menu
3
+ */
4
+ export interface ContextMenuApi {
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
2
  import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi';
3
- import { AdaptableApi, DataImportApi, NamedQueryApi, OptionsApi, SettingsPanelApi } from '../../types';
3
+ import { AdaptableApi, ColumnMenuApi, ContextMenuApi, DataImportApi, NamedQueryApi, OptionsApi, SettingsPanelApi } from '../../types';
4
4
  import { AlertApi } from '../AlertApi';
5
5
  import { BulkUpdateApi } from '../BulkUpdateApi';
6
6
  import { CalendarApi } from '../CalendarApi';
@@ -91,6 +91,8 @@ export declare class AdaptableApiImpl implements AdaptableApi {
91
91
  chartingApi: ChartingApi;
92
92
  statusBarApi: StatusBarApi;
93
93
  noteApi: NoteApi;
94
+ columnMenuApi: ColumnMenuApi;
95
+ contextMenuApi: ContextMenuApi;
94
96
  fdc3Api: Fdc3Api;
95
97
  dataImportApi: DataImportApi;
96
98
  gridFilterApi: GridFilterApi;
@@ -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, 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, ColumnScopeApi, 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, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ColumnScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions, ColumnMenuOptions, ContextMenuOptions } from '../../types';
11
11
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
12
12
  export declare abstract class ApiBase {
13
13
  protected adaptable: IAdaptable;
@@ -67,7 +67,8 @@ export declare abstract class ApiBase {
67
67
  protected getExportOptions(): ExportOptions;
68
68
  protected getGroupingOptions(): GroupingOptions;
69
69
  protected getLayoutOptions(): LayoutOptions;
70
- protected getMenuOptions(): MenuOptions;
70
+ protected getColumnMenuOptions(): ColumnMenuOptions;
71
+ protected getContextMenuOptions(): ContextMenuOptions;
71
72
  protected getColumnFilterOptions(): ColumnFilterOptions;
72
73
  protected getExpressionOptions(): ExpressionOptions;
73
74
  protected getPredicateOptions(): PredicateOptions;
@@ -143,8 +143,11 @@ export class ApiBase {
143
143
  getLayoutOptions() {
144
144
  return this.getOptions().layoutOptions;
145
145
  }
146
- getMenuOptions() {
147
- return this.getOptions().menuOptions;
146
+ getColumnMenuOptions() {
147
+ return this.getOptions().columnMenuOptions;
148
+ }
149
+ getContextMenuOptions() {
150
+ return this.getOptions().contextMenuOptions;
148
151
  }
149
152
  getColumnFilterOptions() {
150
153
  return this.getOptions().columnFilterOptions;
@@ -1,5 +1,5 @@
1
1
  import { ApiBase } from './ApiBase';
2
- import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, NoteOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, MenuOptions, NotificationsOptions, OptionsApi, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions, GridFilterOptions } from '../../types';
2
+ import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, NoteOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, NotificationsOptions, OptionsApi, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions, GridFilterOptions, ColumnMenuOptions, ContextMenuOptions } from '../../types';
3
3
  import { GroupingOptions } from '../../AdaptableOptions/GroupingOptions';
4
4
  import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
5
5
  import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
@@ -31,7 +31,8 @@ export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
31
31
  getExportOptions(): ExportOptions;
32
32
  getGroupingOptions(): GroupingOptions;
33
33
  getLayoutOptions(): LayoutOptions;
34
- getMenuOptions(): MenuOptions;
34
+ getColumnMenuOptions(): ColumnMenuOptions;
35
+ getContextMenuOptions(): ContextMenuOptions;
35
36
  getColumnFilterOptions(): ColumnFilterOptions;
36
37
  getGridFilterOptions(): Readonly<GridFilterOptions<any>>;
37
38
  getExpressionOptions(): ExpressionOptions;
@@ -72,8 +72,11 @@ export class OptionsApiImpl extends ApiBase {
72
72
  getLayoutOptions() {
73
73
  return this.getOptions().layoutOptions;
74
74
  }
75
- getMenuOptions() {
76
- return this.getOptions().menuOptions;
75
+ getColumnMenuOptions() {
76
+ return this.getOptions().columnMenuOptions;
77
+ }
78
+ getContextMenuOptions() {
79
+ return this.getOptions().contextMenuOptions;
77
80
  }
78
81
  getColumnFilterOptions() {
79
82
  return this.getOptions().columnFilterOptions;
@@ -1,7 +1,7 @@
1
1
  import { CustomSortOptions } from '../AdaptableOptions/CustomSortOptions';
2
2
  import { DataSetOptions } from '../AdaptableOptions/DataSetOptions';
3
3
  import { GroupingOptions } from '../AdaptableOptions/GroupingOptions';
4
- import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnFilterOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FlashingCellOptions, FormatColumnOptions, GridFilterOptions, LayoutOptions, MenuOptions, NoteOptions, NotificationsOptions, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../types';
4
+ import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnFilterOptions, ColumnMenuOptions, ColumnOptions, ContainerOptions, ContextMenuOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FlashingCellOptions, FormatColumnOptions, GridFilterOptions, LayoutOptions, NoteOptions, NotificationsOptions, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../types';
5
5
  import { Fdc3Options } from '../AdaptableOptions/Fdc3Options';
6
6
  import { ExpressionOptions } from '../AdaptableOptions/ExpressionOptions';
7
7
  import { DataImportOptions } from '../AdaptableOptions/DataImportOptions';
@@ -127,9 +127,13 @@ export interface OptionsApi {
127
127
  */
128
128
  getLayoutOptions(): Readonly<LayoutOptions>;
129
129
  /**
130
- * Returns `AdaptableOptions.menuOptions`
130
+ * Returns `AdaptableOptions.columnMenuOptions`
131
131
  */
132
- getMenuOptions(): Readonly<MenuOptions>;
132
+ getColumnMenuOptions(): Readonly<ColumnMenuOptions>;
133
+ /**
134
+ * Returns `AdaptableOptions.contextMenuOptions`
135
+ */
136
+ getContextMenuOptions(): Readonly<ContextMenuOptions>;
133
137
  /**
134
138
  * Returns `AdaptableOptions.notificationsOptions`
135
139
  */
@@ -159,3 +159,16 @@ export interface ContextMenuContext<TData = any> extends BaseContext {
159
159
  */
160
160
  selectedRowInfo: SelectedRowInfo<TData>;
161
161
  }
162
+ /**
163
+ * Menu Item that is provided by AG Grid
164
+ */
165
+ export interface AgGridMenuItem<MENU_TYPE> {
166
+ /**
167
+ * Type of Menu - always 'AgGrid'
168
+ */
169
+ menuType: 'AgGrid';
170
+ /**
171
+ * Name of the Menu Type
172
+ */
173
+ name: MENU_TYPE;
174
+ }
@@ -16,7 +16,7 @@ export class AgGridMenuAdapter {
16
16
  }
17
17
  buildColumnMenu(params, originalGetMainMenuItems) {
18
18
  var _a;
19
- const menuOptions = this.adaptableOptions.menuOptions;
19
+ const columnMenuOptions = this.adaptableOptions.columnMenuOptions;
20
20
  const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
21
21
  if (!params.column) {
22
22
  // return only AG Grid context if the Adaptable column is not found (should not happen)
@@ -31,10 +31,10 @@ export class AgGridMenuAdapter {
31
31
  const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
32
32
  const defaultColumnMenuStructure = this.buildColumnMenuDefaultStructure(adaptableMenuItems, menuContext);
33
33
  // 1. first check if there is a custom column menu defined
34
- if (typeof menuOptions.customColumnMenu === 'function') {
34
+ if (typeof columnMenuOptions.customColumnMenu === 'function') {
35
35
  const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
36
36
  const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
37
- const customMenuItems = menuOptions
37
+ const customMenuItems = columnMenuOptions
38
38
  .customColumnMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
39
39
  defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultColumnMenuStructure), defaultAgGridMenuStructure: agGridDefaultStructure }))
40
40
  .filter(Boolean);
@@ -58,7 +58,7 @@ export class AgGridMenuAdapter {
58
58
  // we do this in order to refresh the internal state of selected cells (technically query the AG Grid cellRanges)
59
59
  // (right-click selected the current cell, but this was not reflected in the internal state of the selected cells)
60
60
  this.adaptableInstance.refreshSelectedCellsState();
61
- const menuOptions = this.adaptableOptions.menuOptions;
61
+ const contextMenuOptions = this.adaptableOptions.contextMenuOptions;
62
62
  const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
63
63
  const menuContext = this.createContextMenuContextObject(params, adaptableColumn);
64
64
  /**
@@ -91,10 +91,10 @@ export class AgGridMenuAdapter {
91
91
  * Build the context menu
92
92
  */
93
93
  // 1. first check if there is a custom context menu defined
94
- if (typeof menuOptions.customContextMenu === 'function') {
94
+ if (typeof contextMenuOptions.customContextMenu === 'function') {
95
95
  const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
96
96
  const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
97
- const customMenuItems = menuOptions
97
+ const customMenuItems = contextMenuOptions
98
98
  .customContextMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
99
99
  defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(adaptableDefaultStructure), defaultAgGridMenuStructure: agGridDefaultStructure }))
100
100
  .filter(Boolean);
@@ -164,8 +164,10 @@ const DefaultAdaptableOptions = {
164
164
  autoCheckTagsForLayouts: false,
165
165
  },
166
166
  },
167
- menuOptions: {
167
+ columnMenuOptions: {
168
168
  customColumnMenu: undefined,
169
+ },
170
+ contextMenuOptions: {
169
171
  customContextMenu: undefined,
170
172
  },
171
173
  columnFilterOptions: {
@@ -356,7 +358,8 @@ export function applyDefaultAdaptableOptions(adaptableOptions) {
356
358
  adaptableOptsWithDefaults.gridFilterOptions = Object.assign({}, DefaultAdaptableOptions.gridFilterOptions, adaptableOptions.gridFilterOptions);
357
359
  adaptableOptsWithDefaults.userInterfaceOptions = Object.assign({}, DefaultAdaptableOptions.userInterfaceOptions, adaptableOptions.userInterfaceOptions);
358
360
  adaptableOptsWithDefaults.userInterfaceOptions.dateInputOptions = Object.assign({}, DefaultAdaptableOptions.userInterfaceOptions.dateInputOptions, adaptableOptsWithDefaults.userInterfaceOptions.dateInputOptions);
359
- adaptableOptsWithDefaults.menuOptions = Object.assign({}, DefaultAdaptableOptions.menuOptions, adaptableOptions.menuOptions);
361
+ adaptableOptsWithDefaults.columnMenuOptions = Object.assign({}, DefaultAdaptableOptions.columnMenuOptions, adaptableOptions.columnMenuOptions);
362
+ adaptableOptsWithDefaults.contextMenuOptions = Object.assign({}, DefaultAdaptableOptions.contextMenuOptions, adaptableOptions.contextMenuOptions);
360
363
  adaptableOptsWithDefaults.stateOptions = Object.assign({}, DefaultAdaptableOptions.stateOptions, adaptableOptions.stateOptions);
361
364
  adaptableOptsWithDefaults.exportOptions = Object.assign({}, DefaultAdaptableOptions.exportOptions, adaptableOptions.exportOptions);
362
365
  adaptableOptsWithDefaults.teamSharingOptions = Object.assign({}, DefaultAdaptableOptions.teamSharingOptions, adaptableOptions.teamSharingOptions);
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1712929460827 || Date.now(),
4
- VERSION: "18.0.0-canary.35" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1713090178193 || Date.now(),
4
+ VERSION: "18.0.0-canary.36" || '--current-version--',
5
5
  };
@@ -737,18 +737,18 @@ export declare const ADAPTABLE_METAMODEL: {
737
737
  desc: string;
738
738
  isOpt: boolean;
739
739
  gridInfo: string;
740
- noCode: string;
741
- ref: string;
740
+ noCode?: undefined;
742
741
  defVal?: undefined;
742
+ ref?: undefined;
743
743
  } | {
744
744
  name: string;
745
745
  kind: string;
746
746
  desc: string;
747
747
  isOpt: boolean;
748
748
  gridInfo: string;
749
- noCode?: undefined;
749
+ noCode: string;
750
+ ref: string;
750
751
  defVal?: undefined;
751
- ref?: undefined;
752
752
  } | {
753
753
  name: string;
754
754
  kind: string;
@@ -980,6 +980,26 @@ export declare const ADAPTABLE_METAMODEL: {
980
980
  isOpt: boolean;
981
981
  }[];
982
982
  };
983
+ AdaptableSystemColumnMenuItem: {
984
+ name: string;
985
+ kind: string;
986
+ desc: string;
987
+ props: {
988
+ name: string;
989
+ kind: string;
990
+ desc: string;
991
+ }[];
992
+ };
993
+ AdaptableSystemContextMenuItem: {
994
+ name: string;
995
+ kind: string;
996
+ desc: string;
997
+ props: {
998
+ name: string;
999
+ kind: string;
1000
+ desc: string;
1001
+ }[];
1002
+ };
983
1003
  AdaptableSystemIcon: {
984
1004
  name: string;
985
1005
  kind: string;
@@ -1001,16 +1021,6 @@ export declare const ADAPTABLE_METAMODEL: {
1001
1021
  kind: string;
1002
1022
  desc: string;
1003
1023
  };
1004
- AdaptableSystemMenuItem: {
1005
- name: string;
1006
- kind: string;
1007
- desc: string;
1008
- props: {
1009
- name: string;
1010
- kind: string;
1011
- desc: string;
1012
- }[];
1013
- };
1014
1024
  AdaptableTheme: {
1015
1025
  name: string;
1016
1026
  kind: string;
@@ -1909,6 +1919,17 @@ export declare const ADAPTABLE_METAMODEL: {
1909
1919
  ref: string;
1910
1920
  })[];
1911
1921
  };
1922
+ ColumnMenuOptions: {
1923
+ name: string;
1924
+ kind: string;
1925
+ desc: string;
1926
+ props: {
1927
+ name: string;
1928
+ kind: string;
1929
+ desc: string;
1930
+ isOpt: boolean;
1931
+ }[];
1932
+ };
1912
1933
  ColumnOptions: {
1913
1934
  name: string;
1914
1935
  kind: string;
@@ -2095,6 +2116,17 @@ export declare const ADAPTABLE_METAMODEL: {
2095
2116
  ref: string;
2096
2117
  })[];
2097
2118
  };
2119
+ ContextMenuOptions: {
2120
+ name: string;
2121
+ kind: string;
2122
+ desc: string;
2123
+ props: {
2124
+ name: string;
2125
+ kind: string;
2126
+ desc: string;
2127
+ isOpt: boolean;
2128
+ }[];
2129
+ };
2098
2130
  CountryContext: {
2099
2131
  name: string;
2100
2132
  kind: string;
@@ -3950,28 +3982,6 @@ export declare const ADAPTABLE_METAMODEL: {
3950
3982
  ref?: undefined;
3951
3983
  })[];
3952
3984
  };
3953
- MenuOptions: {
3954
- name: string;
3955
- kind: string;
3956
- desc: string;
3957
- props: {
3958
- name: string;
3959
- kind: string;
3960
- desc: string;
3961
- isOpt: boolean;
3962
- }[];
3963
- };
3964
- MenuOrderContext: {
3965
- name: string;
3966
- kind: string;
3967
- desc: string;
3968
- props: {
3969
- name: string;
3970
- kind: string;
3971
- desc: string;
3972
- ref: string;
3973
- }[];
3974
- };
3975
3985
  ModuleExpressionFunctions: {
3976
3986
  name: string;
3977
3987
  kind: string;