@adaptabletools/adaptable 22.0.0-canary.1 → 22.0.0-canary.3
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 +55 -37
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/FormatColumnState.d.ts +0 -8
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -0
- package/src/Api/Implementation/ApiBase.js +1 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +1 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
- package/src/Api/Implementation/DataImportApiImpl.js +1 -0
- package/src/Api/Implementation/DataSetApiImpl.js +1 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +16 -14
- package/src/Api/Implementation/ExportApiImpl.js +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
- package/src/Api/Implementation/GridApiImpl.js +17 -16
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +1 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +1 -0
- package/src/Api/Implementation/NoteApiImpl.js +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -1
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
- package/src/Redux/Store/AdaptableStore.js +49 -43
- package/src/Strategy/AdaptableModuleBase.js +4 -0
- package/src/Strategy/AlertModule.js +1 -0
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +1 -0
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/LayoutModule.js +2 -1
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +1 -0
- package/src/Strategy/ShortcutModule.js +2 -0
- package/src/Strategy/TeamSharingModule.js +10 -10
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +3 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/MenuItem.js +18 -0
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
- package/src/Utilities/Services/AlertService.js +6 -4
- package/src/Utilities/Services/AnnotationsService.js +4 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
- package/src/Utilities/Services/ChartingService.js +1 -0
- package/src/Utilities/Services/DataService.js +10 -2
- package/src/Utilities/Services/Fdc3Service.js +5 -3
- package/src/Utilities/Services/FlashingCellService.js +5 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +4 -3
- package/src/Utilities/Services/QueryLanguageService.js +6 -5
- package/src/Utilities/Services/RowFormService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +10 -7
- package/src/Utilities/Services/TeamSharingService.js +3 -1
- package/src/Utilities/Services/ThemeService.js +11 -9
- package/src/Utilities/Services/ValidationService.js +1 -0
- package/src/Utilities/createAgStatusPanelComponent.js +3 -0
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +24 -11
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +8 -8
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +16 -17
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
- package/src/View/Components/ExpressionWizard.js +5 -5
- package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
- package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.js +20 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/CustomSort/CustomSortSummary.js +13 -13
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FormatColumn/FormatColumnSummary.js +13 -13
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -23
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +13 -13
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
- package/src/View/Theme/ThemePopup.js +13 -16
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +15 -0
- package/src/agGrid/Adaptable.js +4 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +104 -38
- package/src/agGrid/AdaptableFilterHandler.js +4 -0
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +10 -0
- package/src/agGrid/AgGridAdapter.js +11 -1
- package/src/agGrid/AgGridColumnAdapter.js +5 -18
- package/src/agGrid/AgGridExportAdapter.js +10 -9
- package/src/agGrid/AgGridFilterAdapter.js +4 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.js +3 -0
- package/src/agGrid/AgGridMenuAdapter.js +1 -0
- package/src/agGrid/AgGridModulesAdapter.js +2 -1
- package/src/agGrid/AgGridOptionsService.js +3 -0
- package/src/agGrid/AgGridThemeAdapter.js +2 -0
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/components/overlayBaseZIndex.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +17 -14
- package/src/devTools/index.js +54 -53
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +11 -11
- package/src/layout-manager/src/LMLogger.js +7 -0
- package/src/layout-manager/src/index.js +56 -51
- package/src/metamodel/adaptable.metamodel.d.ts +66 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +5 -0
- package/src/migration/VersionUpgrade.js +1 -0
- package/src/migration/VersionUpgrade17.js +1 -2
- package/src/migration/VersionUpgrade22.d.ts +6 -0
- package/src/migration/VersionUpgrade22.js +27 -0
- package/src/parser/src/ExpressionEvaluationError.js +1 -0
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -10,6 +10,24 @@ const stopPropagation = (e) => {
|
|
|
10
10
|
e.stopPropagation();
|
|
11
11
|
};
|
|
12
12
|
export class EntityListActionButtons extends React.Component {
|
|
13
|
+
static defaultProps = {
|
|
14
|
+
// Adaptable: null,
|
|
15
|
+
suspendableObject: null,
|
|
16
|
+
showEdit: true,
|
|
17
|
+
showDelete: true,
|
|
18
|
+
showShare: false,
|
|
19
|
+
showSuspend: false,
|
|
20
|
+
overrideDisableEdit: false,
|
|
21
|
+
overrideDisableDelete: false,
|
|
22
|
+
overrideDisableClone: false,
|
|
23
|
+
overrideDisableShare: false,
|
|
24
|
+
confirmDeleteAction: null,
|
|
25
|
+
entityType: '',
|
|
26
|
+
accessLevel: 'Full',
|
|
27
|
+
editSize: 'xsmall',
|
|
28
|
+
deleteSize: 'xsmall',
|
|
29
|
+
shareSize: 'xsmall',
|
|
30
|
+
};
|
|
13
31
|
render() {
|
|
14
32
|
const { justifyContent } = this.props;
|
|
15
33
|
const justifyContentClassName = clsx({
|
|
@@ -25,21 +43,3 @@ export class EntityListActionButtons extends React.Component {
|
|
|
25
43
|
this.props.showSuspend && this.props.suspendableObject && (React.createElement(SuspendToggleButton, { className: `twa:ml-[2px] twa:align-self-center`, onSuspend: this.props.onSuspend, onUnSuspend: this.props.onUnSuspend, suspendableObject: this.props.suspendableObject, disabled: this.props.accessLevel == 'ReadOnly' }))));
|
|
26
44
|
}
|
|
27
45
|
}
|
|
28
|
-
EntityListActionButtons.defaultProps = {
|
|
29
|
-
// Adaptable: null,
|
|
30
|
-
suspendableObject: null,
|
|
31
|
-
showEdit: true,
|
|
32
|
-
showDelete: true,
|
|
33
|
-
showShare: false,
|
|
34
|
-
showSuspend: false,
|
|
35
|
-
overrideDisableEdit: false,
|
|
36
|
-
overrideDisableDelete: false,
|
|
37
|
-
overrideDisableClone: false,
|
|
38
|
-
overrideDisableShare: false,
|
|
39
|
-
confirmDeleteAction: null,
|
|
40
|
-
entityType: '',
|
|
41
|
-
accessLevel: 'Full',
|
|
42
|
-
editSize: 'xsmall',
|
|
43
|
-
deleteSize: 'xsmall',
|
|
44
|
-
shareSize: 'xsmall',
|
|
45
|
-
};
|
|
@@ -204,7 +204,7 @@ export const FloatingFilterValues = (props) => {
|
|
|
204
204
|
...(props.value?.length
|
|
205
205
|
? {
|
|
206
206
|
valueContainer: {
|
|
207
|
-
fontWeight: 'var(--ab-cmp-
|
|
207
|
+
fontWeight: 'var(--ab-cmp-floatingfilter-selected-options-text__font-weight)',
|
|
208
208
|
},
|
|
209
209
|
}
|
|
210
210
|
: {}),
|
|
@@ -9,11 +9,6 @@ import { Flex } from '../../components/Flex';
|
|
|
9
9
|
export class ExpressionWizard extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
|
-
this.handleCustomExpressionChange = (expression) => {
|
|
13
|
-
this.setState({
|
|
14
|
-
expression,
|
|
15
|
-
}, () => this.props.updateGoBackState());
|
|
16
|
-
};
|
|
17
12
|
this.state = {
|
|
18
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)
|
|
19
14
|
// once we move to the new Wizard we can remove this monstrosity
|
|
@@ -43,6 +38,11 @@ export class ExpressionWizard extends React.Component {
|
|
|
43
38
|
.getQueryLanguageService()
|
|
44
39
|
.validateBoolean(this.state.expression, NamedQueryModuleId).isValid);
|
|
45
40
|
}
|
|
41
|
+
handleCustomExpressionChange = (expression) => {
|
|
42
|
+
this.setState({
|
|
43
|
+
expression,
|
|
44
|
+
}, () => this.props.updateGoBackState());
|
|
45
|
+
};
|
|
46
46
|
canNext() {
|
|
47
47
|
if (this.isValidExpression() == false) {
|
|
48
48
|
return false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DashboardToolbar as DashboardToolbarUI } from '../../../../components/Dashboard';
|
|
3
3
|
export class PanelDashboard extends React.Component {
|
|
4
|
+
static defaultProps = {
|
|
5
|
+
showConfigureActionButton: true,
|
|
6
|
+
showCloseActionButton: true,
|
|
7
|
+
headerText: 'Module',
|
|
8
|
+
onClose: null,
|
|
9
|
+
onConfigure: null,
|
|
10
|
+
accessLevel: 'Full',
|
|
11
|
+
};
|
|
4
12
|
render() {
|
|
5
13
|
const { headerText, showConfigureActionButton, showCloseActionButton, onConfigure, onClose, accessLevel, children, } = this.props;
|
|
6
14
|
return (React.createElement(DashboardToolbarUI, { title: headerText, onConfigure: onConfigure, showConfigure: showConfigureActionButton, showClose: showCloseActionButton, onClose: onClose, accessLevel: accessLevel }, children));
|
|
7
15
|
}
|
|
8
16
|
}
|
|
9
|
-
PanelDashboard.defaultProps = {
|
|
10
|
-
showConfigureActionButton: true,
|
|
11
|
-
showCloseActionButton: true,
|
|
12
|
-
headerText: 'Module',
|
|
13
|
-
onClose: null,
|
|
14
|
-
onConfigure: null,
|
|
15
|
-
accessLevel: 'Full',
|
|
16
|
-
};
|
|
@@ -7,6 +7,13 @@ import { ButtonMaximise } from '../../Buttons/ButtonMaximise';
|
|
|
7
7
|
import { twMerge } from '../../../../twMerge';
|
|
8
8
|
import { Flex } from '../../../../components/Flex';
|
|
9
9
|
export class PanelToolPanel extends React.Component {
|
|
10
|
+
static defaultProps = {
|
|
11
|
+
headerText: '',
|
|
12
|
+
onClose: null,
|
|
13
|
+
onConfigure: null,
|
|
14
|
+
onMinimiseChanged: null,
|
|
15
|
+
isMinimised: true,
|
|
16
|
+
};
|
|
10
17
|
render() {
|
|
11
18
|
const { useDefaultPanelStyle, isMinimised, onMinimiseChanged, headerText, onClose, onConfigure, ...props } = this.props;
|
|
12
19
|
let header = (React.createElement(React.Fragment, null,
|
|
@@ -38,10 +45,3 @@ export class PanelToolPanel extends React.Component {
|
|
|
38
45
|
} }));
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
|
-
PanelToolPanel.defaultProps = {
|
|
42
|
-
headerText: '',
|
|
43
|
-
onClose: null,
|
|
44
|
-
onConfigure: null,
|
|
45
|
-
onMinimiseChanged: null,
|
|
46
|
-
isMinimised: true,
|
|
47
|
-
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import DropdownButton from '../../../components/DropdownButton';
|
|
3
4
|
import UIHelper from '../../UIHelper';
|
|
4
5
|
import AdaptableInput from '../AdaptableInput';
|
|
5
6
|
import { PermittedValuesSelector } from './PermittedValuesSelector';
|
|
6
|
-
import { Select } from '../../../components/Select';
|
|
7
7
|
import { useAdaptable } from '../../AdaptableContext';
|
|
8
|
-
import { useCallback } from 'react';
|
|
9
8
|
import clsx from 'clsx';
|
|
10
|
-
import { Box } from '../../../components/Flex';
|
|
9
|
+
import { Box, Flex } from '../../../components/Flex';
|
|
10
|
+
import { Icon } from '../../../components/icons';
|
|
11
|
+
import { InputGroup } from '../../../components/InputGroup';
|
|
11
12
|
export const BulkUpdateValueSelector = (props) => {
|
|
12
13
|
const [valueType, setValueType] = React.useState('existing');
|
|
13
14
|
const adaptable = useAdaptable();
|
|
@@ -17,8 +18,8 @@ export const BulkUpdateValueSelector = (props) => {
|
|
|
17
18
|
// TODO = this seems to be called whenever we edit a cell
|
|
18
19
|
// which is then triggering a get all values
|
|
19
20
|
// not sure that we need to
|
|
20
|
-
const permittedValueSelector = (React.createElement(Box,
|
|
21
|
-
React.createElement(PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', disabled: props.disabled || !props.selectedColumn, value: props.selectedColumnValue === '' ? null : props.selectedColumnValue, columnId: columnId, placeholder:
|
|
21
|
+
const permittedValueSelector = (React.createElement(Box, { className: 'twa:flex-1' },
|
|
22
|
+
React.createElement(PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', disabled: props.disabled || !props.selectedColumn, value: props.selectedColumnValue === '' ? null : props.selectedColumnValue, columnId: columnId, placeholder: 'Select value', loadValues: useCallback(({ currentSearchValue }) => {
|
|
22
23
|
if (!columnId || !props.selectedGridCells.length) {
|
|
23
24
|
return Promise.resolve([]);
|
|
24
25
|
}
|
|
@@ -41,16 +42,16 @@ export const BulkUpdateValueSelector = (props) => {
|
|
|
41
42
|
: 'Enter Value', autoFocus: true, disabled: props.disabled, className: "twa:w-full", value: props.selectedColumnValue, onChange: (e) => {
|
|
42
43
|
props.onColumnValueChange(e.target.value);
|
|
43
44
|
} }));
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
return (React.createElement(Flex, { className: clsx('twa:overflow-visible twa:max-w-full', props.className), style: props.style }, isDateType ? (React.createElement(React.Fragment, null,
|
|
46
|
+
React.createElement(InputGroup, { Component: Flex, "data-id": "bulk-update-input-wrapper", className: "twa:w-full" },
|
|
47
|
+
React.createElement(DropdownButton, { "aria-label": "Bulk Update Value Selector", "data-id": "bulk-update-value-type-selector", "data-value": valueType, columns: ['label'], variant: "outlined", tone: "neutral", items: [
|
|
48
|
+
{ label: 'New', icon: React.createElement(Icon, { name: "edit" }), onClick: () => setValueType('new') },
|
|
49
|
+
{
|
|
50
|
+
label: 'Existing',
|
|
51
|
+
icon: React.createElement(Icon, { name: "grid" }),
|
|
52
|
+
onClick: () => setValueType('existing'),
|
|
53
|
+
},
|
|
54
|
+
] },
|
|
55
|
+
React.createElement(React.Fragment, null, valueType === 'existing' ? React.createElement(Icon, { name: "grid" }) : React.createElement(Icon, { name: "edit" }))),
|
|
56
|
+
valueType === 'new' ? input : permittedValueSelector))) : (permittedValueSelector)));
|
|
56
57
|
};
|
|
@@ -129,6 +129,14 @@ export const StyleComponent = (props) => {
|
|
|
129
129
|
}
|
|
130
130
|
setComponentStyle(newStyle);
|
|
131
131
|
};
|
|
132
|
+
const onAlignmentChange = (alignment) => {
|
|
133
|
+
const newStyle = { ...componentStyle };
|
|
134
|
+
newStyle.Alignment = alignment;
|
|
135
|
+
if (alignment == 'Default') {
|
|
136
|
+
delete newStyle.Alignment;
|
|
137
|
+
}
|
|
138
|
+
setComponentStyle(newStyle);
|
|
139
|
+
};
|
|
132
140
|
const Cmp = props.headless ? Box : Panel;
|
|
133
141
|
const headerText = props.headerText ?? 'Style';
|
|
134
142
|
const cmpProps = props.headless
|
|
@@ -216,7 +224,18 @@ export const StyleComponent = (props) => {
|
|
|
216
224
|
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) }))) : (React.createElement(Flex, { flexDirection: "row", alignItems: "center", className: "twa:gap-2 twa:flex-wrap" }, fontSizes.map((enumName) => {
|
|
217
225
|
return (React.createElement(Radio, { onClick: () => onFontSizeChange(enumName), checked: (enumName == 'Default' && !componentStyle.FontSize) ||
|
|
218
226
|
componentStyle.FontSize === enumName, key: enumName }, enumName));
|
|
219
|
-
})))
|
|
227
|
+
}))),
|
|
228
|
+
React.createElement("span", null, "Alignment"),
|
|
229
|
+
React.createElement(ToggleGroup, null,
|
|
230
|
+
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed
|
|
231
|
+
? onAlignmentChange('Left')
|
|
232
|
+
: onAlignmentChange('Default') }),
|
|
233
|
+
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed
|
|
234
|
+
? onAlignmentChange('Center')
|
|
235
|
+
: onAlignmentChange('Default') }),
|
|
236
|
+
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed
|
|
237
|
+
? onAlignmentChange('Right')
|
|
238
|
+
: onAlignmentChange('Default') })))))),
|
|
220
239
|
!props.hidePreview && (React.createElement(Card, { shadow: false },
|
|
221
240
|
React.createElement(Card.Title, null, "Preview"),
|
|
222
241
|
React.createElement(Card.Body, { className: "twa:grid twa:place-items-center" },
|
|
@@ -222,6 +222,8 @@ export const getAdaptableToolPanelAgGridComponent = (adaptable) => {
|
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
224
|
return class AdaptableToolPanelAgGridComponent {
|
|
225
|
+
gui;
|
|
226
|
+
unmountReactRoot;
|
|
225
227
|
init(params) {
|
|
226
228
|
const api = adaptable.api;
|
|
227
229
|
this.gui = document.createElement('div');
|
|
@@ -16,19 +16,6 @@ import { CustomSortWizard } from './Wizard/CustomSortWizard';
|
|
|
16
16
|
export class CustomSortSummaryComponent extends React.Component {
|
|
17
17
|
constructor(props) {
|
|
18
18
|
super(props);
|
|
19
|
-
this.onFinishWizard = (customSort) => {
|
|
20
|
-
if (this.props.CustomSorts.find((x) => x.ColumnId == customSort.ColumnId)) {
|
|
21
|
-
this.props.onEditCustomSort(customSort);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this.props.onAddCustomSort(customSort);
|
|
25
|
-
}
|
|
26
|
-
this.setState({
|
|
27
|
-
editedAdaptableObject: null,
|
|
28
|
-
wizardStartIndex: 0,
|
|
29
|
-
wizardStatus: WizardStatus.None,
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
19
|
this.state = UIHelper.getEmptyConfigState();
|
|
33
20
|
}
|
|
34
21
|
render() {
|
|
@@ -76,6 +63,19 @@ export class CustomSortSummaryComponent extends React.Component {
|
|
|
76
63
|
wizardStatus: WizardStatus.None,
|
|
77
64
|
});
|
|
78
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
79
|
canFinishWizard() {
|
|
80
80
|
let customSort = this.state.editedAdaptableObject;
|
|
81
81
|
return (StringExtensions.IsNotNullOrEmpty(customSort.ColumnId) &&
|
|
@@ -69,18 +69,17 @@ class DashboardPopupComponent extends React.Component {
|
|
|
69
69
|
React.createElement(Flex, { flexDirection: "column", className: "twa:h-full twa:gap-4" },
|
|
70
70
|
areDashboardSettingsVisible && (React.createElement(React.Fragment, null,
|
|
71
71
|
React.createElement(Card, null,
|
|
72
|
-
React.createElement(Card.Title, { gap: 8 },
|
|
73
|
-
"Display Settings",
|
|
74
|
-
React.createElement(ToggleButton, { className: "twa:self-end", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible')),
|
|
72
|
+
React.createElement(Card.Title, { gap: 8 }, "Display Settings"),
|
|
75
73
|
React.createElement(Card.Body, { gap: 2, className: "twa:p-2" },
|
|
76
|
-
React.createElement(ToggleButton, {
|
|
74
|
+
React.createElement(ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
|
|
75
|
+
this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
|
|
77
76
|
this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null)))),
|
|
78
77
|
React.createElement(Card, { className: "twa:flex-1 twa:overflow-hidden", gap: 0 },
|
|
79
78
|
React.createElement(Card.Title, null, "Contents"),
|
|
80
79
|
React.createElement(Card.Body, { className: "twa:p-2" },
|
|
81
80
|
React.createElement(Tabs, { className: "twa:flex-1 twa:min-h-0" },
|
|
82
81
|
React.createElement(Tabs.Tab, { value: "pinned-toolbars" }, "Pinned Toolbars"),
|
|
83
|
-
React.createElement(Tabs.Tab, { value: "tabbed-toolbars" }, "
|
|
82
|
+
React.createElement(Tabs.Tab, { value: "tabbed-toolbars" }, "Tabs & Toolbars"),
|
|
84
83
|
React.createElement(Tabs.Tab, { value: "buttons" }, "Buttons"),
|
|
85
84
|
React.createElement(Tabs.Content, { value: "pinned-toolbars", className: contentCls },
|
|
86
85
|
React.createElement(PinnedToolbarsSelector, null)),
|
|
@@ -12,7 +12,7 @@ export const ExportDestinationPicker = ({ reportName, reportFormat, viewType, })
|
|
|
12
12
|
};
|
|
13
13
|
const supportedDestinations = exportApi.getSupportedExportDestinations(reportFormat);
|
|
14
14
|
if (supportedDestinations.length === 0 || supportedDestinations.length === 1) {
|
|
15
|
-
return (React.createElement(ButtonExport, { className: clsx(viewType !== 'StatusBar' ? '
|
|
15
|
+
return (React.createElement(ButtonExport, { className: clsx(viewType !== 'StatusBar' ? '' : undefined, ''), onClick: () => handleExport(supportedDestinations[0]), tooltip: "Export Report", disabled: reportName == undefined || reportFormat == undefined }));
|
|
16
16
|
}
|
|
17
17
|
const destinationItems = supportedDestinations.map((destination) => ({
|
|
18
18
|
label: destination,
|
|
@@ -4,13 +4,15 @@ import { ReportNameSelector } from './ReportNameSelector';
|
|
|
4
4
|
import { ReportFormatSelector } from './ReportFormatSelector';
|
|
5
5
|
import { ExportDestinationPicker } from './ExportDestinationPicker';
|
|
6
6
|
import { useAdaptable } from '../AdaptableContext';
|
|
7
|
+
import { Flex } from '../../components/Flex';
|
|
7
8
|
export const ExportStatusBar = () => {
|
|
8
9
|
const adaptable = useAdaptable();
|
|
9
10
|
const exportApi = adaptable.api.exportApi;
|
|
10
11
|
const currentReportName = useSelector((state) => state.Export.CurrentReport);
|
|
11
12
|
const currentFormat = useSelector((state) => state.Export.CurrentFormat);
|
|
12
13
|
return (React.createElement(React.Fragment, null,
|
|
13
|
-
React.createElement(
|
|
14
|
-
|
|
14
|
+
React.createElement(Flex, { className: "twa:gap-1" },
|
|
15
|
+
React.createElement(ReportNameSelector, { viewType: "StatusBar", reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
|
|
16
|
+
React.createElement(ReportFormatSelector, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) })),
|
|
15
17
|
React.createElement(ExportDestinationPicker, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat })));
|
|
16
18
|
};
|
|
@@ -15,6 +15,7 @@ import { ReportNameSelector } from './ReportNameSelector';
|
|
|
15
15
|
import { ReportFormatSelector } from './ReportFormatSelector';
|
|
16
16
|
import { ExportDestinationPicker } from './ExportDestinationPicker';
|
|
17
17
|
import { Flex } from '../../components/Flex';
|
|
18
|
+
import clsx from 'clsx';
|
|
18
19
|
export const ExportViewPanel = (props) => {
|
|
19
20
|
const dispatch = useDispatch();
|
|
20
21
|
const exportApi = props.api.exportApi;
|
|
@@ -26,27 +27,33 @@ export const ExportViewPanel = (props) => {
|
|
|
26
27
|
const deleteMessage = currentReport
|
|
27
28
|
? `Are you sure you want to delete '${currentReport.Name}'?`
|
|
28
29
|
: 'Are you sure you want to delete this report?';
|
|
29
|
-
const
|
|
30
|
-
|
|
30
|
+
const isToolbar = props.viewType === 'Toolbar';
|
|
31
|
+
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
32
|
+
return (React.createElement(Flex, { flexDirection: "row", className: clsx(`ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
|
|
33
|
+
'twa:min-w-[486px] twa:flex-nowrap': isToolbar,
|
|
34
|
+
'twa:flex-1 twa:flex-wrap': !isToolbar,
|
|
35
|
+
}) },
|
|
31
36
|
React.createElement(ReportNameSelector, { viewType: props.viewType, reportName: currentReportName, userReports: userReports, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
|
|
32
37
|
React.createElement(ReportFormatSelector, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) }),
|
|
33
38
|
React.createElement(Flex, { className: join(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls twa:w-full`) },
|
|
34
|
-
React.createElement(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})), tooltip: "Create New Report", accessLevel: props.accessLevel }),
|
|
43
|
-
React.createElement(ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
|
|
44
|
-
props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { className: `ab-${elementType}__Export__schedule twa:ml-1`, onClick: () => {
|
|
45
|
-
const reportSchedule = ObjectFactory.CreateReportSchedule(currentReportName, currentFormat);
|
|
46
|
-
dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ScheduleModuleId, 'SchedulePopup', {
|
|
39
|
+
React.createElement(Flex, { className: "twa:min-w-[44px]" },
|
|
40
|
+
React.createElement(ExportDestinationPicker, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat })),
|
|
41
|
+
React.createElement(Flex, null,
|
|
42
|
+
React.createElement(ButtonEdit, { onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
|
|
43
|
+
action: 'Edit',
|
|
44
|
+
source: 'Toolbar',
|
|
45
|
+
})), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null, accessLevel: accessLevel }),
|
|
46
|
+
React.createElement(ButtonNew, { variant: "text", className: `ab-${elementType}__Export__new`, tone: "neutral", children: null, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
|
|
47
47
|
action: 'New',
|
|
48
48
|
source: 'Toolbar',
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
})), tooltip: "Create New Report", accessLevel: props.accessLevel }),
|
|
50
|
+
React.createElement(ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
|
|
51
|
+
props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { className: `ab-${elementType}__Export__schedule`, onClick: () => {
|
|
52
|
+
const reportSchedule = ObjectFactory.CreateReportSchedule(currentReportName, currentFormat);
|
|
53
|
+
dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ScheduleModuleId, 'SchedulePopup', {
|
|
54
|
+
action: 'New',
|
|
55
|
+
source: 'Toolbar',
|
|
56
|
+
value: reportSchedule,
|
|
57
|
+
}));
|
|
58
|
+
}, tooltip: "Schedule", disabled: currentReport == null, accessLevel: props.accessLevel }))))));
|
|
52
59
|
};
|
|
@@ -15,19 +15,6 @@ import { FormatColumnWizard } from './Wizard/FormatColumnWizard';
|
|
|
15
15
|
export class FormatColumnSummaryComponent extends React.Component {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
18
|
-
this.onFinishWizard = (formatColumn) => {
|
|
19
|
-
if (this.props.FormatColumns.find((x) => x.Uuid == formatColumn.Uuid)) {
|
|
20
|
-
this.props.onEditFormatColumn(formatColumn);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.props.onAddFormatColumn(formatColumn);
|
|
24
|
-
}
|
|
25
|
-
this.setState({
|
|
26
|
-
editedAdaptableObject: null,
|
|
27
|
-
wizardStartIndex: 0,
|
|
28
|
-
wizardStatus: WizardStatus.None,
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
18
|
this.state = UIHelper.getEmptyConfigState();
|
|
32
19
|
}
|
|
33
20
|
render() {
|
|
@@ -70,6 +57,19 @@ export class FormatColumnSummaryComponent extends React.Component {
|
|
|
70
57
|
wizardStatus: WizardStatus.None,
|
|
71
58
|
});
|
|
72
59
|
}
|
|
60
|
+
onFinishWizard = (formatColumn) => {
|
|
61
|
+
if (this.props.FormatColumns.find((x) => x.Uuid == formatColumn.Uuid)) {
|
|
62
|
+
this.props.onEditFormatColumn(formatColumn);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.props.onAddFormatColumn(formatColumn);
|
|
66
|
+
}
|
|
67
|
+
this.setState({
|
|
68
|
+
editedAdaptableObject: null,
|
|
69
|
+
wizardStartIndex: 0,
|
|
70
|
+
wizardStatus: WizardStatus.None,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
73
|
canFinishWizard() {
|
|
74
74
|
let formatColumn = this.state.editedAdaptableObject;
|
|
75
75
|
return formatColumn.Scope != undefined && UIHelper.IsNotEmptyStyle(formatColumn.Style);
|
|
@@ -3,16 +3,11 @@ import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
|
3
3
|
import { CheckBox } from '../../../components/CheckBox';
|
|
4
4
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
5
5
|
import { Tag } from '../../../components/Tag';
|
|
6
|
-
import { ToggleGroup } from '../../../components/Toggle/ToggleGroup';
|
|
7
|
-
import { Toggle } from '../../../components/Toggle/Toggle';
|
|
8
6
|
import Radio, { RadioGroup } from '../../../components/Radio';
|
|
9
7
|
import { Box, Flex } from '../../../components/Flex';
|
|
10
8
|
import { Card } from '../../../components/Card';
|
|
11
9
|
export const renderFormatColumnSettingsSummary = (data) => {
|
|
12
10
|
return (React.createElement(Box, { className: "twa:p-2" },
|
|
13
|
-
React.createElement(Box, null,
|
|
14
|
-
"Cell alignment ",
|
|
15
|
-
React.createElement(Tag, null, data.CellAlignment ?? 'default')),
|
|
16
11
|
React.createElement(Box, { className: "twa:mt-3" },
|
|
17
12
|
"Data Rows ",
|
|
18
13
|
React.createElement(Tag, null, data.RowScope?.ExcludeDataRows ? 'no' : 'yes')),
|
|
@@ -35,13 +30,6 @@ export const renderFormatColumnSettingsSummary = (data) => {
|
|
|
35
30
|
};
|
|
36
31
|
export const FormatColumnSettingsWizardSection = (props) => {
|
|
37
32
|
const { data } = useOnePageAdaptableWizardContext();
|
|
38
|
-
const onCellAlignmentSelectChanged = (CellAlignment) => {
|
|
39
|
-
const newData = { ...data, CellAlignment };
|
|
40
|
-
if (CellAlignment === null) {
|
|
41
|
-
delete newData.CellAlignment;
|
|
42
|
-
}
|
|
43
|
-
props.onChange(newData);
|
|
44
|
-
};
|
|
45
33
|
const onExcludeDataRowsChanged = (ExcludeDataRows) => {
|
|
46
34
|
props.onChange({
|
|
47
35
|
...data,
|
|
@@ -83,17 +71,6 @@ export const FormatColumnSettingsWizardSection = (props) => {
|
|
|
83
71
|
React.createElement(Card.Body, null,
|
|
84
72
|
React.createElement(Flex, { flexDirection: "row" },
|
|
85
73
|
React.createElement(FormLayout, null,
|
|
86
|
-
React.createElement(FormRow, { label: "Cell Alignment" },
|
|
87
|
-
React.createElement(ToggleGroup, null,
|
|
88
|
-
React.createElement(Toggle, { icon: "align-left", pressed: data.CellAlignment === 'Left', onPressedChange: (pressed) => pressed
|
|
89
|
-
? onCellAlignmentSelectChanged('Left')
|
|
90
|
-
: onCellAlignmentSelectChanged(null) }),
|
|
91
|
-
React.createElement(Toggle, { icon: "align-center", pressed: data.CellAlignment === 'Center', onPressedChange: (pressed) => pressed
|
|
92
|
-
? onCellAlignmentSelectChanged('Center')
|
|
93
|
-
: onCellAlignmentSelectChanged(null) }),
|
|
94
|
-
React.createElement(Toggle, { icon: "align-right", pressed: data.CellAlignment === 'Right', onPressedChange: (pressed) => pressed
|
|
95
|
-
? onCellAlignmentSelectChanged('Right')
|
|
96
|
-
: onCellAlignmentSelectChanged(null) }))),
|
|
97
74
|
data.Target === 'cell' && (React.createElement(React.Fragment, null,
|
|
98
75
|
React.createElement(FormRow, { label: "Exclude Data Rows:" },
|
|
99
76
|
React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
@@ -8,7 +8,6 @@ export const isFormatColumnStyleValid = (data, api) => {
|
|
|
8
8
|
if (data.Style &&
|
|
9
9
|
UIHelper.IsEmptyStyle(data.Style) &&
|
|
10
10
|
data.DisplayFormat === undefined &&
|
|
11
|
-
data.CellAlignment === undefined &&
|
|
12
11
|
!api.columnScopeApi.isSingleBooleanColumnScope(data.Scope)) {
|
|
13
12
|
return 'No format applied';
|
|
14
13
|
}
|
|
@@ -19,7 +18,8 @@ const toStyle = (data) => {
|
|
|
19
18
|
...convertAdaptableStyleToCSS(data.Style ?? {}),
|
|
20
19
|
borderWidth: data.Style?.BorderColor ? 2 : 0,
|
|
21
20
|
borderStyle: 'solid',
|
|
22
|
-
|
|
21
|
+
// ToDO abcdefg
|
|
22
|
+
textAlign: data.Style?.Alignment ? data.Style.Alignment.toLowerCase() : undefined,
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
export const renderFormatColumnStyleWizardSummary = (data) => {
|
|
@@ -15,19 +15,6 @@ import { FreeTextColumnWizard } from './Wizard/FreeTextColumnWizard';
|
|
|
15
15
|
export class FreeTextColumnSummaryComponent extends React.Component {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
18
|
-
this.onFinishWizard = (FreeTextColumn) => {
|
|
19
|
-
if (this.props.FreeTextColumns.find((x) => x.ColumnId == FreeTextColumn.ColumnId)) {
|
|
20
|
-
this.props.onEditFreeTextColumn(FreeTextColumn);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.props.onAddFreeTextColumn(FreeTextColumn);
|
|
24
|
-
}
|
|
25
|
-
this.setState({
|
|
26
|
-
editedAdaptableObject: null,
|
|
27
|
-
wizardStartIndex: 0,
|
|
28
|
-
wizardStatus: WizardStatus.None,
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
18
|
this.state = UIHelper.getEmptyConfigState();
|
|
32
19
|
}
|
|
33
20
|
render() {
|
|
@@ -68,6 +55,19 @@ export class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
68
55
|
wizardStatus: WizardStatus.None,
|
|
69
56
|
});
|
|
70
57
|
}
|
|
58
|
+
onFinishWizard = (FreeTextColumn) => {
|
|
59
|
+
if (this.props.FreeTextColumns.find((x) => x.ColumnId == FreeTextColumn.ColumnId)) {
|
|
60
|
+
this.props.onEditFreeTextColumn(FreeTextColumn);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.props.onAddFreeTextColumn(FreeTextColumn);
|
|
64
|
+
}
|
|
65
|
+
this.setState({
|
|
66
|
+
editedAdaptableObject: null,
|
|
67
|
+
wizardStartIndex: 0,
|
|
68
|
+
wizardStatus: WizardStatus.None,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
71
|
canFinishWizard() {
|
|
72
72
|
let FreeTextColumn = this.state.editedAdaptableObject;
|
|
73
73
|
return StringExtensions.IsNotNullOrEmpty(FreeTextColumn.ColumnId);
|