@adaptabletools/adaptable 22.0.0-canary.2 → 22.0.0-canary.4
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 +64 -26
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +2 -2
- package/src/AdaptableState/ChartingState.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +3 -4
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
- package/src/AdaptableState/CustomSortState.d.ts +2 -2
- package/src/AdaptableState/DashboardState.d.ts +2 -2
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FlashingCellState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +2 -10
- package/src/AdaptableState/LayoutState.d.ts +8 -3
- package/src/AdaptableState/NamedQueryState.d.ts +2 -2
- package/src/AdaptableState/PlusMinusState.d.ts +2 -2
- package/src/AdaptableState/ShortcutState.d.ts +2 -2
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +2 -2
- package/src/Api/CustomSortApi.d.ts +6 -3
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
- package/src/Api/Implementation/GridApiImpl.js +16 -16
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Strategy/AlertModule.js +4 -0
- package/src/Strategy/CustomSortModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +5 -0
- package/src/Strategy/FormatColumnModule.js +4 -0
- package/src/Strategy/LayoutModule.js +4 -4
- package/src/Strategy/PlusMinusModule.js +4 -0
- package/src/Strategy/ScheduleModule.js +4 -0
- package/src/Strategy/ShortcutModule.js +4 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +16 -0
- package/src/Utilities/Helpers/FormatHelper.js +9 -2
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AnnotationsService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +3 -3
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +47 -12
- package/src/View/Alert/Wizard/AlertWizard.js +14 -10
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +23 -11
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +15 -17
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.js +20 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +40 -14
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +34 -14
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -9
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +15 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +5 -5
- package/src/agGrid/AgGridColumnAdapter.js +3 -18
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
- package/src/layout-manager/src/index.js +25 -7
- package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +39 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +3 -1
- package/src/migration/VersionUpgrade22.d.ts +21 -0
- package/src/migration/VersionUpgrade22.js +187 -0
- package/src/types.d.ts +2 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
- package/src/AdaptableState/Common/SuspendableObject.js +0 -1
|
@@ -249,7 +249,7 @@ export function TreeDropdown(props) {
|
|
|
249
249
|
} }, children));
|
|
250
250
|
} },
|
|
251
251
|
React.createElement(FieldWrap, { style: props.fieldStyle, className: "twa:w-full" },
|
|
252
|
-
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", placeholder: props.placeholder ?? 'Select a value', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
252
|
+
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", "aria-expanded": visible, placeholder: props.placeholder ?? 'Select a value', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
253
253
|
if (!visible) {
|
|
254
254
|
setVisible(true);
|
|
255
255
|
}
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "22.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1770223980882 || Date.now(),
|
|
4
|
+
VERSION: "22.0.0-canary.4" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -172,5 +172,6 @@ export interface PivotLayoutModel extends BaseLayoutModel {
|
|
|
172
172
|
* Display automatically calculated Totals within EACH Pivot Column Group, in the position specified
|
|
173
173
|
*/
|
|
174
174
|
PivotColumnTotal?: 'before' | 'after' | boolean;
|
|
175
|
+
PivotResultColumns?: string[] | boolean;
|
|
175
176
|
}
|
|
176
177
|
export type LayoutModel = TableLayoutModel | PivotLayoutModel;
|
|
@@ -166,7 +166,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
166
166
|
this.setupEvents();
|
|
167
167
|
this.indexColumns();
|
|
168
168
|
this.setupPivotTotals();
|
|
169
|
-
globalThis.layoutManager = this;
|
|
169
|
+
// (globalThis as any).layoutManager = this;
|
|
170
170
|
}
|
|
171
171
|
destroy() {
|
|
172
172
|
if (this.destroyed) {
|
|
@@ -344,10 +344,11 @@ export class LayoutManager extends LMEmitter {
|
|
|
344
344
|
const columnState = this.gridApi
|
|
345
345
|
.getColumnState()
|
|
346
346
|
.filter((col) => !pivotResultColumnsSet.has(col.colId));
|
|
347
|
-
|
|
347
|
+
const PivotColumns = this.gridApi.getPivotColumns().map((col) => col.getColId());
|
|
348
348
|
const layout = this.getUndecidedLayoutModelFromGrid(columnState);
|
|
349
349
|
let ColumnSizing = layout.ColumnSizing || {};
|
|
350
350
|
let ColumnVisibility = { ...layout.ColumnVisibility };
|
|
351
|
+
const storePivotResultColumns = !!prevLayout?.PivotResultColumns;
|
|
351
352
|
//let's also include the column widths of the pivotResult columns
|
|
352
353
|
pivotResultColumns.forEach((col) => {
|
|
353
354
|
const colId = col.getColId();
|
|
@@ -401,6 +402,13 @@ export class LayoutManager extends LMEmitter {
|
|
|
401
402
|
GrandTotalRow: layout.GrandTotalRow,
|
|
402
403
|
PivotExpandLevel: prevLayout?.PivotExpandLevel ?? -1,
|
|
403
404
|
};
|
|
405
|
+
if (storePivotResultColumns) {
|
|
406
|
+
// Get pivot result columns in display order (not creation order)
|
|
407
|
+
const displayedPivotResultColumns = this.gridApi
|
|
408
|
+
.getAllDisplayedColumns()
|
|
409
|
+
.filter((col) => pivotResultColumnsSet.has(col.getColId()));
|
|
410
|
+
pivotLayout.PivotResultColumns = displayedPivotResultColumns.map((col) => col.getColId());
|
|
411
|
+
}
|
|
404
412
|
if (layout.SuppressAggFuncInHeader) {
|
|
405
413
|
pivotLayout.SuppressAggFuncInHeader = layout.SuppressAggFuncInHeader;
|
|
406
414
|
}
|
|
@@ -424,20 +432,20 @@ export class LayoutManager extends LMEmitter {
|
|
|
424
432
|
let TableColumns = columnState.map((c) => c.colId);
|
|
425
433
|
// .filter((colId) => colId !== 'ag-Grid-SelectionColumn');
|
|
426
434
|
let ColumnSorts = [];
|
|
427
|
-
|
|
435
|
+
const RowGroupedColumns = [];
|
|
428
436
|
let RowGroupValues = undefined;
|
|
429
437
|
let ColumnGroupValues = undefined;
|
|
430
438
|
let TableAggregationColumns = [];
|
|
431
|
-
|
|
439
|
+
const ColumnPinning = {};
|
|
432
440
|
const gridState = this.gridApi.getState();
|
|
433
441
|
const prevLayout = this.currentLayout;
|
|
434
442
|
const prevAggColumns = prevLayout?.TableAggregationColumns ?? prevLayout?.PivotAggregationColumns;
|
|
435
|
-
|
|
443
|
+
const ColumnSizing = { ...prevLayout?.ColumnSizing };
|
|
436
444
|
const prevAggColumnsMap = prevAggColumns?.reduce((acc, agg) => {
|
|
437
445
|
acc[agg.ColumnId] = agg;
|
|
438
446
|
return acc;
|
|
439
447
|
}, {});
|
|
440
|
-
|
|
448
|
+
const ColumnVisibility = columnState.reduce((acc, colState) => {
|
|
441
449
|
const colId = colState.colId;
|
|
442
450
|
// normally we take the initial width from this object
|
|
443
451
|
let initialWidth = this.initialColumnWidths[colId];
|
|
@@ -1239,7 +1247,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
1239
1247
|
}
|
|
1240
1248
|
}
|
|
1241
1249
|
computeColumnStateForPivotLayout(layout) {
|
|
1242
|
-
|
|
1250
|
+
const columnState = {};
|
|
1243
1251
|
const pivotColumnsToIndexes = (layout.PivotColumns || []).reduce((acc, colId, index) => {
|
|
1244
1252
|
acc[colId] = index;
|
|
1245
1253
|
return acc;
|
|
@@ -1270,6 +1278,12 @@ export class LayoutManager extends LMEmitter {
|
|
|
1270
1278
|
this.computeColumnSorts(layout, columnState);
|
|
1271
1279
|
this.computePinnedColumns(layout, columnState);
|
|
1272
1280
|
this.computePivotAggregations(layout, columnState);
|
|
1281
|
+
// Add pivot result columns to the state for ordering (will be applied with applyOrder: true later)
|
|
1282
|
+
if (Array.isArray(layout.PivotResultColumns)) {
|
|
1283
|
+
layout.PivotResultColumns.forEach((colId) => {
|
|
1284
|
+
columnState.state.push({ colId });
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1273
1287
|
return columnState;
|
|
1274
1288
|
}
|
|
1275
1289
|
computePivotAggregations(layout, columnState) {
|
|
@@ -1510,6 +1524,10 @@ export class LayoutManager extends LMEmitter {
|
|
|
1510
1524
|
});
|
|
1511
1525
|
// now recompute and apply the last one
|
|
1512
1526
|
this.computePivotAggregations(layout, columnState);
|
|
1527
|
+
// Apply order only on the final call when PivotResultColumns is specified
|
|
1528
|
+
if (Array.isArray(layout.PivotResultColumns)) {
|
|
1529
|
+
columnState.applyOrder = true;
|
|
1530
|
+
}
|
|
1513
1531
|
this.gridApi.applyColumnState(columnState);
|
|
1514
1532
|
// let's also include the column widths of the pivotResult columns
|
|
1515
1533
|
// we can't simply include those in the columnState because the columnState will also apply order
|
|
@@ -132,6 +132,9 @@ export function normalizePivotLayoutModel(layout) {
|
|
|
132
132
|
if (!layout.ColumnPinning) {
|
|
133
133
|
layout.ColumnPinning = {};
|
|
134
134
|
}
|
|
135
|
+
if (!layout.PivotResultColumns) {
|
|
136
|
+
layout.PivotResultColumns = false;
|
|
137
|
+
}
|
|
135
138
|
if (!layout.ColumnSizing) {
|
|
136
139
|
layout.ColumnSizing = {};
|
|
137
140
|
}
|
|
@@ -1000,12 +1000,19 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1000
1000
|
name: string;
|
|
1001
1001
|
kind: string;
|
|
1002
1002
|
desc: string;
|
|
1003
|
-
props: {
|
|
1003
|
+
props: ({
|
|
1004
1004
|
name: string;
|
|
1005
1005
|
kind: string;
|
|
1006
1006
|
desc: string;
|
|
1007
1007
|
isOpt: boolean;
|
|
1008
|
-
|
|
1008
|
+
ref: string;
|
|
1009
|
+
} | {
|
|
1010
|
+
name: string;
|
|
1011
|
+
kind: string;
|
|
1012
|
+
desc: string;
|
|
1013
|
+
isOpt: boolean;
|
|
1014
|
+
ref?: undefined;
|
|
1015
|
+
})[];
|
|
1009
1016
|
};
|
|
1010
1017
|
AdaptableSystemColumnMenuItem: {
|
|
1011
1018
|
name: string;
|
|
@@ -1712,11 +1719,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1712
1719
|
kind: string;
|
|
1713
1720
|
desc: string;
|
|
1714
1721
|
};
|
|
1715
|
-
CellAlignment: {
|
|
1716
|
-
name: string;
|
|
1717
|
-
kind: string;
|
|
1718
|
-
desc: string;
|
|
1719
|
-
};
|
|
1720
1722
|
CellColorRange: {
|
|
1721
1723
|
name: string;
|
|
1722
1724
|
kind: string;
|
|
@@ -2155,12 +2157,20 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2155
2157
|
name: string;
|
|
2156
2158
|
kind: string;
|
|
2157
2159
|
desc: string;
|
|
2160
|
+
isOpt?: undefined;
|
|
2161
|
+
ref?: undefined;
|
|
2162
|
+
} | {
|
|
2163
|
+
name: string;
|
|
2164
|
+
kind: string;
|
|
2165
|
+
desc: string;
|
|
2166
|
+
isOpt: boolean;
|
|
2158
2167
|
ref?: undefined;
|
|
2159
2168
|
} | {
|
|
2160
2169
|
name: string;
|
|
2161
2170
|
kind: string;
|
|
2162
2171
|
desc: string;
|
|
2163
2172
|
ref: string;
|
|
2173
|
+
isOpt?: undefined;
|
|
2164
2174
|
})[];
|
|
2165
2175
|
};
|
|
2166
2176
|
CommandHandler: {
|
|
@@ -4066,6 +4076,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4066
4076
|
kind: string;
|
|
4067
4077
|
desc: string;
|
|
4068
4078
|
};
|
|
4079
|
+
Identifiable: {
|
|
4080
|
+
name: string;
|
|
4081
|
+
kind: string;
|
|
4082
|
+
desc: string;
|
|
4083
|
+
props: {
|
|
4084
|
+
name: string;
|
|
4085
|
+
kind: string;
|
|
4086
|
+
desc: string;
|
|
4087
|
+
isOpt: boolean;
|
|
4088
|
+
ref: string;
|
|
4089
|
+
}[];
|
|
4090
|
+
};
|
|
4069
4091
|
InFilterValue: {
|
|
4070
4092
|
name: string;
|
|
4071
4093
|
kind: string;
|
|
@@ -4455,6 +4477,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4455
4477
|
kind: string;
|
|
4456
4478
|
desc: string;
|
|
4457
4479
|
};
|
|
4480
|
+
NamedObject: {
|
|
4481
|
+
name: string;
|
|
4482
|
+
kind: string;
|
|
4483
|
+
desc: string;
|
|
4484
|
+
props: {
|
|
4485
|
+
name: string;
|
|
4486
|
+
kind: string;
|
|
4487
|
+
desc: string;
|
|
4488
|
+
}[];
|
|
4489
|
+
};
|
|
4458
4490
|
NamedQuery: {
|
|
4459
4491
|
name: string;
|
|
4460
4492
|
kind: string;
|