@adaptabletools/adaptable 22.0.0-canary.1 → 22.0.0-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/index.css +3 -14
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -0
- package/src/Api/Implementation/ApiBase.js +1 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +1 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
- package/src/Api/Implementation/DataImportApiImpl.js +1 -0
- package/src/Api/Implementation/DataSetApiImpl.js +1 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +16 -14
- package/src/Api/Implementation/ExportApiImpl.js +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.js +1 -0
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +1 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +1 -0
- package/src/Api/Implementation/NoteApiImpl.js +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
- package/src/Redux/Store/AdaptableStore.js +49 -43
- package/src/Strategy/AdaptableModuleBase.js +4 -0
- package/src/Strategy/AlertModule.js +1 -0
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +1 -0
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/LayoutModule.js +2 -1
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +1 -0
- package/src/Strategy/ShortcutModule.js +2 -0
- package/src/Strategy/TeamSharingModule.js +10 -10
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
- package/src/Utilities/MenuItem.js +18 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
- package/src/Utilities/Services/AlertService.js +6 -4
- package/src/Utilities/Services/AnnotationsService.js +3 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
- package/src/Utilities/Services/ChartingService.js +1 -0
- package/src/Utilities/Services/DataService.js +10 -2
- package/src/Utilities/Services/Fdc3Service.js +5 -3
- package/src/Utilities/Services/FlashingCellService.js +5 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +1 -0
- package/src/Utilities/Services/QueryLanguageService.js +6 -5
- package/src/Utilities/Services/RowFormService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +10 -7
- package/src/Utilities/Services/TeamSharingService.js +3 -1
- package/src/Utilities/Services/ThemeService.js +11 -9
- package/src/Utilities/Services/ValidationService.js +1 -0
- package/src/Utilities/createAgStatusPanelComponent.js +3 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -0
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +8 -8
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -0
- package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
- package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
- package/src/View/Components/ExpressionWizard.js +5 -5
- package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
- package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/CustomSort/CustomSortSummary.js +13 -13
- package/src/View/FormatColumn/FormatColumnSummary.js +13 -13
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +13 -13
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
- package/src/View/Theme/ThemePopup.js +13 -16
- package/src/agGrid/Adaptable.js +4 -0
- package/src/agGrid/AdaptableAgGrid.js +99 -33
- package/src/agGrid/AdaptableFilterHandler.js +4 -0
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +10 -0
- package/src/agGrid/AgGridAdapter.js +11 -1
- package/src/agGrid/AgGridColumnAdapter.js +2 -0
- package/src/agGrid/AgGridExportAdapter.js +10 -9
- package/src/agGrid/AgGridFilterAdapter.js +4 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.js +3 -0
- package/src/agGrid/AgGridMenuAdapter.js +1 -0
- package/src/agGrid/AgGridModulesAdapter.js +2 -1
- package/src/agGrid/AgGridOptionsService.js +3 -0
- package/src/agGrid/AgGridThemeAdapter.js +2 -0
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/overlayBaseZIndex.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +17 -14
- package/src/devTools/index.js +54 -53
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +11 -11
- package/src/layout-manager/src/LMLogger.js +7 -0
- package/src/layout-manager/src/index.js +56 -51
- package/src/metamodel/adaptable.metamodel.d.ts +57 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +3 -0
- package/src/migration/VersionUpgrade.js +1 -0
- package/src/migration/VersionUpgrade17.js +1 -2
- package/src/parser/src/ExpressionEvaluationError.js +1 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -222,6 +222,8 @@ export const getAdaptableToolPanelAgGridComponent = (adaptable) => {
|
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
224
|
return class AdaptableToolPanelAgGridComponent {
|
|
225
|
+
gui;
|
|
226
|
+
unmountReactRoot;
|
|
225
227
|
init(params) {
|
|
226
228
|
const api = adaptable.api;
|
|
227
229
|
this.gui = document.createElement('div');
|
|
@@ -16,19 +16,6 @@ import { CustomSortWizard } from './Wizard/CustomSortWizard';
|
|
|
16
16
|
export class CustomSortSummaryComponent extends React.Component {
|
|
17
17
|
constructor(props) {
|
|
18
18
|
super(props);
|
|
19
|
-
this.onFinishWizard = (customSort) => {
|
|
20
|
-
if (this.props.CustomSorts.find((x) => x.ColumnId == customSort.ColumnId)) {
|
|
21
|
-
this.props.onEditCustomSort(customSort);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this.props.onAddCustomSort(customSort);
|
|
25
|
-
}
|
|
26
|
-
this.setState({
|
|
27
|
-
editedAdaptableObject: null,
|
|
28
|
-
wizardStartIndex: 0,
|
|
29
|
-
wizardStatus: WizardStatus.None,
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
19
|
this.state = UIHelper.getEmptyConfigState();
|
|
33
20
|
}
|
|
34
21
|
render() {
|
|
@@ -76,6 +63,19 @@ export class CustomSortSummaryComponent extends React.Component {
|
|
|
76
63
|
wizardStatus: WizardStatus.None,
|
|
77
64
|
});
|
|
78
65
|
}
|
|
66
|
+
onFinishWizard = (customSort) => {
|
|
67
|
+
if (this.props.CustomSorts.find((x) => x.ColumnId == customSort.ColumnId)) {
|
|
68
|
+
this.props.onEditCustomSort(customSort);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.props.onAddCustomSort(customSort);
|
|
72
|
+
}
|
|
73
|
+
this.setState({
|
|
74
|
+
editedAdaptableObject: null,
|
|
75
|
+
wizardStartIndex: 0,
|
|
76
|
+
wizardStatus: WizardStatus.None,
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
79
|
canFinishWizard() {
|
|
80
80
|
let customSort = this.state.editedAdaptableObject;
|
|
81
81
|
return (StringExtensions.IsNotNullOrEmpty(customSort.ColumnId) &&
|
|
@@ -15,19 +15,6 @@ import { FormatColumnWizard } from './Wizard/FormatColumnWizard';
|
|
|
15
15
|
export class FormatColumnSummaryComponent extends React.Component {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
18
|
-
this.onFinishWizard = (formatColumn) => {
|
|
19
|
-
if (this.props.FormatColumns.find((x) => x.Uuid == formatColumn.Uuid)) {
|
|
20
|
-
this.props.onEditFormatColumn(formatColumn);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.props.onAddFormatColumn(formatColumn);
|
|
24
|
-
}
|
|
25
|
-
this.setState({
|
|
26
|
-
editedAdaptableObject: null,
|
|
27
|
-
wizardStartIndex: 0,
|
|
28
|
-
wizardStatus: WizardStatus.None,
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
18
|
this.state = UIHelper.getEmptyConfigState();
|
|
32
19
|
}
|
|
33
20
|
render() {
|
|
@@ -70,6 +57,19 @@ export class FormatColumnSummaryComponent extends React.Component {
|
|
|
70
57
|
wizardStatus: WizardStatus.None,
|
|
71
58
|
});
|
|
72
59
|
}
|
|
60
|
+
onFinishWizard = (formatColumn) => {
|
|
61
|
+
if (this.props.FormatColumns.find((x) => x.Uuid == formatColumn.Uuid)) {
|
|
62
|
+
this.props.onEditFormatColumn(formatColumn);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.props.onAddFormatColumn(formatColumn);
|
|
66
|
+
}
|
|
67
|
+
this.setState({
|
|
68
|
+
editedAdaptableObject: null,
|
|
69
|
+
wizardStartIndex: 0,
|
|
70
|
+
wizardStatus: WizardStatus.None,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
73
|
canFinishWizard() {
|
|
74
74
|
let formatColumn = this.state.editedAdaptableObject;
|
|
75
75
|
return formatColumn.Scope != undefined && UIHelper.IsNotEmptyStyle(formatColumn.Style);
|
|
@@ -15,19 +15,6 @@ import { FreeTextColumnWizard } from './Wizard/FreeTextColumnWizard';
|
|
|
15
15
|
export class FreeTextColumnSummaryComponent extends React.Component {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
18
|
-
this.onFinishWizard = (FreeTextColumn) => {
|
|
19
|
-
if (this.props.FreeTextColumns.find((x) => x.ColumnId == FreeTextColumn.ColumnId)) {
|
|
20
|
-
this.props.onEditFreeTextColumn(FreeTextColumn);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.props.onAddFreeTextColumn(FreeTextColumn);
|
|
24
|
-
}
|
|
25
|
-
this.setState({
|
|
26
|
-
editedAdaptableObject: null,
|
|
27
|
-
wizardStartIndex: 0,
|
|
28
|
-
wizardStatus: WizardStatus.None,
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
18
|
this.state = UIHelper.getEmptyConfigState();
|
|
32
19
|
}
|
|
33
20
|
render() {
|
|
@@ -68,6 +55,19 @@ export class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
68
55
|
wizardStatus: WizardStatus.None,
|
|
69
56
|
});
|
|
70
57
|
}
|
|
58
|
+
onFinishWizard = (FreeTextColumn) => {
|
|
59
|
+
if (this.props.FreeTextColumns.find((x) => x.ColumnId == FreeTextColumn.ColumnId)) {
|
|
60
|
+
this.props.onEditFreeTextColumn(FreeTextColumn);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.props.onAddFreeTextColumn(FreeTextColumn);
|
|
64
|
+
}
|
|
65
|
+
this.setState({
|
|
66
|
+
editedAdaptableObject: null,
|
|
67
|
+
wizardStartIndex: 0,
|
|
68
|
+
wizardStatus: WizardStatus.None,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
71
|
canFinishWizard() {
|
|
72
72
|
let FreeTextColumn = this.state.editedAdaptableObject;
|
|
73
73
|
return StringExtensions.IsNotNullOrEmpty(FreeTextColumn.ColumnId);
|
|
@@ -13,6 +13,7 @@ import { connect } from 'react-redux';
|
|
|
13
13
|
import { Select } from '../../components/Select';
|
|
14
14
|
import { Flex } from '../../components/Flex';
|
|
15
15
|
class SmartEditViewPanelComponent extends React.Component {
|
|
16
|
+
cleanupEvent;
|
|
16
17
|
constructor(props) {
|
|
17
18
|
super(props);
|
|
18
19
|
this.state = {
|
|
@@ -11,22 +11,6 @@ import { Icon } from '../../components/icons';
|
|
|
11
11
|
import { ThemeSelector } from './ThemeSelector';
|
|
12
12
|
import { Box } from '../../components/Flex';
|
|
13
13
|
class ThemePopupComponent extends React.Component {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.handleCreateNewTheme = (variant) => {
|
|
17
|
-
let nthItem = this.props.UserThemes.length + 1;
|
|
18
|
-
let name = 'Custom-Theme-' + nthItem;
|
|
19
|
-
// make sure it is unique
|
|
20
|
-
while (this.props.UserThemes.some((theme) => theme.Name === name)) {
|
|
21
|
-
nthItem++;
|
|
22
|
-
name = 'Custom-Theme-' + nthItem;
|
|
23
|
-
}
|
|
24
|
-
const newTheme = ObjectFactory.CreateEmptyTheme(name);
|
|
25
|
-
newTheme.Variant = variant;
|
|
26
|
-
this.props.api.themeApi.addUserTheme(newTheme);
|
|
27
|
-
this.props.api.themeApi.loadTheme(newTheme.Name);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
14
|
render() {
|
|
31
15
|
const isCustomTheme = this.props.api.themeApi
|
|
32
16
|
.getUserThemes()
|
|
@@ -59,6 +43,19 @@ class ThemePopupComponent extends React.Component {
|
|
|
59
43
|
onChangeTheme(value) {
|
|
60
44
|
this.props.SelectTheme(value);
|
|
61
45
|
}
|
|
46
|
+
handleCreateNewTheme = (variant) => {
|
|
47
|
+
let nthItem = this.props.UserThemes.length + 1;
|
|
48
|
+
let name = 'Custom-Theme-' + nthItem;
|
|
49
|
+
// make sure it is unique
|
|
50
|
+
while (this.props.UserThemes.some((theme) => theme.Name === name)) {
|
|
51
|
+
nthItem++;
|
|
52
|
+
name = 'Custom-Theme-' + nthItem;
|
|
53
|
+
}
|
|
54
|
+
const newTheme = ObjectFactory.CreateEmptyTheme(name);
|
|
55
|
+
newTheme.Variant = variant;
|
|
56
|
+
this.props.api.themeApi.addUserTheme(newTheme);
|
|
57
|
+
this.props.api.themeApi.loadTheme(newTheme.Name);
|
|
58
|
+
};
|
|
62
59
|
}
|
|
63
60
|
function mapStateToProps(state, ownProps) {
|
|
64
61
|
return {
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -155,38 +155,77 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
|
155
155
|
const adaptableInstances = {};
|
|
156
156
|
const publishTimestamp = Number(ADAPTABLE_PUBLISH_TIMESTAMP);
|
|
157
157
|
export class AdaptableAgGrid {
|
|
158
|
+
logger;
|
|
159
|
+
_id;
|
|
160
|
+
lifecycleState;
|
|
161
|
+
variant;
|
|
162
|
+
emitter;
|
|
163
|
+
/**
|
|
164
|
+
* Runtime flags
|
|
165
|
+
*/
|
|
166
|
+
hasAutogeneratedPrimaryKey;
|
|
167
|
+
hasAdaptableToolPanel;
|
|
168
|
+
initWithLazyData;
|
|
169
|
+
_rawAdaptableOptions;
|
|
170
|
+
adaptableOptions;
|
|
171
|
+
_isDetailGrid;
|
|
172
|
+
_isDetailGridForIndex;
|
|
173
|
+
agGridOptionsService;
|
|
174
|
+
agGridAdapter;
|
|
175
|
+
agGridColumnAdapter;
|
|
176
|
+
agGridMenuAdapter;
|
|
177
|
+
agGridExportAdapter;
|
|
178
|
+
agGridThemeAdapter;
|
|
179
|
+
agGridModulesAdapter;
|
|
180
|
+
DANGER_USE_GETTER_adaptableContainerElement;
|
|
181
|
+
DANGER_USE_GETTER_agGridContainerElement;
|
|
182
|
+
api;
|
|
183
|
+
adaptableStore;
|
|
184
|
+
adaptableModules;
|
|
185
|
+
DataService;
|
|
186
|
+
CalculatedColumnExpressionService;
|
|
187
|
+
ModuleService;
|
|
188
|
+
ValidationService;
|
|
189
|
+
QueryLanguageService;
|
|
190
|
+
AlertService;
|
|
191
|
+
TeamSharingService;
|
|
192
|
+
MetamodelService;
|
|
193
|
+
RowFormService;
|
|
194
|
+
Fdc3Service;
|
|
195
|
+
AnnotationsService;
|
|
196
|
+
FlashingCellService;
|
|
197
|
+
LicenseService;
|
|
198
|
+
ChartingService;
|
|
199
|
+
ThemeService;
|
|
200
|
+
rowListeners;
|
|
201
|
+
throttleFilterOnDataChange;
|
|
202
|
+
debouncedSetSelectedRows;
|
|
203
|
+
debouncedSetSelectedCells;
|
|
204
|
+
agGridListenerKeydown;
|
|
205
|
+
agGridListenerMouseEnter;
|
|
206
|
+
agGridListenerMouseLeave;
|
|
207
|
+
listenerGlobalSetRowSelection;
|
|
208
|
+
listenerGlobalChartingChanges;
|
|
209
|
+
listenerCellEditingStarted;
|
|
210
|
+
listenerFirstDataRendered;
|
|
211
|
+
listenerPivotChanged;
|
|
212
|
+
listenerCellSelectionChanged;
|
|
213
|
+
listenerSortChanged;
|
|
214
|
+
listenerColumnGroupOpened;
|
|
215
|
+
layoutManager;
|
|
216
|
+
columnMinMaxValuesCache = {};
|
|
217
|
+
renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
|
|
218
|
+
unmountReactRoot;
|
|
219
|
+
unmountLoadingScreen;
|
|
220
|
+
/**
|
|
221
|
+
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
222
|
+
*/
|
|
223
|
+
adaptableStatusPanelKeys = [];
|
|
224
|
+
// see #no_additional_react_root
|
|
225
|
+
_PRIVATE_adaptableJSXElement;
|
|
226
|
+
_prevLayout;
|
|
227
|
+
__prevLayoutForRefresh;
|
|
158
228
|
constructor(config) {
|
|
159
|
-
this.columnMinMaxValuesCache = {};
|
|
160
|
-
this.renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
|
|
161
|
-
/**
|
|
162
|
-
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
163
|
-
*/
|
|
164
|
-
this.adaptableStatusPanelKeys = [];
|
|
165
|
-
// only for our private / internal events used within Adaptable
|
|
166
|
-
// public events are emitted through the EventApi
|
|
167
|
-
this._emit = (eventName, data) => {
|
|
168
|
-
if (this.emitter) {
|
|
169
|
-
return this.emitter.emit(eventName, data);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
this._emitSync = (eventName, data) => {
|
|
173
|
-
if (this.emitter) {
|
|
174
|
-
return this.emitter.emitSync(eventName, data);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
this._on = (eventName, callback) => {
|
|
178
|
-
if (!this.emitter) {
|
|
179
|
-
return () => { };
|
|
180
|
-
}
|
|
181
|
-
return this.emitter.on(eventName, callback);
|
|
182
|
-
};
|
|
183
|
-
this._onIncludeFired = (eventName, callback) => {
|
|
184
|
-
if (!this.emitter) {
|
|
185
|
-
return () => { };
|
|
186
|
-
}
|
|
187
|
-
return this.emitter.onIncludeFired(eventName, callback);
|
|
188
|
-
};
|
|
189
|
-
this.__updateColumnModelAndRefreshGrid_already_called = false;
|
|
190
229
|
this.lifecycleState = 'initial';
|
|
191
230
|
this.emitter = new Emitter();
|
|
192
231
|
this.agGridOptionsService = new AgGridOptionsService(this);
|
|
@@ -222,6 +261,30 @@ export class AdaptableAgGrid {
|
|
|
222
261
|
get isDestroyed() {
|
|
223
262
|
return this.lifecycleState === 'preDestroyed';
|
|
224
263
|
}
|
|
264
|
+
// only for our private / internal events used within Adaptable
|
|
265
|
+
// public events are emitted through the EventApi
|
|
266
|
+
_emit = (eventName, data) => {
|
|
267
|
+
if (this.emitter) {
|
|
268
|
+
return this.emitter.emit(eventName, data);
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
_emitSync = (eventName, data) => {
|
|
272
|
+
if (this.emitter) {
|
|
273
|
+
return this.emitter.emitSync(eventName, data);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
_on = (eventName, callback) => {
|
|
277
|
+
if (!this.emitter) {
|
|
278
|
+
return () => { };
|
|
279
|
+
}
|
|
280
|
+
return this.emitter.on(eventName, callback);
|
|
281
|
+
};
|
|
282
|
+
_onIncludeFired = (eventName, callback) => {
|
|
283
|
+
if (!this.emitter) {
|
|
284
|
+
return () => { };
|
|
285
|
+
}
|
|
286
|
+
return this.emitter.onIncludeFired(eventName, callback);
|
|
287
|
+
};
|
|
225
288
|
/**
|
|
226
289
|
* Internal initializer for Adaptable, directly called by the React and Angular Adaptable wrappers
|
|
227
290
|
* @private
|
|
@@ -782,7 +845,8 @@ You need to define at least one Layout!`);
|
|
|
782
845
|
return original_autoGroupColumnDef;
|
|
783
846
|
}
|
|
784
847
|
if (typeof original_autoGroupColumnDef?.filter === 'object') {
|
|
785
|
-
this.logger.
|
|
848
|
+
this.logger.consoleWarn(`autoGroupColumnDef.filter is set and overrides the Adaptable custom filter mechanism, so Adaptable will not be able to manage filtering for the Group Column!
|
|
849
|
+
Please contact the Adaptable Support Team for further assistance and investigation.`);
|
|
786
850
|
return original_autoGroupColumnDef;
|
|
787
851
|
}
|
|
788
852
|
const autoGroupColumnDef = { ...original_autoGroupColumnDef };
|
|
@@ -790,7 +854,8 @@ You need to define at least one Layout!`);
|
|
|
790
854
|
// !! DO NOT REMOVE THIS !!
|
|
791
855
|
// see https://github.com/ag-grid/ag-grid/blob/6f43ff257c2e285068eb425b655e58d6eeb89816/packages/ag-grid-enterprise/src/rowHierarchy/autoColService.ts#L225
|
|
792
856
|
autoGroupColumnDef.filterValueGetter = (params) => {
|
|
793
|
-
this.logger.
|
|
857
|
+
this.logger.consoleWarn(`An unexpected invocation of autoGroupColumnDef.filterValueGetter was detected. This execution path is not expected under normal operation.
|
|
858
|
+
Please contact the Adaptable Support Team for further assistance and investigation.`, params);
|
|
794
859
|
return '';
|
|
795
860
|
};
|
|
796
861
|
// !! it is important that we always return the same component / handler instances
|
|
@@ -2066,6 +2131,7 @@ You need to define at least one Layout!`);
|
|
|
2066
2131
|
}
|
|
2067
2132
|
return rawValue;
|
|
2068
2133
|
}
|
|
2134
|
+
__updateColumnModelAndRefreshGrid_already_called = false;
|
|
2069
2135
|
updateColumnModelAndRefreshGrid() {
|
|
2070
2136
|
if (this.__updateColumnModelAndRefreshGrid_already_called) {
|
|
2071
2137
|
return;
|
|
@@ -11,7 +11,17 @@ export const errorOnce = (message) => {
|
|
|
11
11
|
console.error(message);
|
|
12
12
|
errorOnceFlags[message] = true;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* AdapTable's Logger
|
|
16
|
+
*/
|
|
14
17
|
export class AdaptableLogger {
|
|
18
|
+
adaptableId;
|
|
19
|
+
debugger;
|
|
20
|
+
infoLogger;
|
|
21
|
+
successLogger;
|
|
22
|
+
warnLogger;
|
|
23
|
+
errorLogger;
|
|
24
|
+
perfLogger;
|
|
15
25
|
// use static loggers whenever access to AdaptableLogger instance is not feasible
|
|
16
26
|
static consoleErrorBase(message, ...optionalParams) {
|
|
17
27
|
if (optionalParams?.length) {
|
|
@@ -13,9 +13,19 @@ import { isWeightedAverageAggFuncName } from '../AdaptableState/Common/Aggregati
|
|
|
13
13
|
const DANGER_AG_GRID_BEANS_MAP = {};
|
|
14
14
|
const getColumnApiModule = () => ColumnApiModule;
|
|
15
15
|
export class AgGridAdapter {
|
|
16
|
+
_adaptableInstance;
|
|
17
|
+
DANGER_USE_GETTER_gridApi;
|
|
18
|
+
DANGER_gridApi_from_args;
|
|
19
|
+
// see #gridOpts_monkey_patch
|
|
20
|
+
DANGER_updateGridOptionsMonkeyPatcher;
|
|
21
|
+
// see #aggColumnFilters_monkey_patch
|
|
22
|
+
DANGER_doFiltersPassMonkeyPatcher;
|
|
23
|
+
DANGER_isAggFilterPresentMonkeyPatcher;
|
|
24
|
+
activePivotColumnFilters_MEMO = new WeakMap();
|
|
25
|
+
initialGridOptions;
|
|
26
|
+
_agGridId;
|
|
16
27
|
constructor(_adaptableInstance, config) {
|
|
17
28
|
this._adaptableInstance = _adaptableInstance;
|
|
18
|
-
this.activePivotColumnFilters_MEMO = new WeakMap();
|
|
19
29
|
const columnApiModuleReference = config?.getAgGridColumnApiModuleReference?.() ?? getColumnApiModule();
|
|
20
30
|
const ColumnDefFactory_Prototype = columnApiModuleReference?.beans?.[0]?.prototype;
|
|
21
31
|
if (!ColumnDefFactory_Prototype) {
|
|
@@ -27,6 +27,8 @@ export function getEditorForColumnDataType(columnDataType, variant) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export class AgGridColumnAdapter {
|
|
30
|
+
adaptableInstance;
|
|
31
|
+
colDefPropertyCache;
|
|
30
32
|
constructor(adaptableInstance) {
|
|
31
33
|
this.adaptableInstance = adaptableInstance;
|
|
32
34
|
this.colDefPropertyCache = new Map();
|
|
@@ -8,17 +8,18 @@ import { createUuid } from '../AdaptableState/Uuid';
|
|
|
8
8
|
import { inferSchema, initParser } from 'udsv';
|
|
9
9
|
import { AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_COLUMN, } from '../Utilities/Constants/GeneralConstants';
|
|
10
10
|
export class AgGridExportAdapter {
|
|
11
|
+
_adaptableInstance;
|
|
12
|
+
/**
|
|
13
|
+
* !!!
|
|
14
|
+
* do NOT mutate this array reference, this is passed only initially to AG Grid and we can only change it's internal state
|
|
15
|
+
*/
|
|
16
|
+
DANGER_excelStyles = [];
|
|
17
|
+
originalExcelStyles = [];
|
|
18
|
+
excelStylesCache = {};
|
|
19
|
+
cellOrHeaderClassKey2ExcelStyleIdMap = {};
|
|
20
|
+
excelStylesWithFormattedDate = {};
|
|
11
21
|
constructor(_adaptableInstance) {
|
|
12
22
|
this._adaptableInstance = _adaptableInstance;
|
|
13
|
-
/**
|
|
14
|
-
* !!!
|
|
15
|
-
* do NOT mutate this array reference, this is passed only initially to AG Grid and we can only change it's internal state
|
|
16
|
-
*/
|
|
17
|
-
this.DANGER_excelStyles = [];
|
|
18
|
-
this.originalExcelStyles = [];
|
|
19
|
-
this.excelStylesCache = {};
|
|
20
|
-
this.cellOrHeaderClassKey2ExcelStyleIdMap = {};
|
|
21
|
-
this.excelStylesWithFormattedDate = {};
|
|
22
23
|
}
|
|
23
24
|
get agGridApi() {
|
|
24
25
|
return this._adaptableInstance.agGridAdapter.getAgGridApi();
|
|
@@ -14,6 +14,10 @@ export const AgGridFilterAdapterFactory = (adaptable) => {
|
|
|
14
14
|
return 'filter_' + colId + '_' + adaptable.adaptableOptions.adaptableId;
|
|
15
15
|
}
|
|
16
16
|
return class AgGridFilterAdapter {
|
|
17
|
+
params;
|
|
18
|
+
filterContainer;
|
|
19
|
+
column;
|
|
20
|
+
unmountReactRoot;
|
|
17
21
|
init(params) {
|
|
18
22
|
this.params = params;
|
|
19
23
|
this.column = params.column;
|
|
@@ -3,6 +3,7 @@ import { iconToString } from '../components/icons';
|
|
|
3
3
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
4
4
|
import { MENU_SEPARATOR } from '../Utilities/Constants/GeneralConstants';
|
|
5
5
|
export class AgGridMenuAdapter {
|
|
6
|
+
_adaptableInstance;
|
|
6
7
|
constructor(_adaptableInstance) {
|
|
7
8
|
this._adaptableInstance = _adaptableInstance;
|
|
8
9
|
}
|
|
@@ -2,9 +2,10 @@ import { AdaptableLogger } from '.';
|
|
|
2
2
|
import { AllEnterpriseModule } from 'ag-grid-enterprise';
|
|
3
3
|
export const AG_GRID_VERSION = AllEnterpriseModule.version;
|
|
4
4
|
export class AgGridModulesAdapter {
|
|
5
|
+
adaptableInstance;
|
|
6
|
+
allAgGridModules = new Set();
|
|
5
7
|
constructor(adaptableInstance) {
|
|
6
8
|
this.adaptableInstance = adaptableInstance;
|
|
7
|
-
this.allAgGridModules = new Set();
|
|
8
9
|
this.allAgGridModules = this.extractAgGridModuleNames(AllEnterpriseModule);
|
|
9
10
|
}
|
|
10
11
|
destroy() {
|
|
@@ -97,6 +97,11 @@ export const ReactActionColumnRenderer = (props) => {
|
|
|
97
97
|
React.createElement(ActionButtons, { buttons: actionButtons, adaptableApi: adaptable.api, context: buttonContext, rerender: rerender })));
|
|
98
98
|
};
|
|
99
99
|
export class ActionColumnRenderer {
|
|
100
|
+
eGui;
|
|
101
|
+
eventListener;
|
|
102
|
+
unmountReactRoot;
|
|
103
|
+
layoutSwitchUnsubscribe;
|
|
104
|
+
actionButtons;
|
|
100
105
|
// gets called once before the renderer is used
|
|
101
106
|
init(params) {
|
|
102
107
|
const adaptable = params.context.__adaptable;
|
|
@@ -3,6 +3,8 @@ import { renderWithAdaptableContext } from '../../View/renderWithAdaptableContex
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
5
5
|
return class BadgetRenderer {
|
|
6
|
+
eGui;
|
|
7
|
+
unmountReactRoot;
|
|
6
8
|
getAdaptableInstance(params) {
|
|
7
9
|
const adaptable = params.context.__adaptable;
|
|
8
10
|
return adaptable;
|
|
@@ -5,6 +5,7 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
return class PercentBarRenderer {
|
|
8
|
+
eGui;
|
|
8
9
|
init(params) {
|
|
9
10
|
const min = api.styledColumnApi.internalApi.getNumericStyleMinValue(styledColumn, abColumn, params.node, params.value);
|
|
10
11
|
const max = api.styledColumnApi.internalApi.getNumericStyleMaxValue(styledColumn, abColumn, params.node, params.value);
|
|
@@ -94,9 +94,12 @@ export const AdaptableReactDateEditor = forwardRef((props, ref) => {
|
|
|
94
94
|
* We strongly recommend you specify a `colDef.valueParser` function
|
|
95
95
|
*/
|
|
96
96
|
export class AdaptableDateEditor {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
value;
|
|
98
|
+
el;
|
|
99
|
+
params;
|
|
100
|
+
editor;
|
|
101
|
+
unmountReactRoot;
|
|
102
|
+
valueParser = defaultDateValueParser;
|
|
100
103
|
init(params) {
|
|
101
104
|
this.value = getStartValue(params);
|
|
102
105
|
const { valueParser } = params.column.getColDef();
|
|
@@ -81,18 +81,13 @@ AdaptableReactNumberEditor.displayName = 'AdaptableReactNumberEditor';
|
|
|
81
81
|
* Number Editor provided by AdapTable and used by default for all `number` columns
|
|
82
82
|
*/
|
|
83
83
|
export class AdaptableNumberEditor {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
newValue: value,
|
|
92
|
-
})
|
|
93
|
-
: value;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
84
|
+
value;
|
|
85
|
+
columnId;
|
|
86
|
+
el;
|
|
87
|
+
params;
|
|
88
|
+
editor;
|
|
89
|
+
valueParser = defaultValueParser;
|
|
90
|
+
unmountReactRoot;
|
|
96
91
|
init(params) {
|
|
97
92
|
this.value = getStartValue(params);
|
|
98
93
|
this.params = params;
|
|
@@ -143,4 +138,13 @@ export class AdaptableNumberEditor {
|
|
|
143
138
|
destroy() {
|
|
144
139
|
this.unmountReactRoot?.();
|
|
145
140
|
}
|
|
141
|
+
onValueChange = (value) => {
|
|
142
|
+
this.value = this.valueParser
|
|
143
|
+
? this.valueParser({
|
|
144
|
+
...this.params,
|
|
145
|
+
oldValue: this.params.value,
|
|
146
|
+
newValue: value,
|
|
147
|
+
})
|
|
148
|
+
: value;
|
|
149
|
+
};
|
|
146
150
|
}
|
|
@@ -65,19 +65,13 @@ AdaptableReactPercentageEditor.displayName = 'AdaptableReactPercentageEditor';
|
|
|
65
65
|
* Used to edit percentage columns as percentages (similar to how its done in Excel)
|
|
66
66
|
*/
|
|
67
67
|
export class AdaptablePercentageEditor {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
newValue: value,
|
|
76
|
-
})
|
|
77
|
-
: value;
|
|
78
|
-
this.value = NumberExtensions.divideBy100(newValue);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
68
|
+
value;
|
|
69
|
+
columnId;
|
|
70
|
+
el;
|
|
71
|
+
params;
|
|
72
|
+
editor;
|
|
73
|
+
valueParser = defaultValueParser;
|
|
74
|
+
unmountReactRoot;
|
|
81
75
|
init(params) {
|
|
82
76
|
this.value = getStartValue(params);
|
|
83
77
|
this.params = params;
|
|
@@ -128,4 +122,14 @@ export class AdaptablePercentageEditor {
|
|
|
128
122
|
destroy() {
|
|
129
123
|
this.unmountReactRoot?.();
|
|
130
124
|
}
|
|
125
|
+
onValueChange = (value) => {
|
|
126
|
+
const newValue = this.valueParser
|
|
127
|
+
? this.valueParser({
|
|
128
|
+
...this.params,
|
|
129
|
+
oldValue: this.params.value,
|
|
130
|
+
newValue: value,
|
|
131
|
+
})
|
|
132
|
+
: value;
|
|
133
|
+
this.value = NumberExtensions.divideBy100(newValue);
|
|
134
|
+
};
|
|
131
135
|
}
|
package/src/agGrid/index.d.ts
CHANGED
|
@@ -2,5 +2,11 @@ import { Adaptable, AdaptableNoCodeWizard as ABWizard } from './Adaptable';
|
|
|
2
2
|
import { AdaptableLogger as ABLogger } from './AdaptableLogger';
|
|
3
3
|
export { default as AdaptableWizardView } from '../View/AdaptableWizardView';
|
|
4
4
|
export default Adaptable;
|
|
5
|
+
/**
|
|
6
|
+
* AdapTable's No Code Wizard
|
|
7
|
+
*/
|
|
5
8
|
export declare const AdaptableNoCodeWizard: typeof ABWizard;
|
|
9
|
+
/**
|
|
10
|
+
* AdapTable's Logger
|
|
11
|
+
*/
|
|
6
12
|
export declare const AdaptableLogger: typeof ABLogger;
|