@adaptabletools/adaptable-cjs 20.1.2 → 20.1.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/base.css +1 -0
- package/base.css.map +1 -1
- package/index.css +1 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableState/Common/{AdaptableSearchState.d.ts → AdaptableFilterState.d.ts} +7 -7
- package/src/AdaptableState/Common/AdaptableSortState.d.ts +1 -1
- package/src/Api/Implementation/StateApiImpl.d.ts +2 -2
- package/src/Api/Implementation/StateApiImpl.js +5 -5
- package/src/Api/Internal/EventInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/StateApi.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +7 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
- package/src/View/CellSummary/CellSummaryDetails.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/ColumnInfo/ColumnInfo.js +1 -1
- package/src/View/Comments/CommentsPopup.js +1 -1
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +7 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -1
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +2 -2
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/WizardSummaryPage.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.js +1 -1
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/Dashboard/DashboardToolbarFactory.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +8 -9
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.js +1 -1
- package/src/View/Export/ReportFormatSelector.js +1 -1
- package/src/View/Export/ReportNameSelector.js +1 -1
- package/src/View/Filter/FilterViewPanel.js +2 -2
- package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Note/NotePopup.js +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
- package/src/View/StateManagement/components/LoadButton.js +1 -1
- package/src/View/Theme/ThemeSelector.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +10 -0
- package/src/agGrid/AdaptableAgGrid.js +66 -28
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Datepicker/index.js +49 -4
- package/src/components/Icon/index.js +1 -1
- package/src/components/InfiniteTable/index.d.ts +2 -2
- package/src/components/InfiniteTable/index.js +3 -3
- package/src/components/List/GridList/index.js +1 -1
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +1 -1
- package/src/components/SimpleButton/index.js +5 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +32 -3
- package/src/metamodel/adaptable.metamodel.d.ts +10 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- /package/src/AdaptableState/Common/{AdaptableSearchState.js → AdaptableFilterState.js} +0 -0
|
@@ -43,8 +43,10 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
43
43
|
};
|
|
44
44
|
onInputChange?: (value: string) => void;
|
|
45
45
|
onMenuOpen?: VoidFunction;
|
|
46
|
+
'aria-label'?: string;
|
|
46
47
|
size?: 'small' | 'normal';
|
|
47
48
|
isCreatable?: boolean;
|
|
48
49
|
menuPortalTarget?: HTMLElement;
|
|
50
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
49
51
|
};
|
|
50
52
|
export declare const Select: <SelectValue extends unknown, IsMulti extends boolean = false>(props: SelectProps<SelectValue, IsMulti>) => React.JSX.Element;
|
|
@@ -369,7 +369,7 @@ const Select = function (props) {
|
|
|
369
369
|
setInputValue(value);
|
|
370
370
|
props.onInputChange?.(value);
|
|
371
371
|
}, [props.onInputChange, isMulti]);
|
|
372
|
-
return (React.createElement(SelectComponent, { ref: ref, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
372
|
+
return (React.createElement(SelectComponent, { ref: ref, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
373
373
|
// This needed so the menu is not clipped by overflow: hidden
|
|
374
374
|
menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
375
375
|
if (isMulti) {
|
|
@@ -85,7 +85,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
85
85
|
const fontWeight = buttonProps.fontWeight
|
|
86
86
|
? theme_1.default[buttonProps.fontWeight] ?? buttonProps.fontWeight ?? 'normal'
|
|
87
87
|
: 'normal';
|
|
88
|
-
const btn = (React.createElement(rebass_1.Button, { ...buttonProps,
|
|
88
|
+
const btn = (React.createElement(rebass_1.Button, { ...buttonProps, "aria-label": buttonProps['aria-label'] ||
|
|
89
|
+
buttonProps.label ||
|
|
90
|
+
tooltip ||
|
|
91
|
+
buttonProps.title ||
|
|
92
|
+
`${buttonProps.key}`, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : '', fontWeight ? `${exports.baseClassName}--font-weight=${fontWeight}` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`), ref: theRef }, children));
|
|
89
93
|
return tooltip ? React.createElement(Tooltip_1.default, { label: tooltip }, btn) : btn;
|
|
90
94
|
});
|
|
91
95
|
exports.default = SimpleButton;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "20.1.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1747747722676 || Date.now(),
|
|
6
|
+
VERSION: "20.1.4" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -245,19 +245,28 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
245
245
|
: this.getTableLayoutModelFromGrid();
|
|
246
246
|
}
|
|
247
247
|
getPivotLayoutModelFromGrid() {
|
|
248
|
-
const
|
|
248
|
+
const pivotResultColumns = this.gridApi.getPivotResultColumns() || [];
|
|
249
|
+
const pivotResultColumnsSet = new Set(pivotResultColumns.map((col) => col.getColId()));
|
|
249
250
|
const prevLayout = this.currentLayout;
|
|
250
251
|
const columnState = this.gridApi
|
|
251
252
|
.getColumnState()
|
|
252
253
|
.filter((col) => !pivotResultColumnsSet.has(col.colId));
|
|
253
254
|
let PivotColumns = this.gridApi.getPivotColumns().map((col) => col.getColId());
|
|
254
255
|
const layout = this.getUndecidedLayoutModelFromGrid(columnState);
|
|
256
|
+
let ColumnWidths = layout.ColumnWidths || {};
|
|
257
|
+
//let's also include the column widths of the pivotResult columns
|
|
258
|
+
pivotResultColumns.forEach((col) => {
|
|
259
|
+
ColumnWidths[col.getColId()] = col.getActualWidth();
|
|
260
|
+
});
|
|
261
|
+
if (!Object.keys(ColumnWidths).length) {
|
|
262
|
+
ColumnWidths = undefined;
|
|
263
|
+
}
|
|
255
264
|
delete layout.TableColumns;
|
|
256
265
|
const pivotLayout = {
|
|
257
266
|
PivotColumns,
|
|
258
267
|
ColumnPinning: layout.ColumnPinning,
|
|
259
268
|
ColumnSorts: layout.ColumnSorts,
|
|
260
|
-
ColumnWidths
|
|
269
|
+
ColumnWidths,
|
|
261
270
|
ColumnVisibility: layout.ColumnVisibility,
|
|
262
271
|
RowGroupValues: layout.RowGroupValues,
|
|
263
272
|
PivotGroupedColumns: layout.RowGroupedColumns,
|
|
@@ -824,7 +833,10 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
824
833
|
return acc;
|
|
825
834
|
}, {});
|
|
826
835
|
columnState.applyOrder = true;
|
|
827
|
-
const columnIds = getColumnOrderIdsForAllColDefs([
|
|
836
|
+
const columnIds = getColumnOrderIdsForAllColDefs([
|
|
837
|
+
...layout.PivotColumns,
|
|
838
|
+
...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),
|
|
839
|
+
], this.gridApi.getColumnDefs());
|
|
828
840
|
const pivotAggsToIndexes = layout.PivotAggregationColumns.reduce((acc, { ColumnId }, index) => {
|
|
829
841
|
acc[ColumnId] = index;
|
|
830
842
|
return acc;
|
|
@@ -1039,6 +1051,23 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1039
1051
|
// now recompute and apply the last one
|
|
1040
1052
|
this.computePivotAggregations(layout, columnState);
|
|
1041
1053
|
this.gridApi.applyColumnState(columnState);
|
|
1054
|
+
// let's also include the column widths of the pivotResult columns
|
|
1055
|
+
// we can't simply include those in the columnState because the columnState will also apply order
|
|
1056
|
+
// but we don't want to affect the order of the pivotResult columns
|
|
1057
|
+
// so we'll do it manually, and apply the widths after the columnState
|
|
1058
|
+
// by using the gridApi.setColumnWidths method
|
|
1059
|
+
if (layout.ColumnWidths) {
|
|
1060
|
+
const colWidthForPivotResultColumns = [];
|
|
1061
|
+
(this.gridApi.getPivotResultColumns() || []).forEach((col) => {
|
|
1062
|
+
const colId = col.getColId();
|
|
1063
|
+
if (layout.ColumnWidths[colId]) {
|
|
1064
|
+
colWidthForPivotResultColumns.push({ key: colId, newWidth: layout.ColumnWidths[colId] });
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
if (colWidthForPivotResultColumns.length) {
|
|
1068
|
+
this.gridApi.setColumnWidths(colWidthForPivotResultColumns);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1042
1071
|
this.applyPivotExpandLevel(layout);
|
|
1043
1072
|
const hasGroupedColumns = layout.PivotGroupedColumns && layout.PivotGroupedColumns.length;
|
|
1044
1073
|
// but also let's not forget to apply the row group values
|
|
@@ -443,6 +443,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
443
443
|
kind: string;
|
|
444
444
|
desc: string;
|
|
445
445
|
};
|
|
446
|
+
AdaptableFilterState: {
|
|
447
|
+
name: string;
|
|
448
|
+
kind: string;
|
|
449
|
+
desc: string;
|
|
450
|
+
props: {
|
|
451
|
+
name: string;
|
|
452
|
+
kind: string;
|
|
453
|
+
desc: string;
|
|
454
|
+
}[];
|
|
455
|
+
};
|
|
446
456
|
AdaptableFlashingCell: {
|
|
447
457
|
name: string;
|
|
448
458
|
kind: string;
|
|
@@ -879,16 +889,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
879
889
|
desc: string;
|
|
880
890
|
}[];
|
|
881
891
|
};
|
|
882
|
-
AdaptableSearchState: {
|
|
883
|
-
name: string;
|
|
884
|
-
kind: string;
|
|
885
|
-
desc: string;
|
|
886
|
-
props: {
|
|
887
|
-
name: string;
|
|
888
|
-
kind: string;
|
|
889
|
-
desc: string;
|
|
890
|
-
}[];
|
|
891
|
-
};
|
|
892
892
|
AdaptableSettingsPanel: {
|
|
893
893
|
name: string;
|
|
894
894
|
kind: string;
|