@adaptabletools/adaptable-cjs 18.1.13 → 18.1.15-canary.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/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +2 -1
- package/src/AdaptableOptions/ChartingOptions.d.ts +5 -1
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +5 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +5 -1
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +5 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +6 -2
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +5 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/ChartingApi.d.ts +2 -2
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/ConfigApi.d.ts +22 -2
- package/src/Api/Events/LiveDataChanged.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +2 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +3 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +4 -1
- package/src/Api/Implementation/ConfigApiImpl.js +16 -1
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +4 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +31 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -7
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +2 -6
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -6
- package/src/Api/Internal/AdaptableInternalApi.js +5 -11
- package/src/Api/Internal/EntitlementInternalApi.d.ts +4 -0
- package/src/Api/Internal/EntitlementInternalApi.js +15 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +33 -8
- package/src/Api/Internal/ExportInternalApi.js +577 -5
- package/src/Api/Internal/NamedQueryInternalApi.d.ts +0 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -5
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -5
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +2 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -6
- package/src/Redux/ActionsReducers/GridRedux.js +11 -11
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +10 -10
- package/src/Redux/ActionsReducers/NamedQueryRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +1 -1
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/PluginsRedux.js +3 -3
- package/src/Redux/Store/AdaptableReduxMerger.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +2 -4
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -2
- package/src/Strategy/ExportModule.js +17 -44
- package/src/Strategy/FlashingCellModule.js +2 -10
- package/src/Strategy/ScheduleModule.js +4 -6
- package/src/Strategy/SmartEditModule.js +1 -7
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +1 -3
- package/src/Utilities/Constants/FilterConstants.d.ts +10 -0
- package/src/Utilities/Constants/FilterConstants.js +11 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +41 -4
- package/src/Utilities/Constants/GeneralConstants.js +44 -5
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -6
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +14 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +68 -1
- package/src/Utilities/Extensions/EnumExtensions.d.ts +0 -4
- package/src/Utilities/Extensions/EnumExtensions.js +3 -15
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -10
- package/src/Utilities/Helpers/AdaptableHelper.js +10 -64
- package/src/Utilities/Helpers/FormatHelper.d.ts +9 -0
- package/src/Utilities/Helpers/FormatHelper.js +26 -14
- package/src/Utilities/Helpers/Helper.d.ts +0 -10
- package/src/Utilities/Helpers/Helper.js +1 -76
- package/src/Utilities/Services/ChartingService.d.ts +2 -2
- package/src/Utilities/Services/ChartingService.js +5 -11
- package/src/Utilities/Services/ModuleService.js +35 -31
- package/src/Utilities/Services/RowEditService.js +1 -6
- package/src/Utilities/Services/RowSummaryService.js +2 -2
- package/src/Utilities/Services/ValidationService.js +2 -16
- package/src/View/Alert/AlertEmptyView.js +1 -2
- package/src/View/Charting/ChartingStatusBarPopover.js +1 -2
- package/src/View/Charting/useChartingElements.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -4
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -12
- package/src/View/Components/ModuleValueSelector/index.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -5
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -3
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -12
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +3 -23
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +4 -5
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -3
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +2 -2
- package/src/View/Dashboard/CustomDashboardButton.js +1 -6
- package/src/View/Dashboard/CustomToolbar.js +2 -9
- package/src/View/Dashboard/Dashboard.js +2 -4
- package/src/View/Dashboard/DashboardPopup.js +1 -3
- package/src/View/Dashboard/DashboardToolbarFactory.js +1 -2
- package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -2
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -3
- package/src/View/Export/ExportViewPanel.js +2 -4
- package/src/View/Export/Wizard/ReportSummaryWizard.js +2 -6
- package/src/View/GridFilter/GridFilterExpressionEditor.js +2 -2
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +2 -6
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +1 -7
- package/src/View/Layout/SaveLayoutButton.js +1 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/SystemStatus/SystemStatusPopup.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +8 -22
- package/src/agGrid/AdaptableAgGrid.d.ts +5 -7
- package/src/agGrid/AdaptableAgGrid.js +158 -147
- package/src/agGrid/AgGridAdapter.d.ts +0 -1
- package/src/agGrid/AgGridAdapter.js +7 -10
- package/src/agGrid/AgGridColumnAdapter.d.ts +3 -1
- package/src/agGrid/AgGridColumnAdapter.js +39 -13
- package/src/agGrid/BadgeRenderer.js +4 -22
- package/src/agGrid/FloatingFilterWrapper.js +21 -0
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +1 -1
- package/src/agGrid/buildSortedColumnStateForLayout.js +2 -2
- package/src/agGrid/defaultAdaptableOptions.js +35 -30
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -15
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +84 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +9 -9
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Redux/ActionsReducers/QueryRedux.d.ts +0 -10
- package/src/Redux/ActionsReducers/QueryRedux.js +0 -25
- package/src/Utilities/Helpers/FormatContentHelper.d.ts +0 -22
- package/src/Utilities/Helpers/FormatContentHelper.js +0 -39
- package/src/Utilities/Services/EntitlementService.d.ts +0 -14
- package/src/Utilities/Services/EntitlementService.js +0 -67
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -10
- package/src/Utilities/Services/Interface/IEntitlementService.js +0 -2
- package/src/Utilities/Services/Interface/IReportService.d.ts +0 -27
- package/src/Utilities/Services/Interface/IReportService.js +0 -2
- package/src/Utilities/Services/ReportService.d.ts +0 -41
- package/src/Utilities/Services/ReportService.js +0 -608
- package/src/Utilities/isAdaptableObject.d.ts +0 -2
- package/src/Utilities/isAdaptableObject.js +0 -8
- package/src/Utilities/reorder.d.ts +0 -1
- package/src/Utilities/reorder.js +0 -17
- package/src/Utilities/sortWithOrder.d.ts +0 -11
- package/src/Utilities/sortWithOrder.js +0 -54
|
@@ -21,7 +21,6 @@ export declare class AgGridAdapter {
|
|
|
21
21
|
* to handle this edge case, we try to extract the AG GridApi from the invocation arguments
|
|
22
22
|
*/
|
|
23
23
|
grabAgGridApiOnTheFly(args: unknown): void;
|
|
24
|
-
getLiveGridOptions(): GridOptions | undefined;
|
|
25
24
|
updateGridOptions(options: ManagedGridOptions): void;
|
|
26
25
|
getGridOption<Key extends keyof GridOptions>(key: Key): GridOptions[Key];
|
|
27
26
|
setGridOption<Key extends ManagedGridOptionKey>(key: Key, value: GridOptions[Key]): void;
|
|
@@ -43,23 +43,18 @@ class AgGridAdapter {
|
|
|
43
43
|
* to handle this edge case, we try to extract the AG GridApi from the invocation arguments
|
|
44
44
|
*/
|
|
45
45
|
grabAgGridApiOnTheFly(args) {
|
|
46
|
-
|
|
46
|
+
var _a;
|
|
47
|
+
if (this.DANGER_USE_GETTER_gridApi || this.DANGER_gridApi_from_args) {
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
50
|
if (Array.isArray(args) &&
|
|
50
51
|
args[0] &&
|
|
51
52
|
typeof args[0].api === 'object' &&
|
|
52
|
-
|
|
53
|
+
// can't ise instanceof operator because gridApi is exported as interface
|
|
54
|
+
typeof ((_a = args[0].api) === null || _a === void 0 ? void 0 : _a.getGridId) === 'function') {
|
|
53
55
|
this.DANGER_gridApi_from_args = args[0].api;
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
|
-
// TODO AFL check if this is still needed if GridAPI offers the `getOption` method
|
|
57
|
-
// do NOT ever mutate the returned object!!
|
|
58
|
-
getLiveGridOptions() {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
return (_b = (_a = this.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.gos) === null || _b === void 0 ? void 0 : _b.gridOptions;
|
|
62
|
-
}
|
|
63
58
|
updateGridOptions(options) {
|
|
64
59
|
var _a;
|
|
65
60
|
(_a = this.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.updateGridOptions(options);
|
|
@@ -84,6 +79,7 @@ class AgGridAdapter {
|
|
|
84
79
|
if (isFilterActive) {
|
|
85
80
|
// used in particular at init time to show the filter icon correctly
|
|
86
81
|
for (const colFilter of activeFilters) {
|
|
82
|
+
// AG Grid exposes the Column interface, but we need the AG Column class
|
|
87
83
|
const agGridCol = this.getAgGridApi().getColumn(colFilter.ColumnId);
|
|
88
84
|
if (agGridCol) {
|
|
89
85
|
columnsWithActiveFilters[agGridCol.getColId()] = true;
|
|
@@ -95,6 +91,7 @@ class AgGridAdapter {
|
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
93
|
const agFilterModel = this.getAgGridApi().getFilterModel();
|
|
94
|
+
// AG Grid exposes the Column interface, but we need the AG Column class
|
|
98
95
|
(this.getAgGridApi().getColumns() || []).forEach((col) => {
|
|
99
96
|
/**
|
|
100
97
|
* When AG Grid filters are used active state should not be removed for all columns.
|
|
@@ -497,7 +494,7 @@ class AgGridAdapter {
|
|
|
497
494
|
}
|
|
498
495
|
isColumnFilterable(colDef) {
|
|
499
496
|
// follow agGrid logic which is that ONLY filterable if explicitly set
|
|
500
|
-
if (this.
|
|
497
|
+
if (this.adaptableApi.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants.ColumnFilterModuleId) == 'Hidden') {
|
|
501
498
|
return false;
|
|
502
499
|
}
|
|
503
500
|
return colDef != null && colDef.filter != null && colDef.filter != false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
2
|
import { ColumnSetupInfo } from './ColumnSetupInfo';
|
|
3
|
-
import { ColDef, Column } from '@ag-grid-community/core';
|
|
3
|
+
import { ColDef, ColGroupDef, Column, GridOptions } from '@ag-grid-community/core';
|
|
4
4
|
import { AdaptableVariant } from '../AdaptableInterfaces/IAdaptable';
|
|
5
5
|
export declare function getEditorsForColumnTypes(variant: AdaptableVariant): Record<string, ColDef['cellEditor']>;
|
|
6
6
|
export declare class AgGridColumnAdapter {
|
|
@@ -26,6 +26,7 @@ export declare class AgGridColumnAdapter {
|
|
|
26
26
|
private setupColumnCellDataType;
|
|
27
27
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
28
28
|
private setupColumnFilter;
|
|
29
|
+
setupColumnFloatingFilterTemporarily(initialGridOptions: GridOptions): void;
|
|
29
30
|
private setupColumnFloatingFilter;
|
|
30
31
|
private setupColumnValueFormatter;
|
|
31
32
|
private setupColumnEditable;
|
|
@@ -54,4 +55,5 @@ export declare class AgGridColumnAdapter {
|
|
|
54
55
|
private getAlertCellStyle;
|
|
55
56
|
private getFlashingCellStyle;
|
|
56
57
|
private getCellHighlightStyle;
|
|
58
|
+
isColGroupDef(columnDefinition: ColDef | ColGroupDef): columnDefinition is ColGroupDef;
|
|
57
59
|
}
|
|
@@ -133,14 +133,12 @@ class AgGridColumnAdapter {
|
|
|
133
133
|
const quickSearchStyleClassName = this.adaptableApi.quickSearchApi.getQuickSearchStyle().ClassName;
|
|
134
134
|
const hasQuickSearchStyleClassName = StringExtensions_1.default.IsNotNullOrEmpty(quickSearchStyleClassName);
|
|
135
135
|
const cellClass = (params) => {
|
|
136
|
-
const gridCell = this.
|
|
136
|
+
const gridCell = this.adaptableApi.gridApi.getGridCellFromRowNode(params.node, abColumn.columnId);
|
|
137
137
|
// if a Visual Data export is in progress, we are interested only in the Excel Style Class
|
|
138
138
|
if (this.adaptableApi.exportApi.internalApi.isVisualDataExportInProgress()) {
|
|
139
139
|
const userDefinedCellClass = typeof userCellClass === 'function' ? userCellClass(params) : userCellClass;
|
|
140
140
|
const cellClassKey = this.getExcelClassNameForCell(colId, gridCell.primaryKeyValue, userDefinedCellClass);
|
|
141
|
-
return this.adaptableApi.internalApi
|
|
142
|
-
.getReportService()
|
|
143
|
-
.getExcelStyleIdForCellClassKey(cellClassKey);
|
|
141
|
+
return this.adaptableApi.exportApi.internalApi.getExcelStyleIdForCellClassKey(cellClassKey);
|
|
144
142
|
}
|
|
145
143
|
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(gridCell, params);
|
|
146
144
|
const editableClassName = this.getEditableCellClass(gridCell, params);
|
|
@@ -339,6 +337,16 @@ class AgGridColumnAdapter {
|
|
|
339
337
|
return (0, FilterWrapper_1.FilterWrapperFactory)(this.adaptableInstance);
|
|
340
338
|
});
|
|
341
339
|
}
|
|
340
|
+
setupColumnFloatingFilterTemporarily(initialGridOptions) {
|
|
341
|
+
var _a;
|
|
342
|
+
(_a = initialGridOptions.columnDefs) === null || _a === void 0 ? void 0 : _a.filter((colDef) => !this.isColGroupDef(colDef)).map((colDef) => {
|
|
343
|
+
var _a;
|
|
344
|
+
const isFloatingFilterEnabled = ((_a = initialGridOptions.defaultColDef) === null || _a === void 0 ? void 0 : _a.floatingFilter) || colDef.floatingFilter;
|
|
345
|
+
if (isFloatingFilterEnabled) {
|
|
346
|
+
colDef.floatingFilterComponent = (0, FloatingFilterWrapper_1.FloatingFilterWrapperFactory)(this.adaptableInstance);
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
}
|
|
342
350
|
setupColumnFloatingFilter({ col, colDef }) {
|
|
343
351
|
const isFloatingFilterDisabled = !colDef.floatingFilter ||
|
|
344
352
|
!this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering;
|
|
@@ -366,6 +374,7 @@ class AgGridColumnAdapter {
|
|
|
366
374
|
return;
|
|
367
375
|
}
|
|
368
376
|
return (params) => {
|
|
377
|
+
var _a, _b, _c, _d, _e, _f;
|
|
369
378
|
const { node, value } = params;
|
|
370
379
|
const mostRelevantFormatColumn = this.adaptableApi.formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(activeFormatColumnsWithDisplayFormat, abColumn, { node, value });
|
|
371
380
|
if (!mostRelevantFormatColumn) {
|
|
@@ -376,19 +385,37 @@ class AgGridColumnAdapter {
|
|
|
376
385
|
if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'NumberFormatter') {
|
|
377
386
|
// change the Number format - if the scope allows it
|
|
378
387
|
if (this.adaptableApi.columnScopeApi.isColumnInNumericScope(abColumn, mostRelevantFormatColumn.Scope)) {
|
|
379
|
-
|
|
388
|
+
let cellValue = params.value;
|
|
389
|
+
if (typeof ((_a = params.value) === null || _a === void 0 ? void 0 : _a.toNumber) === 'function' &&
|
|
390
|
+
typeof ((_b = params.value) === null || _b === void 0 ? void 0 : _b.toString) === 'function') {
|
|
391
|
+
// aggregation values are wrapped in an AG Grid specific object
|
|
392
|
+
cellValue = params.value.toNumber();
|
|
393
|
+
}
|
|
394
|
+
return this.adaptableApi.formatColumnApi.internalApi.getNumberFormattedValue(cellValue, params.node, abColumn, options);
|
|
380
395
|
}
|
|
381
396
|
}
|
|
382
397
|
if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'DateFormatter') {
|
|
383
398
|
// change the Date format - if the scope allows it
|
|
384
399
|
if (this.adaptableApi.columnScopeApi.isColumnInDateScope(abColumn, mostRelevantFormatColumn.Scope)) {
|
|
385
|
-
|
|
400
|
+
let cellValue = params.value;
|
|
401
|
+
if (typeof ((_c = params.value) === null || _c === void 0 ? void 0 : _c.toNumber) === 'function' &&
|
|
402
|
+
typeof ((_d = params.value) === null || _d === void 0 ? void 0 : _d.toString) === 'function') {
|
|
403
|
+
// aggregation values are wrapped in an AG Grid specific object
|
|
404
|
+
cellValue = params.value.toString();
|
|
405
|
+
}
|
|
406
|
+
return this.adaptableApi.formatColumnApi.internalApi.getDateFormattedValue(cellValue, params.node, abColumn, options);
|
|
386
407
|
}
|
|
387
408
|
}
|
|
388
409
|
if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'StringFormatter') {
|
|
389
410
|
// change the String format - if the scope allows it
|
|
390
411
|
if (this.adaptableApi.columnScopeApi.isColumnInStringsScope(abColumn, mostRelevantFormatColumn.Scope)) {
|
|
391
|
-
|
|
412
|
+
let cellValue = params.value;
|
|
413
|
+
if (typeof ((_e = params.value) === null || _e === void 0 ? void 0 : _e.toNumber) === 'function' &&
|
|
414
|
+
typeof ((_f = params.value) === null || _f === void 0 ? void 0 : _f.toString) === 'function') {
|
|
415
|
+
// aggregation values are wrapped in an AG Grid specific object
|
|
416
|
+
cellValue = params.value.toString();
|
|
417
|
+
}
|
|
418
|
+
return this.adaptableApi.formatColumnApi.internalApi.getStringFormattedValue(cellValue, params.node, abColumn, options);
|
|
392
419
|
}
|
|
393
420
|
}
|
|
394
421
|
// should NEVER arrive at this line, but just to be sure
|
|
@@ -413,12 +440,7 @@ class AgGridColumnAdapter {
|
|
|
413
440
|
return typeof userValue === 'function' ? userValue(params) : userValue;
|
|
414
441
|
}
|
|
415
442
|
const gridCell = this.adaptableInstance.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
416
|
-
const cellEditableContext = {
|
|
417
|
-
gridCell,
|
|
418
|
-
adaptableApi: this.adaptableApi,
|
|
419
|
-
userName: this.adaptableOptions.userName,
|
|
420
|
-
adaptableId: this.adaptableOptions.adaptableId,
|
|
421
|
-
};
|
|
443
|
+
const cellEditableContext = Object.assign({ gridCell }, this.adaptableApi.internalApi.buildBaseContext());
|
|
422
444
|
return cellEditableFn(cellEditableContext);
|
|
423
445
|
};
|
|
424
446
|
return editableCallback;
|
|
@@ -819,5 +841,9 @@ class AgGridColumnAdapter {
|
|
|
819
841
|
return (0, StyleHelper_1.convertAdaptableStyleToCSS)(cellHightlight.highlightStyle);
|
|
820
842
|
}
|
|
821
843
|
}
|
|
844
|
+
isColGroupDef(columnDefinition) {
|
|
845
|
+
// @ts-ignore
|
|
846
|
+
return columnDefinition['children'] != null;
|
|
847
|
+
}
|
|
822
848
|
}
|
|
823
849
|
exports.AgGridColumnAdapter = AgGridColumnAdapter;
|
|
@@ -47,7 +47,7 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
47
47
|
this.renderSingularValues(params, adaptableApi);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
renderArrayValues(params,
|
|
50
|
+
renderArrayValues(params, adaptableApi) {
|
|
51
51
|
var _a, _b, _c, _d, _e, _f;
|
|
52
52
|
let badgesConfig = [];
|
|
53
53
|
if (!Array.isArray(params.value) || params.value.length === 0) {
|
|
@@ -57,16 +57,7 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
57
57
|
}
|
|
58
58
|
for (const value of params.value) {
|
|
59
59
|
const formattedValue = (_f = (_e = (_d = params.formatValue) === null || _d === void 0 ? void 0 : _d.call(params, value)) !== null && _e !== void 0 ? _e : value) !== null && _f !== void 0 ? _f : '';
|
|
60
|
-
const predicateDefHandlerContext = {
|
|
61
|
-
value: value,
|
|
62
|
-
oldValue: null,
|
|
63
|
-
displayValue: params.formatValue,
|
|
64
|
-
node: params.node,
|
|
65
|
-
column: abColumn,
|
|
66
|
-
adaptableApi: adapatableApi,
|
|
67
|
-
userName: adapatableApi.optionsApi.getUserName(),
|
|
68
|
-
adaptableId: adapatableApi.optionsApi.getAdaptableId(),
|
|
69
|
-
};
|
|
60
|
+
const predicateDefHandlerContext = Object.assign({ value: value, oldValue: null, displayValue: params.formatValue, node: params.node, column: abColumn }, adaptableApi.internalApi.buildBaseContext());
|
|
70
61
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
71
62
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
72
63
|
if (!isNullValue && badge) {
|
|
@@ -78,19 +69,10 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
78
69
|
}
|
|
79
70
|
this.renderBadges(badgesConfig, api, params);
|
|
80
71
|
}
|
|
81
|
-
renderSingularValues(params,
|
|
72
|
+
renderSingularValues(params, adaptableApi) {
|
|
82
73
|
var _a, _b, _c;
|
|
83
74
|
const formattedValue = (_c = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value) !== null && _c !== void 0 ? _c : '';
|
|
84
|
-
const predicateDefHandlerContext = {
|
|
85
|
-
value: params.value,
|
|
86
|
-
oldValue: null,
|
|
87
|
-
displayValue: params.formatValue,
|
|
88
|
-
node: params.node,
|
|
89
|
-
column: abColumn,
|
|
90
|
-
adaptableApi: adapatableApi,
|
|
91
|
-
userName: adapatableApi.optionsApi.getUserName(),
|
|
92
|
-
adaptableId: adapatableApi.optionsApi.getAdaptableId(),
|
|
93
|
-
};
|
|
75
|
+
const predicateDefHandlerContext = Object.assign({ value: params.value, oldValue: null, displayValue: params.formatValue, node: params.node, column: abColumn }, adaptableApi.internalApi.buildBaseContext());
|
|
94
76
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
95
77
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
96
78
|
if (
|
|
@@ -33,6 +33,27 @@ const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
33
33
|
filterContainer.parentElement.parentElement.style.padding = 'var(--ab-space-1)';
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
if (adaptable.isAgGridInitialising) {
|
|
37
|
+
if (adaptable.variant === 'react') {
|
|
38
|
+
return () => React.createElement(React.Fragment, null);
|
|
39
|
+
}
|
|
40
|
+
return class FloatingFilterStub {
|
|
41
|
+
init(params) {
|
|
42
|
+
this.filterContainer = document.createElement('div');
|
|
43
|
+
}
|
|
44
|
+
getGui() {
|
|
45
|
+
return this.filterContainer;
|
|
46
|
+
}
|
|
47
|
+
destroy() {
|
|
48
|
+
var _a;
|
|
49
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
50
|
+
this.filterContainer = null;
|
|
51
|
+
}
|
|
52
|
+
onParentModelChanged() {
|
|
53
|
+
// nothing yet
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
36
57
|
if (adaptable.variant === 'react') {
|
|
37
58
|
return (0, react_1.forwardRef)(function ReactFloatingFilterWrapper(props, ref) {
|
|
38
59
|
const colId = props.column.getId();
|
|
@@ -6,9 +6,9 @@ const ColumnInternalApi_1 = require("../Api/Internal/ColumnInternalApi");
|
|
|
6
6
|
const ColumnApiImpl_1 = require("../Api/Implementation/ColumnApiImpl");
|
|
7
7
|
const sortColumnStateForVisibleColumns_1 = require("./sortColumnStateForVisibleColumns");
|
|
8
8
|
function buildSortedColumnStateForLayout(params) {
|
|
9
|
-
const { columnState, layout,
|
|
9
|
+
const { columnState, layout, groupDisplayType } = params;
|
|
10
10
|
let visibleColumnList = [...layout.Columns];
|
|
11
|
-
const multipleGroupColumns =
|
|
11
|
+
const multipleGroupColumns = groupDisplayType === 'multipleColumns';
|
|
12
12
|
const singleGroupColumn = !multipleGroupColumns;
|
|
13
13
|
const rowGroupedColumnsIndexes = {};
|
|
14
14
|
let generatedRowGroupColumnsIds = [];
|
|
@@ -3,12 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getDefaultAdaptableOptions = exports.applyDefaultAdaptableOptions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const GeneralConstants = tslib_1.__importStar(require("../Utilities/Constants/GeneralConstants"));
|
|
6
|
+
const FilterConstants = tslib_1.__importStar(require("../Utilities/Constants/FilterConstants"));
|
|
6
7
|
const UIHelper_1 = tslib_1.__importStar(require("../View/UIHelper"));
|
|
7
8
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
8
9
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
9
10
|
const AdaptablePredicate_1 = require("../PredefinedConfig/Common/AdaptablePredicate");
|
|
10
11
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
11
12
|
const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
|
|
13
|
+
/**
|
|
14
|
+
* Default Adaptable Options values used if not set by the user
|
|
15
|
+
* Try to avoid any hard coded strings or numbers - use General (or other) Constants files
|
|
16
|
+
*/
|
|
12
17
|
const DefaultAdaptableOptions = {
|
|
13
18
|
adaptableId: GeneralConstants.ADAPTABLE_ID,
|
|
14
19
|
adaptableStateKey: undefined,
|
|
@@ -22,30 +27,30 @@ const DefaultAdaptableOptions = {
|
|
|
22
27
|
cellHighlightDuration: 2000,
|
|
23
28
|
rowHighlightDuration: 4000,
|
|
24
29
|
statusbarHighlightDuration: 2000,
|
|
25
|
-
dataChangeDetectionPolicy:
|
|
30
|
+
dataChangeDetectionPolicy: GeneralConstants.RAW_VALUE_DATA_CHANGE_DETECTION_POLICY,
|
|
26
31
|
actionHandlers: undefined,
|
|
27
32
|
alertMessageText: undefined,
|
|
28
33
|
showMissingPrimaryKeyAlert: false,
|
|
29
34
|
},
|
|
30
35
|
notificationsOptions: {
|
|
31
36
|
maxNotifications: 3,
|
|
32
|
-
position:
|
|
33
|
-
duration:
|
|
37
|
+
position: GeneralConstants.TOAST_POSITIONS_BOTTOM_RIGHT,
|
|
38
|
+
duration: GeneralConstants.NOTIFICATION_DURATION,
|
|
34
39
|
showProgressBar: false,
|
|
35
40
|
closeWhenClicked: false,
|
|
36
41
|
pauseWhenHovering: false,
|
|
37
42
|
isDraggable: false,
|
|
38
|
-
transition:
|
|
43
|
+
transition: GeneralConstants.TOAST_TRANSITIONS_SLIDE,
|
|
39
44
|
showApplicationIcon: false,
|
|
40
45
|
showSystemStatusMessageNotifications: false,
|
|
41
|
-
maxSystemMessagesInStore:
|
|
46
|
+
maxSystemMessagesInStore: GeneralConstants.NOTIFICATION_MAX_SYSTEM_MESSAGES,
|
|
42
47
|
},
|
|
43
48
|
dataImportOptions: {
|
|
44
49
|
fileHandlers: undefined,
|
|
45
50
|
},
|
|
46
51
|
flashingCellOptions: {
|
|
47
52
|
defaultFlashDuration: 500,
|
|
48
|
-
defaultFlashTarget:
|
|
53
|
+
defaultFlashTarget: GeneralConstants.FLASHING_TARGET_CELL,
|
|
49
54
|
defaultDownChangeStyle: {
|
|
50
55
|
BackColor: (0, UIHelper_1.getHexForName)(UIHelper_1.RED),
|
|
51
56
|
},
|
|
@@ -72,8 +77,8 @@ const DefaultAdaptableOptions = {
|
|
|
72
77
|
calendarOptions: { holidays: undefined },
|
|
73
78
|
cellSummaryOptions: { cellSummaryOperations: undefined },
|
|
74
79
|
containerOptions: {
|
|
75
|
-
adaptableContainer:
|
|
76
|
-
agGridContainer:
|
|
80
|
+
adaptableContainer: GeneralConstants.ADAPTABLE_CONTAINER_ID,
|
|
81
|
+
agGridContainer: GeneralConstants.AG_GRID_CONTAINER_ID,
|
|
77
82
|
agGridContainerWaitTimeout: 60000,
|
|
78
83
|
modalContainer: undefined,
|
|
79
84
|
systemStatusContainer: undefined,
|
|
@@ -90,7 +95,7 @@ const DefaultAdaptableOptions = {
|
|
|
90
95
|
showQuickSearchInHeader: true,
|
|
91
96
|
customDashboardButtons: undefined,
|
|
92
97
|
customToolbars: undefined,
|
|
93
|
-
buttonsLocation:
|
|
98
|
+
buttonsLocation: GeneralConstants.DASHBOARD_BUTTONS_LOCATION_RIGHT,
|
|
94
99
|
},
|
|
95
100
|
actionColumnOptions: {
|
|
96
101
|
actionColumns: undefined,
|
|
@@ -119,7 +124,7 @@ const DefaultAdaptableOptions = {
|
|
|
119
124
|
smartEditCustomOperations: undefined,
|
|
120
125
|
},
|
|
121
126
|
entitlementOptions: {
|
|
122
|
-
defaultAccessLevel:
|
|
127
|
+
defaultAccessLevel: GeneralConstants.ACCESS_LEVEL_FULL,
|
|
123
128
|
moduleEntitlements: undefined,
|
|
124
129
|
},
|
|
125
130
|
exportOptions: {
|
|
@@ -154,7 +159,7 @@ const DefaultAdaptableOptions = {
|
|
|
154
159
|
customDisplayFormatters: undefined,
|
|
155
160
|
},
|
|
156
161
|
layoutOptions: {
|
|
157
|
-
displayRowGroups:
|
|
162
|
+
displayRowGroups: GeneralConstants.DISPLAY_ROW_GROUPS_DYNAMIC,
|
|
158
163
|
autoSaveLayouts: true,
|
|
159
164
|
autoSizeColumnsInLayout: false,
|
|
160
165
|
autoSizeColumnsInPivotLayout: false,
|
|
@@ -178,7 +183,7 @@ const DefaultAdaptableOptions = {
|
|
|
178
183
|
quickFilterOptions: {
|
|
179
184
|
hideQuickFilterDropdown: undefined,
|
|
180
185
|
hideQuickFilterInput: undefined,
|
|
181
|
-
quickFilterTrigger:
|
|
186
|
+
quickFilterTrigger: FilterConstants.FILTER_TRIGGER_MOUSE_ENTER,
|
|
182
187
|
quickFilterDebounce: 250,
|
|
183
188
|
quickFilterHeight: null,
|
|
184
189
|
showQuickFilter: true,
|
|
@@ -190,7 +195,7 @@ const DefaultAdaptableOptions = {
|
|
|
190
195
|
defaultFilterFormTab: 'Values',
|
|
191
196
|
},
|
|
192
197
|
valuesFilterOptions: {
|
|
193
|
-
valuesFilterTrigger:
|
|
198
|
+
valuesFilterTrigger: FilterConstants.FILTER_TRIGGER_MOUSE_ENTER,
|
|
194
199
|
sortValuesFilter: false,
|
|
195
200
|
filterValuesUsingTime: false,
|
|
196
201
|
showCurrentlyFilteredValuesOnly: false,
|
|
@@ -203,17 +208,17 @@ const DefaultAdaptableOptions = {
|
|
|
203
208
|
useAdaptableColumnFiltering: true,
|
|
204
209
|
clearColumnFiltersOnStartUp: false,
|
|
205
210
|
filterActionOnUserDataChange: {
|
|
206
|
-
applyFilter:
|
|
211
|
+
applyFilter: FilterConstants.FILTER_ACTION_ALWAYS,
|
|
207
212
|
throttleDelay: 0,
|
|
208
213
|
},
|
|
209
214
|
filterActionOnExternalDataChange: {
|
|
210
|
-
applyFilter:
|
|
215
|
+
applyFilter: FilterConstants.FILTER_ACTION_NEVER,
|
|
211
216
|
throttleDelay: 0,
|
|
212
217
|
},
|
|
213
218
|
autoApplyFilter: true,
|
|
214
|
-
defaultNumericColumnFilter:
|
|
215
|
-
defaultStringColumnFilter:
|
|
216
|
-
defaultDateColumnFilter:
|
|
219
|
+
defaultNumericColumnFilter: FilterConstants.PREDICATE_EQUALS,
|
|
220
|
+
defaultStringColumnFilter: FilterConstants.PREDICATE_CONTAINS,
|
|
221
|
+
defaultDateColumnFilter: FilterConstants.PREDICATE_ON,
|
|
217
222
|
enableFilterOnSpecialColumns: true,
|
|
218
223
|
showClearFilterButton: false,
|
|
219
224
|
showSuspendFilterButton: false,
|
|
@@ -237,7 +242,7 @@ const DefaultAdaptableOptions = {
|
|
|
237
242
|
runQuickSearchOnRowGroups: true,
|
|
238
243
|
runQuickSearchOnPivotColumns: true,
|
|
239
244
|
clearQuickSearchOnStartUp: false,
|
|
240
|
-
quickSearchPlaceholder:
|
|
245
|
+
quickSearchPlaceholder: GeneralConstants.QUICK_SEARCH_PLACEHOLDER,
|
|
241
246
|
filterResultsAfterQuickSearch: false,
|
|
242
247
|
runQuickSearchWithCaseSensitivity: false,
|
|
243
248
|
runBespokeQuickSearch: undefined,
|
|
@@ -266,15 +271,15 @@ const DefaultAdaptableOptions = {
|
|
|
266
271
|
alternativeModuleNames: undefined,
|
|
267
272
|
applicationIcon: undefined,
|
|
268
273
|
useCustomMacLikeScrollbars: false,
|
|
269
|
-
englishVariant:
|
|
274
|
+
englishVariant: GeneralConstants.ENGLISH_VARIANT,
|
|
270
275
|
showLoadingScreen: true,
|
|
271
|
-
loadingScreenDelay:
|
|
272
|
-
loadingScreenTitle:
|
|
273
|
-
loadingScreenText:
|
|
276
|
+
loadingScreenDelay: GeneralConstants.LOADING_SCREEN_DELAY,
|
|
277
|
+
loadingScreenTitle: GeneralConstants.LOADING_SCREEN_TITLE,
|
|
278
|
+
loadingScreenText: GeneralConstants.LOADING_SCREEN_TEXT,
|
|
274
279
|
disableDeleteConfirmation: false,
|
|
275
280
|
dateInputOptions: {
|
|
276
281
|
useNativeInput: false,
|
|
277
|
-
dateFormat:
|
|
282
|
+
dateFormat: GeneralConstants.DATE_INPUT_DATE_FORMAT,
|
|
278
283
|
// locale is not explicitly defaulted to 'en-US' as this is already done by the react-day-picker
|
|
279
284
|
showWeekNumber: false,
|
|
280
285
|
showOutsideDays: true,
|
|
@@ -298,26 +303,26 @@ const DefaultAdaptableOptions = {
|
|
|
298
303
|
activeByDefault: false,
|
|
299
304
|
showDataChange: undefined,
|
|
300
305
|
changeHistoryButton: undefined,
|
|
301
|
-
showLastDataChangeOnly: true
|
|
306
|
+
showLastDataChangeOnly: true,
|
|
302
307
|
},
|
|
303
308
|
settingsPanelOptions: {
|
|
304
|
-
popupType:
|
|
309
|
+
popupType: GeneralConstants.POPUP_TYPE_WINDOW,
|
|
305
310
|
title: ModuleConstants.SettingsPanelFriendlyName,
|
|
306
|
-
icon:
|
|
311
|
+
icon: GeneralConstants.ICON_CONFIGURATION,
|
|
307
312
|
navigation: {},
|
|
308
313
|
alwaysShowInDashboard: false,
|
|
309
314
|
alwaysShowInToolPanel: false,
|
|
310
315
|
},
|
|
311
316
|
chartingOptions: {
|
|
312
|
-
|
|
317
|
+
saveChartBehaviour: GeneralConstants.SAVE_CHART_BEHAVIOUR_NONE,
|
|
313
318
|
agGridContainerName: GeneralConstants.AG_GRID_CHART_WINDOW,
|
|
314
319
|
externalChartingOptions: {},
|
|
315
320
|
},
|
|
316
321
|
fdc3Options: {
|
|
317
322
|
enableLogging: false,
|
|
318
323
|
actionColumnDefaultConfiguration: {
|
|
319
|
-
columnId:
|
|
320
|
-
headerName:
|
|
324
|
+
columnId: GeneralConstants.FDC3_ACTION_COLUMN_DEFAULT_COLUMN_ID,
|
|
325
|
+
headerName: GeneralConstants.FDC3_ACTION_COLUMN_DEFAULT_HEADER_NAME,
|
|
321
326
|
width: 200,
|
|
322
327
|
resizable: true,
|
|
323
328
|
movable: false,
|
|
@@ -20,25 +20,13 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
|
|
|
20
20
|
});
|
|
21
21
|
let buttonStyle = api.internalApi.getStyleForButton(button, context
|
|
22
22
|
? context
|
|
23
|
-
: {
|
|
24
|
-
adaptableApi: api,
|
|
25
|
-
userName: this.getOptions().userName,
|
|
26
|
-
adaptableId: this.getOptions().adaptableId,
|
|
27
|
-
});
|
|
23
|
+
: Object.assign({}, api.internalApi.buildBaseContext()));
|
|
28
24
|
let buttonLabel = api.internalApi.getLabelForButton(button, context
|
|
29
25
|
? context
|
|
30
|
-
: {
|
|
31
|
-
adaptableApi: api,
|
|
32
|
-
userName: this.getOptions().userName,
|
|
33
|
-
adaptableId: this.getOptions().adaptableId,
|
|
34
|
-
});
|
|
26
|
+
: Object.assign({}, api.internalApi.buildBaseContext()));
|
|
35
27
|
let buttonTooltip = api.internalApi.getTooltipForButton(button, context
|
|
36
28
|
? context
|
|
37
|
-
: {
|
|
38
|
-
adaptableApi: api,
|
|
39
|
-
userName: this.getOptions().userName,
|
|
40
|
-
adaptableId: this.getOptions().adaptableId,
|
|
41
|
-
});
|
|
29
|
+
: Object.assign({}, api.internalApi.buildBaseContext()));
|
|
42
30
|
return (React.createElement(SimpleButton_1.default, { autoFocus: focusFirstButton && index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, icon: buttonIcon, tone: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _a !== void 0 ? _a : defaultTone, variant: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant, "data-text": buttonLabel, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, marginLeft: index ? 2 : 0, onClick: () => {
|
|
43
31
|
onClick(button);
|
|
44
32
|
} }, buttonLabel));
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "18.1.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1724081730492 || Date.now(),
|
|
6
|
+
VERSION: "18.1.15-canary.0" || '--current-version--',
|
|
7
7
|
};
|