@adaptabletools/adaptable 20.0.0-canary.15 → 20.0.0-canary.17
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/PredefinedConfig/Common/AdaptablePredicate.js +13 -13
- package/src/Redux/Store/AdaptableStore.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -13
- package/src/Utilities/Helpers/DateHelper.js +1 -2
- package/src/Utilities/Helpers/FormatHelper.js +1 -2
- package/src/View/Comments/CommentsEditor.js +5 -2
- package/src/View/Comments/CommentsPopup.js +5 -2
- package/src/View/Components/ColumnFilter/utils.js +1 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -2
- package/src/View/Note/NotePopup.js +5 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +22 -0
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +1 -1
- package/src/components/Datepicker/DatepickerContext.d.ts +1 -0
- package/src/components/Datepicker/index.d.ts +1 -0
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/Select/Select.js +3 -3
- package/src/env.js +2 -2
- package/src/migration/VersionUpgrade20.d.ts +2 -0
- package/src/migration/VersionUpgrade20.js +35 -12
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "20.0.0-canary.
|
|
3
|
+
"version": "20.0.0-canary.17",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@finos/fdc3": "2.1.0",
|
|
41
41
|
"@infinite-table/infinite-react": "6.2.5",
|
|
42
|
-
"date-fns": "^
|
|
42
|
+
"date-fns": "^4.1.0",
|
|
43
43
|
"lodash": "^4.17.15",
|
|
44
44
|
"normalize.css": "^8.0.1",
|
|
45
45
|
"prop-types": "^15.6.2",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import isAfter from 'date-fns
|
|
2
|
-
import isBefore from 'date-fns
|
|
3
|
-
import isEqual from 'date-fns
|
|
4
|
-
import isFuture from 'date-fns
|
|
5
|
-
import isPast from 'date-fns
|
|
6
|
-
import isSameDay from 'date-fns
|
|
7
|
-
import isThisMonth from 'date-fns
|
|
8
|
-
import isThisQuarter from 'date-fns
|
|
9
|
-
import isThisWeek from 'date-fns
|
|
10
|
-
import isThisYear from 'date-fns
|
|
11
|
-
import isToday from 'date-fns
|
|
12
|
-
import isTomorrow from 'date-fns
|
|
13
|
-
import isYesterday from 'date-fns
|
|
1
|
+
import { isAfter } from 'date-fns';
|
|
2
|
+
import { isBefore } from 'date-fns';
|
|
3
|
+
import { isEqual } from 'date-fns';
|
|
4
|
+
import { isFuture } from 'date-fns';
|
|
5
|
+
import { isPast } from 'date-fns';
|
|
6
|
+
import { isSameDay } from 'date-fns';
|
|
7
|
+
import { isThisMonth } from 'date-fns';
|
|
8
|
+
import { isThisQuarter } from 'date-fns';
|
|
9
|
+
import { isThisWeek } from 'date-fns';
|
|
10
|
+
import { isThisYear } from 'date-fns';
|
|
11
|
+
import { isToday } from 'date-fns';
|
|
12
|
+
import { isTomorrow } from 'date-fns';
|
|
13
|
+
import { isYesterday } from 'date-fns';
|
|
14
14
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
15
15
|
import { parseDateValue } from '../../Utilities/Helpers/DateHelper';
|
|
16
16
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Redux from 'redux';
|
|
2
2
|
import * as PluginsRedux from '../ActionsReducers/PluginsRedux';
|
|
3
3
|
import * as PopupRedux from '../ActionsReducers/PopupRedux';
|
|
4
|
-
import { PROGRESS_INDICATOR_HIDE, PROGRESS_INDICATOR_SHOW
|
|
4
|
+
import { PROGRESS_INDICATOR_HIDE, PROGRESS_INDICATOR_SHOW } from '../ActionsReducers/PopupRedux';
|
|
5
5
|
import { createEngine as createEngineLocal } from './AdaptableReduxLocalStorageEngine';
|
|
6
6
|
import { mergeReducer } from './AdaptableReduxMerger';
|
|
7
7
|
import { isAdaptableCellChangedAlert, isAdaptableRowChangedAlert, } from '../../PredefinedConfig/Common/AdaptableAlert';
|
|
@@ -2,7 +2,7 @@ import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluation
|
|
|
2
2
|
import { SumArray } from '../Extensions/ArrayExtensions';
|
|
3
3
|
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
4
4
|
import { extractColumnParameter, extractColumnParameters, extractParameter, getNumericValue, handleColumnFunction, validateColumnType, } from './expressionFunctionUtils';
|
|
5
|
-
import isAfter from 'date-fns
|
|
5
|
+
import { isAfter } from 'date-fns';
|
|
6
6
|
import { parseDateValue } from '../Helpers/DateHelper';
|
|
7
7
|
export const aggregatedExpressionFunctions = [
|
|
8
8
|
'SUM',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import isAfter from 'date-fns
|
|
2
|
-
import isBefore from 'date-fns
|
|
3
|
-
import isEqual from 'date-fns
|
|
1
|
+
import { isAfter } from 'date-fns';
|
|
2
|
+
import { isBefore } from 'date-fns';
|
|
3
|
+
import { isEqual } from 'date-fns';
|
|
4
4
|
import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluationError';
|
|
5
5
|
import { getStringValue, getStringValues } from './expressionFunctionUtils';
|
|
6
6
|
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluationError';
|
|
2
|
-
import parseISO from 'date-fns
|
|
3
|
-
import startOfDay from 'date-fns
|
|
4
|
-
import startOfWeek from 'date-fns
|
|
5
|
-
import startOfMonth from 'date-fns
|
|
6
|
-
import startOfYear from 'date-fns
|
|
7
|
-
import addDays from 'date-fns
|
|
8
|
-
import addWeeks from 'date-fns
|
|
9
|
-
import addMonths from 'date-fns
|
|
10
|
-
import addYears from 'date-fns
|
|
11
|
-
import differenceInDays from 'date-fns
|
|
12
|
-
import differenceInWeeks from 'date-fns
|
|
13
|
-
import differenceInMonths from 'date-fns
|
|
14
|
-
import differenceInYears from 'date-fns
|
|
2
|
+
import { parseISO } from 'date-fns';
|
|
3
|
+
import { startOfDay } from 'date-fns';
|
|
4
|
+
import { startOfWeek } from 'date-fns';
|
|
5
|
+
import { startOfMonth } from 'date-fns';
|
|
6
|
+
import { startOfYear } from 'date-fns';
|
|
7
|
+
import { addDays } from 'date-fns';
|
|
8
|
+
import { addWeeks } from 'date-fns';
|
|
9
|
+
import { addMonths } from 'date-fns';
|
|
10
|
+
import { addYears } from 'date-fns';
|
|
11
|
+
import { differenceInDays } from 'date-fns';
|
|
12
|
+
import { differenceInWeeks } from 'date-fns';
|
|
13
|
+
import { differenceInMonths } from 'date-fns';
|
|
14
|
+
import { differenceInYears } from 'date-fns';
|
|
15
15
|
import { evaluateExpressionNode, getNumericValue, isTextSearchCaseInsensitive, } from './expressionFunctionUtils';
|
|
16
16
|
import { normalizeDateParams } from './dateUtils';
|
|
17
17
|
import StringExtensions from '../Extensions/StringExtensions';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import parseISO from 'date-fns
|
|
2
|
-
import parse from 'date-fns/parse';
|
|
1
|
+
import { parseISO, parse } from 'date-fns';
|
|
3
2
|
import { DateFormatter } from './FormatHelper';
|
|
4
3
|
import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
|
|
5
4
|
export const isValidDate = (date) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// TODO inspect why the following is erroring on angular build
|
|
2
|
-
|
|
3
|
-
import dateFnsFormat from 'date-fns/format';
|
|
2
|
+
import { format as dateFnsFormat } from 'date-fns';
|
|
4
3
|
import { sentenceCase } from 'sentence-case';
|
|
5
4
|
import { DEFAULT_DATE_FORMAT_PATTERN } from '../Constants/GeneralConstants';
|
|
6
5
|
import Helper from './Helper';
|
|
@@ -8,7 +8,7 @@ import * as CommentsRedux from '../../Redux/ActionsReducers/CommentsRedux';
|
|
|
8
8
|
import { CommentsAndNotesSelector } from '../../Redux/ActionsReducers/InternalRedux';
|
|
9
9
|
import { useAdaptable } from '../AdaptableContext';
|
|
10
10
|
import AdaptableInput from '../Components/AdaptableInput';
|
|
11
|
-
import
|
|
11
|
+
import FormatHelper from '../../Utilities/Helpers/FormatHelper';
|
|
12
12
|
// Edit Mode
|
|
13
13
|
// [author] [edit, delete]
|
|
14
14
|
// [text-editor] * this is different
|
|
@@ -48,6 +48,9 @@ export const CommentsEditor = (props) => {
|
|
|
48
48
|
if (!commentThread) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
+
const formatDate = (date, format) => {
|
|
52
|
+
return FormatHelper.DateFormatter(date, { Pattern: format });
|
|
53
|
+
};
|
|
51
54
|
return (React.createElement(Panel, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup", onKeyDown: (event) => {
|
|
52
55
|
if (event.key === 'Escape') {
|
|
53
56
|
api.commentApi.hideCommentsPopup();
|
|
@@ -75,7 +78,7 @@ export const CommentsEditor = (props) => {
|
|
|
75
78
|
React.createElement(Flex, { mb: 2, alignItems: "center" },
|
|
76
79
|
React.createElement(Box, null,
|
|
77
80
|
React.createElement(Box, { "data-name": "comment-username", fontSize: 3, fontWeight: "bold" }, comment?.Author?.UserName),
|
|
78
|
-
comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 },
|
|
81
|
+
comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 }, formatDate(comment.Timestamp, api.commentApi.internalApi.getCommentsDateFormat())))),
|
|
79
82
|
React.createElement(Box, { flex: 1 }),
|
|
80
83
|
React.createElement(SimpleButton, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }),
|
|
81
84
|
React.createElement(SimpleButton, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
|
|
@@ -3,10 +3,10 @@ import { useSelector } from 'react-redux';
|
|
|
3
3
|
import { DataSource, InfiniteTable } from '../../components/InfiniteTable';
|
|
4
4
|
import Panel from '../../components/Panel';
|
|
5
5
|
import { Box, Flex } from 'rebass';
|
|
6
|
-
import dateFnsFormat from 'date-fns/format';
|
|
7
6
|
import { useAdaptable } from '../AdaptableContext';
|
|
8
7
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
9
8
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
9
|
+
import FormatHelper from '../../Utilities/Helpers/FormatHelper';
|
|
10
10
|
const tableDOMProps = {
|
|
11
11
|
style: {
|
|
12
12
|
minHeight: 160,
|
|
@@ -16,6 +16,9 @@ const tableDOMProps = {
|
|
|
16
16
|
const CellComments = (props) => {
|
|
17
17
|
const adaptable = useAdaptable();
|
|
18
18
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Comment') === 'ReadOnly';
|
|
19
|
+
const formatDate = (date, format) => {
|
|
20
|
+
return FormatHelper.DateFormatter(date, { Pattern: format });
|
|
21
|
+
};
|
|
19
22
|
const columnsMap = React.useMemo(() => {
|
|
20
23
|
const columns = {
|
|
21
24
|
author: {
|
|
@@ -27,7 +30,7 @@ const CellComments = (props) => {
|
|
|
27
30
|
field: 'Timestamp',
|
|
28
31
|
maxWidth: 150,
|
|
29
32
|
valueGetter: (params) => {
|
|
30
|
-
return
|
|
33
|
+
return formatDate(params.data.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat());
|
|
31
34
|
},
|
|
32
35
|
},
|
|
33
36
|
text: {
|
|
@@ -67,7 +67,7 @@ export const qlPredicateToString = (qlPredicate, predicateDefs) => {
|
|
|
67
67
|
return str;
|
|
68
68
|
};
|
|
69
69
|
export const isPredicateEmpty = (predicate, predicateDef) => {
|
|
70
|
-
if (!predicateDef
|
|
70
|
+
if (!predicateDef?.inputs || predicateDef.inputs.length === 0) {
|
|
71
71
|
return false;
|
|
72
72
|
}
|
|
73
73
|
return (!predicate ||
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
|
|
3
|
-
import
|
|
3
|
+
import { isEqual } from 'date-fns';
|
|
4
4
|
import { parseDateValue } from '../../../Utilities/Helpers/DateHelper';
|
|
5
5
|
import join from '../../../components/utils/join';
|
|
6
6
|
import { Select } from '../../../components/Select';
|
|
@@ -13,7 +13,7 @@ export const ColumnValuesSelect = (props) => {
|
|
|
13
13
|
let isActive = selectedColumnValues.indexOf(distinctValue.value) >= 0;
|
|
14
14
|
// special case for date objects, need to check against string values
|
|
15
15
|
if (!isActive && distinctValue.value && distinctValue.value instanceof Date) {
|
|
16
|
-
isActive = selectedColumnValues.some((dateStr) =>
|
|
16
|
+
isActive = selectedColumnValues.some((dateStr) => isEqual(parseDateValue(dateStr), parseDateValue(distinctValue.value)));
|
|
17
17
|
}
|
|
18
18
|
const columnLabel = distinctValue.label;
|
|
19
19
|
if (StringExtensions.IsNullOrEmpty(columnLabel)) {
|
|
@@ -2,11 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { DataSource, InfiniteTable } from '../../components/InfiniteTable';
|
|
4
4
|
import { GetAllNotesSelector } from '../../Redux/ActionsReducers/NoteRedux';
|
|
5
|
-
import dateFnsFormat from 'date-fns/format';
|
|
6
5
|
import { useAdaptable } from '../AdaptableContext';
|
|
7
6
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
8
7
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
9
8
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
9
|
+
import FormatHelper from '../../Utilities/Helpers/FormatHelper';
|
|
10
10
|
const tableDOMProps = {
|
|
11
11
|
style: {
|
|
12
12
|
height: '100%',
|
|
@@ -21,6 +21,9 @@ export const NotePopup = (props) => {
|
|
|
21
21
|
: StringExtensions.Humanize(adaptable.adaptableOptions.primaryKey);
|
|
22
22
|
const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
|
|
23
23
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
|
|
24
|
+
const formatDate = (date, format) => {
|
|
25
|
+
return FormatHelper.DateFormatter(date, { Pattern: format });
|
|
26
|
+
};
|
|
24
27
|
const columnsMap = React.useMemo(() => {
|
|
25
28
|
const columns = {
|
|
26
29
|
primaryKey: {
|
|
@@ -43,7 +46,7 @@ export const NotePopup = (props) => {
|
|
|
43
46
|
timestamp: {
|
|
44
47
|
field: 'Timestamp',
|
|
45
48
|
valueGetter: (params) => {
|
|
46
|
-
return
|
|
49
|
+
return formatDate(params.data.Timestamp, adaptable.api.noteApi.internalApi.getNotesDateFormat());
|
|
47
50
|
},
|
|
48
51
|
},
|
|
49
52
|
delete: {
|
|
@@ -96,6 +96,7 @@ import { isPivotLayoutModel } from '../layout-manager/src/isPivotLayoutModel';
|
|
|
96
96
|
import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
97
97
|
import { agGridDataTypeDefinitions } from './agGridDataTypeDefinitions';
|
|
98
98
|
import { AgGridThemeAdapter } from './AgGridThemeAdapter';
|
|
99
|
+
import { mapOldTypeToDataType } from '../migration/VersionUpgrade20';
|
|
99
100
|
const LocalEventService_Prototype = LocalEventService.prototype;
|
|
100
101
|
const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEvent;
|
|
101
102
|
LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
@@ -356,6 +357,7 @@ export class AdaptableAgGrid {
|
|
|
356
357
|
// AG Grid evaluates early on the floatingFilter params, so we need to "suppres" the floating filter temporarily
|
|
357
358
|
// we will reset it once Adaptable is ready
|
|
358
359
|
this.agGridColumnAdapter.setupColumnFloatingFilterTemporarily(gridOptions);
|
|
360
|
+
this.validateColumnDefTypes(gridOptions.columnDefs);
|
|
359
361
|
const agGridApi = await this.initializeAgGrid(gridOptions, config.modules, config.renderAgGridFrameworkComponent);
|
|
360
362
|
if (agGridApi === false) {
|
|
361
363
|
this.midwayDestroy();
|
|
@@ -3288,4 +3290,24 @@ You need to define at least one Layout!`);
|
|
|
3288
3290
|
this.__prevLayoutForOnChange = layout;
|
|
3289
3291
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
3290
3292
|
}
|
|
3293
|
+
validateColumnDefTypes(columnDefs) {
|
|
3294
|
+
// in Adaptable version 20 we switched from colDef.type to colDef.cellDataType
|
|
3295
|
+
// although we documented this change and try to infer the correct cellDataTypes, it's best to also check if the client dev forgot to adjust his colDefs
|
|
3296
|
+
columnDefs.forEach((colDef) => {
|
|
3297
|
+
if (colDef.children?.length) {
|
|
3298
|
+
this.validateColumnDefTypes(colDef.children);
|
|
3299
|
+
}
|
|
3300
|
+
const columnDefinition = colDef;
|
|
3301
|
+
const colDefType = columnDefinition.type;
|
|
3302
|
+
const colDefTypes = typeof colDefType === 'string' ? [colDefType] : colDefType || [];
|
|
3303
|
+
colDefTypes
|
|
3304
|
+
.filter((colType) => colType.startsWith('abColDef'))
|
|
3305
|
+
.forEach((colType) => {
|
|
3306
|
+
const newValidCellDataType = mapOldTypeToDataType(colType);
|
|
3307
|
+
if (newValidCellDataType) {
|
|
3308
|
+
this.logger.consoleWarn(`Column ${columnDefinition.colId ?? columnDefinition.field} has a type of ${colType} which is no longer in use${newValidCellDataType !== 'unknown' ? `. Please use 'colDef.cellDataType' instead: ${newValidCellDataType}` : ''}`);
|
|
3309
|
+
}
|
|
3310
|
+
});
|
|
3311
|
+
});
|
|
3312
|
+
}
|
|
3291
3313
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import parseISO from 'date-fns
|
|
2
|
+
import { parseISO } from 'date-fns';
|
|
3
3
|
import useProperty from '../../../components/utils/useProperty';
|
|
4
4
|
import AdaptableInput from '../../../View/Components/AdaptableInput';
|
|
5
5
|
import { DatepickerContext } from '../../../components/Datepicker/DatepickerContext';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BoxProps } from 'rebass';
|
|
3
3
|
import { DatepickerButton } from '../../AdaptableOptions/DateInputOptions';
|
|
4
|
+
import { Locale } from 'date-fns';
|
|
4
5
|
export type DatepickerProps = Omit<BoxProps, 'value' | 'onChange' | 'defaultValue'> & {
|
|
5
6
|
value: Date | undefined;
|
|
6
7
|
defaultValue?: Date | undefined;
|
|
@@ -9,7 +9,7 @@ import { DateFormatter } from '../../Utilities/Helpers/FormatHelper';
|
|
|
9
9
|
import { useDatepickerContext } from './DatepickerContext';
|
|
10
10
|
import { DayPicker } from 'react-day-picker';
|
|
11
11
|
import { AdaptableDateInlineInput } from '../../View/Components/AdaptableInput/AdaptableDateInlineInput';
|
|
12
|
-
import { isValid, addYears, endOfYear, startOfYear, addDays, addBusinessDays } from 'date-fns';
|
|
12
|
+
import { isValid, addYears, endOfYear, startOfYear, addDays, addBusinessDays, } from 'date-fns';
|
|
13
13
|
const DatepickerOverlay = ({ onHide, children, onKeyDown, onMouseDown, }) => {
|
|
14
14
|
const domRef = React.useRef(null);
|
|
15
15
|
return (React.createElement("div", { className: "ab-Datepicker-Overlay", ref: domRef, onKeyDown: onKeyDown, onMouseDown: onMouseDown, onBlur: (e) => {
|
|
@@ -35,7 +35,7 @@ const INFINITE_COLUMNS_WITH_CHECKBOX = {
|
|
|
35
35
|
renderHeader: (headerParams) => {
|
|
36
36
|
return (React.createElement(React.Fragment, null,
|
|
37
37
|
headerParams.renderBag.selectionCheckBox,
|
|
38
|
-
headerParams.allRowsSelected ? 'Deselect All' : 'Select All'));
|
|
38
|
+
headerParams.allRowsSelected ? '(Deselect All)' : '(Select All)'));
|
|
39
39
|
},
|
|
40
40
|
renderMenuIcon: false,
|
|
41
41
|
},
|
|
@@ -95,7 +95,7 @@ export const Select = function (props) {
|
|
|
95
95
|
};
|
|
96
96
|
const renderMultipleValues = props.renderMultipleValues;
|
|
97
97
|
const isMulti = props.isMulti ?? Array.isArray(props.value);
|
|
98
|
-
const showHeaderSelectionCheckbox = props.showHeaderSelectionCheckbox ?? false;
|
|
98
|
+
const showHeaderSelectionCheckbox = isMulti && (props.showHeaderSelectionCheckbox ?? false);
|
|
99
99
|
let selectedOption = null;
|
|
100
100
|
if (isMulti) {
|
|
101
101
|
selectedOption =
|
|
@@ -335,7 +335,7 @@ export const Select = function (props) {
|
|
|
335
335
|
zIndex: 999999,
|
|
336
336
|
boxShadow: 'var(--ab-cmp-select-menu__box-shadow)',
|
|
337
337
|
minWidth: `var(--ab-cmp-select-menu__min-width)`,
|
|
338
|
-
'--ab-cmp-select-menu__min-height': `min(${(props.options || []).length * ROW_HEIGHT}px, 20rem)`,
|
|
338
|
+
'--ab-cmp-select-menu__min-height': `min(${((props.options || []).length + (showHeaderSelectionCheckbox ? 1 : 0)) * ROW_HEIGHT}px, 20rem)`,
|
|
339
339
|
...commonStyles(state),
|
|
340
340
|
...props.menuStyle,
|
|
341
341
|
};
|
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: "20.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1741946418887 || Date.now(),
|
|
4
|
+
VERSION: "20.0.0-canary.17" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { VersionUpgrade } from './VersionUpgrade';
|
|
2
2
|
import { AdaptableState } from '../PredefinedConfig/AdaptableState';
|
|
3
|
+
import { AdaptableColumnDataType } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
export declare function mapOldTypeToDataType(previousType: string): AdaptableColumnDataType;
|
|
3
5
|
export declare class VersionUpgrade20 extends VersionUpgrade {
|
|
4
6
|
migrateState(state: AdaptableState): AdaptableState;
|
|
5
7
|
private migrateLayoutState;
|
|
@@ -2,21 +2,13 @@ import { VersionUpgrade } from './VersionUpgrade';
|
|
|
2
2
|
import { ALL_ADAPTABLE_DATA_TYPES } from '../agGrid/agGridDataTypeDefinitions';
|
|
3
3
|
function transition_pre_20(layout) {
|
|
4
4
|
const l = layout;
|
|
5
|
-
if (l.
|
|
6
|
-
const oldAggs = l.AggregationColumns || {};
|
|
7
|
-
const newAggs = Object.entries(oldAggs).map(([colId, aggFunc]) => ({
|
|
8
|
-
ColumnId: colId,
|
|
9
|
-
AggFunc: aggFunc,
|
|
10
|
-
}));
|
|
11
|
-
layout.TableAggregationColumns = newAggs;
|
|
12
|
-
}
|
|
13
|
-
if (l.Columns) {
|
|
5
|
+
if (l.Columns && !l.EnablePivot) {
|
|
14
6
|
layout.TableColumns = l.Columns;
|
|
15
7
|
delete l.Columns;
|
|
16
8
|
delete layout.PivotColumns;
|
|
17
9
|
}
|
|
18
10
|
if (l.PinnedColumnsMap) {
|
|
19
|
-
layout.ColumnPinning = l.PinnedColumnsMap;
|
|
11
|
+
layout.ColumnPinning = { ...l.PinnedColumnsMap };
|
|
20
12
|
delete l.PinnedColumnsMap;
|
|
21
13
|
}
|
|
22
14
|
if (l.ColumnHeadersMap) {
|
|
@@ -29,11 +21,42 @@ function transition_pre_20(layout) {
|
|
|
29
21
|
}
|
|
30
22
|
if (l.EnablePivot) {
|
|
31
23
|
layout.PivotColumns = l.PivotColumns || [];
|
|
24
|
+
delete l.Columns;
|
|
32
25
|
delete layout.TableColumns;
|
|
26
|
+
delete l.EnablePivot;
|
|
33
27
|
if (l.AggregationColumns) {
|
|
34
|
-
layout.PivotAggregationColumns =
|
|
28
|
+
layout.PivotAggregationColumns = (Object.entries(l.AggregationColumns) || []).map(([ColumnId, AggFunc]) => {
|
|
29
|
+
return {
|
|
30
|
+
ColumnId,
|
|
31
|
+
AggFunc,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
delete layout.TableAggregationColumns;
|
|
35
|
+
delete l.AggregationColumns;
|
|
36
|
+
}
|
|
37
|
+
if (l.RowGroupedColumns) {
|
|
38
|
+
layout.PivotGroupedColumns = l.RowGroupedColumns;
|
|
39
|
+
delete l.RowGroupedColumns;
|
|
35
40
|
}
|
|
36
41
|
}
|
|
42
|
+
else {
|
|
43
|
+
if (l.AggregationColumns && !Array.isArray(l.AggregationColumns)) {
|
|
44
|
+
const oldAggs = l.AggregationColumns || {};
|
|
45
|
+
const newAggs = Object.entries(oldAggs).map(([ColumnId, AggFunc]) => ({
|
|
46
|
+
ColumnId,
|
|
47
|
+
AggFunc,
|
|
48
|
+
}));
|
|
49
|
+
layout.TableAggregationColumns = newAggs;
|
|
50
|
+
delete l.AggregationColumns;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (l.ExpandedRowGroupValues) {
|
|
54
|
+
layout.RowGroupValues = {
|
|
55
|
+
RowGroupDefaultBehavior: 'collapsed',
|
|
56
|
+
ExceptionGroupKeys: l.ExpandedRowGroupValues,
|
|
57
|
+
};
|
|
58
|
+
delete l.ExpandedRowGroupValues;
|
|
59
|
+
}
|
|
37
60
|
if (Array.isArray(l.ColumnFilters)) {
|
|
38
61
|
layout.ColumnFilters = l.ColumnFilters.map((columnFilter) => {
|
|
39
62
|
const filter = {
|
|
@@ -73,7 +96,7 @@ function transition_pre_20(layout) {
|
|
|
73
96
|
function hasUpToDateDataType(dataType) {
|
|
74
97
|
return ALL_ADAPTABLE_DATA_TYPES.includes(dataType);
|
|
75
98
|
}
|
|
76
|
-
function mapOldTypeToDataType(previousType) {
|
|
99
|
+
export function mapOldTypeToDataType(previousType) {
|
|
77
100
|
if (ALL_ADAPTABLE_DATA_TYPES.includes(previousType)) {
|
|
78
101
|
return previousType;
|
|
79
102
|
}
|