@adaptabletools/adaptable 22.0.0-canary.4 → 22.0.0-canary.6
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/index.css +46 -26
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/CustomSortOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +6 -2
- package/src/AdaptableState/ChartingState.d.ts +5 -5
- package/src/AdaptableState/Common/AdaptableObject.d.ts +0 -9
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +1 -1
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +18 -0
- package/src/AdaptableState/Common/Schedule.d.ts +6 -2
- package/src/AdaptableState/CustomSortState.d.ts +6 -2
- package/src/AdaptableState/DashboardState.d.ts +3 -3
- package/src/AdaptableState/ExportState.d.ts +3 -3
- package/src/AdaptableState/FlashingCellState.d.ts +6 -2
- package/src/AdaptableState/FormatColumnState.d.ts +6 -2
- package/src/AdaptableState/InternalState.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +4 -4
- package/src/AdaptableState/NamedQueryState.d.ts +3 -3
- package/src/AdaptableState/PlusMinusState.d.ts +6 -2
- package/src/AdaptableState/ShortcutState.d.ts +6 -2
- package/src/AdaptableState/ThemeState.d.ts +3 -3
- package/src/Api/GridApi.d.ts +18 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -0
- package/src/Api/Implementation/GridApiImpl.js +15 -1
- package/src/Api/Implementation/LayoutHelpers.js +4 -4
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +36 -0
- package/src/Redux/Store/AdaptableStore.js +21 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +41 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +54 -2
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +84 -33
- package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/agGrid/AdaptableAgGrid.js +9 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
- package/src/agGrid/AgGridColumnAdapter.js +14 -3
- package/src/components/ColorPicker/ColorPicker.js +5 -4
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/Select/Select.js +78 -15
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -1
- package/src/layout-manager/src/index.js +5 -5
- package/src/layout-manager/src/normalizeLayoutModel.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +25 -18
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -632
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -28
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -58
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -8
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -7
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -5
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -7
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -7
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -7
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -77
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -14
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -9
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -15
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -26
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -45
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
- package/src/View/Components/SharedProps/WizardScopeState.js +0 -1
- package/src/View/Components/WizardSummaryRow.d.ts +0 -9
- package/src/View/Components/WizardSummaryRow.js +0 -11
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -105
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -56
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -35
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -48
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -90
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -88
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -94
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -95
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -23
- /package/src/{View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts → AdaptableState/Common/ColumnHighlightInfo.js} +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { connect } from 'react-redux';
|
|
3
|
-
import { Helper } from '../../Utilities/Helpers/Helper';
|
|
4
|
-
import * as CalculatedColumnRedux from '../../Redux/ActionsReducers/CalculatedColumnRedux';
|
|
5
|
-
import { WizardStatus, } from '../Components/SharedProps/EditableConfigEntityState';
|
|
6
|
-
import { UIHelper } from '../UIHelper';
|
|
7
|
-
import { ModuleDetail } from '../Components/ModuleSummary/ModuleDetail';
|
|
8
|
-
import { CalculatedColumnWizard } from './Wizard/CalculatedColumnWizard';
|
|
9
|
-
export class CalculatedColumnSummaryComponent extends React.Component {
|
|
10
|
-
constructor(props) {
|
|
11
|
-
super(props);
|
|
12
|
-
this.state = UIHelper.getEmptyConfigState();
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
let detailRow;
|
|
16
|
-
this.props.CalculatedColumns.map((item, index) => {
|
|
17
|
-
if (item.ColumnId == this.props.summarisedColumn.columnId) {
|
|
18
|
-
detailRow = (React.createElement(ModuleDetail, { key: 'UF' + index, item1: this.props.moduleInfo.FriendlyName, item2: this.props.api.internalApi.getAdaptableQueryExpressionText(item.Query), configEnity: item, showShare: this.props.teamSharingActivated, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(item), onShare: (config) => this.props.onShare(item, config), onDelete: CalculatedColumnRedux.CalculatedColumnDelete(item), showBold: true, accessLevel: this.props.accessLevel }));
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return (React.createElement("div", null,
|
|
22
|
-
detailRow,
|
|
23
|
-
this.state.editedAdaptableObject && (React.createElement(CalculatedColumnWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.CalculatedColumns, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
|
|
24
|
-
}
|
|
25
|
-
onEdit(calculatedColumn) {
|
|
26
|
-
this.setState({
|
|
27
|
-
editedAdaptableObject: Helper.cloneObject(calculatedColumn),
|
|
28
|
-
wizardStartIndex: 0,
|
|
29
|
-
wizardStatus: WizardStatus.Edit,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
onCloseWizard() {
|
|
33
|
-
this.setState({
|
|
34
|
-
editedAdaptableObject: null,
|
|
35
|
-
wizardStartIndex: 0,
|
|
36
|
-
wizardStatus: WizardStatus.None,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
onFinishWizard = (calculatedColumn) => {
|
|
40
|
-
this.props.onEdit(calculatedColumn);
|
|
41
|
-
this.setState({
|
|
42
|
-
editedAdaptableObject: null,
|
|
43
|
-
wizardStartIndex: 0,
|
|
44
|
-
wizardStatus: WizardStatus.None,
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function mapStateToProps(state) {
|
|
49
|
-
return {
|
|
50
|
-
CalculatedColumns: state.CalculatedColumn.CalculatedColumns,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function mapDispatchToProps(dispatch) {
|
|
54
|
-
return {
|
|
55
|
-
onEdit: (calculatedColumn) => dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn)),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export let CalculatedColumnSummary = connect(mapStateToProps, mapDispatchToProps)(CalculatedColumnSummaryComponent);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SimpleButtonProps } from '../../../components/SimpleButton';
|
|
3
|
-
export interface ModuleButtonProps extends SimpleButtonProps {
|
|
4
|
-
}
|
|
5
|
-
export declare class ButtonFunction extends React.Component<ModuleButtonProps, {}> {
|
|
6
|
-
render(): React.JSX.Element;
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import SimpleButton from '../../../components/SimpleButton';
|
|
3
|
-
import { twMerge } from '../../../twMerge';
|
|
4
|
-
export class ButtonFunction extends React.Component {
|
|
5
|
-
render() {
|
|
6
|
-
return (React.createElement(SimpleButton, { "data-name": "function", tooltip: "Module", iconSize: 20, icon: "function", ...this.props, className: twMerge('twa:mr-1', this.props.className) }));
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import SimpleButton from '../../../components/SimpleButton';
|
|
3
|
-
export class ButtonShow extends React.Component {
|
|
4
|
-
render() {
|
|
5
|
-
return (React.createElement(SimpleButton, { "data-name": "show", tooltip: "Show", iconSize: 18, icon: "check", variant: "text", ...this.props }));
|
|
6
|
-
}
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import SimpleButton from '../../../components/SimpleButton';
|
|
3
|
-
export class ButtonShowChart extends React.Component {
|
|
4
|
-
render() {
|
|
5
|
-
return (React.createElement(SimpleButton, { "data-name": "show-chart", tooltip: "Show Chart", iconSize: 20, icon: "chart", variant: "text", ...this.props }));
|
|
6
|
-
}
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import SimpleButton from '../../../components/SimpleButton';
|
|
3
|
-
export class ButtonUndo extends React.Component {
|
|
4
|
-
render() {
|
|
5
|
-
return (React.createElement(SimpleButton, { "data-name": "undo", iconSize: 20, tooltip: "Undo", icon: 'undo', variant: "text", ...this.props }));
|
|
6
|
-
}
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableModule } from '../../AdaptableState/Common/Types';
|
|
3
|
-
import { AdaptableWizardStep, AdaptableWizardStepProps } from '../Wizard/Interface/IAdaptableWizard';
|
|
4
|
-
export interface ExpressionWizardProps extends AdaptableWizardStepProps<any> {
|
|
5
|
-
onSetNewNamedQuery: (newNamedQuery: string) => void;
|
|
6
|
-
callingModule?: AdaptableModule;
|
|
7
|
-
}
|
|
8
|
-
export interface ExpressionWizardState {
|
|
9
|
-
expression?: string;
|
|
10
|
-
saveToNamedQueries: boolean;
|
|
11
|
-
newNamedQuery: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class ExpressionWizard extends React.Component<ExpressionWizardProps, ExpressionWizardState> implements AdaptableWizardStep {
|
|
14
|
-
constructor(props: ExpressionWizardProps);
|
|
15
|
-
render(): React.JSX.Element;
|
|
16
|
-
isValidExpression(): boolean;
|
|
17
|
-
handleCustomExpressionChange: (expression: string) => void;
|
|
18
|
-
canNext(): boolean;
|
|
19
|
-
canBack(): boolean;
|
|
20
|
-
next(): void;
|
|
21
|
-
back(): void;
|
|
22
|
-
getIndexStepIncrement(): number;
|
|
23
|
-
getIndexStepDecrement(): number;
|
|
24
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CheckBox } from '../../components/CheckBox';
|
|
3
|
-
import { ExpressionEditor } from '../../components/ExpressionEditor';
|
|
4
|
-
import Input from '../../components/Input';
|
|
5
|
-
import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
|
|
6
|
-
import { NamedQueryModuleId } from '../../Utilities/Constants/ModuleConstants';
|
|
7
|
-
import { useMemo } from 'react';
|
|
8
|
-
import { Flex } from '../../components/Flex';
|
|
9
|
-
export class ExpressionWizard extends React.Component {
|
|
10
|
-
constructor(props) {
|
|
11
|
-
super(props);
|
|
12
|
-
this.state = {
|
|
13
|
-
// this is realy horrible but its only way to use the Expression Wizard for both Report (that has Query) and Format Column (that has Rule)
|
|
14
|
-
// once we move to the new Wizard we can remove this monstrosity
|
|
15
|
-
expression: this.props.callingModule && this.props.callingModule == 'Export'
|
|
16
|
-
? this.props.data.Query?.BooleanExpression
|
|
17
|
-
: this.props.data.Rule?.BooleanExpression,
|
|
18
|
-
saveToNamedQueries: false,
|
|
19
|
-
newNamedQuery: '',
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const initialData = useMemo(() => this.props.api.internalApi.getQueryPreviewData(), []);
|
|
24
|
-
return (React.createElement(React.Fragment, null,
|
|
25
|
-
React.createElement(ExpressionEditor, { type: 'boolean', module: NamedQueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: this.props.api.expressionApi.internalApi.getAvailableFields(), namedQueries: this.props.api.namedQueryApi.getNamedQueries(), api: this.props.api }),
|
|
26
|
-
' ',
|
|
27
|
-
React.createElement(Flex, { flexDirection: "row", className: "twa:p-1 twa:mb-2 twa:ml-1", alignItems: "center", "data-name": "expression-wizard-save-option" },
|
|
28
|
-
React.createElement(CheckBox, { className: "twa:ml-2 twa:mb-2", disabled: !this.isValidExpression(), checked: this.state.saveToNamedQueries, onChange: (checked) => this.setState({
|
|
29
|
-
saveToNamedQueries: checked,
|
|
30
|
-
}, () => this.props.updateGoBackState()) }, "Save as new Named Query"),
|
|
31
|
-
this.state.saveToNamedQueries && (React.createElement(Input, { className: "twa:ml-2 twa:min-w-[20rem]", value: this.state.newNamedQuery, onChange: (e) => this.setState({
|
|
32
|
-
newNamedQuery: e.target.value,
|
|
33
|
-
}, () => this.props.updateGoBackState()) })))));
|
|
34
|
-
}
|
|
35
|
-
isValidExpression() {
|
|
36
|
-
return (StringExtensions.IsNotNullOrEmpty(this.state.expression) &&
|
|
37
|
-
this.props.api.internalApi
|
|
38
|
-
.getQueryLanguageService()
|
|
39
|
-
.validateBoolean(this.state.expression, NamedQueryModuleId).isValid);
|
|
40
|
-
}
|
|
41
|
-
handleCustomExpressionChange = (expression) => {
|
|
42
|
-
this.setState({
|
|
43
|
-
expression,
|
|
44
|
-
}, () => this.props.updateGoBackState());
|
|
45
|
-
};
|
|
46
|
-
canNext() {
|
|
47
|
-
if (this.isValidExpression() == false) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
if (this.state.saveToNamedQueries && StringExtensions.IsNullOrEmpty(this.state.newNamedQuery)) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
canBack() {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
next() {
|
|
59
|
-
this.props.callingModule == 'Export'
|
|
60
|
-
? (this.props.data.Query = {
|
|
61
|
-
BooleanExpression: this.state.expression,
|
|
62
|
-
})
|
|
63
|
-
: (this.props.data.Rule = {
|
|
64
|
-
BooleanExpression: this.state.expression,
|
|
65
|
-
});
|
|
66
|
-
if (this.state.saveToNamedQueries) {
|
|
67
|
-
this.props.onSetNewNamedQuery(this.state.newNamedQuery);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
back() { }
|
|
71
|
-
getIndexStepIncrement() {
|
|
72
|
-
return 1;
|
|
73
|
-
}
|
|
74
|
-
getIndexStepDecrement() {
|
|
75
|
-
return 1;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type WaitingProps = React.ClassAttributes<Waiting> & {
|
|
3
|
-
WaitingMessage: string;
|
|
4
|
-
} & FlexProps & {
|
|
5
|
-
className?: string;
|
|
6
|
-
};
|
|
7
|
-
import { FlexProps } from '../../../components/Flex';
|
|
8
|
-
export declare class Waiting extends React.Component<WaitingProps, {}> {
|
|
9
|
-
render(): any;
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import IconRefresh from '../../../components/icons/refresh';
|
|
3
|
-
import { Flex } from '../../../components/Flex';
|
|
4
|
-
import { twMerge } from '../../../twMerge';
|
|
5
|
-
export class Waiting extends React.Component {
|
|
6
|
-
render() {
|
|
7
|
-
const { WaitingMessage, ...props } = this.props;
|
|
8
|
-
return (React.createElement(Flex, { flexDirection: "column", ...props, className: twMerge(`twa:my-2`, props.className) },
|
|
9
|
-
React.createElement(Flex, { flexDirection: "row", justifyContent: "center" },
|
|
10
|
-
React.createElement(IconRefresh, null)),
|
|
11
|
-
React.createElement(Flex, { flexDirection: "row", justifyContent: "center" },
|
|
12
|
-
React.createElement("h5", null, WaitingMessage))));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface PanelFooterProps {
|
|
3
|
-
onCancel: () => void;
|
|
4
|
-
onAccept: () => void;
|
|
5
|
-
cancelDisabled?: boolean;
|
|
6
|
-
acceptDisabled?: boolean;
|
|
7
|
-
acceptText?: React.ReactElement;
|
|
8
|
-
cancelText?: React.ReactElement;
|
|
9
|
-
}
|
|
10
|
-
export declare const PanelFooter: React.FunctionComponent<PanelFooterProps>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import SimpleButton from '../../../components/SimpleButton';
|
|
3
|
-
import { Flex, Box } from '../../../components/Flex';
|
|
4
|
-
export const PanelFooter = (props) => {
|
|
5
|
-
return (React.createElement(Flex, { className: "ab-Panel__Footer twa:p-1 twa:bg-primary", flexDirection: "row", alignItems: "center" },
|
|
6
|
-
React.createElement(SimpleButton, { className: "twa:m-1", variant: "text", "data-name": "action-cancel", onClick: props.onCancel, disabled: props.cancelDisabled }, props.cancelText ?? 'CANCEL'),
|
|
7
|
-
React.createElement(Box, { className: "twa:flex-1" }),
|
|
8
|
-
React.createElement(SimpleButton, { variant: "raised", tone: "accent", "data-name": "action-finish", className: "twa:m-1", onClick: props.onAccept, disabled: props.acceptDisabled }, props.cancelText ?? 'Finish')));
|
|
9
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PanelProps } from '../../../components/Panel';
|
|
3
|
-
export interface PanelWithTwoButtonsProps extends Omit<PanelProps, 'flex'> {
|
|
4
|
-
firstButtonContent?: React.ReactNode;
|
|
5
|
-
firstButton?: React.ReactElement<any>;
|
|
6
|
-
secondButtonContent?: React.ReactNode;
|
|
7
|
-
secondButton?: React.ReactElement<any>;
|
|
8
|
-
headerText: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class PanelWithTwoButtons extends React.Component<PanelWithTwoButtonsProps, {}> {
|
|
11
|
-
render(): React.JSX.Element;
|
|
12
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import Panel from '../../../components/Panel';
|
|
3
|
-
import { Flex } from '../../../components/Flex';
|
|
4
|
-
//We cannot destructure this.props using the react way in typescript which is a real pain as you
|
|
5
|
-
//need to transfer props individually as a consequence
|
|
6
|
-
//let { buttonContent, ...other } = this.props
|
|
7
|
-
export class PanelWithTwoButtons extends React.Component {
|
|
8
|
-
render() {
|
|
9
|
-
let header = (React.createElement(Flex, { alignItems: "center", className: "twa:w-full" },
|
|
10
|
-
React.createElement(Flex, { className: "twa:flex-1" }, this.props.headerText),
|
|
11
|
-
this.props.secondButton,
|
|
12
|
-
this.props.firstButton));
|
|
13
|
-
return (React.createElement(Panel, { ...this.props, header: header }, this.props.children));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PanelProps } from '../../../components/Panel';
|
|
3
|
-
export interface ToolPanelSettingsPanelProps extends PanelProps {
|
|
4
|
-
button: React.ReactElement<any>;
|
|
5
|
-
}
|
|
6
|
-
export declare class ToolPanelSettingsPanel extends React.Component<ToolPanelSettingsPanelProps, {}> {
|
|
7
|
-
render(): React.JSX.Element;
|
|
8
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Icon } from '../../../components/icons';
|
|
3
|
-
import Panel from '../../../components/Panel';
|
|
4
|
-
//We cannot destructure this.props using the react way in typescript which is a real pain as you
|
|
5
|
-
//need to transfer props individually as a consequence
|
|
6
|
-
//let { buttonContent, ...other } = this.props
|
|
7
|
-
export class ToolPanelSettingsPanel extends React.Component {
|
|
8
|
-
render() {
|
|
9
|
-
let header = (React.createElement("span", { style: { verticalAlign: 'middle' } },
|
|
10
|
-
' ',
|
|
11
|
-
React.createElement(Icon, { name: 'spanner' }),
|
|
12
|
-
" ",
|
|
13
|
-
React.createElement("span", null, "Settings"),
|
|
14
|
-
this.props.button &&
|
|
15
|
-
React.cloneElement(this.props.button, {
|
|
16
|
-
style: {
|
|
17
|
-
float: 'right',
|
|
18
|
-
border: '0px',
|
|
19
|
-
background: 'none',
|
|
20
|
-
borderRadius: '0px',
|
|
21
|
-
boxShadow: 'none',
|
|
22
|
-
},
|
|
23
|
-
})));
|
|
24
|
-
return (React.createElement(Panel, { header: header, style: { margin: '0px', padding: '0px' } }, this.props.children));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SelectionMode } from '../../../AdaptableState/Common/Enums';
|
|
3
|
-
import { AdaptableColumn } from '../../../AdaptableState/Common/AdaptableColumn';
|
|
4
|
-
export interface ColumnSelectorProps extends React.HTMLProps<ColumnSelector> {
|
|
5
|
-
ColumnList: AdaptableColumn[];
|
|
6
|
-
SelectedColumnIds: string[];
|
|
7
|
-
onColumnChange: (SelectedColumns: AdaptableColumn[]) => void;
|
|
8
|
-
SelectionMode: SelectionMode;
|
|
9
|
-
className?: string;
|
|
10
|
-
placeHolder?: string;
|
|
11
|
-
showClearButton?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare class ColumnSelector extends React.Component<ColumnSelectorProps, {}> {
|
|
15
|
-
render(): React.JSX.Element;
|
|
16
|
-
onClearButton(): void;
|
|
17
|
-
onColumnChange(selected: AdaptableColumn[], isEmptySelection: boolean): void;
|
|
18
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
|
|
3
|
-
import { SortOrder } from '../../../AdaptableState/Common/Enums';
|
|
4
|
-
import { ArrayExtensions } from '../../../Utilities/Extensions/ArrayExtensions';
|
|
5
|
-
import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
6
|
-
import DropdownButton from '../../../components/DropdownButton';
|
|
7
|
-
export class ColumnSelector extends React.Component {
|
|
8
|
-
render() {
|
|
9
|
-
const sortedColumns = ArrayExtensions.sortArrayWithProperty(SortOrder.Asc, this.props.ColumnList, 'friendlyName');
|
|
10
|
-
const selectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x));
|
|
11
|
-
const isEmptySelectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x)).length == 0;
|
|
12
|
-
let sortedColumnOptions = sortedColumns.map((column) => {
|
|
13
|
-
return {
|
|
14
|
-
label: column.friendlyName,
|
|
15
|
-
value: column.columnId,
|
|
16
|
-
disabled: this.props.disabled,
|
|
17
|
-
onClick: () => {
|
|
18
|
-
const selected = sortedColumns.filter((c) => c.columnId === column.columnId);
|
|
19
|
-
if (!selected.length) {
|
|
20
|
-
this.onClearButton();
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.onColumnChange(selected, isEmptySelectedColumnIds);
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
let currentColumnName = selectedColumnIds.length > 0
|
|
29
|
-
? this.props.ColumnList.find((c) => c.columnId == selectedColumnIds[0])?.friendlyName
|
|
30
|
-
: 'Select a column';
|
|
31
|
-
return (React.createElement("div", { "data-name": 'column-selector' },
|
|
32
|
-
React.createElement(FormLayout, { columns: [{ name: 'columnSelector', style: { display: 'flex' } }], style: this.props.style },
|
|
33
|
-
React.createElement(FormRow, null,
|
|
34
|
-
React.createElement(DropdownButton, { className: "twa:w-full twa:text-0 twa:mr-2", columns: ['label'], showClearButton: currentColumnName != 'Select a column', onClear: () => this.onClearButton(), items: sortedColumnOptions, disabled: this.props.disabled || sortedColumnOptions.length == 0 }, currentColumnName)))));
|
|
35
|
-
}
|
|
36
|
-
onClearButton() {
|
|
37
|
-
this.props.onColumnChange([]);
|
|
38
|
-
}
|
|
39
|
-
onColumnChange(selected, isEmptySelection) {
|
|
40
|
-
if (selected.length == 0 && isEmptySelection) {
|
|
41
|
-
return; // must be a nicer way but we want to avoid ridiculous amounts of prop calls
|
|
42
|
-
}
|
|
43
|
-
this.props.onColumnChange(selected);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseRowProps } from './SharedProps/ConfigEntityRowProps';
|
|
3
|
-
export interface WizardSummaryRowProps<WizardSummaryRow> extends BaseRowProps<WizardSummaryRow> {
|
|
4
|
-
propertyName: string;
|
|
5
|
-
propertyValue: any;
|
|
6
|
-
}
|
|
7
|
-
export declare class WizardSummaryRow extends React.Component<WizardSummaryRowProps<WizardSummaryRow>, {}> {
|
|
8
|
-
render(): any;
|
|
9
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableObjectRow } from './AdaptableObjectRow';
|
|
3
|
-
import { cloneObject } from '../../Utilities/Helpers/Helper';
|
|
4
|
-
export class WizardSummaryRow extends React.Component {
|
|
5
|
-
render() {
|
|
6
|
-
let colItems = cloneObject(this.props.colItems);
|
|
7
|
-
colItems[0].Content = this.props.propertyName;
|
|
8
|
-
colItems[1].Content = this.props.propertyValue;
|
|
9
|
-
return React.createElement(AdaptableObjectRow, { colItems: colItems, fontSize: 'medium' });
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ModuleSummaryProps } from '../Components/SharedProps/ModuleSummaryProps';
|
|
3
|
-
import { EditableConfigEntityState } from '../Components/SharedProps/EditableConfigEntityState';
|
|
4
|
-
import * as CustomSortRedux from '../../Redux/ActionsReducers/CustomSortRedux';
|
|
5
|
-
import { CustomSort } from '../../AdaptableState/CustomSortState';
|
|
6
|
-
export interface CustomSortSummaryProps extends ModuleSummaryProps<CustomSortSummaryComponent> {
|
|
7
|
-
CustomSorts: CustomSort[];
|
|
8
|
-
onAddCustomSort: (customSort: CustomSort) => CustomSortRedux.CustomSortAddAction;
|
|
9
|
-
onEditCustomSort: (customSort: CustomSort) => CustomSortRedux.CustomSortEditAction;
|
|
10
|
-
}
|
|
11
|
-
export declare class CustomSortSummaryComponent extends React.Component<CustomSortSummaryProps, EditableConfigEntityState> {
|
|
12
|
-
constructor(props: CustomSortSummaryProps);
|
|
13
|
-
render(): any;
|
|
14
|
-
onNew(): void;
|
|
15
|
-
onEdit(customSort: CustomSort): void;
|
|
16
|
-
onCloseWizard(): void;
|
|
17
|
-
onFinishWizard: (customSort: CustomSort) => void;
|
|
18
|
-
canFinishWizard(): boolean;
|
|
19
|
-
private getCustomSortedValues;
|
|
20
|
-
}
|
|
21
|
-
export declare let CustomSortSummary: import("react-redux").ConnectedComponent<typeof CustomSortSummaryComponent, {
|
|
22
|
-
[x: string]: any;
|
|
23
|
-
}>;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { WizardStatus, } from '../Components/SharedProps/EditableConfigEntityState';
|
|
3
|
-
import { connect } from 'react-redux';
|
|
4
|
-
import { Helper } from '../../Utilities/Helpers/Helper';
|
|
5
|
-
import * as CustomSortRedux from '../../Redux/ActionsReducers/CustomSortRedux';
|
|
6
|
-
import { ObjectFactory } from '../../Utilities/ObjectFactory';
|
|
7
|
-
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
8
|
-
import { ModuleHeader } from '../Components/ModuleSummary/ModuleHeader';
|
|
9
|
-
import { ModuleDetail } from '../Components/ModuleSummary/ModuleDetail';
|
|
10
|
-
import { ModuleProfile } from '../Components/ModuleProfile';
|
|
11
|
-
import * as TeamSharingRedux from '../../Redux/ActionsReducers/TeamSharingRedux';
|
|
12
|
-
import { UIHelper } from '../UIHelper';
|
|
13
|
-
import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
|
|
14
|
-
import { ArrayExtensions } from '../../Utilities/Extensions/ArrayExtensions';
|
|
15
|
-
import { CustomSortWizard } from './Wizard/CustomSortWizard';
|
|
16
|
-
export class CustomSortSummaryComponent extends React.Component {
|
|
17
|
-
constructor(props) {
|
|
18
|
-
super(props);
|
|
19
|
-
this.state = UIHelper.getEmptyConfigState();
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
const customSort = this.props.CustomSorts.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
23
|
-
const columnSortComparer = this.props.api.customSortApi.internalApi.getCustomSortComparer(this.props.summarisedColumn.columnId);
|
|
24
|
-
let noCustomSort = customSort == null && columnSortComparer == null;
|
|
25
|
-
let customSortRow;
|
|
26
|
-
if (!this.props.summarisedColumn.sortable) {
|
|
27
|
-
customSortRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'Column is not sortable', newButtonDisabled: true, onNew: () => this.onNew(), newButtonTooltip: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel }));
|
|
28
|
-
}
|
|
29
|
-
else if (noCustomSort) {
|
|
30
|
-
// title row
|
|
31
|
-
customSortRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'No Custom Sort Set', onNew: () => this.onNew(), accessLevel: this.props.accessLevel, newButtonTooltip: this.props.moduleInfo.FriendlyName }));
|
|
32
|
-
}
|
|
33
|
-
else if (columnSortComparer != null) {
|
|
34
|
-
customSortRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'Using a Custom Sort Comparer Function', onNew: () => this.onNew(), accessLevel: this.props.accessLevel, newButtonTooltip: this.props.moduleInfo.FriendlyName }));
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
customSortRow = (React.createElement(ModuleDetail, { key: this.props.moduleInfo.FriendlyName, item1: React.createElement(ModuleProfile, { moduleInfo: this.props.moduleInfo }), item2: this.getCustomSortedValues(customSort), configEnity: customSort, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(customSort), showEdit: customSort != undefined, onShare: (config) => this.props.onShare(customSort, config), showShare: this.props.teamSharingActivated, onDelete: CustomSortRedux.CustomSortDelete(customSort), showBold: true, accessLevel: this.props.accessLevel }));
|
|
38
|
-
}
|
|
39
|
-
return (React.createElement(React.Fragment, null,
|
|
40
|
-
customSortRow,
|
|
41
|
-
this.state.editedAdaptableObject && (React.createElement(CustomSortWizard, { isNew: this.state.wizardStatus === WizardStatus.New, moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.CustomSorts, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
|
|
42
|
-
}
|
|
43
|
-
onNew() {
|
|
44
|
-
let configEntity = ObjectFactory.CreateEmptyCustomSort();
|
|
45
|
-
configEntity.ColumnId = this.props.summarisedColumn.columnId;
|
|
46
|
-
this.setState({
|
|
47
|
-
editedAdaptableObject: configEntity,
|
|
48
|
-
wizardStartIndex: 1,
|
|
49
|
-
wizardStatus: WizardStatus.New,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
onEdit(customSort) {
|
|
53
|
-
this.setState({
|
|
54
|
-
editedAdaptableObject: Helper.cloneObject(customSort),
|
|
55
|
-
wizardStartIndex: 1,
|
|
56
|
-
wizardStatus: WizardStatus.Edit,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
onCloseWizard() {
|
|
60
|
-
this.setState({
|
|
61
|
-
editedAdaptableObject: null,
|
|
62
|
-
wizardStartIndex: 0,
|
|
63
|
-
wizardStatus: WizardStatus.None,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
onFinishWizard = (customSort) => {
|
|
67
|
-
if (this.props.CustomSorts.find((x) => x.ColumnId == customSort.ColumnId)) {
|
|
68
|
-
this.props.onEditCustomSort(customSort);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.props.onAddCustomSort(customSort);
|
|
72
|
-
}
|
|
73
|
-
this.setState({
|
|
74
|
-
editedAdaptableObject: null,
|
|
75
|
-
wizardStartIndex: 0,
|
|
76
|
-
wizardStatus: WizardStatus.None,
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
canFinishWizard() {
|
|
80
|
-
let customSort = this.state.editedAdaptableObject;
|
|
81
|
-
return (StringExtensions.IsNotNullOrEmpty(customSort.ColumnId) &&
|
|
82
|
-
ArrayExtensions.IsNotNullOrEmpty(customSort.SortedValues));
|
|
83
|
-
}
|
|
84
|
-
getCustomSortedValues(customSort) {
|
|
85
|
-
if (ArrayExtensions.IsNotNullOrEmpty(customSort.SortedValues)) {
|
|
86
|
-
return customSort.SortedValues.join(', ');
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return '[Has bespoke Custom Sort implementing using bespoke function]';
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function mapStateToProps(state, ownProps) {
|
|
94
|
-
return {
|
|
95
|
-
CustomSorts: state.CustomSort.CustomSorts,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function mapDispatchToProps(dispatch) {
|
|
99
|
-
return {
|
|
100
|
-
onAddCustomSort: (customSort) => dispatch(CustomSortRedux.CustomSortAdd(customSort)),
|
|
101
|
-
onEditCustomSort: (customSort) => dispatch(CustomSortRedux.CustomSortEdit(customSort)),
|
|
102
|
-
onShare: (entity, config) => dispatch(TeamSharingRedux.TeamSharingShare(entity, ModuleConstants.CustomSortModuleId, config)),
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
export let CustomSortSummary = connect(mapStateToProps, mapDispatchToProps)(CustomSortSummaryComponent);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ValidationErrorsMap } from '../DataImportWizard';
|
|
3
|
-
interface ImportSectionProps {
|
|
4
|
-
data?: Record<string, unknown>[];
|
|
5
|
-
onDataChange?: (data: Record<string, unknown>[]) => void;
|
|
6
|
-
errors: ValidationErrorsMap | null;
|
|
7
|
-
}
|
|
8
|
-
export declare const ImportSection: React.FunctionComponent<ImportSectionProps>;
|
|
9
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
3
|
-
import CheckBox from '../../../../components/icons/check-box';
|
|
4
|
-
import { Tabs } from '../../../../components/Tabs';
|
|
5
|
-
import { DataPreview } from './DataPreview';
|
|
6
|
-
import { Flex } from '../../../../components/Flex';
|
|
7
|
-
export const ImportSection = (props) => {
|
|
8
|
-
return (React.createElement(Flex, { flexDirection: "column", className: "twa:p-2 twa:h-full" },
|
|
9
|
-
React.createElement(Tabs, { className: "twa:mb-2" },
|
|
10
|
-
React.createElement(Tabs.Tab, null, "Import Options"),
|
|
11
|
-
React.createElement(Tabs.Content, null,
|
|
12
|
-
React.createElement(FormLayout, null,
|
|
13
|
-
React.createElement(FormRow, { label: "Exclude Invalid Rows" },
|
|
14
|
-
React.createElement(CheckBox, null))))),
|
|
15
|
-
React.createElement(Tabs, { className: "twa:flex-1" },
|
|
16
|
-
React.createElement(Tabs.Tab, null, "Preview"),
|
|
17
|
-
React.createElement(Tabs.Content, null,
|
|
18
|
-
React.createElement(DataPreview, { onDataChange: props.onDataChange, data: props.data, errors: props.errors, editable: false })))));
|
|
19
|
-
};
|