@adaptabletools/adaptable 18.0.0-canary.7 → 18.0.0-canary.9
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 -2
- package/base.css.map +1 -1
- package/index.css +9 -2
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
- package/src/Api/ConfigApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.js +5 -0
- package/src/Api/Implementation/ConfigApiImpl.js +6 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +13 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -4
- package/src/Api/Implementation/LayoutApiImpl.js +15 -14
- package/src/Api/Implementation/NotesApiImpl.d.ts +4 -0
- package/src/Api/Implementation/NotesApiImpl.js +5 -0
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +13 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.js +1 -1
- package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
- package/src/Api/Internal/NotesInternalApi.js +13 -0
- package/src/Api/LayoutApi.d.ts +11 -8
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
- package/src/PredefinedConfig/Common/RowSummary.js +1 -0
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/SystemState.d.ts +7 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
- package/src/Redux/Store/AdaptableStore.js +11 -0
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +1 -0
- package/src/Strategy/CellSummaryModule.js +50 -21
- package/src/Strategy/CommentsModule.js +3 -0
- package/src/Strategy/LayoutModule.d.ts +7 -0
- package/src/Strategy/LayoutModule.js +102 -3
- package/src/Strategy/NotesModule.js +3 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/ObjectFactory.js +6 -6
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +11 -8
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.js +10 -5
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -1
- package/src/Utilities/Services/SummaryService.d.ts +19 -0
- package/src/Utilities/Services/SummaryService.js +29 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/NewScopeComponent.js +32 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +7 -7
- package/src/View/Layout/TransposedPopup.js +7 -6
- package/src/agGrid/ActionColumnRenderer.js +3 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +16 -2
- package/src/agGrid/AdaptableAgGrid.js +201 -91
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +8 -0
- package/src/agGrid/AgGridColumnAdapter.js +14 -3
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +8 -0
- package/src/metamodel/adaptable.metamodel.js +18 -0
- package/src/parser/src/types.d.ts +5 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
|
-
import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
|
|
4
|
-
export interface ScopeComponentProps extends React.ClassAttributes<ScopeComponent> {
|
|
5
|
-
api: AdaptableApi;
|
|
6
|
-
scope: AdaptableScope;
|
|
7
|
-
updateScope: (scope: AdaptableScope) => void;
|
|
8
|
-
displayMessage?: string;
|
|
9
|
-
availableDataTypes?: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface ScopeComponentState {
|
|
12
|
-
ScopeChoice: 'All' | 'Column' | 'DataType';
|
|
13
|
-
componentScope: AdaptableScope;
|
|
14
|
-
selectedColumnValues: string[] | undefined;
|
|
15
|
-
availableDataTypes?: string[];
|
|
16
|
-
}
|
|
17
|
-
export declare class ScopeComponent extends React.Component<ScopeComponentProps, ScopeComponentState> {
|
|
18
|
-
constructor(props: ScopeComponentProps);
|
|
19
|
-
render(): JSX.Element;
|
|
20
|
-
private setScopeChoice;
|
|
21
|
-
private onScopeSelectChanged;
|
|
22
|
-
private onColumnsSelectedChanged;
|
|
23
|
-
private onCheckBoxDataTypeChecked;
|
|
24
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Flex, Box } from 'rebass';
|
|
3
|
-
import Panel from '../../components/Panel';
|
|
4
|
-
import HelpBlock from '../../components/HelpBlock';
|
|
5
|
-
import Radio from '../../components/Radio';
|
|
6
|
-
import { DualListBoxEditor } from './ListBox/DualListBoxEditor';
|
|
7
|
-
import { CheckBox } from '../../components/CheckBox';
|
|
8
|
-
export class ScopeComponent extends React.Component {
|
|
9
|
-
constructor(props) {
|
|
10
|
-
super(props);
|
|
11
|
-
this.state = {
|
|
12
|
-
ScopeChoice: this.setScopeChoice(this.props.scope),
|
|
13
|
-
componentScope: this.props.scope,
|
|
14
|
-
selectedColumnValues: this.props.api.columnApi.getFriendlyNamesForColumnIds(this.props.api.scopeApi.getColumnIdsInScope(this.props.scope)),
|
|
15
|
-
availableDataTypes: this.props.availableDataTypes
|
|
16
|
-
? this.props.availableDataTypes
|
|
17
|
-
: ['Date', 'Number', 'String', 'Boolean'],
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
let availableValues = this.props.api.columnApi.internalApi.getAllColumnFriendlyNames();
|
|
22
|
-
let displayMessage = this.props.displayMessage
|
|
23
|
-
? this.props.displayMessage
|
|
24
|
-
: 'Apply Scope for: Row, or one or more Columns, or one or more Data Types';
|
|
25
|
-
return (React.createElement("div", { "data-name": 'scope-component' },
|
|
26
|
-
React.createElement(Panel, { header: "Scope", margin: 2, className: "ab-ScopeComponent" },
|
|
27
|
-
React.createElement(Flex, { flexDirection: "column", "data-name": "scope-block" },
|
|
28
|
-
React.createElement(HelpBlock, { marginBottom: 1 }, displayMessage),
|
|
29
|
-
' ',
|
|
30
|
-
React.createElement(Flex, { flexDirection: "row", alignItems: "center", padding: 2 },
|
|
31
|
-
React.createElement(Radio, { value: "Row", checked: this.state.ScopeChoice == 'All', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "All Columns"),
|
|
32
|
-
' ',
|
|
33
|
-
React.createElement(Radio, { marginLeft: 3, value: "Column", checked: this.state.ScopeChoice == 'Column', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "Selected Column(s)"),
|
|
34
|
-
' ',
|
|
35
|
-
React.createElement(Radio, { marginLeft: 3, value: "DataType", checked: this.state.ScopeChoice == 'DataType', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "DataType(s)")),
|
|
36
|
-
this.state.ScopeChoice == 'Column' && (React.createElement(Box, { marginBottom: 2, "data-name": "column-scope" },
|
|
37
|
-
React.createElement(DualListBoxEditor, { style: { flex: 1, overflow: 'hidden', height: '250px' }, AvailableValues: availableValues, SelectedValues: this.state.selectedColumnValues, HeaderAvailable: "Columns", HeaderSelected: "Columns In Style", onChange: (SelectedValues) => this.onColumnsSelectedChanged(SelectedValues) }))),
|
|
38
|
-
this.state.ScopeChoice == 'DataType' && (React.createElement(Panel, { "data-name": "datatype-scope", variant: "modern" },
|
|
39
|
-
React.createElement(Flex, { flexDirection: "row" },
|
|
40
|
-
this.state.availableDataTypes.includes('Date') && (React.createElement(CheckBox, { "data-name": "scope", "data-value": "date", checked: this.state.componentScope &&
|
|
41
|
-
'DataTypes' in this.state.componentScope &&
|
|
42
|
-
this.props.api.scopeApi
|
|
43
|
-
.getDataTypesInScope(this.state.componentScope)
|
|
44
|
-
.includes('Date'), marginLeft: 2, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'Date') }, "Date")),
|
|
45
|
-
this.state.availableDataTypes.includes('Number') && (React.createElement(CheckBox, { "data-name": "scope", "data-value": "number", checked: this.state.componentScope &&
|
|
46
|
-
'DataTypes' in this.state.componentScope &&
|
|
47
|
-
this.props.api.scopeApi
|
|
48
|
-
.getDataTypesInScope(this.state.componentScope)
|
|
49
|
-
.includes('Number'), marginLeft: 4, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'Number') }, "Number")),
|
|
50
|
-
this.state.availableDataTypes.includes('String') && (React.createElement(CheckBox, { "data-name": "scope", "data-value": "string", checked: this.state.componentScope &&
|
|
51
|
-
'DataTypes' in this.state.componentScope &&
|
|
52
|
-
this.props.api.scopeApi
|
|
53
|
-
.getDataTypesInScope(this.state.componentScope)
|
|
54
|
-
.includes('String'), marginLeft: 4, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'String') }, "String")),
|
|
55
|
-
this.state.availableDataTypes.includes('Boolean') && (React.createElement(CheckBox, { "data-name": "scope", "data-value": "boolean", checked: this.state.componentScope &&
|
|
56
|
-
'DataTypes' in this.state.componentScope &&
|
|
57
|
-
this.props.api.scopeApi
|
|
58
|
-
.getDataTypesInScope(this.state.componentScope)
|
|
59
|
-
.includes('Boolean'), marginLeft: 4, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'Boolean') }, "Boolean")))))))));
|
|
60
|
-
}
|
|
61
|
-
setScopeChoice(scope) {
|
|
62
|
-
if (!scope) {
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
if (this.props.api.scopeApi.scopeIsAll(scope)) {
|
|
66
|
-
return 'All';
|
|
67
|
-
}
|
|
68
|
-
if (this.props.api.scopeApi.scopeHasColumns(this.props.scope)) {
|
|
69
|
-
return 'Column';
|
|
70
|
-
}
|
|
71
|
-
if (this.props.api.scopeApi.scopeHasDataType(this.props.scope)) {
|
|
72
|
-
return 'DataType';
|
|
73
|
-
}
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
onScopeSelectChanged(event) {
|
|
77
|
-
let e = event.target;
|
|
78
|
-
let newScope;
|
|
79
|
-
let newScopeChoice;
|
|
80
|
-
if (e.value == 'Column') {
|
|
81
|
-
newScope = {
|
|
82
|
-
ColumnIds: [],
|
|
83
|
-
};
|
|
84
|
-
newScopeChoice = 'Column';
|
|
85
|
-
}
|
|
86
|
-
else if (e.value == 'DataType') {
|
|
87
|
-
newScope = {
|
|
88
|
-
DataTypes: [],
|
|
89
|
-
};
|
|
90
|
-
newScopeChoice = 'DataType';
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
newScope = {
|
|
94
|
-
All: true,
|
|
95
|
-
};
|
|
96
|
-
newScopeChoice = 'All';
|
|
97
|
-
}
|
|
98
|
-
this.setState({
|
|
99
|
-
ScopeChoice: newScopeChoice,
|
|
100
|
-
componentScope: newScope,
|
|
101
|
-
}, () => this.forceUpdate());
|
|
102
|
-
this.props.updateScope(newScope);
|
|
103
|
-
}
|
|
104
|
-
onColumnsSelectedChanged(columnFriendlyNames) {
|
|
105
|
-
let cols = this.props.api.columnApi.getColumnIdsForFriendlyNames(columnFriendlyNames);
|
|
106
|
-
let newScope = {
|
|
107
|
-
ColumnIds: cols,
|
|
108
|
-
};
|
|
109
|
-
this.setState({
|
|
110
|
-
componentScope: newScope,
|
|
111
|
-
selectedColumnValues: columnFriendlyNames,
|
|
112
|
-
}, () => this.forceUpdate());
|
|
113
|
-
// this.updateScope();
|
|
114
|
-
this.props.updateScope(newScope);
|
|
115
|
-
}
|
|
116
|
-
onCheckBoxDataTypeChecked(checked, item) {
|
|
117
|
-
let dataTypes = [].concat(this.props.api.scopeApi.getDataTypesInScope(this.state.componentScope));
|
|
118
|
-
if (checked) {
|
|
119
|
-
dataTypes.push(item);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
const index = dataTypes.indexOf(item, 0);
|
|
123
|
-
if (index > -1) {
|
|
124
|
-
dataTypes.splice(index, 1);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
let newScope = {
|
|
128
|
-
DataTypes: dataTypes,
|
|
129
|
-
};
|
|
130
|
-
this.setState({ componentScope: newScope }, () => this.forceUpdate());
|
|
131
|
-
this.props.updateScope(newScope);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableWizardStep, AdaptableWizardStepProps } from '../../Wizard/Interface/IAdaptableWizard';
|
|
3
|
-
import { WizardScopeState } from '../../Components/SharedProps/WizardScopeState';
|
|
4
|
-
import { Report } from '../../../PredefinedConfig/ExportState';
|
|
5
|
-
export interface ReportScopeWizardProps extends AdaptableWizardStepProps<Report> {
|
|
6
|
-
}
|
|
7
|
-
export declare class ReportScopeWizard extends React.Component<ReportScopeWizardProps, WizardScopeState> implements AdaptableWizardStep {
|
|
8
|
-
constructor(props: ReportScopeWizardProps);
|
|
9
|
-
render(): any;
|
|
10
|
-
private onUpdateScope;
|
|
11
|
-
canNext(): boolean;
|
|
12
|
-
canBack(): boolean;
|
|
13
|
-
next(): void;
|
|
14
|
-
back(): void;
|
|
15
|
-
getIndexStepIncrement(): number;
|
|
16
|
-
getIndexStepDecrement(): number;
|
|
17
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import WizardPanel from '../../../components/WizardPanel';
|
|
3
|
-
import { ScopeComponent } from '../../Components/ScopeComponent';
|
|
4
|
-
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
5
|
-
export class ReportScopeWizard extends React.Component {
|
|
6
|
-
constructor(props) {
|
|
7
|
-
super(props);
|
|
8
|
-
this.state = {
|
|
9
|
-
scope: this.props.data.Scope ? this.props.data.Scope : { All: true },
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return (React.createElement(WizardPanel, { "data-name": "scope-container", bodyProps: { padding: 0 } },
|
|
14
|
-
React.createElement(ScopeComponent, { api: this.props.api, scope: this.state.scope, updateScope: (scope) => this.onUpdateScope(scope) }),
|
|
15
|
-
' '));
|
|
16
|
-
}
|
|
17
|
-
onUpdateScope(scope) {
|
|
18
|
-
this.setState({ scope: scope }, () => this.props.updateGoBackState());
|
|
19
|
-
}
|
|
20
|
-
canNext() {
|
|
21
|
-
if (this.state.scope == undefined) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
if ('ColumnIds' in this.state.scope &&
|
|
25
|
-
ArrayExtensions.IsNullOrEmpty(this.props.api.scopeApi.getColumnIdsInScope(this.state.scope))) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
if ('DataTypes' in this.state.scope &&
|
|
29
|
-
ArrayExtensions.IsNullOrEmpty(this.props.api.scopeApi.getDataTypesInScope(this.state.scope))) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
canBack() {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
next() {
|
|
38
|
-
this.props.data.Scope = this.state.scope;
|
|
39
|
-
}
|
|
40
|
-
back() { }
|
|
41
|
-
getIndexStepIncrement() {
|
|
42
|
-
return 1;
|
|
43
|
-
}
|
|
44
|
-
getIndexStepDecrement() {
|
|
45
|
-
return 1;
|
|
46
|
-
}
|
|
47
|
-
}
|