@adaptabletools/adaptable-cjs 20.2.6 → 20.2.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/base.css +7 -10
- package/base.css.map +1 -1
- package/index.css +7 -9
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableState/LayoutState.d.ts +4 -4
- package/src/Api/GridApi.d.ts +2 -2
- package/src/Api/GridFilterApi.d.ts +10 -1
- package/src/Api/Implementation/ColumnApiImpl.js +6 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +3 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +10 -0
- package/src/Api/Implementation/LayoutApiImpl.js +13 -8
- package/src/Api/Implementation/LayoutHelpers.js +4 -6
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StateApiImpl.js +7 -4
- package/src/Api/StateApi.d.ts +7 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +0 -1
- package/src/Redux/ActionsReducers/LayoutRedux.js +1 -24
- package/src/Redux/Store/AdaptableStore.js +1 -3
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/View/Components/ReorderDraggable/index.js +2 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +6 -2
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +1 -1
- package/src/View/StateManagement/components/ExportDropdown.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +5 -1
- package/src/agGrid/AgGridAdapter.js +2 -2
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +4 -4
- package/src/layout-manager/src/index.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +0 -1
- package/src/metamodel/adaptable.metamodel.d.ts +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -171,7 +171,6 @@ export interface LayoutReadyAction extends Redux.Action {
|
|
|
171
171
|
export declare const LayoutAdd: (layout: Layout) => LayoutAddAction;
|
|
172
172
|
export declare const LayoutDelete: (layout: Layout) => LayoutDeleteAction;
|
|
173
173
|
export declare const LayoutSave: (layout: Layout) => LayoutSaveAction;
|
|
174
|
-
export declare const LayoutSetColumnCaption: (layoutName: string, columnId: string, caption: string) => LayoutSetColumnCaptionAction;
|
|
175
174
|
export declare const LayoutAddColumn: (layoutName: string, columnId: string) => LayoutAddColumnAction;
|
|
176
175
|
export declare const LayoutRemoveColumn: (layoutName: string, columnId: string) => LayoutRemoveColumnAction;
|
|
177
176
|
export declare const LayoutSelect: (layoutName: string) => LayoutSelectAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutReducer = exports.getColumnFilterSelector = exports.getCurrentLayoutSelector = exports.getColumnFiltersSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutAddColumn = exports.
|
|
3
|
+
exports.LayoutReducer = exports.getColumnFilterSelector = exports.getCurrentLayoutSelector = exports.getColumnFiltersSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutAddColumn = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LayoutGridFilterClear = exports.LayoutGridFilterUnSuspend = exports.LayoutGridFilterSuspend = exports.LayoutGridFilterSet = exports.LayoutColumnFilterUnSuspendAll = exports.LayoutColumnFilterSuspendAll = exports.LayoutColumnFilterUnSuspend = exports.LayoutColumnFilterSuspend = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_GRID_FILTER_CLEAR = exports.LAYOUT_GRID_FILTER_SET = exports.LAYOUT_GRID_FILTER_UNSUSPEND = exports.LAYOUT_GRID_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = exports.LAYOUT_COLUMN_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_COLUMN_REMOVE = exports.LAYOUT_COLUMN_ADD = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = exports.LAYOUT_READY = exports.LAYOUT_COLUMN_SET_CAPTION = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
6
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
@@ -168,13 +168,6 @@ const LayoutSave = (layout) => ({
|
|
|
168
168
|
layout: (0, LayoutHelpers_1.normalizeLayout)(layout),
|
|
169
169
|
});
|
|
170
170
|
exports.LayoutSave = LayoutSave;
|
|
171
|
-
const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
|
|
172
|
-
type: exports.LAYOUT_COLUMN_SET_CAPTION,
|
|
173
|
-
layoutName,
|
|
174
|
-
columnId,
|
|
175
|
-
caption,
|
|
176
|
-
});
|
|
177
|
-
exports.LayoutSetColumnCaption = LayoutSetColumnCaption;
|
|
178
171
|
const LayoutAddColumn = (layoutName, columnId) => ({
|
|
179
172
|
type: exports.LAYOUT_COLUMN_ADD,
|
|
180
173
|
layoutName,
|
|
@@ -271,22 +264,6 @@ const LayoutReducer = (state = initialState, action) => {
|
|
|
271
264
|
Layouts: newLayouts,
|
|
272
265
|
};
|
|
273
266
|
}
|
|
274
|
-
case exports.LAYOUT_COLUMN_SET_CAPTION: {
|
|
275
|
-
const setColumnCaptionAction = action;
|
|
276
|
-
const currentLayoutName = setColumnCaptionAction.layoutName;
|
|
277
|
-
let currentLayout = state.Layouts.find((l) => l.Name === currentLayoutName);
|
|
278
|
-
if (currentLayout) {
|
|
279
|
-
if (!currentLayout.ColumnHeaders) {
|
|
280
|
-
currentLayout.ColumnHeaders = {};
|
|
281
|
-
}
|
|
282
|
-
currentLayout.ColumnHeaders[setColumnCaptionAction.columnId] =
|
|
283
|
-
setColumnCaptionAction.caption;
|
|
284
|
-
return Object.assign({}, state, {
|
|
285
|
-
Layouts: state.Layouts.map((abObject) => abObject.Uuid === currentLayout.Uuid ? currentLayout : abObject),
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
return state;
|
|
289
|
-
}
|
|
290
267
|
case exports.LAYOUT_COLUMN_ADD: {
|
|
291
268
|
const addColumnAction = action;
|
|
292
269
|
const layoutname = addColumnAction.layoutName;
|
|
@@ -888,7 +888,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
888
888
|
case LayoutRedux.LAYOUT_EDIT:
|
|
889
889
|
case LayoutRedux.LAYOUT_SAVE:
|
|
890
890
|
case LayoutRedux.LAYOUT_DELETE:
|
|
891
|
-
case LayoutRedux.LAYOUT_COLUMN_SET_CAPTION:
|
|
892
891
|
case LayoutRedux.LAYOUT_SELECT: {
|
|
893
892
|
const oldLayoutState = middlewareAPI.getState().Layout;
|
|
894
893
|
// this must be called before 'next(action)'
|
|
@@ -914,8 +913,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
914
913
|
adaptable.applyFiltering();
|
|
915
914
|
}
|
|
916
915
|
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
917
|
-
returnAction.type == LayoutRedux.LAYOUT_DELETE
|
|
918
|
-
returnAction.type == LayoutRedux.LAYOUT_COLUMN_SET_CAPTION) {
|
|
916
|
+
returnAction.type == LayoutRedux.LAYOUT_DELETE) {
|
|
919
917
|
// tell AdapTable the Layout has been selected
|
|
920
918
|
if (newLayout) {
|
|
921
919
|
adaptable.updateLayoutInManagerAfterStoreHasChanged(newLayout);
|
|
@@ -46,7 +46,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
46
46
|
}
|
|
47
47
|
getExplicitlyReferencedColumnIds(layout) {
|
|
48
48
|
const columnIds = [];
|
|
49
|
-
if (layout.TableColumns) {
|
|
49
|
+
if (!(0, LayoutHelpers_1.isPivotLayout)(layout) && layout.TableColumns) {
|
|
50
50
|
const visibility = layout.ColumnVisibility || {};
|
|
51
51
|
columnIds.push(...layout.TableColumns.filter((colId) => {
|
|
52
52
|
return visibility[colId] !== false;
|
|
@@ -17,7 +17,8 @@ function ReorderDraggable(props) {
|
|
|
17
17
|
return (React.createElement(rebass_1.Flex, { className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier ?? index, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option", ...flexProps },
|
|
18
18
|
React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
|
|
19
19
|
reorderable ? (React.createElement(rebass_1.Box, { mr: 3, ...dragHandleProps },
|
|
20
|
-
React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) :
|
|
20
|
+
React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : (React.createElement(rebass_1.Box, { mr: 3 },
|
|
21
|
+
React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }))),
|
|
21
22
|
props.renderOption(option, index))));
|
|
22
23
|
};
|
|
23
24
|
const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
|
|
@@ -27,6 +27,7 @@ const AdaptableFormControlTextClear_1 = require("../../../Components/Forms/Adapt
|
|
|
27
27
|
const sortColumnIdsByOrder_1 = require("../../../../layout-manager/src/sortColumnIdsByOrder");
|
|
28
28
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
29
29
|
const GeneralConstants_1 = require("../../../../Utilities/Constants/GeneralConstants");
|
|
30
|
+
const isPivotLayout_1 = require("../../../../Utilities/isPivotLayout");
|
|
30
31
|
const PropertyOrderText = (props) => (React.createElement(rebass_1.Text, { fontWeight: 600, fontSize: 2 }, props.children));
|
|
31
32
|
const columnTypes = {
|
|
32
33
|
default: {
|
|
@@ -161,7 +162,8 @@ const ColumnRow = (props) => {
|
|
|
161
162
|
const { column } = props;
|
|
162
163
|
// width
|
|
163
164
|
const columnWidth = props.layout.ColumnWidths?.[column.columnId];
|
|
164
|
-
const visible = (props.layout
|
|
165
|
+
const visible = (!(0, isPivotLayout_1.isPivotLayout)(props.layout) &&
|
|
166
|
+
props.layout.TableColumns.includes(column.columnId) &&
|
|
165
167
|
props.layout.ColumnVisibility?.[column.columnId] !== false) ||
|
|
166
168
|
isRowGroupColumn;
|
|
167
169
|
return (React.createElement(rebass_1.Box, { "data-name": props.column.columnId, className: "ab-Layout-Wizard__ColumnRow" },
|
|
@@ -381,7 +383,9 @@ const ColumnsSection = (props) => {
|
|
|
381
383
|
React.createElement(rebass_1.Box, null,
|
|
382
384
|
React.createElement(icons_1.NaturallySizedIcon, { name: "info" })),
|
|
383
385
|
React.createElement(rebass_1.Text, { ml: 1 }, "Expand each Column to set Width, Pinnning and a custom Header")),
|
|
384
|
-
React.createElement(ReorderDraggable_1.ReorderDraggable, { toIdentifier: (option) => `${option.columnId}`,
|
|
386
|
+
React.createElement(ReorderDraggable_1.ReorderDraggable, { toIdentifier: (option) => `${option.columnId}`, isOptionDraggable: (option) => {
|
|
387
|
+
return option.moveable;
|
|
388
|
+
}, order: currentOrder, renderOption: (option) => {
|
|
385
389
|
return (React.createElement(ColumnRow, { onColumnNameChange: handleColumnNameChange, onColumnWidthChange: handleColumnWidthChange, onColumnVisibilityChange: handleColumnVisibilityChange, onPinChange: handlePinChange, layout: layout, column: option }));
|
|
386
390
|
}, onChange: handleColumnsChange }),
|
|
387
391
|
(0, ValueSelector_1.renderSelectionSection)({
|
|
@@ -27,7 +27,7 @@ const PivotRowGroupingSection = (props) => {
|
|
|
27
27
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
28
28
|
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
29
29
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
30
|
-
return ArrayExtensions_1.default.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), layout.
|
|
30
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), layout.PivotGroupedColumns ?? [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
31
31
|
}, [layout, allGroupableColumns]);
|
|
32
32
|
const onChange = (layout) => {
|
|
33
33
|
props.onChange((0, LayoutHelpers_1.normalizeLayout)(layout));
|
|
@@ -9,7 +9,7 @@ const ExportDropdown = (props) => {
|
|
|
9
9
|
const handleChange = (destination) => {
|
|
10
10
|
switch (props.type) {
|
|
11
11
|
case 'adaptableState':
|
|
12
|
-
const adaptableState = props.api.stateApi.
|
|
12
|
+
const adaptableState = props.api.stateApi.getPersistentState();
|
|
13
13
|
(0, handleExportState_1.handleExportState)(destination, 'adaptableState', adaptableState);
|
|
14
14
|
break;
|
|
15
15
|
case 'initialState':
|
|
@@ -3131,6 +3131,7 @@ You need to define at least one Layout!`);
|
|
|
3131
3131
|
}
|
|
3132
3132
|
}
|
|
3133
3133
|
}
|
|
3134
|
+
const prevLayout = this._prevLayout;
|
|
3134
3135
|
this._prevLayout = layout;
|
|
3135
3136
|
const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
|
|
3136
3137
|
const isPivot = (0, LayoutHelpers_1.isPivotLayout)(layout);
|
|
@@ -3153,7 +3154,10 @@ You need to define at least one Layout!`);
|
|
|
3153
3154
|
// need to refresh the header,
|
|
3154
3155
|
// as the Layout.ColumnHeaders state property is not implemented in the LayoutManager
|
|
3155
3156
|
// and is specific to Adaptable, therefore we need to refresh it manually
|
|
3156
|
-
|
|
3157
|
+
if (!prevLayout ||
|
|
3158
|
+
JSON.stringify(prevLayout.ColumnHeaders) !== JSON.stringify(layout.ColumnHeaders)) {
|
|
3159
|
+
this.refreshHeader();
|
|
3160
|
+
}
|
|
3157
3161
|
const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
|
|
3158
3162
|
this.layoutManager?.setLayout(layoutModel, {
|
|
3159
3163
|
skipApplyRowGroupsExpandedState: !shouldUpdateExpandState,
|
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.2.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1752148722883 || Date.now(),
|
|
6
|
+
VERSION: "20.2.8" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -40,10 +40,6 @@ export interface BaseLayoutModel {
|
|
|
40
40
|
* Same as RowSummaries, but for Pivot Layout
|
|
41
41
|
*/
|
|
42
42
|
Ignore_RowSummaries?: any;
|
|
43
|
-
/**
|
|
44
|
-
* Same as above, but
|
|
45
|
-
*/
|
|
46
|
-
Ignore_Name?: string;
|
|
47
43
|
/**
|
|
48
44
|
* Same as above, but for Column Headers
|
|
49
45
|
*/
|
|
@@ -51,6 +47,10 @@ export interface BaseLayoutModel {
|
|
|
51
47
|
Ignore_Source?: string;
|
|
52
48
|
Ignore_AdaptableVersion?: string;
|
|
53
49
|
Ignore_Uuid?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The Layout Name
|
|
52
|
+
*/
|
|
53
|
+
Name?: string;
|
|
54
54
|
ColumnVisibility?: {
|
|
55
55
|
[columnId: string]: false;
|
|
56
56
|
};
|
|
@@ -279,7 +279,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
279
279
|
}
|
|
280
280
|
delete layout.TableColumns;
|
|
281
281
|
const pivotLayout = {
|
|
282
|
-
|
|
282
|
+
Name: layout.Name,
|
|
283
283
|
Ignore_GridFilter: layout.Ignore_GridFilter,
|
|
284
284
|
Ignore_ColumnFilters: layout.Ignore_ColumnFilters,
|
|
285
285
|
Ignore_ColumnHeaders: layout.Ignore_ColumnHeaders,
|
|
@@ -598,7 +598,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
const layout = (0, simplifyLayoutModel_1.simplifyTableLayoutModel)({
|
|
601
|
-
|
|
601
|
+
Name: this.currentLayout?.Name || 'Default',
|
|
602
602
|
Ignore_GridFilter: this.currentLayout?.Ignore_GridFilter,
|
|
603
603
|
Ignore_ColumnFilters: this.currentLayout?.Ignore_ColumnFilters,
|
|
604
604
|
Ignore_ColumnHeaders: this.currentLayout?.Ignore_ColumnHeaders,
|
|
@@ -56,7 +56,6 @@ exports.isTableLayoutEqual = isTableLayoutEqual;
|
|
|
56
56
|
function clearIgnoredProperties(layout) {
|
|
57
57
|
delete layout.Ignore_GridFilter;
|
|
58
58
|
delete layout.Ignore_ColumnFilters;
|
|
59
|
-
delete layout.Ignore_Name;
|
|
60
59
|
delete layout.Ignore_ColumnHeaders;
|
|
61
60
|
delete layout.Ignore_AutoSizeColumns;
|
|
62
61
|
delete layout.Ignore_RowSummaries;
|
|
@@ -5644,13 +5644,13 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
5644
5644
|
kind: string;
|
|
5645
5645
|
desc: string;
|
|
5646
5646
|
isOpt: boolean;
|
|
5647
|
-
ref
|
|
5647
|
+
ref: string;
|
|
5648
5648
|
} | {
|
|
5649
5649
|
name: string;
|
|
5650
5650
|
kind: string;
|
|
5651
5651
|
desc: string;
|
|
5652
5652
|
isOpt: boolean;
|
|
5653
|
-
ref
|
|
5653
|
+
ref?: undefined;
|
|
5654
5654
|
} | {
|
|
5655
5655
|
name: string;
|
|
5656
5656
|
kind: string;
|