@adaptabletools/adaptable 18.0.0-canary.34 → 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.
@@ -1,194 +0,0 @@
1
- import { AdaptableColumnMenuItemName, AdaptableContextMenuItemName, AdaptableMenuItem, ColumnMenuContext, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
2
- import { AdaptableColumn, AdaptableIcon, BaseContext } from '../types';
3
- /**
4
- * Options for managing menus in AdapTable – provided using 2 collections
5
- */
6
- export interface MenuOptions<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
- * Customises Context Menu (default context menu items are available in provided context)
13
- */
14
- customContextMenu?: (menuContext: CustomContextMenuContext<TData>) => CustomContextMenuItem[];
15
- }
16
- /**
17
- * Context info provided when building Custom Context Menus
18
- */
19
- export interface CustomContextMenuContext<TData = any> extends ContextMenuContext<TData> {
20
- /**
21
- * Flat list of all available AdapTable Menu Items
22
- */
23
- defaultAdaptableMenuItems: AdaptableSystemMenuItem<AdaptableContextMenuItemName>[];
24
- /**
25
- * Flat list of all available AG Grid Menu Items
26
- */
27
- defaultAgGridMenuItems: AgGridMenuItem<AgGridContextMenuItemType>[];
28
- /**
29
- * Default structure of Adaptable Menu Items
30
- */
31
- defaultAdaptableMenuStructure: (AdaptableSystemMenuItem<AdaptableContextMenuItemName> | '-')[];
32
- /**
33
- * Default structure of AG Grid Menu Items
34
- */
35
- defaultAgGridMenuStructure: (AgGridMenuItem<AgGridContextMenuItemType> | {
36
- menuType: 'Group';
37
- label: string;
38
- subMenuItems: AgGridMenuItem<AgGridContextMenuItemType>[];
39
- disabled?: boolean;
40
- icon?: AdaptableIcon;
41
- })[];
42
- }
43
- /**
44
- * Context info provided when building Custom Column Menus
45
- */
46
- export interface CustomColumnMenuContext<TData = any> extends ColumnMenuContext<TData> {
47
- /**
48
- * Flat list of all available AdapTable Menu Items
49
- */
50
- defaultAdaptableMenuItems: AdaptableSystemMenuItem<AdaptableColumnMenuItemName>[];
51
- /**
52
- * Flat list of all available AG Grid Menu Items
53
- */
54
- defaultAgGridMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
55
- /**
56
- * Default structure of Adaptable Menu Items
57
- */
58
- defaultAdaptableMenuStructure: (AdaptableSystemMenuItem<AdaptableColumnMenuItemName> | '-')[];
59
- /**
60
- * Default structure of AG Grid Menu Items
61
- */
62
- defaultAgGridMenuStructure: (AgGridMenuItem<AgGridColumnMenuItemType> | {
63
- menuType: 'Group';
64
- label: string;
65
- subMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
66
- disabled?: boolean;
67
- icon?: AdaptableIcon;
68
- })[];
69
- }
70
- /**
71
- * Custom Context Menu Item
72
- */
73
- export type CustomContextMenuItem = AgGridMenuItem<AgGridContextMenuItemType> | AdaptableSystemMenuItem<AdaptableContextMenuItemName> | UserContextMenuItem | '-' | {
74
- menuType: 'Group';
75
- label: string;
76
- subMenuItems: CustomContextMenuItem[];
77
- disabled?: boolean;
78
- icon?: AdaptableIcon;
79
- };
80
- /**
81
- * Custom Column Menu Item
82
- */
83
- export type CustomColumnMenuItem = AgGridMenuItem<AgGridColumnMenuItemType> | AdaptableSystemMenuItem<AdaptableColumnMenuItemName> | UserColumnMenuItem | '-' | {
84
- menuType: 'Group';
85
- label: string;
86
- subMenuItems: CustomColumnMenuItem[];
87
- disabled?: boolean;
88
- icon?: AdaptableIcon;
89
- };
90
- /**
91
- * Menu Item that is provided by AG Grid
92
- */
93
- export interface AgGridMenuItem<MENU_TYPE> {
94
- /**
95
- * Type of Menu - always 'AgGrid'
96
- */
97
- menuType: 'AgGrid';
98
- /**
99
- * Name of the Menu Type
100
- */
101
- name: MENU_TYPE;
102
- }
103
- /**
104
- * System Menu Item that is provided by AdapTable
105
- */
106
- export interface AdaptableSystemMenuItem<MENU_TYPE_NAME> extends AdaptableMenuItem<MENU_TYPE_NAME> {
107
- /**
108
- * Type of Menu - always 'Adaptable'
109
- */
110
- menuType: 'Adaptable';
111
- }
112
- /**
113
- * Context Menu Item that is provided by User
114
- */
115
- export interface UserContextMenuItem {
116
- /**
117
- * Type of Menu - always 'Adaptable'
118
- */
119
- menuType: 'User';
120
- /**
121
- * Text to appear in the Menu Item
122
- */
123
- label: string;
124
- /**
125
- * Function invoked when the Menu Item is clicked
126
- */
127
- onClick?: (menuContext: ContextMenuContext) => void;
128
- /**
129
- * Whether menu item is disabled
130
- */
131
- disabled?: boolean;
132
- /**
133
- * Whether menu item is hidden
134
- */
135
- hidden?: boolean;
136
- /**
137
- * Optional icon to display
138
- */
139
- icon?: AdaptableIcon;
140
- /**
141
- * Array of Menu Items, enabling limitless levels of menus
142
- */
143
- subMenuItems?: CustomContextMenuItem[];
144
- }
145
- /**
146
- * Column Menu Item that is provided by User
147
- */
148
- export interface UserColumnMenuItem {
149
- /**
150
- * Type of Menu - always 'User'
151
- */
152
- menuType: 'User';
153
- /**
154
- * Text to appear in the Menu Item
155
- */
156
- label: string;
157
- /**
158
- * Function invoked when the Menu Item is clicked
159
- */
160
- onClick?: (menuContext: ColumnMenuContext) => void;
161
- /**
162
- * Whether menu item is disabled
163
- */
164
- disabled?: boolean;
165
- /**
166
- * Whether menu item is hidden
167
- */
168
- hidden?: boolean;
169
- /**
170
- * Optional icon to display
171
- */
172
- icon?: AdaptableIcon;
173
- /**
174
- * Array of Menu Items, enabling limitless levels of menus
175
- */
176
- subMenuItems?: CustomColumnMenuItem[];
177
- }
178
- /**
179
- * Context used when ordering Menu Sections
180
- */
181
- export interface MenuOrderContext extends BaseContext {
182
- /**
183
- * Column in which Menu will appear
184
- */
185
- column: AdaptableColumn;
186
- }
187
- /**
188
- * Defines AG Grid Context Menu Items
189
- */
190
- export type AgGridContextMenuItemType = 'autoSizeAll' | 'expandAll' | 'contractAll' | 'copy' | 'copyWithHeaders' | 'copyWithGroupHeaders' | 'cut' | 'paste' | 'resetColumns' | 'export' | 'csvExport' | 'excelExport' | 'chartRange' | 'pivotChart' | 'separator';
191
- /**
192
- * Defines AG Grid Column Menu Items
193
- */
194
- export type AgGridColumnMenuItemType = 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'separator';
@@ -1,6 +0,0 @@
1
- export {};
2
- // 1. adding custom menu items
3
- // 2. changing the order of items
4
- // 3. removing all AdapTable menu items
5
- // 4. removing some AdapTable menu items
6
- // 5. removing some Ag Grid menu items