@adaptabletools/adaptable 10.0.4-canary.1 → 10.0.4-canary.2
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +16 -6
- package/bundle.cjs.js +350 -0
- package/index.css +20 -6
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +14 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +8 -8
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +8 -0
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/ColumnApi.d.ts +10 -5
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +3 -2
- package/src/Api/GridApi.d.ts +10 -10
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -3
- package/src/Api/Implementation/ColumnApiImpl.js +11 -9
- package/src/Api/Implementation/ConfigApiImpl.js +0 -24
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -2
- package/src/Api/Implementation/GridApiImpl.js +3 -4
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
- package/src/Api/Implementation/InternalApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +15 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +3 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
- package/src/Api/InternalApi.d.ts +1 -1
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +3 -3
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +18 -13
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +1 -94
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +4 -4
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -2
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +21 -8
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +3 -4
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -7
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/ValidationService.js +1 -1
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.js +5 -7
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +3 -5
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +22 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -4
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/Dashboard/Dashboard.js +3 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +6 -5
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Query/QueryViewPanel.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/agGrid/Adaptable.d.ts +9 -8
- package/src/agGrid/Adaptable.js +99 -78
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +15 -16
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +53 -45
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +52 -37
- package/src/metamodel/adaptable.metamodel.js +261 -265
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridOptions, MenuItemDef, GetContextMenuItemsParams, GetMainMenuItems, GetMainMenuItemsParams, GetContextMenuItems, Column } from '@ag-grid-community/all-modules';
|
|
2
|
-
import { AdaptableMenuItem,
|
|
2
|
+
import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
|
|
5
5
|
export declare class agGridMenuHelper {
|
|
@@ -10,20 +10,22 @@ export declare class agGridMenuHelper {
|
|
|
10
10
|
buildContextMenu(params: GetContextMenuItemsParams, originalgetContextMenuItems: GetContextMenuItems): (string | MenuItemDef)[];
|
|
11
11
|
createRemoveGroupsMenuItem(x: AdaptableMenuItem): MenuItemDef;
|
|
12
12
|
createAgGridMenuDefFromAdaptableMenu(adaptableMenuItem: AdaptableMenuItem): MenuItemDef;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
createAgGridColumnMenuDefFromUserMenu(menuItem: UserMenuItem<ColumnMenuContext>, menuContext: ColumnMenuContext): MenuItemDef;
|
|
14
|
+
createAgGridContextMenuDefFromUserMenu(menuItem: UserMenuItem<ContextMenuContext>, menuContext: ContextMenuContext): MenuItemDef;
|
|
15
|
+
createAdaptableColumnMenuItemFromUserMenu(menuItem: UserMenuItem<ColumnMenuContext>, menuContext: ColumnMenuContext): AdaptableMenuItem;
|
|
16
|
+
createAgGridColumnMenuItems(originalgetMainMenuItems: GetMainMenuItems, params: GetMainMenuItemsParams): (string | MenuItemDef)[] | undefined;
|
|
16
17
|
createGroupedColumnMenuItem(): MenuItemDef | undefined;
|
|
17
|
-
createAdaptableColumnMenuItems(adaptableColumn: AdaptableColumn, menuContext:
|
|
18
|
-
createUserColumnMenuItems(menuContext:
|
|
19
|
-
createColumnMenuContextObject(adaptableColumn: AdaptableColumn,
|
|
20
|
-
createContextMenuContextObject(params: GetContextMenuItemsParams, adaptableColumn: AdaptableColumn):
|
|
21
|
-
|
|
22
|
-
createAdaptableContextMenuItems(menuContext:
|
|
23
|
-
createAgGridAdaptableContextMenuItems(adaptableMenuItems: AdaptableMenuItem[], menuContext:
|
|
24
|
-
createAgGridUserContextMenuItems(userContextMenuItems: UserMenuItem[], menuContext:
|
|
18
|
+
createAdaptableColumnMenuItems(adaptableColumn: AdaptableColumn, menuContext: ColumnMenuContext): MenuItemDef[];
|
|
19
|
+
createUserColumnMenuItems(menuContext: ColumnMenuContext): MenuItemDef[];
|
|
20
|
+
createColumnMenuContextObject(adaptableColumn: AdaptableColumn, agGridColumn: Column): ColumnMenuContext;
|
|
21
|
+
createContextMenuContextObject(params: GetContextMenuItemsParams, adaptableColumn: AdaptableColumn): ContextMenuContext;
|
|
22
|
+
createAgGridContextMenuItems(originalgetContextMenuItems: GetContextMenuItems, params: GetContextMenuItemsParams): (string | MenuItemDef)[] | undefined;
|
|
23
|
+
createAdaptableContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[];
|
|
24
|
+
createAgGridAdaptableContextMenuItems(adaptableMenuItems: AdaptableMenuItem[], menuContext: ContextMenuContext): MenuItemDef[];
|
|
25
|
+
createAgGridUserContextMenuItems(userContextMenuItems: UserMenuItem<ContextMenuContext>[], menuContext: ContextMenuContext): MenuItemDef[];
|
|
25
26
|
private getAdaptableMenuItemsColumnHeader;
|
|
26
|
-
private
|
|
27
|
+
private getLabelFromUserColumnMenuItem;
|
|
28
|
+
private getLabelFromUserContextMenuItem;
|
|
27
29
|
private getUserMenuItemsColumnHeader;
|
|
28
30
|
buildStandaloneColumnHeader(adaptableColumn: AdaptableColumn): AdaptableMenuItem[];
|
|
29
31
|
}
|
|
@@ -16,16 +16,15 @@ class agGridMenuHelper {
|
|
|
16
16
|
buildColumnMenu(params, originalgetMainMenuItems) {
|
|
17
17
|
// couldnt find a way to listen for menu close. There is a Menu Item Select, but you can also close menu from filter and clicking outside menu....
|
|
18
18
|
const colId = params.column.getColId();
|
|
19
|
-
let
|
|
19
|
+
let agGridColumnMenuItems = [];
|
|
20
20
|
let adaptableColumnMenuItems = [];
|
|
21
21
|
let userColumnMenuItems = [];
|
|
22
|
-
//First get
|
|
23
|
-
|
|
24
|
-
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
25
|
-
.showAdaptableColumnMenu;
|
|
22
|
+
//First get Ag Grid Column Items
|
|
23
|
+
agGridColumnMenuItems.push(...this.createAgGridColumnMenuItems(originalgetMainMenuItems, params));
|
|
24
|
+
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableColumnMenu;
|
|
26
25
|
let hasAdaptableColumnMenuItems = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
27
26
|
if (hasAdaptableColumnMenuItems) {
|
|
28
|
-
|
|
27
|
+
agGridColumnMenuItems.push('separator');
|
|
29
28
|
}
|
|
30
29
|
const adaptableColumn = this.adaptable.api.columnApi.getColumnFromId(colId);
|
|
31
30
|
const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
|
|
@@ -44,7 +43,7 @@ class agGridMenuHelper {
|
|
|
44
43
|
// Finally get all the User Menu Items
|
|
45
44
|
userColumnMenuItems.push(...this.createUserColumnMenuItems(menuContext));
|
|
46
45
|
const map = {
|
|
47
|
-
|
|
46
|
+
aggrid: agGridColumnMenuItems,
|
|
48
47
|
adaptable: adaptableColumnMenuItems,
|
|
49
48
|
user: userColumnMenuItems,
|
|
50
49
|
};
|
|
@@ -53,19 +52,18 @@ class agGridMenuHelper {
|
|
|
53
52
|
}));
|
|
54
53
|
}
|
|
55
54
|
buildContextMenu(params, originalgetContextMenuItems) {
|
|
56
|
-
let
|
|
55
|
+
let agGridContextMenuItems = [];
|
|
57
56
|
let adaptableContextMenuItems = [];
|
|
58
57
|
let userContextMenuItems = [];
|
|
59
|
-
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
60
|
-
.showAdaptableContextMenu;
|
|
58
|
+
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableContextMenu;
|
|
61
59
|
let hasAdaptableContextMenuItems = showAdaptableContextMenu == null || showAdaptableContextMenu !== false;
|
|
62
60
|
let userDefinedContextMenuItems = this.adaptable.adaptableOptions.menuOptions.contextMenuItems;
|
|
63
61
|
let hasUserDefinedContextMenuItems = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userDefinedContextMenuItems);
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
|
|
62
|
+
const agGridMenuItems = this.createAgGridContextMenuItems(originalgetContextMenuItems, params);
|
|
63
|
+
if (agGridMenuItems) {
|
|
64
|
+
agGridContextMenuItems.push(...agGridMenuItems);
|
|
67
65
|
if (hasAdaptableContextMenuItems || hasUserDefinedContextMenuItems) {
|
|
68
|
-
|
|
66
|
+
agGridContextMenuItems.push('separator');
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
const adaptableMenuItems = [];
|
|
@@ -91,7 +89,7 @@ class agGridMenuHelper {
|
|
|
91
89
|
}
|
|
92
90
|
}
|
|
93
91
|
const map = {
|
|
94
|
-
|
|
92
|
+
aggrid: agGridContextMenuItems,
|
|
95
93
|
adaptable: adaptableContextMenuItems,
|
|
96
94
|
user: userContextMenuItems,
|
|
97
95
|
};
|
|
@@ -133,25 +131,40 @@ class agGridMenuHelper {
|
|
|
133
131
|
subMenu: subMenuItems,
|
|
134
132
|
};
|
|
135
133
|
}
|
|
136
|
-
|
|
134
|
+
createAgGridColumnMenuDefFromUserMenu(menuItem, menuContext) {
|
|
137
135
|
const fn = menuItem.onClick;
|
|
138
136
|
const disabled = menuItem.disabled && menuItem.disabled(menuContext);
|
|
139
137
|
return {
|
|
140
|
-
name: this.
|
|
138
|
+
name: this.getLabelFromUserColumnMenuItem(menuItem, menuContext),
|
|
141
139
|
action: () => (fn ? fn(menuContext) : null),
|
|
142
140
|
icon: menuItem.icon,
|
|
143
141
|
disabled: disabled,
|
|
144
142
|
subMenu: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(menuItem.subMenuItems)
|
|
145
143
|
? undefined
|
|
146
144
|
: menuItem.subMenuItems.map((subMenuItem) => {
|
|
147
|
-
return this.
|
|
145
|
+
return this.createAgGridColumnMenuDefFromUserMenu(subMenuItem, menuContext);
|
|
148
146
|
}),
|
|
149
147
|
};
|
|
150
148
|
}
|
|
151
|
-
|
|
149
|
+
createAgGridContextMenuDefFromUserMenu(menuItem, menuContext) {
|
|
150
|
+
const fn = menuItem.onClick;
|
|
151
|
+
const disabled = menuItem.disabled && menuItem.disabled(menuContext);
|
|
152
|
+
return {
|
|
153
|
+
name: this.getLabelFromUserContextMenuItem(menuItem, menuContext),
|
|
154
|
+
action: () => (fn ? fn(menuContext) : null),
|
|
155
|
+
icon: menuItem.icon,
|
|
156
|
+
disabled: disabled,
|
|
157
|
+
subMenu: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(menuItem.subMenuItems)
|
|
158
|
+
? undefined
|
|
159
|
+
: menuItem.subMenuItems.map((subMenuItem) => {
|
|
160
|
+
return this.createAgGridContextMenuDefFromUserMenu(subMenuItem, menuContext);
|
|
161
|
+
}),
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
createAdaptableColumnMenuItemFromUserMenu(menuItem, menuContext) {
|
|
152
165
|
const fn = menuItem.onClick;
|
|
153
166
|
let adaptableMenuItem = {
|
|
154
|
-
label: this.
|
|
167
|
+
label: this.getLabelFromUserColumnMenuItem(menuItem, menuContext),
|
|
155
168
|
reduxAction: null,
|
|
156
169
|
onClick: () => (fn ? fn(menuContext) : null),
|
|
157
170
|
isVisible: true,
|
|
@@ -159,7 +172,7 @@ class agGridMenuHelper {
|
|
|
159
172
|
};
|
|
160
173
|
return adaptableMenuItem;
|
|
161
174
|
}
|
|
162
|
-
|
|
175
|
+
createAgGridColumnMenuItems(originalgetMainMenuItems, params) {
|
|
163
176
|
// if there was an initial implementation we init the list of menu items with this one; otherwise we take the default items
|
|
164
177
|
return originalgetMainMenuItems
|
|
165
178
|
? originalgetMainMenuItems(params)
|
|
@@ -195,26 +208,18 @@ class agGridMenuHelper {
|
|
|
195
208
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userColumnMenuItems)) {
|
|
196
209
|
userColumnMenuItems.forEach((userMenuItem) => {
|
|
197
210
|
// And then convert them into Menu Item Defs
|
|
198
|
-
let menuItem = this.
|
|
211
|
+
let menuItem = this.createAgGridColumnMenuDefFromUserMenu(userMenuItem, menuContext);
|
|
199
212
|
columnMenuItems.push(menuItem);
|
|
200
213
|
});
|
|
201
214
|
}
|
|
202
215
|
return columnMenuItems;
|
|
203
216
|
}
|
|
204
|
-
createColumnMenuContextObject(adaptableColumn,
|
|
217
|
+
createColumnMenuContextObject(adaptableColumn, agGridColumn) {
|
|
205
218
|
return {
|
|
206
|
-
gridCell: undefined,
|
|
207
219
|
adaptableColumn: adaptableColumn,
|
|
208
|
-
|
|
209
|
-
isSelectedCell: false,
|
|
210
|
-
isSingleSelectedColumn: false,
|
|
211
|
-
isGroupedNode: false,
|
|
212
|
-
rowNode: undefined,
|
|
213
|
-
primaryKeyValue: undefined,
|
|
214
|
-
selectedCellInfo: this.adaptable.api.gridApi.getSelectedCellInfo(),
|
|
215
|
-
selectedRowInfo: this.adaptable.api.gridApi.getSelectedRowInfo(),
|
|
220
|
+
agGridColumn: agGridColumn,
|
|
216
221
|
adaptableApi: this.adaptable.api,
|
|
217
|
-
isRowGroupColumn: this.adaptable.api.columnApi.isRowGroupColumn(
|
|
222
|
+
isRowGroupColumn: this.adaptable.api.columnApi.isRowGroupColumn(agGridColumn.getColId()),
|
|
218
223
|
};
|
|
219
224
|
}
|
|
220
225
|
createContextMenuContextObject(params, adaptableColumn) {
|
|
@@ -240,7 +245,7 @@ class agGridMenuHelper {
|
|
|
240
245
|
isSelectedCell: isSelectedCell,
|
|
241
246
|
gridCell: clickedCell,
|
|
242
247
|
adaptableColumn: adaptableColumn,
|
|
243
|
-
|
|
248
|
+
agGridColumn: params.column,
|
|
244
249
|
rowNode: params.node,
|
|
245
250
|
isGroupedNode: params.node ? params.node.group : false,
|
|
246
251
|
isSingleSelectedColumn: isSingleSelectedColumn,
|
|
@@ -251,7 +256,7 @@ class agGridMenuHelper {
|
|
|
251
256
|
isRowGroupColumn: this.adaptable.api.columnApi.isRowGroupColumn(params.column.getColId()),
|
|
252
257
|
};
|
|
253
258
|
}
|
|
254
|
-
|
|
259
|
+
createAgGridContextMenuItems(originalgetContextMenuItems, params) {
|
|
255
260
|
// if there was an initial implementation we init the list of menu items with this one, otherwise we take default items
|
|
256
261
|
// this allows us to ensure that devs can still create their own agGrid context menu without losing ours
|
|
257
262
|
return originalgetContextMenuItems
|
|
@@ -278,8 +283,7 @@ class agGridMenuHelper {
|
|
|
278
283
|
// here we create agGrid Menu items based on Adaptable Menu Items
|
|
279
284
|
// user has ability to decide whether to show or not
|
|
280
285
|
let contextMenuItems = [];
|
|
281
|
-
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
282
|
-
.showAdaptableContextMenu;
|
|
286
|
+
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableContextMenu;
|
|
283
287
|
if (showAdaptableContextMenu == null || showAdaptableContextMenu !== false) {
|
|
284
288
|
adaptableMenuItems.forEach((adaptableMenuItem) => {
|
|
285
289
|
if (adaptableMenuItem) {
|
|
@@ -306,7 +310,7 @@ class agGridMenuHelper {
|
|
|
306
310
|
return userMenuItem.hidden ? !userMenuItem.hidden(menuContext) : true;
|
|
307
311
|
})
|
|
308
312
|
.forEach((userMenuItem) => {
|
|
309
|
-
let menuItem = this.
|
|
313
|
+
let menuItem = this.createAgGridContextMenuDefFromUserMenu(userMenuItem, menuContext);
|
|
310
314
|
contextMenuItems.push(menuItem);
|
|
311
315
|
});
|
|
312
316
|
return contextMenuItems;
|
|
@@ -314,8 +318,7 @@ class agGridMenuHelper {
|
|
|
314
318
|
// method to get all the Adaptable Menu Items - together with running the function where user can choose whether or not to display
|
|
315
319
|
getAdaptableMenuItemsColumnHeader(adaptableColumn, menuContext) {
|
|
316
320
|
const adaptableMenuItems = [];
|
|
317
|
-
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
318
|
-
.showAdaptableColumnMenu;
|
|
321
|
+
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableColumnMenu;
|
|
319
322
|
let runCheck = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
320
323
|
// if (adaptableColumn != null) {
|
|
321
324
|
this.adaptable.modules.forEach((s) => {
|
|
@@ -343,10 +346,15 @@ class agGridMenuHelper {
|
|
|
343
346
|
// }
|
|
344
347
|
return adaptableMenuItems;
|
|
345
348
|
}
|
|
346
|
-
|
|
347
|
-
return typeof
|
|
348
|
-
?
|
|
349
|
-
:
|
|
349
|
+
getLabelFromUserColumnMenuItem(userColumnMenuItem, menuContext) {
|
|
350
|
+
return typeof userColumnMenuItem.label === 'function'
|
|
351
|
+
? userColumnMenuItem.label(menuContext)
|
|
352
|
+
: userColumnMenuItem.label;
|
|
353
|
+
}
|
|
354
|
+
getLabelFromUserContextMenuItem(userContextMenuItem, menuContext) {
|
|
355
|
+
return typeof userContextMenuItem.label === 'function'
|
|
356
|
+
? userContextMenuItem.label(menuContext)
|
|
357
|
+
: userContextMenuItem.label;
|
|
350
358
|
}
|
|
351
359
|
getUserMenuItemsColumnHeader(menuContext) {
|
|
352
360
|
var _a, _b;
|
|
@@ -361,7 +369,7 @@ class agGridMenuHelper {
|
|
|
361
369
|
let userColumnMenuItems = this.getUserMenuItemsColumnHeader(menuContext);
|
|
362
370
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userColumnMenuItems)) {
|
|
363
371
|
userColumnMenuItems.forEach((userMenuItem) => {
|
|
364
|
-
let adaptableMenuItem = this.
|
|
372
|
+
let adaptableMenuItem = this.createAdaptableColumnMenuItemFromUserMenu(userMenuItem, menuContext);
|
|
365
373
|
returnMenuItems.push(adaptableMenuItem);
|
|
366
374
|
});
|
|
367
375
|
}
|
|
@@ -7,7 +7,7 @@ export declare type InternalAdaptableDateEditorProps = {
|
|
|
7
7
|
value?: string | Date | number | null;
|
|
8
8
|
dateFormat: string;
|
|
9
9
|
onValueChange?: (value: Date | null) => void;
|
|
10
|
-
|
|
10
|
+
onStopEdit?: (keyboardEventKey?: string) => void;
|
|
11
11
|
showClearButton?: boolean;
|
|
12
12
|
};
|
|
13
13
|
export declare const InternalAdaptableDateEditor: React.ForwardRefExoticComponent<InternalAdaptableDateEditorProps & React.RefAttributes<InternalAdaptableDateEditorApi>>;
|
|
@@ -34,9 +34,14 @@ exports.InternalAdaptableDateEditor = React.forwardRef((props, ref) => {
|
|
|
34
34
|
};
|
|
35
35
|
const [value, setValue] = useProperty_1.default(props, 'value', props.defaultValue, {
|
|
36
36
|
onChange: (value) => {
|
|
37
|
-
var _a;
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
var _a, _b;
|
|
38
|
+
if (value === '' || value == undefined) {
|
|
39
|
+
(_a = props.onValueChange) === null || _a === void 0 ? void 0 : _a.call(props, null);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const date = typeof value === 'string' ? parseISO_1.default(value) : new Date(value);
|
|
43
|
+
(_b = props.onValueChange) === null || _b === void 0 ? void 0 : _b.call(props, date);
|
|
44
|
+
}
|
|
40
45
|
},
|
|
41
46
|
});
|
|
42
47
|
React.useImperativeHandle(ref, () => {
|
|
@@ -50,12 +55,12 @@ exports.InternalAdaptableDateEditor = React.forwardRef((props, ref) => {
|
|
|
50
55
|
}, []);
|
|
51
56
|
return (React.createElement("div", { style: hostStyle },
|
|
52
57
|
React.createElement(DatepickerContext_1.DatepickerContext.Provider, { value: {
|
|
53
|
-
onHide: () => {
|
|
58
|
+
onHide: (keyboardEventKey) => {
|
|
54
59
|
var _a;
|
|
55
|
-
(_a = props.
|
|
60
|
+
(_a = props.onStopEdit) === null || _a === void 0 ? void 0 : _a.call(props, keyboardEventKey);
|
|
56
61
|
},
|
|
57
62
|
onShow: () => { },
|
|
58
|
-
showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a :
|
|
63
|
+
showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : true,
|
|
59
64
|
} },
|
|
60
65
|
React.createElement(AdaptableInput_1.default, { type: 'date', value: stringValue, onChange: onChange, style: inputStyle, ref: inputRef }))));
|
|
61
66
|
});
|
|
@@ -9,13 +9,13 @@ import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
|
9
9
|
* field: 'tradeDate',
|
|
10
10
|
* type: 'abColDefDate',
|
|
11
11
|
* cellEditorParams: {
|
|
12
|
-
* showClearButton:
|
|
12
|
+
* showClearButton: true
|
|
13
13
|
* }
|
|
14
14
|
* }
|
|
15
15
|
*
|
|
16
16
|
* For now, there is just 1 editor param you can configure:
|
|
17
17
|
*
|
|
18
|
-
* cellEditorParams.showClearButton - defaults to `
|
|
18
|
+
* cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button.
|
|
19
19
|
*
|
|
20
20
|
* When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
|
|
21
21
|
* This is useful because dates can be stored as strings, numbers or Date instances - the value parser will be called with a `Date` instance,
|
|
@@ -37,4 +37,5 @@ export declare class AdaptableDateEditor implements ICellEditorComp {
|
|
|
37
37
|
getAdaptableInstance(params: ICellEditorParams): IAdaptable;
|
|
38
38
|
afterGuiAttached(): void;
|
|
39
39
|
destroy(): void;
|
|
40
|
+
private shouldClearExistingValue;
|
|
40
41
|
}
|
|
@@ -6,6 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_dom_1 = require("react-dom");
|
|
7
7
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
8
8
|
const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
|
|
9
|
+
const all_modules_1 = require("@ag-grid-community/all-modules");
|
|
9
10
|
const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
10
11
|
/**
|
|
11
12
|
* Used by default for all `abColDefDate` columns.
|
|
@@ -16,13 +17,13 @@ const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
|
16
17
|
* field: 'tradeDate',
|
|
17
18
|
* type: 'abColDefDate',
|
|
18
19
|
* cellEditorParams: {
|
|
19
|
-
* showClearButton:
|
|
20
|
+
* showClearButton: true
|
|
20
21
|
* }
|
|
21
22
|
* }
|
|
22
23
|
*
|
|
23
24
|
* For now, there is just 1 editor param you can configure:
|
|
24
25
|
*
|
|
25
|
-
* cellEditorParams.showClearButton - defaults to `
|
|
26
|
+
* cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button.
|
|
26
27
|
*
|
|
27
28
|
* When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
|
|
28
29
|
* This is useful because dates can be stored as strings, numbers or Date instances - the value parser will be called with a `Date` instance,
|
|
@@ -40,7 +41,7 @@ class AdaptableDateEditor {
|
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
init(params) {
|
|
43
|
-
this.value = params.value;
|
|
44
|
+
this.value = this.shouldClearExistingValue(params) ? '' : params.value;
|
|
44
45
|
const { valueParser } = params.column.getColDef();
|
|
45
46
|
this.params = params;
|
|
46
47
|
if (typeof valueParser === 'function') {
|
|
@@ -75,7 +76,8 @@ class AdaptableDateEditor {
|
|
|
75
76
|
afterGuiAttached() {
|
|
76
77
|
var _a;
|
|
77
78
|
const adaptable = this.getAdaptableInstance(this.params);
|
|
78
|
-
const
|
|
79
|
+
const defaultValue = this.shouldClearExistingValue(this.params) ? '' : this.params.value;
|
|
80
|
+
const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: defaultValue, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
|
|
79
81
|
const invalid = isNaN(+value);
|
|
80
82
|
if (this.valueParser) {
|
|
81
83
|
const params = Object.assign(Object.assign({}, this.params), { oldValue: this.params.value, newValue: value, defaultParser: (value) => {
|
|
@@ -98,8 +100,13 @@ class AdaptableDateEditor {
|
|
|
98
100
|
this.params.stopEditing();
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
|
-
}, showClearButton: (_a = this.params.showClearButton) !== null && _a !== void 0 ? _a :
|
|
102
|
-
|
|
103
|
+
}, showClearButton: (_a = this.params.showClearButton) !== null && _a !== void 0 ? _a : true, onStopEdit: (keyboardEventKey) => {
|
|
104
|
+
if (keyboardEventKey === 'Escape') {
|
|
105
|
+
this.params.api.stopEditing(true);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.params.stopEditing();
|
|
109
|
+
}
|
|
103
110
|
}, ref: (editor) => {
|
|
104
111
|
this.editor = editor;
|
|
105
112
|
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
@@ -109,5 +116,8 @@ class AdaptableDateEditor {
|
|
|
109
116
|
destroy() {
|
|
110
117
|
react_dom_1.unmountComponentAtNode(this.el);
|
|
111
118
|
}
|
|
119
|
+
shouldClearExistingValue(params) {
|
|
120
|
+
return params.keyPress === all_modules_1.KeyCode.BACKSPACE || params.keyPress === all_modules_1.KeyCode.DELETE;
|
|
121
|
+
}
|
|
112
122
|
}
|
|
113
123
|
exports.AdaptableDateEditor = AdaptableDateEditor;
|
|
@@ -6,6 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_dom_1 = require("react-dom");
|
|
7
7
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
8
8
|
const InternalAdaptableNumberEditor_1 = require("./InternalAdaptableNumberEditor");
|
|
9
|
+
const all_modules_1 = require("@ag-grid-community/all-modules");
|
|
9
10
|
/**
|
|
10
11
|
* Used by default for all `abColDefNumber` columns.
|
|
11
12
|
*
|
|
@@ -39,7 +40,7 @@ class AdaptableNumberEditor {
|
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
init(params) {
|
|
42
|
-
this.value = params.value;
|
|
43
|
+
this.value = this.shouldClearExistingValue(params) ? '' : params.value;
|
|
43
44
|
this.params = params;
|
|
44
45
|
this.columnId = params.column.getColId();
|
|
45
46
|
const { valueParser } = params.column.getColDef();
|
|
@@ -71,7 +72,8 @@ class AdaptableNumberEditor {
|
|
|
71
72
|
afterGuiAttached() {
|
|
72
73
|
var _a, _b;
|
|
73
74
|
const adaptable = this.params.api.__adaptable;
|
|
74
|
-
const
|
|
75
|
+
const defaultValue = this.shouldClearExistingValue(this.params) ? '' : this.params.value;
|
|
76
|
+
const editorElement = (React.createElement(InternalAdaptableNumberEditor_1.InternalAdaptableNumberEditor, { defaultValue: defaultValue, showClearButton: (_a = this.params.showClearButton) !== null && _a !== void 0 ? _a : true, emptyValue: (_b = this.params.emptyValue) !== null && _b !== void 0 ? _b : '', onValueChange: this.onValueChange, ref: (editor) => {
|
|
75
77
|
this.editor = editor;
|
|
76
78
|
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
77
79
|
} }));
|
|
@@ -90,5 +92,8 @@ class AdaptableNumberEditor {
|
|
|
90
92
|
destroy() {
|
|
91
93
|
react_dom_1.unmountComponentAtNode(this.el);
|
|
92
94
|
}
|
|
95
|
+
shouldClearExistingValue(params) {
|
|
96
|
+
return params.keyPress === all_modules_1.KeyCode.BACKSPACE || params.keyPress === all_modules_1.KeyCode.DELETE;
|
|
97
|
+
}
|
|
93
98
|
}
|
|
94
99
|
exports.AdaptableNumberEditor = AdaptableNumberEditor;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const DatepickerContext: React.Context<{
|
|
3
|
-
onHide?:
|
|
3
|
+
onHide?: (keyboardEventKey?: string) => void;
|
|
4
4
|
onShow?: VoidFunction;
|
|
5
5
|
showClearButton?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const useDatepickerContext: () => {
|
|
8
|
-
onHide?:
|
|
8
|
+
onHide?: (keyboardEventKey?: string) => void;
|
|
9
9
|
onShow?: VoidFunction;
|
|
10
10
|
showClearButton?: boolean;
|
|
11
11
|
};
|
|
@@ -57,19 +57,23 @@ exports.Datepicker = React.forwardRef((props, ref) => {
|
|
|
57
57
|
};
|
|
58
58
|
const inputValue = (_a = FormatHelper_1.DateFormatter(value, { Pattern: dateProps.format })) !== null && _a !== void 0 ? _a : '';
|
|
59
59
|
const [visible, doSetVisible] = react_1.useState(false);
|
|
60
|
-
const setVisible = (visible) => {
|
|
60
|
+
const setVisible = (visible, keyboardEventKey) => {
|
|
61
61
|
var _a, _b;
|
|
62
62
|
doSetVisible(visible);
|
|
63
63
|
if (!visible) {
|
|
64
|
-
(_a = datepickerContext === null || datepickerContext === void 0 ? void 0 : datepickerContext.onHide) === null || _a === void 0 ? void 0 : _a.call(datepickerContext);
|
|
64
|
+
(_a = datepickerContext === null || datepickerContext === void 0 ? void 0 : datepickerContext.onHide) === null || _a === void 0 ? void 0 : _a.call(datepickerContext, keyboardEventKey);
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
67
|
(_b = datepickerContext === null || datepickerContext === void 0 ? void 0 : datepickerContext.onShow) === null || _b === void 0 ? void 0 : _b.call(datepickerContext);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
+
const clearValue = () => {
|
|
71
|
+
updateValue(undefined);
|
|
72
|
+
};
|
|
70
73
|
const renderButton = (label, onClick) => (React.createElement(SimpleButton_1.default, { onClick: onClick, margin: '2px' }, label));
|
|
71
74
|
const todayDate = new Date();
|
|
72
75
|
const footerButtonsMap = {
|
|
76
|
+
clear: renderButton('Clear', () => clearValue()),
|
|
73
77
|
close: renderButton('Close', () => setVisible(false)),
|
|
74
78
|
today: renderButton('Today', () => updateValue(todayDate)),
|
|
75
79
|
tomorrow: renderButton('Tomorrow', () => updateValue(addDays_1.default(todayDate, 1))),
|
|
@@ -82,12 +86,12 @@ exports.Datepicker = React.forwardRef((props, ref) => {
|
|
|
82
86
|
const footerButtons = datepickerButtons.map((buttonKey, index) => React.cloneElement(footerButtonsMap[buttonKey], { key: index }));
|
|
83
87
|
const clearButton = showClearButton ? (React.createElement(SimpleButton_1.default, { "data-name": "clear", variant: "text", tooltip: "Clear", iconSize: 20, padding: 0, icon: "clear", onMouseDown: (e) => {
|
|
84
88
|
e.preventDefault();
|
|
85
|
-
|
|
89
|
+
clearValue();
|
|
86
90
|
}, accessLevel: 'Full' })) : null;
|
|
87
91
|
const calendarButton = (React.createElement(SimpleButton_1.default, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, px: 0, py: 0, onClick: () => setVisible(true) }));
|
|
88
92
|
return (React.createElement(OverlayTrigger_1.default, { visible: visible, alignHorizontal: 'left', render: () => (React.createElement(DatepickerOverlay, { onHide: () => setVisible(false), onKeyDown: (e) => {
|
|
89
|
-
if (e.key === 'Escape') {
|
|
90
|
-
setVisible(false);
|
|
93
|
+
if (e.key === 'Escape' || e.key === 'Enter') {
|
|
94
|
+
setVisible(false, e.key);
|
|
91
95
|
}
|
|
92
96
|
} },
|
|
93
97
|
React.createElement(react_day_picker_1.DayPicker, Object.assign({ fixedWeeks: true }, dayPickerProps, { showWeekNumber: showWeekNumber, showOutsideDays: showOutsideDays, mode: "single", month: isNaN(+month) ? new Date() : month, onMonthChange: setMonth, components: { Caption: Caption_1.Caption, CaptionLabel: CaptionLabel_1.CaptionLabel }, onSelect: updateValue, footer: React.createElement(rebass_1.Flex, { justifyContent: "space-between", mt: 2, flexWrap: 'wrap' }, footerButtons) })))) },
|
|
@@ -15,7 +15,7 @@ const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
|
15
15
|
const usePrevious_1 = tslib_1.__importDefault(require("../utils/usePrevious"));
|
|
16
16
|
const utils_1 = require("./utils");
|
|
17
17
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
18
|
-
const
|
|
18
|
+
const useAgGridClassName_1 = tslib_1.__importDefault(require("./useAgGridClassName"));
|
|
19
19
|
const contains_1 = tslib_1.__importDefault(require("../utils/contains"));
|
|
20
20
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
21
21
|
exports.getConstrainRect = (target, constrainTo) => {
|
|
@@ -133,7 +133,7 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
133
133
|
};
|
|
134
134
|
}, [props.visible, showEvent, hideEvent, onShow, onHide]);
|
|
135
135
|
let overlay;
|
|
136
|
-
const
|
|
136
|
+
const agGridClassName = useAgGridClassName_1.default([visible]);
|
|
137
137
|
if (targetRect) {
|
|
138
138
|
const overlayTarget = targetRef.current;
|
|
139
139
|
alignHorizontal =
|
|
@@ -163,7 +163,7 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
163
163
|
node.addEventListener(showEvent, onShow);
|
|
164
164
|
node.addEventListener(hideEvent, onHide);
|
|
165
165
|
}
|
|
166
|
-
}, className: join_1.default('ab-Overlay', `ab-Overlay--position-${position}`, showTriangle ? 'ab-Overlay--show-triangle' : '',
|
|
166
|
+
}, className: join_1.default('ab-Overlay', `ab-Overlay--position-${position}`, showTriangle ? 'ab-Overlay--show-triangle' : '', agGridClassName, domProps.className), visible: visible, style: overlayStyle, anchor: anchor, position: position, getConstrainRect: () => exports.getConstrainRect(targetRef.current) }), props.render()), portalElement);
|
|
167
167
|
}
|
|
168
168
|
return (React.createElement(React.Fragment, null,
|
|
169
169
|
props.children,
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const react_1 = require("react");
|
|
4
4
|
const AdaptableContext_1 = require("../../View/AdaptableContext");
|
|
5
|
-
const
|
|
5
|
+
const useAgGridClassName = (deps = []) => {
|
|
6
6
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
7
7
|
return react_1.useMemo(() => {
|
|
8
8
|
if (adaptable) {
|
|
9
|
-
return adaptable.
|
|
9
|
+
return adaptable.getAgGridCurrentThemeName();
|
|
10
10
|
}
|
|
11
11
|
return '';
|
|
12
12
|
}, deps);
|
|
13
13
|
};
|
|
14
|
-
exports.default =
|
|
14
|
+
exports.default = useAgGridClassName;
|
|
@@ -18,7 +18,7 @@ exports.ProgressIndicator = () => {
|
|
|
18
18
|
});
|
|
19
19
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
20
20
|
const adaptableContainerRef = react_1.useRef(adaptable.getAdaptableContainerElement());
|
|
21
|
-
const gridContainerRef = react_1.useRef(adaptable.
|
|
21
|
+
const gridContainerRef = react_1.useRef(adaptable.getAgGridContainerElement());
|
|
22
22
|
const disableAdaptableGrid = (elemRef, disabled) => {
|
|
23
23
|
const DISABLING_CSS_CLASS = 'ab-wait-for-progress-indicator';
|
|
24
24
|
if (!elemRef.current) {
|
|
@@ -82,6 +82,7 @@ const check_box_outline_1 = tslib_1.__importDefault(require("./check-box-outline
|
|
|
82
82
|
const boolean_list_1 = tslib_1.__importDefault(require("./boolean-list"));
|
|
83
83
|
const tab_unselected_1 = tslib_1.__importDefault(require("./tab-unselected"));
|
|
84
84
|
const cloud_upload_1 = tslib_1.__importDefault(require("./cloud-upload"));
|
|
85
|
+
const upload_1 = tslib_1.__importDefault(require("./upload"));
|
|
85
86
|
const ipushpull_1 = tslib_1.__importDefault(require("./ipushpull"));
|
|
86
87
|
const folder_open_1 = tslib_1.__importDefault(require("./folder-open"));
|
|
87
88
|
const folder_1 = tslib_1.__importDefault(require("./folder"));
|
|
@@ -218,6 +219,7 @@ const allIcons = {
|
|
|
218
219
|
'info-sign': info_1.default,
|
|
219
220
|
add: plus_1.default,
|
|
220
221
|
'cloud-upload': cloud_upload_1.default,
|
|
222
|
+
upload: upload_1.default,
|
|
221
223
|
ipushpull: ipushpull_1.default,
|
|
222
224
|
'folder-open': folder_open_1.default,
|
|
223
225
|
'folder-shared': folder_shared_1.default,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
|
|
6
|
+
exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props),
|
|
7
|
+
React.createElement("path", { d: "M5,20h14v-2H5V20z M5,10h4v6h6v-6h4l-7-7L5,10z" }),
|
|
8
|
+
' '));
|