@adaptabletools/adaptable 18.0.0-canary.12 → 18.0.0-canary.13
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 -1
- package/base.css.map +1 -1
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -53
- package/src/AdaptableOptions/MenuOptions.js +3 -3
- package/src/Api/AdaptableApi.d.ts +2 -2
- package/src/Api/ConfigApi.d.ts +2 -3
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
- package/src/Api/Implementation/ConfigApiImpl.js +7 -7
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
- package/src/Api/Implementation/GridApiImpl.js +8 -1
- package/src/Api/Implementation/NoteApiImpl.d.ts +2 -2
- package/src/Api/Implementation/NoteApiImpl.js +8 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -2
- package/src/Api/Internal/AdaptableInternalApi.js +11 -11
- package/src/Api/Internal/CalculatedColumnInternalApi.js +3 -2
- package/src/Api/Internal/Fdc3InternalApi.js +2 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.js +3 -2
- package/src/Api/Internal/GridInternalApi.d.ts +2 -0
- package/src/Api/Internal/GridInternalApi.js +15 -0
- package/src/Api/NoteApi.d.ts +5 -5
- package/src/Api/OptionsApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +0 -11
- package/src/PredefinedConfig/AdaptableState.d.ts +1 -1
- package/src/PredefinedConfig/CommentState.d.ts +16 -12
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +6 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +1 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/NoteState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +20 -20
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.js +7 -7
- package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +1 -5
- package/src/Strategy/{CommentsModule.js → CommentModule.js} +5 -6
- package/src/Strategy/LayoutModule.d.ts +1 -0
- package/src/Strategy/LayoutModule.js +17 -1
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
- package/src/Strategy/{NotesModule.js → NoteModule.js} +7 -3
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +6 -6
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +10 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +4 -24
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
- package/src/Utilities/Services/CellPopupService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +4 -0
- package/src/Utilities/Services/QueryLanguageService.js +2 -2
- package/src/Utilities/Services/SummaryService.d.ts +1 -1
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +14 -0
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Comments/CommentsPopup.js +8 -4
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +5 -5
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/Layout/TransposedPopup.js +19 -18
- package/src/View/Layout/Wizard/LayoutWizard.js +8 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +140 -0
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +3 -3
- package/src/agGrid/AdaptableAgGrid.js +4 -4
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +5 -0
- package/src/agGrid/AgGridColumnAdapter.js +3 -3
- package/src/agGrid/defaultAdaptableOptions.js +0 -7
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -14
- package/src/components/icons/note.js +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +36 -11
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/parser.js +117 -1257
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
- package/src/parser/src/types.d.ts +2 -2
- package/src/types.d.ts +1 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- /package/src/Api/Internal/{NotesInternalApi.d.ts → NoteInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Box, Flex } from 'rebass';
|
|
3
|
+
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
4
|
+
import Panel from '../../../../components/Panel';
|
|
5
|
+
import { Select } from '../../../../components/Select';
|
|
6
|
+
import SimpleButton from '../../../../components/SimpleButton';
|
|
7
|
+
import { Tabs } from '../../../../components/Tabs';
|
|
8
|
+
import { Tag } from '../../../../components/Tag';
|
|
9
|
+
import { mapColumnDataTypeToExpressionFunctionType } from '../../../../Utilities/adaptableQlUtils';
|
|
10
|
+
import { LayoutModuleId } from '../../../../Utilities/Constants/ModuleConstants';
|
|
11
|
+
import { summarySupportedExpressions } from '../../../../Utilities/Services/SummaryService';
|
|
12
|
+
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
13
|
+
import { useAdaptable } from '../../../AdaptableContext';
|
|
14
|
+
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
15
|
+
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
16
|
+
import { columnFilter } from './Utilities';
|
|
17
|
+
const getAvailableExpressionsForColumnType = (columnType, availableScalarExpressions) => {
|
|
18
|
+
const inputType = mapColumnDataTypeToExpressionFunctionType(columnType);
|
|
19
|
+
return Object.entries(availableScalarExpressions !== null && availableScalarExpressions !== void 0 ? availableScalarExpressions : {})
|
|
20
|
+
.map(([expression, expressionDef]) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
let firstArg = null;
|
|
23
|
+
if (!summarySupportedExpressions.includes(expression)) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray((_a = expressionDef === null || expressionDef === void 0 ? void 0 : expressionDef.inputs) === null || _a === void 0 ? void 0 : _a[0])) {
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
firstArg = (_b = expressionDef.inputs.find((input) => input.includes(inputType))) === null || _b === void 0 ? void 0 : _b[0];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
firstArg = expressionDef.inputs[0];
|
|
32
|
+
}
|
|
33
|
+
if (inputType === firstArg) {
|
|
34
|
+
return expression;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
.filter(Boolean);
|
|
41
|
+
};
|
|
42
|
+
export const RowGroupingSectionSummary = () => {
|
|
43
|
+
var _a;
|
|
44
|
+
const adaptable = useAdaptable();
|
|
45
|
+
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
46
|
+
return (React.createElement(Box, null, ((_a = layout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) ? (layout.RowGroupedColumns.map((columnId) => (React.createElement(Tag, { mr: 1, key: columnId }, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))))) : (React.createElement(Tag, null, "No Row Grouping"))));
|
|
47
|
+
};
|
|
48
|
+
const RowSummaryEditor = ({ rowSummary, onChange, availableScalarExpressions, onDelete, }) => {
|
|
49
|
+
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
50
|
+
const adaptable = useAdaptable();
|
|
51
|
+
const columns = React.useMemo(() => {
|
|
52
|
+
const colIds = adaptable.api.columnApi
|
|
53
|
+
.getColumns()
|
|
54
|
+
.filter((column) => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
if (!['Number', 'String'].includes(column.dataType))
|
|
57
|
+
return false;
|
|
58
|
+
return (_b = (_a = layout.Columns) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, column.columnId);
|
|
59
|
+
})
|
|
60
|
+
.map((c) => c.columnId);
|
|
61
|
+
return sortWithOrderArray(colIds, Object.keys(rowSummary.ColumnsMap), {
|
|
62
|
+
sortUnorderedItems: false,
|
|
63
|
+
}).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
64
|
+
}, [rowSummary.ColumnsMap]);
|
|
65
|
+
return (React.createElement(Panel, { header: React.createElement(Flex, { style: { width: '100%' } },
|
|
66
|
+
React.createElement(Flex, { flex: 1, alignItems: "center" }, "Row Summary"),
|
|
67
|
+
React.createElement(SimpleButton, { icon: "delete", onClick: () => {
|
|
68
|
+
onDelete();
|
|
69
|
+
} })), p: 2 },
|
|
70
|
+
React.createElement(FormLayout, null,
|
|
71
|
+
React.createElement(FormRow, { label: "Position" },
|
|
72
|
+
React.createElement(Select, { options: [
|
|
73
|
+
{
|
|
74
|
+
label: 'Top',
|
|
75
|
+
value: 'Top',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: 'Bottom',
|
|
79
|
+
value: 'Bottom',
|
|
80
|
+
},
|
|
81
|
+
], value: rowSummary.Position, onChange: (position) => {
|
|
82
|
+
onChange(Object.assign(Object.assign({}, rowSummary), { Position: position }));
|
|
83
|
+
} }))),
|
|
84
|
+
React.createElement(Flex, { flexDirection: 'column', mt: 2, mb: 1 },
|
|
85
|
+
React.createElement(Flex, { alignItems: "center", flex: 1, mb: 2 }, "Column Aggregations"),
|
|
86
|
+
React.createElement(Panel, { bodyProps: { maxHeight: '100%' }, style: { height: 360 } },
|
|
87
|
+
React.createElement(ValueSelector, { style: { maxHeight: '100%' }, showFilterInput: true, filter: columnFilter, toIdentifier: (column) => column.columnId, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, options: columns, xSelectedLabel: () => {
|
|
88
|
+
return 'Active Aggregations:';
|
|
89
|
+
}, toListLabel: (column) => {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const label = (_a = column.friendlyName) !== null && _a !== void 0 ? _a : column.columnId;
|
|
92
|
+
if (!(column.columnId in ((_b = rowSummary.ColumnsMap) !== null && _b !== void 0 ? _b : {}))) {
|
|
93
|
+
return label;
|
|
94
|
+
}
|
|
95
|
+
const expressionOptions = getAvailableExpressionsForColumnType(column.dataType, availableScalarExpressions).map((expression) => ({
|
|
96
|
+
label: expression,
|
|
97
|
+
value: expression,
|
|
98
|
+
}));
|
|
99
|
+
const expression = rowSummary.ColumnsMap[column.columnId];
|
|
100
|
+
return (React.createElement(Flex, null,
|
|
101
|
+
React.createElement(Flex, { mr: 2, alignItems: 'center' }, label),
|
|
102
|
+
React.createElement(Select, { value: expression, options: expressionOptions, onChange: (expression) => {
|
|
103
|
+
onChange(Object.assign(Object.assign({}, rowSummary), { ColumnsMap: Object.assign(Object.assign({}, rowSummary.ColumnsMap), { [column.columnId]: expression }) }));
|
|
104
|
+
} })));
|
|
105
|
+
}, value: Object.keys(rowSummary.ColumnsMap), onChange: (colIds) => {
|
|
106
|
+
const newColumnsMap = {};
|
|
107
|
+
colIds.forEach((colId) => {
|
|
108
|
+
var _a;
|
|
109
|
+
newColumnsMap[colId] = (_a = rowSummary.ColumnsMap[colId]) !== null && _a !== void 0 ? _a : null;
|
|
110
|
+
});
|
|
111
|
+
onChange(Object.assign(Object.assign({}, rowSummary), { ColumnsMap: newColumnsMap }));
|
|
112
|
+
} })))));
|
|
113
|
+
};
|
|
114
|
+
export const RowSummarySection = (props) => {
|
|
115
|
+
const adaptable = useAdaptable();
|
|
116
|
+
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
117
|
+
const availableScalarExpressions = React.useMemo(() => {
|
|
118
|
+
return adaptable.api.internalApi
|
|
119
|
+
.getQueryLanguageService()
|
|
120
|
+
.getModuleExpressionFunctionsMap(LayoutModuleId).aggregatedScalarFunctions;
|
|
121
|
+
}, []);
|
|
122
|
+
return (React.createElement(Tabs, { style: { height: '100%' } },
|
|
123
|
+
React.createElement(Tabs.Tab, null, "Row Summaries"),
|
|
124
|
+
React.createElement(Tabs.Content, null,
|
|
125
|
+
React.createElement("div", null,
|
|
126
|
+
React.createElement(Flex, { mb: 1 },
|
|
127
|
+
React.createElement(Flex, { flex: 1 }),
|
|
128
|
+
React.createElement(SimpleButton, { icon: "plus" }, "Add Row Summary")),
|
|
129
|
+
layout.RowSummaries.map((rowSummary, index) => {
|
|
130
|
+
return (React.createElement(RowSummaryEditor, { key: index, onDelete: () => {
|
|
131
|
+
const newSummaries = [...layout.RowSummaries];
|
|
132
|
+
newSummaries.splice(index, 1);
|
|
133
|
+
props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: newSummaries }));
|
|
134
|
+
}, availableScalarExpressions: availableScalarExpressions, rowSummary: rowSummary, onChange: (rowSummary) => {
|
|
135
|
+
const newSummaries = [...layout.RowSummaries];
|
|
136
|
+
newSummaries[index] = rowSummary;
|
|
137
|
+
props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: newSummaries }));
|
|
138
|
+
} }));
|
|
139
|
+
})))));
|
|
140
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { DataSource, InfiniteTable } from '../../components/InfiniteTable';
|
|
4
|
-
import { GetAllNotesSelector } from '../../Redux/ActionsReducers/
|
|
4
|
+
import { GetAllNotesSelector } from '../../Redux/ActionsReducers/NoteRedux';
|
|
5
5
|
import { useAdaptable } from '../AdaptableContext';
|
|
6
6
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
7
7
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
@@ -12,10 +12,10 @@ const tableDOMProps = {
|
|
|
12
12
|
// minHeight: 600,
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
|
-
export const
|
|
15
|
+
export const NotePopup = (props) => {
|
|
16
16
|
const adaptable = useAdaptable();
|
|
17
17
|
const primaryKeyHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId);
|
|
18
|
-
const allNotes = useSelector((state) => GetAllNotesSelector(state.
|
|
18
|
+
const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
|
|
19
19
|
const columnsMap = React.useMemo(() => {
|
|
20
20
|
const columns = {
|
|
21
21
|
primaryKey: {
|
|
@@ -59,12 +59,12 @@ import { ColumnInfoModule } from '../Strategy/ColumnInfoModule';
|
|
|
59
59
|
import { SettingsPanelModule } from '../Strategy/SettingsPanelModule';
|
|
60
60
|
import { StatusBarModule } from '../Strategy/StatusBarModule';
|
|
61
61
|
import { ChartingModule } from '../Strategy/ChartingModule';
|
|
62
|
-
import {
|
|
62
|
+
import { NoteModule } from '../Strategy/NoteModule';
|
|
63
63
|
import { StyledColumnModule } from '../Strategy/StyledColumnModule';
|
|
64
64
|
import { Fdc3Module } from '../Strategy/Fdc3Module';
|
|
65
65
|
import { GridFilterModule } from '../Strategy/GridFilterModule';
|
|
66
66
|
import { NamedQueryModule } from '../Strategy/NamedQueryModule';
|
|
67
|
-
import {
|
|
67
|
+
import { CommentModule } from '../Strategy/CommentModule';
|
|
68
68
|
import { AdaptableNumberEditor, ReactAdaptableNumberEditor } from './editors/AdaptableNumberEditor';
|
|
69
69
|
import { AdaptableDateEditor, ReactAdaptableDateEditor } from './editors/AdaptableDateEditor';
|
|
70
70
|
import { Helper } from '../Utilities/Helpers/Helper';
|
|
@@ -1581,7 +1581,7 @@ export class AdaptableAgGrid {
|
|
|
1581
1581
|
modules.set(ModuleConstants.ChartingModuleId, new ChartingModule(this.api));
|
|
1582
1582
|
modules.set(ModuleConstants.ColumnFilterModuleId, new ColumnFilterModule(this.api));
|
|
1583
1583
|
modules.set(ModuleConstants.ColumnInfoModuleId, new ColumnInfoModule(this.api));
|
|
1584
|
-
modules.set(ModuleConstants.
|
|
1584
|
+
modules.set(ModuleConstants.CommentModuleId, new CommentModule(this.api));
|
|
1585
1585
|
modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule(this.api));
|
|
1586
1586
|
modules.set(ModuleConstants.DashboardModuleId, new DashboardModule(this.api));
|
|
1587
1587
|
modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule(this.api));
|
|
@@ -1596,7 +1596,7 @@ export class AdaptableAgGrid {
|
|
|
1596
1596
|
modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule(this.api));
|
|
1597
1597
|
modules.set(ModuleConstants.LayoutModuleId, new LayoutModule(this.api));
|
|
1598
1598
|
modules.set(ModuleConstants.NamedQueryModuleId, new NamedQueryModule(this.api));
|
|
1599
|
-
modules.set(ModuleConstants.
|
|
1599
|
+
modules.set(ModuleConstants.NoteModuleId, new NoteModule(this.api));
|
|
1600
1600
|
modules.set(ModuleConstants.PlusMinusModuleId, new PlusMinusModule(this.api));
|
|
1601
1601
|
modules.set(ModuleConstants.QuickSearchModuleId, new QuickSearchModule(this.api));
|
|
1602
1602
|
modules.set(ModuleConstants.ScheduleModuleId, new ScheduleModule(this.api));
|
|
@@ -577,4 +577,9 @@ export class AgGridAdapter {
|
|
|
577
577
|
};
|
|
578
578
|
colDefs.forEach((colDef) => assignColId(colDef));
|
|
579
579
|
}
|
|
580
|
+
getDefaultColumnDefinition() {
|
|
581
|
+
var _a, _b;
|
|
582
|
+
// for early init phase, gridApi might not be ready yet
|
|
583
|
+
return (_b = (_a = this.getAgGridApi(true)) === null || _a === void 0 ? void 0 : _a.getGridOption('defaultColDef')) !== null && _b !== void 0 ? _b : {};
|
|
584
|
+
}
|
|
580
585
|
}
|
|
@@ -603,7 +603,7 @@ export class AgGridColumnAdapter {
|
|
|
603
603
|
: undefined;
|
|
604
604
|
}
|
|
605
605
|
getNoteCellClassName(gridCell, params) {
|
|
606
|
-
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('
|
|
606
|
+
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Note')) {
|
|
607
607
|
return;
|
|
608
608
|
}
|
|
609
609
|
if (!this.adaptableApi.noteApi.internalApi.areNotesAvailable()) {
|
|
@@ -613,14 +613,14 @@ export class AgGridColumnAdapter {
|
|
|
613
613
|
PrimaryKeyValue: gridCell.primaryKeyValue,
|
|
614
614
|
ColumnId: gridCell.column.columnId,
|
|
615
615
|
};
|
|
616
|
-
const cellNotes = this.adaptableApi.noteApi.
|
|
616
|
+
const cellNotes = this.adaptableApi.noteApi.getNotesForCell(cellPosition);
|
|
617
617
|
if (!(cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length)) {
|
|
618
618
|
return undefined;
|
|
619
619
|
}
|
|
620
620
|
return 'ab-Cell-Note';
|
|
621
621
|
}
|
|
622
622
|
getCommentCellClassName(gridCell, params) {
|
|
623
|
-
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('
|
|
623
|
+
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Comment')) {
|
|
624
624
|
return;
|
|
625
625
|
}
|
|
626
626
|
if (!this.adaptableApi.commentApi.internalApi.areCommentsAvailable()) {
|
|
@@ -170,13 +170,6 @@ const DefaultAdaptableOptions = {
|
|
|
170
170
|
menuOptions: {
|
|
171
171
|
customColumnMenu: undefined,
|
|
172
172
|
customContextMenu: undefined,
|
|
173
|
-
showAdaptableContextMenu: true,
|
|
174
|
-
showAdaptableColumnMenu: true,
|
|
175
|
-
showUngroupColumnMenuItem: true,
|
|
176
|
-
columnMenuOrder: ['aggrid', 'adaptable', 'user'],
|
|
177
|
-
contextMenuOrder: ['aggrid', 'adaptable', 'user'],
|
|
178
|
-
columnMenuItems: undefined,
|
|
179
|
-
contextMenuItems: undefined,
|
|
180
173
|
},
|
|
181
174
|
columnFilterOptions: {
|
|
182
175
|
quickFilterOptions: {
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Draggable, Droppable } from 'react-beautiful-dnd';
|
|
3
3
|
import { Box, Flex } from 'rebass';
|
|
4
4
|
import { isQlLogicalOperator } from '../../../parser/src/predicate';
|
|
5
|
+
import { mapColumnDataTypeToExpressionFunctionType } from '../../../Utilities/adaptableQlUtils';
|
|
5
6
|
import { booleanExpressionFunctions } from '../../../Utilities/ExpressionFunctions/booleanExpressionFunctions';
|
|
6
7
|
import { useAdaptable } from '../../../View/AdaptableContext';
|
|
7
8
|
import DropdownButton from '../../DropdownButton';
|
|
@@ -9,7 +10,7 @@ import ErrorBox from '../../ErrorBox';
|
|
|
9
10
|
import { Icon } from '../../icons';
|
|
10
11
|
import SimpleButton from '../../SimpleButton';
|
|
11
12
|
import { CombinatorSelector, ExpressionSelector, PrimiteValueInput, PrimitiveColumnSelector, PrimitiveMultiValueInput, } from './QueryBuilderInputs';
|
|
12
|
-
import { getOperatorMatchingInputs as getFunctionMatchingInputTypes
|
|
13
|
+
import { getOperatorMatchingInputs as getFunctionMatchingInputTypes } from './utils';
|
|
13
14
|
const ITEM_HEIGHT = 40;
|
|
14
15
|
const BASE_CLASS_NAME = 'ab-QueryBuilder-predicate-editor';
|
|
15
16
|
const Handle = (props) => (React.createElement(Flex, Object.assign({ className: `${BASE_CLASS_NAME}__handle`, height: ITEM_HEIGHT, alignItems: "center", mr: 1 }, props),
|
|
@@ -2,7 +2,6 @@ import { QlPredicate, QlPredicateError } from '../../../parser/src/predicate';
|
|
|
2
2
|
import { ExpressionFunctionInputType } from '../../../parser/src/types';
|
|
3
3
|
import { AdaptableColumnDataType, BooleanFunctionName } from '../../../types';
|
|
4
4
|
export declare const reorder: (predicate: QlPredicate, from: string, to: string) => any;
|
|
5
|
-
export declare const mapColumnDataTypeToExpressionFunctionType: (dataType: AdaptableColumnDataType) => ExpressionFunctionInputType;
|
|
6
5
|
export declare const mapExpressionFunctionTypeToColumnDataType: (type: ExpressionFunctionInputType) => AdaptableColumnDataType;
|
|
7
6
|
export declare const getOperatorMatchingInputs: (columnType: ExpressionFunctionInputType, inputs: ExpressionFunctionInputType[] | Array<ExpressionFunctionInputType>[]) => ExpressionFunctionInputType[];
|
|
8
7
|
export declare const getFunctionsForColumnType: (dataType: AdaptableColumnDataType, availableBooleanFunctions: BooleanFunctionName[]) => BooleanFunctionName[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mapColumnDataTypeToExpressionFunctionType } from '../../../Utilities/adaptableQlUtils';
|
|
1
2
|
import { isQlLogicalOperator } from '../../../parser/src/predicate';
|
|
2
3
|
import { booleanExpressionFunctions } from '../../../Utilities/ExpressionFunctions/booleanExpressionFunctions';
|
|
3
4
|
import { deepClone } from '../../../Utilities/Extensions/ObjectExtensions';
|
|
@@ -26,20 +27,6 @@ export const reorder = (predicate, from, to) => {
|
|
|
26
27
|
parent.args.splice(parseInt(toPath[toPath.length - 1]), 0, itemToMove);
|
|
27
28
|
return predicateCopy;
|
|
28
29
|
};
|
|
29
|
-
export const mapColumnDataTypeToExpressionFunctionType = (dataType) => {
|
|
30
|
-
if (dataType === 'Number') {
|
|
31
|
-
return 'number';
|
|
32
|
-
}
|
|
33
|
-
if (dataType === 'Boolean') {
|
|
34
|
-
return 'boolean';
|
|
35
|
-
}
|
|
36
|
-
if (dataType === 'String') {
|
|
37
|
-
return 'text';
|
|
38
|
-
}
|
|
39
|
-
if (dataType === 'Date') {
|
|
40
|
-
return 'date';
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
30
|
export const mapExpressionFunctionTypeToColumnDataType = (type) => {
|
|
44
31
|
if (type === 'number') {
|
|
45
32
|
return 'Number';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import DefaultIcon from './DefaultIcon';
|
|
3
|
-
export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props
|
|
4
|
-
React.createElement("path", { d: "
|
|
3
|
+
export default (props) => (React.createElement(DefaultIcon, Object.assign({}, props),
|
|
4
|
+
React.createElement("path", { d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z" })));
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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: "18.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1711118620968 || Date.now(),
|
|
4
|
+
VERSION: "18.0.0-canary.13" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -382,11 +382,19 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
382
382
|
kind: string;
|
|
383
383
|
desc: string;
|
|
384
384
|
isOpt: boolean;
|
|
385
|
+
ref?: undefined;
|
|
385
386
|
} | {
|
|
386
387
|
name: string;
|
|
387
388
|
kind: string;
|
|
388
389
|
desc: string;
|
|
389
390
|
isOpt?: undefined;
|
|
391
|
+
ref?: undefined;
|
|
392
|
+
} | {
|
|
393
|
+
name: string;
|
|
394
|
+
kind: string;
|
|
395
|
+
desc: string;
|
|
396
|
+
isOpt: boolean;
|
|
397
|
+
ref: string;
|
|
390
398
|
})[];
|
|
391
399
|
};
|
|
392
400
|
AdaptableComparerFunction: {
|
|
@@ -1973,6 +1981,24 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1973
1981
|
isOpt: boolean;
|
|
1974
1982
|
}[];
|
|
1975
1983
|
};
|
|
1984
|
+
CommentThread: {
|
|
1985
|
+
name: string;
|
|
1986
|
+
kind: string;
|
|
1987
|
+
desc: string;
|
|
1988
|
+
props: ({
|
|
1989
|
+
name: string;
|
|
1990
|
+
kind: string;
|
|
1991
|
+
desc: string;
|
|
1992
|
+
isOpt?: undefined;
|
|
1993
|
+
ref?: undefined;
|
|
1994
|
+
} | {
|
|
1995
|
+
name: string;
|
|
1996
|
+
kind: string;
|
|
1997
|
+
desc: string;
|
|
1998
|
+
isOpt: boolean;
|
|
1999
|
+
ref: string;
|
|
2000
|
+
})[];
|
|
2001
|
+
};
|
|
1976
2002
|
CompatibleContext: {
|
|
1977
2003
|
name: string;
|
|
1978
2004
|
kind: string;
|
|
@@ -2894,10 +2920,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2894
2920
|
kind: string;
|
|
2895
2921
|
desc: string;
|
|
2896
2922
|
isOpt: boolean;
|
|
2923
|
+
ref?: undefined;
|
|
2924
|
+
} | {
|
|
2925
|
+
name: string;
|
|
2926
|
+
kind: string;
|
|
2927
|
+
desc: string;
|
|
2928
|
+
isOpt?: undefined;
|
|
2929
|
+
ref?: undefined;
|
|
2897
2930
|
} | {
|
|
2898
2931
|
name: string;
|
|
2899
2932
|
kind: string;
|
|
2900
2933
|
desc: string;
|
|
2934
|
+
ref: string;
|
|
2901
2935
|
isOpt?: undefined;
|
|
2902
2936
|
})[];
|
|
2903
2937
|
};
|
|
@@ -3915,21 +3949,12 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3915
3949
|
name: string;
|
|
3916
3950
|
kind: string;
|
|
3917
3951
|
desc: string;
|
|
3918
|
-
props:
|
|
3919
|
-
name: string;
|
|
3920
|
-
kind: string;
|
|
3921
|
-
desc: string;
|
|
3922
|
-
isOpt: boolean;
|
|
3923
|
-
gridInfo?: undefined;
|
|
3924
|
-
defVal?: undefined;
|
|
3925
|
-
} | {
|
|
3952
|
+
props: {
|
|
3926
3953
|
name: string;
|
|
3927
3954
|
kind: string;
|
|
3928
3955
|
desc: string;
|
|
3929
3956
|
isOpt: boolean;
|
|
3930
|
-
|
|
3931
|
-
defVal: string;
|
|
3932
|
-
})[];
|
|
3957
|
+
}[];
|
|
3933
3958
|
};
|
|
3934
3959
|
MenuOrderContext: {
|
|
3935
3960
|
name: string;
|