@adaptabletools/adaptable 22.0.6 → 22.0.8
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 +19 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
- package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
- package/src/AdaptableState/Common/ColumnScope.js +12 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StateApiImpl.js +12 -15
- package/src/Api/StateApi.d.ts +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +4 -1
- package/src/Redux/Store/AdaptableStore.d.ts +2 -1
- package/src/Redux/Store/AdaptableStore.js +12 -8
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +10 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +8 -8
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +4 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -0
- package/src/View/Components/ColumnGroupTag/index.d.ts +5 -0
- package/src/View/Components/ColumnGroupTag/index.js +9 -0
- package/src/View/Components/ColumnSelector/index.js +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +9 -2
- package/src/View/Components/NewScopeComponent.js +19 -37
- package/src/View/Components/ReorderDraggable/index.d.ts +1 -0
- package/src/View/Components/ReorderDraggable/index.js +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +7 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +10 -3
- package/src/View/FormatColumn/Wizard/FormatColumnColumnScopeWizardSection.js +14 -7
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -3
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +2 -2
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -0
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +149 -140
- package/src/View/Layout/Wizard/sections/FilterSection.js +8 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +2 -0
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +5 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +4 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +8 -3
- package/src/View/Layout/Wizard/sections/SortSection.js +4 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +8 -2
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +0 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.js +11 -4
- package/src/agGrid/AdaptableAgGrid.js +19 -28
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +4 -0
- package/src/agGrid/AgGridColumnAdapter.js +3 -3
- package/src/agGrid/AgGridExportAdapter.js +1 -3
- package/src/components/Tree/TreeDropdown/index.d.ts +9 -0
- package/src/components/Tree/TreeDropdown/index.js +20 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +6 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -2154,38 +2154,16 @@ export class AdaptableAgGrid {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
const colDef = this.agGridAdapter.getAgGridApi().getColumnDef(columnId);
|
|
2156
2156
|
if (colDef) {
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
const params = {
|
|
2160
|
-
value: rawValue,
|
|
2161
|
-
node: rowNode,
|
|
2162
|
-
data: rowNode.data,
|
|
2163
|
-
colDef,
|
|
2164
|
-
column,
|
|
2165
|
-
api: this.agGridAdapter.getAgGridApi(),
|
|
2166
|
-
context: this.agGridAdapter.getGridOption('context'),
|
|
2167
|
-
};
|
|
2168
|
-
const formattedValue = colDef.valueFormatter(params);
|
|
2169
|
-
return formattedValue || '';
|
|
2170
|
-
}
|
|
2157
|
+
const formattedValue = this.agGridAdapter._agGridApi_getFormattedValue(columnId, rowNode);
|
|
2158
|
+
return formattedValue || '';
|
|
2171
2159
|
}
|
|
2172
|
-
|
|
2160
|
+
if (this.api.columnApi.isPivotResultColumn(columnId)) {
|
|
2173
2161
|
const pivotResultColumn = this.agGridAdapter
|
|
2174
2162
|
.getAgGridApi()
|
|
2175
2163
|
.getPivotResultColumns()
|
|
2176
2164
|
.find((col) => col.getColId() === columnId);
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
const params = {
|
|
2180
|
-
value: rawValue,
|
|
2181
|
-
node: rowNode,
|
|
2182
|
-
data: rowNode.data,
|
|
2183
|
-
colDef: pivotResultColDef,
|
|
2184
|
-
column: pivotResultColumn,
|
|
2185
|
-
api: this.agGridAdapter.getAgGridApi(),
|
|
2186
|
-
context: this.agGridAdapter.getGridOption('context'),
|
|
2187
|
-
};
|
|
2188
|
-
const formattedValue = pivotResultColDef.valueFormatter(params);
|
|
2165
|
+
if (pivotResultColumn) {
|
|
2166
|
+
const formattedValue = this.agGridAdapter._agGridApi_getFormattedValue(pivotResultColumn, rowNode);
|
|
2189
2167
|
return formattedValue || '';
|
|
2190
2168
|
}
|
|
2191
2169
|
}
|
|
@@ -2731,9 +2709,11 @@ export class AdaptableAgGrid {
|
|
|
2731
2709
|
};
|
|
2732
2710
|
// No distinct values so lets return unique grid cells
|
|
2733
2711
|
const mapFn = (gridCell, level) => {
|
|
2712
|
+
const itemId = `${gridCell.rowNode?.id}-${gridCell.column?.columnId}`;
|
|
2734
2713
|
if (level || Array.isArray(gridCell.children)) {
|
|
2735
2714
|
const cell = gridCell;
|
|
2736
2715
|
const inFilterValue = {
|
|
2716
|
+
id: itemId,
|
|
2737
2717
|
value: gridCell.rawValue,
|
|
2738
2718
|
label: gridCell.displayValue,
|
|
2739
2719
|
level: level ?? 0,
|
|
@@ -2754,6 +2734,7 @@ export class AdaptableAgGrid {
|
|
|
2754
2734
|
return inFilterValue;
|
|
2755
2735
|
}
|
|
2756
2736
|
return {
|
|
2737
|
+
id: itemId,
|
|
2757
2738
|
value: gridCell.rawValue,
|
|
2758
2739
|
label: gridCell.displayValue,
|
|
2759
2740
|
};
|
|
@@ -2773,7 +2754,9 @@ export class AdaptableAgGrid {
|
|
|
2773
2754
|
const result = gridApiInternal
|
|
2774
2755
|
.sortDistinctValues(getCurrentGridCells(), column)
|
|
2775
2756
|
.map((gridCell) => {
|
|
2757
|
+
const itemId = `${gridCell.rowNode?.id}-${gridCell.column?.columnId}`;
|
|
2776
2758
|
return {
|
|
2759
|
+
id: itemId,
|
|
2777
2760
|
label: gridCell.displayValue,
|
|
2778
2761
|
value: gridCell.rawValue,
|
|
2779
2762
|
isSelected: gridCell.rowNode.displayed,
|
|
@@ -2799,7 +2782,9 @@ export class AdaptableAgGrid {
|
|
|
2799
2782
|
},
|
|
2800
2783
|
get defaultValues() {
|
|
2801
2784
|
const result = getCurrentGridCells().map((gridCell) => {
|
|
2785
|
+
const itemId = `${gridCell.rowNode?.id}-${gridCell.column?.columnId}`;
|
|
2802
2786
|
return {
|
|
2787
|
+
id: itemId,
|
|
2803
2788
|
label: gridCell.displayValue,
|
|
2804
2789
|
value: gridCell.rawValue,
|
|
2805
2790
|
isSelected: gridCell.rowNode.displayed,
|
|
@@ -2827,7 +2812,9 @@ export class AdaptableAgGrid {
|
|
|
2827
2812
|
const rowNodes = gridApiInternal.getSortedRowNodesWithCurrentLayoutSortOrder();
|
|
2828
2813
|
const currentGridCells = self.getDistinctGridCellsForColumn(column, rowNodes);
|
|
2829
2814
|
const result = currentGridCells.map((gridCell) => {
|
|
2815
|
+
const itemId = `${gridCell.rowNode?.id}-${gridCell.column?.columnId}`;
|
|
2830
2816
|
return {
|
|
2817
|
+
id: itemId,
|
|
2831
2818
|
label: gridCell.displayValue,
|
|
2832
2819
|
value: gridCell.rawValue,
|
|
2833
2820
|
isSelected: gridCell.rowNode.displayed,
|
|
@@ -3730,7 +3717,11 @@ export class AdaptableAgGrid {
|
|
|
3730
3717
|
}
|
|
3731
3718
|
const distinctRawValues = this.api.gridApi.internalApi
|
|
3732
3719
|
.getUnsortedDistinctRawValuesForColumn(columnId)
|
|
3733
|
-
.map((item) => item.rawValue)
|
|
3720
|
+
.map((item) => item.rawValue)
|
|
3721
|
+
.filter((v) => typeof v === 'number' && !isNaN(v));
|
|
3722
|
+
if (distinctRawValues.length === 0) {
|
|
3723
|
+
return undefined;
|
|
3724
|
+
}
|
|
3734
3725
|
value = minMax === 'min' ? Math.min(...distinctRawValues) : Math.max(...distinctRawValues);
|
|
3735
3726
|
this.columnMinMaxValuesCache[columnId] = {
|
|
3736
3727
|
...this.columnMinMaxValuesCache[columnId],
|
|
@@ -81,4 +81,5 @@ export declare class AgGridAdapter {
|
|
|
81
81
|
traverseColDefs(colDefs: (ColDef | ColGroupDef)[], modifyFn: (colDef: ColDef) => ColDef | null): (ColDef | ColGroupDef)[];
|
|
82
82
|
getDefaultColumnDefinition(): GridOptions['defaultColDef'];
|
|
83
83
|
_agGridApi_getValue(colKey: string | Column, rowNode: IRowNode, gridApi?: GridApi): any;
|
|
84
|
+
_agGridApi_getFormattedValue(colKey: string | Column, rowNode: IRowNode, gridApi?: GridApi): any;
|
|
84
85
|
}
|
|
@@ -835,4 +835,8 @@ export class AgGridAdapter {
|
|
|
835
835
|
gridApi = gridApi || this.getAgGridApi();
|
|
836
836
|
return gridApi.getCellValue({ colKey, rowNode });
|
|
837
837
|
}
|
|
838
|
+
_agGridApi_getFormattedValue(colKey, rowNode, gridApi) {
|
|
839
|
+
gridApi = gridApi || this.getAgGridApi();
|
|
840
|
+
return gridApi.getCellValue({ colKey, rowNode, useFormatter: true });
|
|
841
|
+
}
|
|
838
842
|
}
|
|
@@ -1194,8 +1194,8 @@ export class AgGridColumnAdapter {
|
|
|
1194
1194
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
1195
1195
|
let style = {};
|
|
1196
1196
|
const gradientStyle = styledColumn?.GradientStyle;
|
|
1197
|
-
if (params.value ===
|
|
1198
|
-
return;
|
|
1197
|
+
if (params.value == undefined || params.value === '') {
|
|
1198
|
+
return style;
|
|
1199
1199
|
}
|
|
1200
1200
|
let colValue = params.value;
|
|
1201
1201
|
if (this.adaptableApi.gridApi.isGroupRowNode(params.node)) {
|
|
@@ -1311,7 +1311,7 @@ export class AgGridColumnAdapter {
|
|
|
1311
1311
|
const columnHighlight = this.adaptableApi.internalApi
|
|
1312
1312
|
.getInternalState()
|
|
1313
1313
|
.ColumnHighlightInfo.find((columnHighlightInfo) => {
|
|
1314
|
-
return
|
|
1314
|
+
return gridCell.column.columnId === columnHighlightInfo.columnId;
|
|
1315
1315
|
});
|
|
1316
1316
|
if (columnHighlight) {
|
|
1317
1317
|
return convertAdaptableStyleToCSS(columnHighlight.highlightStyle);
|
|
@@ -430,9 +430,7 @@ export class AgGridExportAdapter {
|
|
|
430
430
|
}
|
|
431
431
|
const getColIdAndRawValue = () => {
|
|
432
432
|
if (this.adaptableApi.columnApi.isAutoRowGroupColumn(agColumn?.getColId())) {
|
|
433
|
-
const columnId =
|
|
434
|
-
rowNode.rowGroupColumn?.getColDef()?.field ??
|
|
435
|
-
rowNode.field;
|
|
433
|
+
const columnId = agColumn.getColId();
|
|
436
434
|
let rawValue = rowNode.key;
|
|
437
435
|
return { columnId, rawValue };
|
|
438
436
|
}
|
|
@@ -24,4 +24,13 @@ export type TreeDropdownProps<T extends TreeListItem<any>> = {
|
|
|
24
24
|
clearable?: boolean;
|
|
25
25
|
};
|
|
26
26
|
export declare function toDisplayValueDefault(value: any[][] | string[]): string;
|
|
27
|
+
/**
|
|
28
|
+
* Formats the closed TreeDropdown input using each option's `label` for the stored `value` path
|
|
29
|
+
* segments (same shape as {@link toDisplayValueDefault}, but resolves raw values to labels).
|
|
30
|
+
*/
|
|
31
|
+
export declare function toDisplayValueFromOptionTree<T extends {
|
|
32
|
+
value: any;
|
|
33
|
+
label: string;
|
|
34
|
+
children?: T[];
|
|
35
|
+
}>(paths: any[][] | string[], options: T[]): string;
|
|
27
36
|
export declare function TreeDropdown<T extends TreeListItem<any>>(props: TreeDropdownProps<T>): React.JSX.Element;
|
|
@@ -23,6 +23,25 @@ export function toDisplayValueDefault(value) {
|
|
|
23
23
|
}
|
|
24
24
|
return value.map((v) => (Array.isArray(v) ? v.join('-') : v)).join(', ');
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Formats the closed TreeDropdown input using each option's `label` for the stored `value` path
|
|
28
|
+
* segments (same shape as {@link toDisplayValueDefault}, but resolves raw values to labels).
|
|
29
|
+
*/
|
|
30
|
+
export function toDisplayValueFromOptionTree(paths, options) {
|
|
31
|
+
const valueToLabel = new Map();
|
|
32
|
+
const walk = (node) => {
|
|
33
|
+
valueToLabel.set(node.value, node.label);
|
|
34
|
+
if (Array.isArray(node.children)) {
|
|
35
|
+
node.children.forEach(walk);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
options.forEach(walk);
|
|
39
|
+
return paths
|
|
40
|
+
.map((path) => Array.isArray(path)
|
|
41
|
+
? path.map((segment) => valueToLabel.get(segment) ?? String(segment)).join('-')
|
|
42
|
+
: valueToLabel.get(path) ?? String(path))
|
|
43
|
+
.join(', ');
|
|
44
|
+
}
|
|
26
45
|
const getLabelColumn = (field, { includeExpandCollapseButton }) => {
|
|
27
46
|
return {
|
|
28
47
|
field,
|
|
@@ -249,7 +268,7 @@ export function TreeDropdown(props) {
|
|
|
249
268
|
} }, children));
|
|
250
269
|
} },
|
|
251
270
|
React.createElement(FieldWrap, { style: props.fieldStyle, className: "twa:w-full" },
|
|
252
|
-
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", "aria-expanded": visible, placeholder: props.placeholder ?? 'Select
|
|
271
|
+
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", "aria-expanded": visible, placeholder: props.placeholder ?? 'Select...', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
253
272
|
if (!visible) {
|
|
254
273
|
setVisible(true);
|
|
255
274
|
}
|
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.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1775221022738 || Date.now(),
|
|
4
|
+
VERSION: "22.0.8" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -1030,6 +1030,12 @@ export class LayoutManager extends LMEmitter {
|
|
|
1030
1030
|
const shouldSkipTriggerChange = options?.skipTriggerChange === true;
|
|
1031
1031
|
const shouldSkipEqualityCheck = options?.force === true;
|
|
1032
1032
|
if (!shouldSkipEqualityCheck && isLayoutEqual(this.currentLayout, layout)) {
|
|
1033
|
+
// isLayoutEqual strips Ignore_* properties (ColumnHeaders, Filters, etc.)
|
|
1034
|
+
// so even when grid-derived properties match, we must sync currentLayout
|
|
1035
|
+
// to preserve any Ignore_* changes — otherwise getLayoutModelFromGrid
|
|
1036
|
+
// will copy stale values from this.currentLayout
|
|
1037
|
+
// this.currentLayout = layout;
|
|
1038
|
+
this.silentSetCurrentLayout(layout);
|
|
1033
1039
|
return false;
|
|
1034
1040
|
}
|
|
1035
1041
|
const prevCurrent = this.currentLayout;
|