@adaptabletools/adaptable 11.1.15 → 11.2.0
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/base.css +2 -0
- package/bundle.cjs.js +98 -98
- package/index.css +3 -0
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +8 -2
- package/src/AdaptableOptions/DashboardOptions.d.ts +4 -3
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +5 -4
- package/src/AdaptableOptions/LayoutOptions.d.ts +56 -10
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +4 -3
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +18 -16
- package/src/Api/AdaptableApi.d.ts +10 -0
- package/src/Api/AlertApi.d.ts +3 -1
- package/src/Api/ConditionalStyleApi.d.ts +3 -1
- package/src/Api/ConfigApi.d.ts +3 -3
- package/src/Api/CustomSortApi.d.ts +3 -1
- package/src/Api/EventApi.d.ts +14 -0
- package/src/Api/Events/LayoutChanged.d.ts +1 -1
- package/src/Api/ExportApi.d.ts +16 -0
- package/src/Api/FinanceApi.d.ts +104 -3
- package/src/Api/FlashingCellApi.d.ts +3 -1
- package/src/Api/FormatColumnApi.d.ts +3 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +53 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +3 -1
- package/src/Api/Implementation/AlertApiImpl.js +7 -6
- package/src/Api/Implementation/ApiBase.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.js +5 -2
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +5 -4
- package/src/Api/Implementation/ConfigApiImpl.js +5 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +3 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +6 -5
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -0
- package/src/Api/Implementation/EventApiImpl.js +4 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +3 -0
- package/src/Api/Implementation/ExportApiImpl.js +10 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +8 -6
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -6
- package/src/Api/Implementation/InternalApiImpl.d.ts +14 -5
- package/src/Api/Implementation/InternalApiImpl.js +75 -3
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +3 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +6 -8
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +17 -6
- package/src/Api/Implementation/ScheduleApiImpl.js +25 -12
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ShortcutApiImpl.js +5 -4
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +1 -2
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
- package/src/Api/InternalApi.d.ts +14 -7
- package/src/Api/LayoutApi.d.ts +4 -6
- package/src/Api/PlusMinusApi.d.ts +3 -1
- package/src/Api/ScheduleApi.d.ts +20 -6
- package/src/Api/ShortcutApi.d.ts +3 -1
- package/src/Api/ToolPanelApi.d.ts +1 -2
- package/src/PredefinedConfig/AlertState.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +2 -5
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -1
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +4 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -0
- package/src/PredefinedConfig/Common/BaseContext.d.ts +10 -0
- package/src/PredefinedConfig/Common/BaseContext.js +2 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -3
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +9 -9
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -13
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
- package/src/PredefinedConfig/DataSourceState.d.ts +2 -2
- package/src/PredefinedConfig/FilterState.d.ts +1 -1
- package/src/PredefinedConfig/SystemState.d.ts +1 -0
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -5
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +11 -1
- package/src/Redux/Store/AdaptableStore.d.ts +1 -0
- package/src/Redux/Store/AdaptableStore.js +6 -1
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
- package/src/Strategy/AdaptableModuleBase.d.ts +5 -0
- package/src/Strategy/AdaptableModuleBase.js +9 -0
- package/src/Strategy/AlertModule.d.ts +4 -1
- package/src/Strategy/AlertModule.js +12 -4
- package/src/Strategy/CalculatedColumnModule.d.ts +3 -17
- package/src/Strategy/CalculatedColumnModule.js +2 -0
- package/src/Strategy/ConditionalStyleModule.d.ts +4 -1
- package/src/Strategy/ConditionalStyleModule.js +12 -4
- package/src/Strategy/CustomSortModule.d.ts +4 -1
- package/src/Strategy/CustomSortModule.js +10 -3
- package/src/Strategy/DataSourceModule.js +2 -0
- package/src/Strategy/ExportModule.d.ts +5 -3
- package/src/Strategy/ExportModule.js +10 -0
- package/src/Strategy/FlashingCellModule.d.ts +4 -1
- package/src/Strategy/FlashingCellModule.js +10 -5
- package/src/Strategy/FormatColumnModule.d.ts +4 -1
- package/src/Strategy/FormatColumnModule.js +10 -3
- package/src/Strategy/FreeTextColumnModule.js +2 -0
- package/src/Strategy/Interface/IModule.d.ts +6 -3
- package/src/Strategy/Interface/IScheduleModule.d.ts +1 -1
- package/src/Strategy/LayoutModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.js +35 -2
- package/src/Strategy/PlusMinusModule.d.ts +4 -1
- package/src/Strategy/PlusMinusModule.js +15 -7
- package/src/Strategy/QueryModule.d.ts +2 -8
- package/src/Strategy/QueryModule.js +2 -0
- package/src/Strategy/ScheduleModule.d.ts +8 -4
- package/src/Strategy/ScheduleModule.js +16 -9
- package/src/Strategy/ShortcutModule.d.ts +4 -1
- package/src/Strategy/ShortcutModule.js +14 -4
- package/src/Strategy/StatusBarModule.d.ts +2 -1
- package/src/Strategy/StatusBarModule.js +2 -3
- package/src/Strategy/Utilities/getAlertBehaviourViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getAlertBehaviourViewItems.js +2 -2
- package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +4 -0
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +13 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
- package/src/Utilities/Emitter.d.ts +1 -0
- package/src/Utilities/Emitter.js +14 -0
- package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +3 -3
- package/src/Utilities/ObjectFactory.d.ts +2 -2
- package/src/Utilities/Services/AlertService.js +1 -1
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Interface/IModuleService.d.ts +1 -1
- package/src/Utilities/Services/ModuleService.d.ts +1 -1
- package/src/Utilities/Services/ModuleService.js +1 -0
- package/src/View/Alert/AlertStatusSubPanel.js +2 -1
- package/src/View/Alert/Wizard/AlertWizard.js +9 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +9 -0
- package/src/View/ColorPicker.d.ts +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -0
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +11 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +22 -0
- package/src/View/Components/Popups/AdaptableToaster.js +12 -1
- package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +3 -3
- package/src/View/Components/TagValueSelector/index.d.ts +13 -0
- package/src/View/Components/TagValueSelector/index.js +22 -0
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +9 -0
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +9 -0
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +1 -1
- package/src/View/DataSource/Wizard/DataSourceWizard.js +10 -0
- package/src/View/Export/ExportSelector.d.ts +4 -0
- package/src/View/Export/ExportSelector.js +75 -0
- package/src/View/Export/ExportViewPanel.js +6 -7
- package/src/View/Export/ReportExportDropdown.d.ts +2 -5
- package/src/View/Export/Wizard/NewReportWizard.js +9 -0
- package/src/View/Export/constants.d.ts +2 -0
- package/src/View/Export/constants.js +5 -0
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +9 -0
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +9 -0
- package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -1
- package/src/View/GridInfo/GridOptionsComponent.js +0 -1
- package/src/View/Layout/LayoutCloneButton.d.ts +6 -0
- package/src/View/Layout/LayoutCloneButton.js +15 -0
- package/src/View/Layout/LayoutRadioSelector.d.ts +2 -1
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -0
- package/src/View/Query/Wizard/NamedQueryWizard.js +9 -0
- package/src/View/Schedule/Wizard/ScheduleWizard.js +10 -0
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +10 -0
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/Wizard/ObjectTagsWizardSection.d.ts +8 -0
- package/src/View/Wizard/ObjectTagsWizardSection.js +22 -0
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +12 -5
- package/src/agGrid/Adaptable.d.ts +14 -1
- package/src/agGrid/Adaptable.js +103 -68
- package/src/agGrid/agGridHelper.js +2 -1
- package/src/agGrid/createAgStatusPanelComponent.js +1 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +8 -7
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +5 -2
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/PopupWithFooter.d.ts +1 -1
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +44 -2
- package/src/metamodel/adaptable.metamodel.js +235 -21
- package/src/types.d.ts +6 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -149,31 +149,31 @@ class Adaptable {
|
|
|
149
149
|
};
|
|
150
150
|
// debounced methods
|
|
151
151
|
this.debouncedSetColumnIntoStore = debounce_1.default(() => {
|
|
152
|
-
if (!this.gridOptions.api) {
|
|
152
|
+
if (this.isDestroyed || !this.gridOptions.api) {
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
this.updateColumnsIntoStore();
|
|
156
156
|
}, GeneralConstants_1.HALF_SECOND);
|
|
157
157
|
this.debouncedSaveGridLayout = debounce_1.default(() => {
|
|
158
|
-
if (!this.gridOptions.api) {
|
|
158
|
+
if (this.isDestroyed || !this.gridOptions.api) {
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
this.updateLayoutFromGrid();
|
|
162
162
|
}, GeneralConstants_1.HALF_SECOND);
|
|
163
163
|
this.debouncedSetSelectedCells = debounce_1.default(() => {
|
|
164
|
-
if (!this.gridOptions.api) {
|
|
164
|
+
if (this.isDestroyed || !this.gridOptions.api) {
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
this.setSelectedCells();
|
|
168
168
|
}, 250);
|
|
169
169
|
this.debouncedSetSelectedRows = debounce_1.default(() => {
|
|
170
|
-
if (!this.gridOptions.api) {
|
|
170
|
+
if (this.isDestroyed || !this.gridOptions.api) {
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
this.setSelectedRows();
|
|
174
174
|
}, GeneralConstants_1.HALF_SECOND);
|
|
175
175
|
this.debouncedFilterGrid = debounce_1.default((callback = () => { }) => {
|
|
176
|
-
if (!this.gridOptions.api) {
|
|
176
|
+
if (this.isDestroyed || !this.gridOptions.api) {
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
this.applyGridFiltering();
|
|
@@ -336,9 +336,9 @@ class Adaptable {
|
|
|
336
336
|
this.agGridMenuHelper = new agGridMenuHelper_1.agGridMenuHelper(this, this.gridOptions);
|
|
337
337
|
// Build the default group sort comparator - will get custom sort values (but not functions) in real time
|
|
338
338
|
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
339
|
-
if (!this.
|
|
339
|
+
if (!this.getInitialGroupOrderComparator(this.gridOptions) &&
|
|
340
340
|
this.adaptableOptions.generalOptions.autoOrderGroupedColumns) {
|
|
341
|
-
this.gridOptions.
|
|
341
|
+
this.gridOptions.initialGroupOrderComparator =
|
|
342
342
|
this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
343
343
|
}
|
|
344
344
|
// we prefer the grid to be NOT instantiated so that we can do it
|
|
@@ -647,8 +647,10 @@ class Adaptable {
|
|
|
647
647
|
createStatusBars() {
|
|
648
648
|
var _a, _b;
|
|
649
649
|
const statusBarOptions = Object.assign({}, this.gridOptions.statusBar);
|
|
650
|
+
const adaptableStatusPanelKeys = [];
|
|
650
651
|
const statusPanels = (_b = ((_a = statusBarOptions === null || statusBarOptions === void 0 ? void 0 : statusBarOptions.statusPanels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.map((statusPanel) => {
|
|
651
652
|
if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
|
|
653
|
+
adaptableStatusPanelKeys.push(statusPanel.key);
|
|
652
654
|
const context = {
|
|
653
655
|
Key: statusPanel.key,
|
|
654
656
|
};
|
|
@@ -660,7 +662,9 @@ class Adaptable {
|
|
|
660
662
|
this.gridOptions.statusBar = statusBarOptions;
|
|
661
663
|
const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
|
|
662
664
|
this.api.eventApi.on('AdaptableReady', () => {
|
|
663
|
-
|
|
665
|
+
const adaptableStatusPanels = statusPanels.filter((statusPanel) => adaptableStatusPanelKeys.includes(statusPanel.key));
|
|
666
|
+
// need to add only the adaptable panels
|
|
667
|
+
statusBarModule.syncStateWithOptions(adaptableStatusPanels);
|
|
664
668
|
});
|
|
665
669
|
}
|
|
666
670
|
getAgGridStatusPanels() {
|
|
@@ -1155,7 +1159,7 @@ class Adaptable {
|
|
|
1155
1159
|
}
|
|
1156
1160
|
}
|
|
1157
1161
|
setLayout(layout) {
|
|
1158
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1162
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1159
1163
|
if (!layout) {
|
|
1160
1164
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
1161
1165
|
}
|
|
@@ -1191,14 +1195,9 @@ class Adaptable {
|
|
|
1191
1195
|
}, {});
|
|
1192
1196
|
let pivotedColumnsIndexesMap = {};
|
|
1193
1197
|
const aggregationFunctionsColumnsMap = layout.AggregationColumns || {};
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
];
|
|
1198
|
-
const columnsToShow = !layout.EnablePivot ? layout.Columns : columnsInPivot || [];
|
|
1199
|
-
if (columnsInPivot.length && layout.RowGroupedColumns) {
|
|
1200
|
-
columnsInPivot.push(...layout.RowGroupedColumns);
|
|
1201
|
-
}
|
|
1198
|
+
const columnsToShow = !layout.EnablePivot
|
|
1199
|
+
? layout.Columns
|
|
1200
|
+
: ((_b = this.gridOptions.columnApi.getSecondaryColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
|
|
1202
1201
|
let isChanged = false;
|
|
1203
1202
|
const colsToAutoSize = {};
|
|
1204
1203
|
let newColState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
@@ -1207,7 +1206,9 @@ class Adaptable {
|
|
|
1207
1206
|
var _a, _b, _c, _d;
|
|
1208
1207
|
const { colId } = colState;
|
|
1209
1208
|
const oldColState = columnsStateMap[colId];
|
|
1210
|
-
const hide =
|
|
1209
|
+
const hide = this.api.columnApi.isAutoPivotColumn(colId)
|
|
1210
|
+
? colState.hide
|
|
1211
|
+
: !layoutColumnsMap[colId];
|
|
1211
1212
|
const newColState = Object.assign(Object.assign({}, oldColState), { hide });
|
|
1212
1213
|
if (layout.ColumnWidthMap && layout.ColumnWidthMap[colId] != null) {
|
|
1213
1214
|
newColState.width = layout.ColumnWidthMap[colId];
|
|
@@ -1333,7 +1334,7 @@ class Adaptable {
|
|
|
1333
1334
|
// this.updateColumnsIntoStore();// no longer needed
|
|
1334
1335
|
}
|
|
1335
1336
|
const colsToAutoSizeArray = Object.keys(colsToAutoSize);
|
|
1336
|
-
if (pivoted && ((
|
|
1337
|
+
if (pivoted && ((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.layoutOptions) === null || _d === void 0 ? void 0 : _d.autoSizeColumnsInPivotLayout)) {
|
|
1337
1338
|
// when a pivoted layout loads, autosize all cols
|
|
1338
1339
|
requestAnimationFrame(() => {
|
|
1339
1340
|
this.gridOptions.columnApi.autoSizeAllColumns();
|
|
@@ -1350,9 +1351,9 @@ class Adaptable {
|
|
|
1350
1351
|
}, 100);
|
|
1351
1352
|
return;
|
|
1352
1353
|
}
|
|
1353
|
-
if (((
|
|
1354
|
+
if (((_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSizeColumnsInLayout) &&
|
|
1354
1355
|
colsToAutoSizeArray.length) {
|
|
1355
|
-
(
|
|
1356
|
+
(_g = this.gridOptions.columnApi) === null || _g === void 0 ? void 0 : _g.autoSizeColumns(colsToAutoSizeArray);
|
|
1356
1357
|
}
|
|
1357
1358
|
this.forPlugins((plugin) => {
|
|
1358
1359
|
if (plugin.afterSetLayout) {
|
|
@@ -2059,6 +2060,7 @@ class Adaptable {
|
|
|
2059
2060
|
enablePivot: freeTextColumnSettings.Pivotable,
|
|
2060
2061
|
suppressMenu: freeTextColumnSettings.SuppressMenu,
|
|
2061
2062
|
suppressMovable: freeTextColumnSettings.SuppressMovable,
|
|
2063
|
+
headerTooltip: freeTextColumnSettings.HeaderToolTip,
|
|
2062
2064
|
cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
|
|
2063
2065
|
? 'agLargeTextCellEditor'
|
|
2064
2066
|
: 'agTextCellEditor'),
|
|
@@ -2250,6 +2252,9 @@ class Adaptable {
|
|
|
2250
2252
|
return this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query);
|
|
2251
2253
|
};
|
|
2252
2254
|
}
|
|
2255
|
+
if (calculatedColumnSettings.HeaderToolTip) {
|
|
2256
|
+
newColDef.headerTooltip = calculatedColumnSettings.HeaderToolTip;
|
|
2257
|
+
}
|
|
2253
2258
|
LoggingHelper_1.LogAdaptableInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
|
|
2254
2259
|
return newColDef;
|
|
2255
2260
|
});
|
|
@@ -2299,8 +2304,30 @@ class Adaptable {
|
|
|
2299
2304
|
return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
|
|
2300
2305
|
}
|
|
2301
2306
|
destroy(config) {
|
|
2302
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
2307
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2303
2308
|
if (this.gridOptions && this.gridOptions.api) {
|
|
2309
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
|
|
2310
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
|
|
2311
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, this.listenerPivotChanged);
|
|
2312
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.listenerColumnRowGroupChanged);
|
|
2313
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, this.listenerRangeSelectionChanged);
|
|
2314
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, this.listenerColumnResized);
|
|
2315
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, this.listenerSortChanged);
|
|
2316
|
+
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, this.listenerModelUpdated);
|
|
2317
|
+
this.gridOptions.api.removeGlobalListener(this.listenerGlobalSetRowSelection);
|
|
2318
|
+
this.gridOptions.api.removeGlobalListener(this.listenerGlobalColumnEventsThatTriggerStateChange);
|
|
2319
|
+
this.gridOptions.api.removeGlobalListener(this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave);
|
|
2320
|
+
this.listenerFirstDataRendered = null;
|
|
2321
|
+
this.listenerPivotModeChanged = null;
|
|
2322
|
+
this.listenerPivotChanged = null;
|
|
2323
|
+
this.listenerColumnRowGroupChanged = null;
|
|
2324
|
+
this.listenerRangeSelectionChanged = null;
|
|
2325
|
+
this.listenerColumnResized = null;
|
|
2326
|
+
this.listenerGlobalSetRowSelection = null;
|
|
2327
|
+
this.listenerSortChanged = null;
|
|
2328
|
+
this.listenerModelUpdated = null;
|
|
2329
|
+
this.listenerGlobalColumnEventsThatTriggerStateChange = null;
|
|
2330
|
+
this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = null;
|
|
2304
2331
|
this.gridOptions.api.__adaptable = null;
|
|
2305
2332
|
this.gridOptions.api.setColumnDefs = GridApi_setColumnDefs;
|
|
2306
2333
|
this.gridOptions.getRowStyle = null;
|
|
@@ -2310,11 +2337,17 @@ class Adaptable {
|
|
|
2310
2337
|
this.gridOptions.api.destroy();
|
|
2311
2338
|
}
|
|
2312
2339
|
}
|
|
2340
|
+
const gridContainerElement = this.getAgGridContainerElement();
|
|
2341
|
+
if (gridContainerElement) {
|
|
2342
|
+
gridContainerElement.removeEventListener('keydown', this.listenerKeydown);
|
|
2343
|
+
this.listenerKeydown = null;
|
|
2344
|
+
}
|
|
2345
|
+
this.api.internalDestroySelf();
|
|
2313
2346
|
this.colDefPropertyCache = null;
|
|
2314
2347
|
this.gridOptionsPropertyCache = null;
|
|
2315
2348
|
this.currentColumnDefs = null;
|
|
2316
2349
|
this.rowListeners = null;
|
|
2317
|
-
this.emitter.
|
|
2350
|
+
this.emitter.destroy();
|
|
2318
2351
|
this.emitter = null;
|
|
2319
2352
|
this._adaptableReady = false;
|
|
2320
2353
|
Adaptable.dismissInstance(this);
|
|
@@ -2325,17 +2358,23 @@ class Adaptable {
|
|
|
2325
2358
|
if (abContainerElement != null) {
|
|
2326
2359
|
ReactDOM.unmountComponentAtNode(abContainerElement);
|
|
2327
2360
|
}
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
(
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
(
|
|
2335
|
-
(
|
|
2336
|
-
(
|
|
2337
|
-
(
|
|
2338
|
-
(
|
|
2361
|
+
this.gridContainerElement = null;
|
|
2362
|
+
this.abContainerElement = null;
|
|
2363
|
+
(_a = this.adaptableStore) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
2364
|
+
this.adaptableStore = null;
|
|
2365
|
+
this.gridOptions = null;
|
|
2366
|
+
this.adaptableOptions = null;
|
|
2367
|
+
(_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2368
|
+
(_c = this.DataService) === null || _c === void 0 ? void 0 : _c.destroy();
|
|
2369
|
+
(_d = this.EntitlementService) === null || _d === void 0 ? void 0 : _d.destroy();
|
|
2370
|
+
(_e = this.ReportService) === null || _e === void 0 ? void 0 : _e.destroy();
|
|
2371
|
+
(_f = this.ModuleService) === null || _f === void 0 ? void 0 : _f.destroy();
|
|
2372
|
+
(_g = this.ValidationService) === null || _g === void 0 ? void 0 : _g.destroy();
|
|
2373
|
+
(_h = this.QueryLanguageService) === null || _h === void 0 ? void 0 : _h.destroy();
|
|
2374
|
+
(_j = this.AlertService) === null || _j === void 0 ? void 0 : _j.destroy();
|
|
2375
|
+
(_k = this.TeamSharingService) === null || _k === void 0 ? void 0 : _k.destroy();
|
|
2376
|
+
(_l = this.MetamodelService) === null || _l === void 0 ? void 0 : _l.destroy();
|
|
2377
|
+
(_m = this.LicenseService) === null || _m === void 0 ? void 0 : _m.destroy();
|
|
2339
2378
|
this.isDestroyed = true;
|
|
2340
2379
|
}
|
|
2341
2380
|
// really really need to do this properly but as a temp fix lets create a default style for when no data
|
|
@@ -2430,7 +2469,7 @@ class Adaptable {
|
|
|
2430
2469
|
}
|
|
2431
2470
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
2432
2471
|
if (gridContainerElement) {
|
|
2433
|
-
gridContainerElement.addEventListener('keydown', (event) => this._emit('KeyDown', event));
|
|
2472
|
+
gridContainerElement.addEventListener('keydown', (this.listenerKeydown = (event) => this._emit('KeyDown', event)));
|
|
2434
2473
|
}
|
|
2435
2474
|
/*********************
|
|
2436
2475
|
* AG Grid EVENTS
|
|
@@ -2450,28 +2489,28 @@ class Adaptable {
|
|
|
2450
2489
|
all_modules_1.Events.EVENT_COLUMN_VISIBLE,
|
|
2451
2490
|
all_modules_1.Events.EVENT_NEW_COLUMNS_LOADED,
|
|
2452
2491
|
];
|
|
2453
|
-
this.gridOptions.api.addGlobalListener((type) => {
|
|
2492
|
+
this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerStateChange = (type) => {
|
|
2454
2493
|
if (columnEventsThatTriggersStateChange.indexOf(type) > -1) {
|
|
2455
2494
|
this.debouncedSetColumnIntoStore();
|
|
2456
2495
|
this.debouncedFilterGrid();
|
|
2457
2496
|
}
|
|
2458
|
-
});
|
|
2497
|
+
}));
|
|
2459
2498
|
/**
|
|
2460
2499
|
* Use Case: initial data has been displayed in grid
|
|
2461
2500
|
* Action1: Set the Layout
|
|
2462
2501
|
* Action2: Ensure that we have set column data types
|
|
2463
2502
|
* Note: Deals with scenario where the data is provided to AdapTable after grid has been setup
|
|
2464
2503
|
*/
|
|
2465
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, () => {
|
|
2504
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, (this.listenerFirstDataRendered = () => {
|
|
2466
2505
|
this.checkColumnsDataTypeSet();
|
|
2467
2506
|
this.setLayout();
|
|
2468
|
-
});
|
|
2507
|
+
}));
|
|
2469
2508
|
/**
|
|
2470
2509
|
* Use Case: Entered or Left Pivot Mode
|
|
2471
2510
|
* Action 1: Autosize pivot columns when entering pivot mode (if autosize pivot in Layout is true)
|
|
2472
2511
|
* Action 2: Set pivot mode on / off in api as necessary
|
|
2473
2512
|
*/
|
|
2474
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, (params) => {
|
|
2513
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, (this.listenerPivotModeChanged = (params) => {
|
|
2475
2514
|
if (params.type == 'columnPivotModeChanged' &&
|
|
2476
2515
|
params.columnApi != null &&
|
|
2477
2516
|
params.columnApi.columnController != null &&
|
|
@@ -2484,12 +2523,12 @@ class Adaptable {
|
|
|
2484
2523
|
else {
|
|
2485
2524
|
this.api.internalApi.setPivotModeOff();
|
|
2486
2525
|
}
|
|
2487
|
-
});
|
|
2526
|
+
}));
|
|
2488
2527
|
/**
|
|
2489
2528
|
* Use Case: A pivot column has changed
|
|
2490
2529
|
* Action: Autosize pivot columns (if autosize pivot in Layout is true)
|
|
2491
2530
|
*/
|
|
2492
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, (params) => {
|
|
2531
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, (this.listenerPivotChanged = (params) => {
|
|
2493
2532
|
if (params.type == 'columnPivotChanged' &&
|
|
2494
2533
|
params.columnApi != null &&
|
|
2495
2534
|
params.columnApi.columnController != null &&
|
|
@@ -2498,7 +2537,7 @@ class Adaptable {
|
|
|
2498
2537
|
this.gridOptions.columnApi.autoSizeAllColumns();
|
|
2499
2538
|
}
|
|
2500
2539
|
}
|
|
2501
|
-
});
|
|
2540
|
+
}));
|
|
2502
2541
|
/**
|
|
2503
2542
|
* Use Case: Things have changed in the grid that require the Layout to be saved
|
|
2504
2543
|
* Action: Save the Layout (on a debounce)
|
|
@@ -2513,16 +2552,16 @@ class Adaptable {
|
|
|
2513
2552
|
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2514
2553
|
all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
|
|
2515
2554
|
];
|
|
2516
|
-
this.gridOptions.api.addGlobalListener((type) => {
|
|
2555
|
+
this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
2517
2556
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
2518
2557
|
this.debouncedSaveGridLayout();
|
|
2519
2558
|
}
|
|
2520
|
-
});
|
|
2559
|
+
}));
|
|
2521
2560
|
/**
|
|
2522
2561
|
* Use Case: A visible Column has become row grouped and 'hideColumnWhenGrouped' is true
|
|
2523
2562
|
* Action: Make the column invisible
|
|
2524
2563
|
*/
|
|
2525
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, (params) => {
|
|
2564
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, (this.listenerColumnRowGroupChanged = (params) => {
|
|
2526
2565
|
if (this.api.internalApi.isGridInPivotMode()) {
|
|
2527
2566
|
return;
|
|
2528
2567
|
}
|
|
@@ -2534,17 +2573,17 @@ class Adaptable {
|
|
|
2534
2573
|
}
|
|
2535
2574
|
});
|
|
2536
2575
|
}
|
|
2537
|
-
});
|
|
2576
|
+
}));
|
|
2538
2577
|
/**
|
|
2539
2578
|
* Use Case: A Column has finished being resized
|
|
2540
2579
|
* Action 1: Save the Layout (on a debounce)
|
|
2541
2580
|
* Action 2: Emit the internal ColumnResized event - used by Sparkline Column (in Charts)
|
|
2542
2581
|
*/
|
|
2543
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, (params) => {
|
|
2582
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, (this.listenerColumnResized = (params) => {
|
|
2544
2583
|
if (params.finished == true && params.type == 'columnResized' && params.column) {
|
|
2545
2584
|
this.debouncedSaveGridLayout();
|
|
2546
2585
|
}
|
|
2547
|
-
});
|
|
2586
|
+
}));
|
|
2548
2587
|
/**
|
|
2549
2588
|
* Use Case: Row Selection has changed
|
|
2550
2589
|
* Action: Set Selected Rows (on a debeounce)
|
|
@@ -2554,35 +2593,35 @@ class Adaptable {
|
|
|
2554
2593
|
all_modules_1.Events.EVENT_SELECTION_CHANGED,
|
|
2555
2594
|
all_modules_1.Events.EVENT_ROW_SELECTED,
|
|
2556
2595
|
];
|
|
2557
|
-
this.gridOptions.api.addGlobalListener((type) => {
|
|
2596
|
+
this.gridOptions.api.addGlobalListener((this.listenerGlobalSetRowSelection = (type) => {
|
|
2558
2597
|
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(columnEventsThatTriggerSetRowSelection, type)) {
|
|
2559
2598
|
this.debouncedSetSelectedRows();
|
|
2560
2599
|
}
|
|
2561
|
-
});
|
|
2600
|
+
}));
|
|
2562
2601
|
/**
|
|
2563
2602
|
* Use Case: User has selected a range of cells
|
|
2564
2603
|
* Action: Set Selected Cells (on a debounce)
|
|
2565
2604
|
*/
|
|
2566
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, (params) => {
|
|
2605
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, (this.listenerRangeSelectionChanged = (params) => {
|
|
2567
2606
|
if (params.finished == true) {
|
|
2568
2607
|
this.debouncedSetSelectedCells();
|
|
2569
2608
|
}
|
|
2570
|
-
});
|
|
2609
|
+
}));
|
|
2571
2610
|
/**
|
|
2572
2611
|
* Use Case: Sort has changed in the Grid
|
|
2573
2612
|
* Action1: Update AdapTable Sort Info
|
|
2574
2613
|
* Action2: Set Selected Cells (on a debounce)
|
|
2575
2614
|
*/
|
|
2576
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, (
|
|
2615
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, (this.listenerSortChanged = () => {
|
|
2577
2616
|
this.onSortChanged();
|
|
2578
2617
|
this.debouncedSetSelectedCells();
|
|
2579
|
-
});
|
|
2618
|
+
}));
|
|
2580
2619
|
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions.showGroupingTotalsAsHeader;
|
|
2581
2620
|
/**
|
|
2582
2621
|
* Use Case: Model has updated
|
|
2583
2622
|
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
2584
2623
|
*/
|
|
2585
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, (params) => {
|
|
2624
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, (this.listenerModelUpdated = (params) => {
|
|
2586
2625
|
if (showGroupingTotalsAsHeader) {
|
|
2587
2626
|
if (params && params.api) {
|
|
2588
2627
|
const pinnedData = params.api.getPinnedTopRow(0);
|
|
@@ -2596,7 +2635,7 @@ class Adaptable {
|
|
|
2596
2635
|
}
|
|
2597
2636
|
}
|
|
2598
2637
|
}
|
|
2599
|
-
});
|
|
2638
|
+
}));
|
|
2600
2639
|
/**
|
|
2601
2640
|
* Row and Cell listeners created in 2020
|
|
2602
2641
|
* These have supplanted many of the events we previously had and simplified things
|
|
@@ -2656,8 +2695,8 @@ class Adaptable {
|
|
|
2656
2695
|
return result;
|
|
2657
2696
|
};
|
|
2658
2697
|
// We plug our filter mechanism and if there is already something like external widgets... we save ref to the function
|
|
2659
|
-
const
|
|
2660
|
-
this.gridOptions.isExternalFilterPresent = () => {
|
|
2698
|
+
const original_isExternalFilterPresent = this.gridOptions.isExternalFilterPresent;
|
|
2699
|
+
this.gridOptions.isExternalFilterPresent = (params) => {
|
|
2661
2700
|
const columnFilters = this.api.filterApi.getAllColumnFilter();
|
|
2662
2701
|
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
|
|
2663
2702
|
const isQueryActive = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.api.queryApi.getCurrentQuery());
|
|
@@ -2676,7 +2715,7 @@ class Adaptable {
|
|
|
2676
2715
|
return (isFilterActive ||
|
|
2677
2716
|
isQueryActive ||
|
|
2678
2717
|
// it means that originaldoesExternalFilterPass will be called so we reinit that collection
|
|
2679
|
-
(
|
|
2718
|
+
(original_isExternalFilterPresent ? original_isExternalFilterPresent(params) : false));
|
|
2680
2719
|
};
|
|
2681
2720
|
const originaldoesExternalFilterPass = this.gridOptions.doesExternalFilterPass;
|
|
2682
2721
|
const evaluateQueryOnClient = this.api.internalApi.runModuleInAdaptableQL('Query');
|
|
@@ -3147,9 +3186,6 @@ class Adaptable {
|
|
|
3147
3186
|
}
|
|
3148
3187
|
const valueSetter = (params) => {
|
|
3149
3188
|
var _a;
|
|
3150
|
-
if (preventEditAlertsForColumn.length) {
|
|
3151
|
-
return false;
|
|
3152
|
-
}
|
|
3153
3189
|
const field = params.column.getColDef().field;
|
|
3154
3190
|
if (noValidations) {
|
|
3155
3191
|
//TODO also consider the case when userValueSetter is a string
|
|
@@ -3214,10 +3250,10 @@ class Adaptable {
|
|
|
3214
3250
|
applyCurrentTheme() {
|
|
3215
3251
|
this.api.themeApi.applyCurrentTheme();
|
|
3216
3252
|
}
|
|
3217
|
-
|
|
3218
|
-
var _a;
|
|
3219
|
-
// fallback to deprecated
|
|
3220
|
-
return (_a = gridOptions.
|
|
3253
|
+
getInitialGroupOrderComparator(gridOptions) {
|
|
3254
|
+
var _a, _b;
|
|
3255
|
+
// fallback to deprecated forms
|
|
3256
|
+
return ((_b = (_a = gridOptions.initialGroupOrderComparator) !== null && _a !== void 0 ? _a : gridOptions.defaultGroupOrderComparator) !== null && _b !== void 0 ? _b : gridOptions.defaultGroupSortComparator);
|
|
3221
3257
|
}
|
|
3222
3258
|
applyFinalRendering() {
|
|
3223
3259
|
this.embedColumnMenu = this.isModulePresent('menu');
|
|
@@ -4143,7 +4179,6 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4143
4179
|
data: node.data,
|
|
4144
4180
|
value: this.getRawValueFromRowNode(node, column.getId()),
|
|
4145
4181
|
rowIndex,
|
|
4146
|
-
$scope: {},
|
|
4147
4182
|
api: this.gridOptions.api,
|
|
4148
4183
|
columnApi: this.gridOptions.columnApi,
|
|
4149
4184
|
context: {},
|
|
@@ -526,7 +526,8 @@ class agGridHelper {
|
|
|
526
526
|
}
|
|
527
527
|
runAdaptableGroupComparerFunction() {
|
|
528
528
|
const adaptable = this.adaptable;
|
|
529
|
-
return function compareItemsOfCustomSort(
|
|
529
|
+
return function compareItemsOfCustomSort(params) {
|
|
530
|
+
const { nodeA, nodeB } = params;
|
|
530
531
|
let firstGroupedColumn = adaptable.getFirstGroupedColumn();
|
|
531
532
|
if (firstGroupedColumn) {
|
|
532
533
|
const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.columnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.columnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AdaptableFormData, AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
3
3
|
import { SimpleButtonProps } from '../SimpleButton';
|
|
4
|
+
import { BaseContext } from '../../types';
|
|
4
5
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
5
|
-
import { AdaptableButton
|
|
6
|
+
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
6
7
|
interface AdaptableFormComponentProps {
|
|
7
|
-
formDef: AdaptableForm<
|
|
8
|
+
formDef: AdaptableForm<BaseContext>;
|
|
8
9
|
data: AdaptableFormData;
|
|
9
10
|
onChange: (data: AdaptableFormData) => void;
|
|
10
|
-
onButtonClick?: (button: AdaptableButton<
|
|
11
|
+
onButtonClick?: (button: AdaptableButton<BaseContext>) => void;
|
|
11
12
|
displayTitle: boolean;
|
|
12
13
|
api: AdaptableApi;
|
|
13
|
-
context?:
|
|
14
|
+
context?: BaseContext;
|
|
14
15
|
focusFirstButton?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabledButtons, api, context, focusFirstButton, }: {
|
|
17
18
|
disabledButtons?: boolean[];
|
|
18
19
|
defaultTone: SimpleButtonProps['tone'];
|
|
19
|
-
onClick: (button: AdaptableButton<
|
|
20
|
-
formDef: AdaptableForm<
|
|
20
|
+
onClick: (button: AdaptableButton<BaseContext>) => void;
|
|
21
|
+
formDef: AdaptableForm<BaseContext>;
|
|
21
22
|
api: AdaptableApi;
|
|
22
|
-
context:
|
|
23
|
+
context: BaseContext;
|
|
23
24
|
focusFirstButton?: boolean;
|
|
24
25
|
}): JSX.Element;
|
|
25
26
|
export declare function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displayTitle, api, context, focusFirstButton, }: AdaptableFormComponentProps): JSX.Element;
|
|
@@ -15,4 +15,4 @@ export declare type DatepickerProps = Omit<BoxProps, 'value' | 'onChange' | 'def
|
|
|
15
15
|
showWeekNumber?: boolean;
|
|
16
16
|
showOutsideDays?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "fontSize" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "margin" | "children" | "key" | "list" | "step" | "
|
|
18
|
+
export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "fontSize" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "margin" | "children" | "key" | "list" | "step" | "type" | "min" | "contextMenu" | "value" | "onKeyDown" | "rows" | "name" | "className" | "id" | "lang" | "method" | "target" | "role" | "tabIndex" | "crossOrigin" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classID" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "as" | "hrefLang" | "integrity" | "rel" | "sizes" | "charSet" | "kind" | "src" | "srcLang" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "htmlFor" | "httpEquiv" | "optimum" | "reversed" | "selected" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "poster" | "challenge" | "keyType" | "keyParams" | "mt" | "mb" | "ml" | "mr" | "my" | "marginY" | "mx" | "marginX" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "bg" | "showClearButton" | "showOutsideDays" | "showWeekNumber" | "onHide" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -168,8 +168,11 @@ const renderQueryHints = (type) => {
|
|
|
168
168
|
}
|
|
169
169
|
if (type === 'aggregatedScalar') {
|
|
170
170
|
examples.push({
|
|
171
|
-
code: '
|
|
172
|
-
description: '
|
|
171
|
+
code: 'AVG([stargazers_count], GROUP_BY([language]))',
|
|
172
|
+
description: 'Average popularity (number of stars) of all the Github repositories, grouped by programming language',
|
|
173
|
+
}, {
|
|
174
|
+
code: 'CUMUL( SUM([PnL]), OVER([TradeDate]))',
|
|
175
|
+
description: "The cumulative sum of all 'PnL' columns in the order given by the 'TradeDate' column",
|
|
173
176
|
});
|
|
174
177
|
}
|
|
175
178
|
return examples.length ? (React.createElement(rebass_1.Box, { "data-name": "expression-hints", my: 2, p: 2, style: {
|
|
@@ -8,5 +8,5 @@ export declare type InputProps = HTMLProps<HTMLInputElement> & {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
list?: any;
|
|
10
10
|
} & BoxProps;
|
|
11
|
-
declare const Input: React.ForwardRefExoticComponent<Pick<InputProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "fontSize" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "margin" | "children" | "key" | "list" | "step" | "
|
|
11
|
+
declare const Input: React.ForwardRefExoticComponent<Pick<InputProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "fontSize" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "margin" | "children" | "key" | "list" | "step" | "type" | "min" | "contextMenu" | "value" | "onKeyDown" | "rows" | "name" | "className" | "id" | "lang" | "method" | "target" | "role" | "tabIndex" | "crossOrigin" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classID" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "as" | "hrefLang" | "integrity" | "rel" | "sizes" | "charSet" | "kind" | "src" | "srcLang" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "htmlFor" | "httpEquiv" | "optimum" | "reversed" | "selected" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "poster" | "challenge" | "keyType" | "keyParams" | "mt" | "mb" | "ml" | "mr" | "my" | "marginY" | "mx" | "marginX" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "bg" | "placehoder"> & React.RefAttributes<HTMLInputElement>>;
|
|
12
12
|
export default Input;
|