@adaptabletools/adaptable 11.1.2 → 11.1.5
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/bundle.cjs.js +120 -120
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
- package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +4 -0
- package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -2
- package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
- package/src/AdaptableOptions/SmartEdit.js +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +1 -1
- package/src/Api/Implementation/FilterApiImpl.js +8 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +6 -8
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +9 -0
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/InternalApi.d.ts +4 -0
- package/src/Api/SmartEditApi.d.ts +3 -2
- package/src/Api/ThemeApi.d.ts +4 -0
- package/src/PredefinedConfig/ExportState.d.ts +0 -5
- package/src/PredefinedConfig/PopupState.d.ts +2 -1
- package/src/PredefinedConfig/SystemState.d.ts +2 -5
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
- package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
- package/src/Strategy/AlertModule.js +29 -9
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/ExportModule.js +14 -4
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +24 -13
- package/src/Strategy/Utilities/getExportColumnsViewItems.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
- package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
- package/src/Utilities/Services/AlertService.d.ts +3 -3
- package/src/Utilities/Services/AlertService.js +6 -6
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +3 -3
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +20 -20
- package/src/Utilities/Services/EntitlementService.d.ts +3 -3
- package/src/Utilities/Services/EntitlementService.js +12 -8
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.d.ts +3 -3
- package/src/Utilities/Services/MetamodelService.js +4 -4
- package/src/Utilities/Services/ModuleService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +12 -12
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +20 -19
- package/src/Utilities/Services/ReportService.d.ts +4 -4
- package/src/Utilities/Services/ReportService.js +50 -44
- package/src/Utilities/Services/TeamSharingService.d.ts +3 -3
- package/src/Utilities/Services/TeamSharingService.js +19 -16
- package/src/Utilities/Services/ValidationService.d.ts +3 -3
- package/src/Utilities/Services/ValidationService.js +19 -17
- package/src/View/AdaptableView.js +2 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +46 -9
- package/src/View/Alert/Wizard/AlertWizard.js +22 -24
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -5
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -3
- package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
- package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -3
- package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
- package/src/View/DataSource/DataSourceViewPanel.js +15 -13
- package/src/View/Export/ExportViewPanel.d.ts +1 -3
- package/src/View/Export/ExportViewPanel.js +1 -17
- package/src/View/GridInfo/AdaptableObjectsSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +4 -4
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -4
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +6 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +15 -3
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/agGrid/Adaptable.d.ts +5 -4
- package/src/agGrid/Adaptable.js +56 -49
- package/src/components/StylePreview.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +5 -0
- package/src/metamodel/adaptable.metamodel.js +16 -5
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
- package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
- package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
- package/src/View/Export/ExportCustomDestinationFormPopups.js +0 -15
|
@@ -78,7 +78,7 @@ exports.AlertWizard = (props) => {
|
|
|
78
78
|
};
|
|
79
79
|
if (alertDefinition.AlertForm && typeof alertDefinition.AlertForm !== 'string') {
|
|
80
80
|
const alertButtons = (_a = alertDefinition.AlertForm) === null || _a === void 0 ? void 0 : _a.Buttons;
|
|
81
|
-
alertButtons.forEach((alertButton) => {
|
|
81
|
+
alertButtons === null || alertButtons === void 0 ? void 0 : alertButtons.forEach((alertButton) => {
|
|
82
82
|
const alertAction = alertButton.Action;
|
|
83
83
|
if (Array.isArray(alertAction)) {
|
|
84
84
|
alertButton.Action = alertAction
|
|
@@ -89,29 +89,27 @@ exports.AlertWizard = (props) => {
|
|
|
89
89
|
alertButton.Action = mapValidButtonActions(alertAction);
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
delete alertDefinition.AlertProperties.JumpToCell;
|
|
114
|
-
}
|
|
92
|
+
}
|
|
93
|
+
// map Alert Properties(Behaviour)
|
|
94
|
+
if (isCellChangeAlert) {
|
|
95
|
+
alertDefinition.AlertProperties.HighlightCell = alertDefinition.AlertProperties.HighlightRow;
|
|
96
|
+
delete alertDefinition.AlertProperties.HighlightRow;
|
|
97
|
+
alertDefinition.AlertProperties.JumpToCell = alertDefinition.AlertProperties.JumpToRow;
|
|
98
|
+
delete alertDefinition.AlertProperties.JumpToRow;
|
|
99
|
+
}
|
|
100
|
+
if (isAddedRowChangeAlert) {
|
|
101
|
+
alertDefinition.AlertProperties.HighlightRow = alertDefinition.AlertProperties.HighlightCell;
|
|
102
|
+
delete alertDefinition.AlertProperties.HighlightCell;
|
|
103
|
+
alertDefinition.AlertProperties.JumpToRow = alertDefinition.AlertProperties.JumpToCell;
|
|
104
|
+
delete alertDefinition.AlertProperties.JumpToCell;
|
|
105
|
+
delete alertDefinition.AlertProperties.PreventEdit;
|
|
106
|
+
}
|
|
107
|
+
if (isRemovedRowChangeAlert) {
|
|
108
|
+
delete alertDefinition.AlertProperties.PreventEdit;
|
|
109
|
+
delete alertDefinition.AlertProperties.HighlightRow;
|
|
110
|
+
delete alertDefinition.AlertProperties.JumpToRow;
|
|
111
|
+
delete alertDefinition.AlertProperties.HighlightCell;
|
|
112
|
+
delete alertDefinition.AlertProperties.JumpToCell;
|
|
115
113
|
}
|
|
116
114
|
setAlertDefinition(alertDefinition);
|
|
117
115
|
};
|
|
@@ -90,15 +90,15 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
90
90
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
91
91
|
React.createElement(FormLayout_1.default, null,
|
|
92
92
|
React.createElement(FormLayout_1.FormRow, { label: "Id" },
|
|
93
|
-
React.createElement(Input_1.default, { value: data.ColumnId || '', width: 300, autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter an Id for the column", onChange: handleColumnIdChange })),
|
|
93
|
+
React.createElement(Input_1.default, { "data-name": "column-id", value: data.ColumnId || '', width: 300, autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter an Id for the column", onChange: handleColumnIdChange })),
|
|
94
94
|
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
95
|
-
React.createElement(Input_1.default, { autoFocus: inEdit, onFocus: () => {
|
|
95
|
+
React.createElement(Input_1.default, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => {
|
|
96
96
|
setColumnNameFocused(true);
|
|
97
97
|
}, onBlur: () => {
|
|
98
98
|
setColumnNameFocused(false);
|
|
99
99
|
}, value: ColumnNameFocused ? ColumnName || '' : ColumnName || ColumnId || '', width: 300, type: "text", placeholder: "Enter column name", onChange: handleColumnNameChange })),
|
|
100
100
|
React.createElement(FormLayout_1.FormRow, { label: "Type" },
|
|
101
|
-
React.createElement(DropdownButton_1.default, { style: {
|
|
101
|
+
React.createElement(DropdownButton_1.default, { "data-name": "column-type", style: {
|
|
102
102
|
width: '300px',
|
|
103
103
|
whiteSpace: 'normal',
|
|
104
104
|
overflow: 'hidden',
|
|
@@ -109,11 +109,11 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
109
109
|
onClick: () => handleDataTypeChange(item.value),
|
|
110
110
|
})) }, dataType ? dataType : 'Select Data Type')),
|
|
111
111
|
React.createElement(FormLayout_1.FormRow, { label: "Width" },
|
|
112
|
-
React.createElement(Input_1.default, { type: "number", width: 300, value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
112
|
+
React.createElement(Input_1.default, { "data-name": "column-width", type: "number", width: 300, value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
113
113
|
Width: Number(e.target.value),
|
|
114
114
|
}) })),
|
|
115
115
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
116
|
-
React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Tooltip")))))),
|
|
116
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Tooltip")))))),
|
|
117
117
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
118
118
|
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
119
119
|
};
|
|
@@ -17,7 +17,7 @@ const SuspendToggleButton_1 = require("../Buttons/SuspendToggleButton/SuspendTog
|
|
|
17
17
|
const ValueSelector_1 = require("../ValueSelector");
|
|
18
18
|
const ICON_SIZE = 26;
|
|
19
19
|
exports.AdaptableObjectListItem = (props) => {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
21
21
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
22
22
|
const dispatch = react_redux_1.useDispatch();
|
|
23
23
|
const [isEditWizardVisible, setIsEditWizardVisible] = React.useState(false);
|
|
@@ -56,8 +56,8 @@ exports.AdaptableObjectListItem = (props) => {
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
const isEditDisabled = !Boolean(EditWizard || viewOptions.onOpenEditPopup);
|
|
59
|
-
return (React.createElement(rebass_1.Flex, { as: "li", mb: 3, className: itemClassName },
|
|
60
|
-
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_g = props.data.items) === null || _g === void 0 ? void 0 :
|
|
59
|
+
return (React.createElement(rebass_1.Flex, { "data-name": "adaptable-object-list-item", "data-value": props.data.abObject.Uuid, as: "li", mb: 3, className: itemClassName },
|
|
60
|
+
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_j = (_h = (_g = props.data.items).filter) === null || _h === void 0 ? void 0 : _h.call(_g, Boolean)) === null || _j === void 0 ? void 0 : _j.map((tag, index) => {
|
|
61
61
|
var _a;
|
|
62
62
|
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${baseClassName}__row` },
|
|
63
63
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableForm, ButtonContext } from '../../../../../types';
|
|
3
|
+
export interface FormDialogProps {
|
|
4
|
+
id: string;
|
|
5
|
+
formProps: any;
|
|
6
|
+
prepareContext: (context: ButtonContext) => Promise<ButtonContext> | ButtonContext;
|
|
7
|
+
form: AdaptableForm<ButtonContext>;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormDialog: React.FunctionComponent<FormDialogProps>;
|
|
10
|
+
export declare const FormPopups: React.FunctionComponent;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormPopups = exports.FormDialog = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const AdaptableFormComponent_1 = require("../../../../components/AdaptableFormComponent");
|
|
9
|
+
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
10
|
+
const AdaptableForm_1 = require("../../../../PredefinedConfig/Common/AdaptableForm");
|
|
11
|
+
const PopupRedux_1 = require("../../../../Redux/ActionsReducers/PopupRedux");
|
|
12
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
13
|
+
exports.FormDialog = ({ id, formProps, form, prepareContext, }) => {
|
|
14
|
+
const dispatch = react_redux_1.useDispatch();
|
|
15
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
|
+
const [data, setData] = React.useState(() => {
|
|
17
|
+
return AdaptableForm_1.getDefaultAdaptableFormData(form);
|
|
18
|
+
});
|
|
19
|
+
const handleDismiss = () => {
|
|
20
|
+
dispatch(PopupRedux_1.PopupHideForm(id));
|
|
21
|
+
};
|
|
22
|
+
const context = Object.assign({ adaptableApi: adaptable.api, formData: data }, formProps);
|
|
23
|
+
return (React.createElement(Dialog_1.default, { isOpen: true, showCloseButton: false, style: { minHeight: 'auto', minWidth: 400 }, onDismiss: handleDismiss },
|
|
24
|
+
React.createElement(rebass_1.Box, { padding: 4 },
|
|
25
|
+
React.createElement(AdaptableFormComponent_1.AdaptableFormComponent, { formDef: form, data: data, context: context, onChange: setData, api: adaptable.api, displayTitle: true, onButtonClick: async (button) => {
|
|
26
|
+
var _a;
|
|
27
|
+
handleDismiss();
|
|
28
|
+
const preparedContext = typeof prepareContext === 'function' ? await prepareContext(context) : context;
|
|
29
|
+
(_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, preparedContext);
|
|
30
|
+
} }))));
|
|
31
|
+
};
|
|
32
|
+
exports.FormPopups = () => {
|
|
33
|
+
const forms = react_redux_1.useSelector((state) => state.Popup.FormPopup.FormList);
|
|
34
|
+
return (React.createElement(React.Fragment, null, forms.map((form) => {
|
|
35
|
+
return (React.createElement(exports.FormDialog, { key: form.Id, prepareContext: form.prepareContext, id: form.Id, formProps: form.FormProps, form: form.Form }));
|
|
36
|
+
})));
|
|
37
|
+
};
|
|
@@ -23,7 +23,7 @@ exports.WindowPopups = () => {
|
|
|
23
23
|
const Component = (_a = windowFactory_1.windowFactory[windowItem.Id]) !== null && _a !== void 0 ? _a : NoopComponent;
|
|
24
24
|
const _g = (_b = windowItem === null || windowItem === void 0 ? void 0 : windowItem.PopupProps) !== null && _b !== void 0 ? _b : {}, { windowModalProps } = _g, restPopupProps = tslib_1.__rest(_g, ["windowModalProps"]);
|
|
25
25
|
const handleDismiss = () => {
|
|
26
|
-
dispatch(PopupRedux_1.
|
|
26
|
+
dispatch(PopupRedux_1.PopupHideWindow(windowItem.Id));
|
|
27
27
|
};
|
|
28
28
|
const size = (_d = (_c = windowModalSettings === null || windowModalSettings === void 0 ? void 0 : windowModalSettings[windowItem.Id]) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : Utilities_1.getWindowPopupSize();
|
|
29
29
|
const position = (_f = (_e = windowModalSettings === null || windowModalSettings === void 0 ? void 0 : windowModalSettings[windowItem.Id]) === null || _e === void 0 ? void 0 : _e.position) !== null && _f !== void 0 ? _f : Utilities_1.getMiddlePosition(size);
|
|
@@ -53,9 +53,7 @@ class DataChangeHistoryPopupComponent extends React.Component {
|
|
|
53
53
|
this.props.api.dataChangeHistoryApi.undoDataChangeHistoryEntry(changeToBeUndone);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
const currentAgGridTheme = this.props.api.
|
|
57
|
-
.getAdaptableInstance()
|
|
58
|
-
.getAgGridCurrentThemeName();
|
|
56
|
+
const currentAgGridTheme = this.props.api.themeApi.getAgGridCurrentThemeName();
|
|
59
57
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
60
58
|
React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPopup", flexDirection: "column", style: { height: '100%' } },
|
|
61
59
|
React.createElement(rebass_1.Flex, { style: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
2
2
|
import { DataSource } from '../../PredefinedConfig/DataSourceState';
|
|
3
|
-
import * as DataSourceRedux from '../../Redux/ActionsReducers/DataSourceRedux';
|
|
4
3
|
import * as React from 'react';
|
|
4
|
+
import * as Redux from 'redux';
|
|
5
5
|
export interface DataSourceViewPanelComponentProps extends ViewPanelProps {
|
|
6
6
|
CurrentDataSourceName: string;
|
|
7
7
|
DataSources: DataSource[];
|
|
8
|
-
onSelectDataSource: (DataSource: DataSource) =>
|
|
8
|
+
onSelectDataSource: (DataSource: DataSource) => Redux.Action;
|
|
9
9
|
}
|
|
10
10
|
interface DataSourceViewPanelComponentState {
|
|
11
11
|
CurrentDataSource: DataSource;
|
|
@@ -15,5 +15,5 @@ declare class DataSourceViewPanelComponent extends React.Component<DataSourceVie
|
|
|
15
15
|
render(): JSX.Element;
|
|
16
16
|
onSelectedDataSourceChanged(dataSourceName: string): void;
|
|
17
17
|
}
|
|
18
|
-
export declare let DataSourceViewPanelControl: import("react-redux").ConnectedComponent<typeof DataSourceViewPanelComponent,
|
|
18
|
+
export declare let DataSourceViewPanelControl: import("react-redux").ConnectedComponent<typeof DataSourceViewPanelComponent, Pick<React.ClassAttributes<DataSourceViewPanelComponent> & DataSourceViewPanelComponentProps, "ref" | "key">>;
|
|
19
19
|
export {};
|
|
@@ -8,6 +8,7 @@ const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions"
|
|
|
8
8
|
const rebass_1 = require("rebass");
|
|
9
9
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
|
|
10
10
|
const react_redux_1 = require("react-redux");
|
|
11
|
+
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
11
12
|
class DataSourceViewPanelComponent extends React.Component {
|
|
12
13
|
constructor(props) {
|
|
13
14
|
super(props);
|
|
@@ -22,11 +23,7 @@ class DataSourceViewPanelComponent extends React.Component {
|
|
|
22
23
|
let currentDataSourceName = this.state.CurrentDataSource == null
|
|
23
24
|
? selectDataSourceString
|
|
24
25
|
: this.state.CurrentDataSource.Name;
|
|
25
|
-
let availableDataSources = this.props.DataSources
|
|
26
|
-
// .filter(
|
|
27
|
-
// s => s.Name != currentDataSourceName
|
|
28
|
-
// )
|
|
29
|
-
.map((dataSource, index) => {
|
|
26
|
+
let availableDataSources = this.props.DataSources.map((dataSource) => {
|
|
30
27
|
return {
|
|
31
28
|
value: dataSource.Name,
|
|
32
29
|
label: dataSource.Name,
|
|
@@ -44,16 +41,11 @@ class DataSourceViewPanelComponent extends React.Component {
|
|
|
44
41
|
else {
|
|
45
42
|
let newDataSource = this.props.DataSources.find((ds) => ds.Name == dataSourceName);
|
|
46
43
|
this.setState({ CurrentDataSource: newDataSource });
|
|
47
|
-
|
|
48
|
-
alert('have params');
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.props.onSelectDataSource(newDataSource);
|
|
52
|
-
}
|
|
44
|
+
this.props.onSelectDataSource(newDataSource);
|
|
53
45
|
}
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
|
-
function mapStateToProps(state
|
|
48
|
+
function mapStateToProps(state) {
|
|
57
49
|
return {
|
|
58
50
|
CurrentDataSourceName: state.DataSource.CurrentDataSource,
|
|
59
51
|
DataSources: state.DataSource.DataSources,
|
|
@@ -61,7 +53,17 @@ function mapStateToProps(state, ownProps) {
|
|
|
61
53
|
}
|
|
62
54
|
function mapDispatchToProps(dispatch) {
|
|
63
55
|
return {
|
|
64
|
-
onSelectDataSource: (dataSource) =>
|
|
56
|
+
onSelectDataSource: (dataSource) => {
|
|
57
|
+
if (dataSource.Form) {
|
|
58
|
+
return dispatch(PopupRedux_1.PopupShowForm({
|
|
59
|
+
Id: 'data-source-form',
|
|
60
|
+
Form: dataSource.Form,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return dispatch(DataSourceRedux.DataSourceSelect(dataSource));
|
|
65
|
+
}
|
|
66
|
+
},
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
69
|
exports.DataSourceViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(DataSourceViewPanelComponent);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
2
|
-
import {
|
|
2
|
+
import { Report, ReportSchedule } from '../../PredefinedConfig/ExportState';
|
|
3
3
|
import { ExportDestination } from '../../PredefinedConfig/Common/Enums';
|
|
4
4
|
import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
|
|
5
|
-
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
6
5
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
7
6
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
8
7
|
import * as React from 'react';
|
|
@@ -13,7 +12,6 @@ export interface ExportViewPanelComponentProps extends ViewPanelProps {
|
|
|
13
12
|
onNewReport: (popup: string) => PopupRedux.PopupShowScreenAction;
|
|
14
13
|
onEditReport: (popup: string) => PopupRedux.PopupShowScreenAction;
|
|
15
14
|
onNewReportSchedule: (reportSchedule: ReportSchedule) => PopupRedux.PopupShowScreenAction;
|
|
16
|
-
showCustomDestinationForm: (data: ExportCustomDestinationPopup) => SystemRedux.SystemExportCustomDestinationPopupShowAction;
|
|
17
15
|
Columns: AdaptableColumn[];
|
|
18
16
|
Reports: Report[] | undefined;
|
|
19
17
|
CurrentReport: string | undefined;
|
|
@@ -4,7 +4,6 @@ exports.ExportViewPanelControl = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
6
6
|
const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
|
|
7
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
8
7
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
9
8
|
const React = tslib_1.__importStar(require("react"));
|
|
10
9
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
@@ -74,22 +73,8 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
74
73
|
if (currentReport != null) {
|
|
75
74
|
deleteMessage = deleteMessage + currentReport.Name + "'?";
|
|
76
75
|
}
|
|
77
|
-
const getCurrentCustomDestination = () => {
|
|
78
|
-
return this.isCustomDestination(currentDestination) ? currentDestination : undefined;
|
|
79
|
-
};
|
|
80
76
|
const onApplyExport = () => {
|
|
81
|
-
|
|
82
|
-
if (currentCustomDestination === null || currentCustomDestination === void 0 ? void 0 : currentCustomDestination.form) {
|
|
83
|
-
this.props.showCustomDestinationForm({
|
|
84
|
-
ExportDestination: currentCustomDestination,
|
|
85
|
-
ReportName: this.props.CurrentReport,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.props.onApplyExport(currentReport, this.isCustomDestination(currentDestination)
|
|
90
|
-
? currentDestination.name
|
|
91
|
-
: currentDestination);
|
|
92
|
-
}
|
|
77
|
+
this.props.onApplyExport(currentReport, this.isCustomDestination(currentDestination) ? currentDestination.name : currentDestination);
|
|
93
78
|
};
|
|
94
79
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
95
80
|
return (React.createElement(rebass_1.Flex, { style: { gap: 5 }, flexDirection: "row", className: `ab-${elementType}__Export__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
@@ -153,7 +138,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
153
138
|
source: 'Toolbar',
|
|
154
139
|
value: reportSchedule,
|
|
155
140
|
})),
|
|
156
|
-
showCustomDestinationForm: (data) => dispatch(SystemRedux.SystemExportCustomDestinationPopupShow(data)),
|
|
157
141
|
};
|
|
158
142
|
}
|
|
159
143
|
exports.ExportViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(ExportViewPanelComponent);
|
|
@@ -19,7 +19,7 @@ exports.AdaptableObjectsSummary = () => {
|
|
|
19
19
|
if (!(items === null || items === void 0 ? void 0 : items.length)) {
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
-
return (React.createElement("div",
|
|
22
|
+
return (React.createElement("div", { key: module.moduleInfo.ModuleName },
|
|
23
23
|
React.createElement("b", null, module.moduleInfo.FriendlyName),
|
|
24
24
|
(items === null || items === void 0 ? void 0 : items.length) && React.createElement(AdaptableObjectList_1.AdaptableObjectList, { items: items, module: module })));
|
|
25
25
|
})));
|
|
@@ -100,10 +100,10 @@ exports.GridInfoPopup = (props) => {
|
|
|
100
100
|
const showRadioButtons = [showGridSummary, showAdaptableOptions, showColumnInfo, showAdaptableObjects].filter((item) => item).length > 1;
|
|
101
101
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Grid Info', glyphicon: 'info-sign' },
|
|
102
102
|
React.createElement(rebass_1.Flex, { marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
|
|
103
|
-
showGridSummary && (React.createElement(Radio_1.default, { "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "
|
|
104
|
-
showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "
|
|
105
|
-
showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", marginRight: 3, value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "
|
|
106
|
-
showAdaptableObjects && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'AdaptableObjectsSummary', onChange: (_, e) => onShowGridSummaryChanged('AdaptableObjectsSummary') }, "
|
|
103
|
+
showGridSummary && (React.createElement(Radio_1.default, { "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Summary")),
|
|
104
|
+
showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "Options")),
|
|
105
|
+
showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", marginRight: 3, value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Columns")),
|
|
106
|
+
showAdaptableObjects && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'AdaptableObjectsSummary', onChange: (_, e) => onShowGridSummaryChanged('AdaptableObjectsSummary') }, "Objects"))))),
|
|
107
107
|
state.ActiveTab == 'GridSummary' && (React.createElement(rebass_1.Box, { margin: 2 },
|
|
108
108
|
React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { colItems: propValueColItems, items: gridSummaries }))),
|
|
109
109
|
state.ActiveTab == 'AdaptableOptions' && React.createElement(AdaptableOptionsComponent_1.AdaptableOptionsComponent, { api: props.api }),
|
|
@@ -347,10 +347,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
347
347
|
React.createElement(icons_1.Icon, { name: "clear" }))));
|
|
348
348
|
} })),
|
|
349
349
|
React.createElement(ListPanel, { className: "ab-LayoutEditor__PivotListPanel", header: React.createElement(rebass_1.Flex, { width: "100%", flexDirection: "row", justifyContent: "space-between", alignItems: "center" },
|
|
350
|
-
React.createElement(rebass_1.Text, null, "Pivoted Columns"),
|
|
351
|
-
React.createElement(CheckBox_1.CheckBox, { mt: 0, mb: 0, checked: layout.EnablePivot, onChange: (checked) => {
|
|
352
|
-
setLayout(Object.assign(Object.assign({}, layout), { EnablePivot: checked }));
|
|
353
|
-
} }, "Enable")), bodyProps: { padding: 0 } },
|
|
350
|
+
React.createElement(rebass_1.Text, null, "Pivoted Columns")), bodyProps: { padding: 0 } },
|
|
354
351
|
React.createElement(PivotList_1.PivotList, { pivotColumns: layout.PivotColumns, onPivotColumnsChange: onPivotColumnsChange, isDropDisabled: state.dropDisabledOnPivot, onReady: (dragEnd) => {
|
|
355
352
|
onDragEndRef.current.pivotList = dragEnd;
|
|
356
353
|
}, renderItem: (colId, clear) => {
|
|
@@ -12,6 +12,7 @@ const AdaptablePopover_1 = require("../../AdaptablePopover");
|
|
|
12
12
|
const rebass_1 = require("rebass");
|
|
13
13
|
const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel"));
|
|
14
14
|
const ColumnLabels_1 = require("./LayoutEditor/ColumnLabels");
|
|
15
|
+
const CheckBox_1 = require("../../../components/CheckBox");
|
|
15
16
|
class LayoutEditorWizard extends React.Component {
|
|
16
17
|
constructor(props) {
|
|
17
18
|
super(props);
|
|
@@ -80,7 +81,11 @@ class LayoutEditorWizard extends React.Component {
|
|
|
80
81
|
' '),
|
|
81
82
|
this.state.errorMessage ? (React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
82
83
|
React.createElement(ErrorBox_1.default, null, this.state.errorMessage))) : null)),
|
|
83
|
-
React.createElement(rebass_1.Flex, { flex: 1,
|
|
84
|
+
React.createElement(rebass_1.Flex, { flex: 1, alignItems: "center", justifyContent: "flex-end" },
|
|
85
|
+
React.createElement(CheckBox_1.CheckBox, { mt: 0, mb: 0, checked: this.state.layout.EnablePivot, onChange: (checked) => {
|
|
86
|
+
this.updateLayout({ EnablePivot: checked });
|
|
87
|
+
} }, "Enable Pivot Layout")),
|
|
88
|
+
React.createElement(rebass_1.Flex, { width: 120, pr: 2, alignItems: "center", justifyContent: "end" },
|
|
84
89
|
React.createElement(rebass_1.Text, { mr: 2 }, "Legend"),
|
|
85
90
|
React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 200, bodyText: [
|
|
86
91
|
React.createElement(Panel_1.default, { variant: "modern", header: "Legend: Column Behaviour", className: "ab-LayoutEditor__LegendPanel", style: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SmartEditRedux from '../../Redux/ActionsReducers/SmartEditRedux';
|
|
3
3
|
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
4
|
-
import { MathOperation } from '../../PredefinedConfig/Common/Enums';
|
|
5
4
|
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
6
5
|
import { PreviewInfo } from '../../Utilities/Interface/Preview';
|
|
6
|
+
import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
|
|
7
7
|
interface SmartEditPopupProps extends ModuleViewPopupProps<SmartEditPopupComponent> {
|
|
8
8
|
SmartEditValue: number;
|
|
9
|
-
|
|
9
|
+
SmartEditOperation: SmartEditOperation;
|
|
10
10
|
PreviewInfo: PreviewInfo;
|
|
11
11
|
onSmartEditValueChange: (value: number) => SystemRedux.SmartEditChangeValueAction;
|
|
12
|
-
onSmartEditOperationChange: (
|
|
12
|
+
onSmartEditOperationChange: (SmartEditOperation: SmartEditOperation) => SystemRedux.SmartEditChangeOperationAction;
|
|
13
13
|
onSmartEditCheckSelectedCells: () => SystemRedux.SmartEditCheckCellSelectionAction;
|
|
14
14
|
onRunSmartEdit: () => SmartEditRedux.SmartEditRunAction;
|
|
15
15
|
}
|
|
@@ -27,6 +27,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
27
27
|
this.props.onSmartEditCheckSelectedCells();
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
+
var _a, _b, _c;
|
|
30
31
|
let col;
|
|
31
32
|
if (this.props.PreviewInfo) {
|
|
32
33
|
col = this.props.PreviewInfo.column;
|
|
@@ -34,7 +35,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
34
35
|
let globalValidationMessage = PreviewHelper_1.PreviewHelper.GetValidationMessage(this.props.PreviewInfo, `${this.props.SmartEditValue}`);
|
|
35
36
|
let showPanel = this.props.PreviewInfo && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(`${this.props.SmartEditValue}`);
|
|
36
37
|
let previewPanel = showPanel ? (React.createElement(PreviewResultsPanel_1.PreviewResultsPanel, { style: { flex: '1 1 100%', overflow: 'initial', height: '100%' }, previewInfo: this.props.PreviewInfo, api: this.props.api, selectedColumn: col, showPanel: showPanel, showHeader: true })) : null;
|
|
37
|
-
|
|
38
|
+
const operationMenuItems = EnumExtensions_1.EnumExtensions.getNames(Enums_1.MathOperation).map((mathOperation, index) => {
|
|
38
39
|
return {
|
|
39
40
|
label: mathOperation,
|
|
40
41
|
onClick: () => {
|
|
@@ -42,6 +43,15 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
42
43
|
},
|
|
43
44
|
};
|
|
44
45
|
});
|
|
46
|
+
const customOperations = (_c = (_b = (_a = this.props.api.internalApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.editOptions) === null || _b === void 0 ? void 0 : _b.smartEdit) === null || _c === void 0 ? void 0 : _c.customOperations;
|
|
47
|
+
if (customOperations === null || customOperations === void 0 ? void 0 : customOperations.length) {
|
|
48
|
+
operationMenuItems.push(...customOperations.map((operation) => {
|
|
49
|
+
return {
|
|
50
|
+
onClick: () => this.props.onSmartEditOperationChange(operation),
|
|
51
|
+
label: operation.Name,
|
|
52
|
+
};
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
45
55
|
return (React.createElement(PanelWithImage_1.PanelWithImage, { flex: 1, style: { height: '100%' }, variant: "primary", bodyProps: {
|
|
46
56
|
style: { display: 'flex', flexFlow: 'column' },
|
|
47
57
|
}, bodyScroll: true, glyphicon: this.props.moduleInfo.Glyph, header: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), onKeyDown: (e) => {
|
|
@@ -50,7 +60,9 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
50
60
|
}
|
|
51
61
|
} },
|
|
52
62
|
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, "data-name": "smart-edit-operation" },
|
|
53
|
-
React.createElement(DropdownButton_1.default, { items: operationMenuItems, columns: ['label'], onMouseDown: preventDefault },
|
|
63
|
+
React.createElement(DropdownButton_1.default, { items: operationMenuItems, columns: ['label'], onMouseDown: preventDefault }, typeof this.props.SmartEditOperation === 'object'
|
|
64
|
+
? this.props.SmartEditOperation.Name
|
|
65
|
+
: this.props.SmartEditOperation),
|
|
54
66
|
React.createElement(Input_1.default, { value: this.props.SmartEditValue.toString(), marginLeft: 2, marginRight: 2, type: "number", placeholder: "Enter a Number", onChange: (e) => this.onSmartEditValueChange(e) }),
|
|
55
67
|
React.createElement(SimpleButton_1.default, { tone: this.getButtonStyle(), variant: "raised", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
|
|
56
68
|
(this.props.PreviewInfo &&
|
|
@@ -87,7 +99,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
87
99
|
function mapStateToProps(state, ownProps) {
|
|
88
100
|
return {
|
|
89
101
|
SmartEditValue: state.System.SmartEditValue,
|
|
90
|
-
|
|
102
|
+
SmartEditOperation: state.System.SmartEditOperation,
|
|
91
103
|
PreviewInfo: state.System.SmartEditPreviewInfo,
|
|
92
104
|
};
|
|
93
105
|
}
|
|
@@ -2,16 +2,16 @@ import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
|
2
2
|
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
3
3
|
import * as SmartEditRedux from '../../Redux/ActionsReducers/SmartEditRedux';
|
|
4
4
|
import { PreviewInfo } from '../../Utilities/Interface/Preview';
|
|
5
|
-
import { MathOperation } from '../../PredefinedConfig/Common/Enums';
|
|
6
5
|
import * as React from 'react';
|
|
6
|
+
import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
|
|
7
7
|
export interface SmartEditViewPanelComponentProps extends ViewPanelProps {
|
|
8
8
|
SmartEditValue: number | undefined;
|
|
9
|
-
|
|
9
|
+
SmartEditOperation: SmartEditOperation | undefined;
|
|
10
10
|
IsValidSelection: boolean;
|
|
11
11
|
PreviewInfo: PreviewInfo;
|
|
12
12
|
InPivotMode: Boolean;
|
|
13
13
|
onSmartEditValueChange: (value: number) => SystemRedux.SmartEditChangeValueAction;
|
|
14
|
-
onSmartEditOperationChange: (MathOperation:
|
|
14
|
+
onSmartEditOperationChange: (MathOperation: SmartEditOperation) => SystemRedux.SmartEditChangeOperationAction;
|
|
15
15
|
onSmartEditCheckSelectedCells: () => SystemRedux.SmartEditCheckCellSelectionAction;
|
|
16
16
|
onRunSmartEdit: () => SmartEditRedux.SmartEditRunAction;
|
|
17
17
|
}
|
|
@@ -28,7 +28,6 @@ declare class SmartEditViewPanelComponent extends React.Component<SmartEditViewP
|
|
|
28
28
|
private onSmartEditValueChange;
|
|
29
29
|
private getStatusColour;
|
|
30
30
|
private onApplyClick;
|
|
31
|
-
private onchangeMathOperation;
|
|
32
31
|
onApplySmartEdit(): any;
|
|
33
32
|
}
|
|
34
33
|
export declare let SmartEditViewPanelControl: import("react-redux").ConnectedComponent<typeof SmartEditViewPanelComponent, any>;
|
|
@@ -39,17 +39,27 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
39
39
|
(_a = this.cleanupEvent) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
+
var _a, _b, _c;
|
|
42
43
|
let statusColour = this.getStatusColour();
|
|
43
44
|
let selectedColumn = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.state.SelectedColumnId)
|
|
44
45
|
? this.props.api.columnApi.getColumnFromId(this.state.SelectedColumnId)
|
|
45
46
|
: null;
|
|
46
47
|
let previewPanel = (React.createElement(PreviewResultsPanel_1.PreviewResultsPanel, { previewInfo: this.props.PreviewInfo, api: this.props.api, selectedColumn: selectedColumn, showPanel: true, showHeader: false }));
|
|
47
|
-
|
|
48
|
+
const operationMenuItems = EnumExtensions_1.EnumExtensions.getNames(Enums_1.MathOperation).map((mathOperation, index) => {
|
|
48
49
|
return {
|
|
49
50
|
onClick: () => this.props.onSmartEditOperationChange(mathOperation),
|
|
50
51
|
label: mathOperation,
|
|
51
52
|
};
|
|
52
53
|
});
|
|
54
|
+
const customOperations = (_c = (_b = (_a = this.props.api.internalApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.editOptions) === null || _b === void 0 ? void 0 : _b.smartEdit) === null || _c === void 0 ? void 0 : _c.customOperations;
|
|
55
|
+
if (customOperations === null || customOperations === void 0 ? void 0 : customOperations.length) {
|
|
56
|
+
operationMenuItems.push(...customOperations.map((operation) => {
|
|
57
|
+
return {
|
|
58
|
+
onClick: () => this.props.onSmartEditOperationChange(operation),
|
|
59
|
+
label: operation.Name,
|
|
60
|
+
};
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
53
63
|
const applyButtonStyle = {
|
|
54
64
|
color: statusColour,
|
|
55
65
|
fill: 'currentColor',
|
|
@@ -60,7 +70,9 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
60
70
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
61
71
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__SmartEdit__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
62
72
|
React.createElement(rebass_1.Flex, null,
|
|
63
|
-
React.createElement(DropdownButton_1.default, { className: `ab-${elementType}__SmartEdit__select`, marginRight: 2, items: operationMenuItems, style: { fontSize: 'small' }, columns: ['label'], disabled: shouldDisable, variant: "outlined" }, this.props.
|
|
73
|
+
React.createElement(DropdownButton_1.default, { className: `ab-${elementType}__SmartEdit__select`, marginRight: 2, items: operationMenuItems, style: { fontSize: 'small' }, columns: ['label'], disabled: shouldDisable, variant: "outlined" }, typeof this.props.SmartEditOperation === 'object'
|
|
74
|
+
? this.props.SmartEditOperation.Name
|
|
75
|
+
: this.props.SmartEditOperation),
|
|
64
76
|
React.createElement(Input_1.default, { style: {
|
|
65
77
|
width: '5rem',
|
|
66
78
|
}, className: `ab-${elementType}__SmartEdit__select-value`, value: this.props.SmartEditValue.toString(), type: "number", placeholder: "Enter a Number", step: "any", onChange: (e) => this.onSmartEditValueChange(e), disabled: shouldDisable, marginRight: 2 })),
|
|
@@ -94,9 +106,6 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
94
106
|
onApplyClick() {
|
|
95
107
|
this.onApplySmartEdit();
|
|
96
108
|
}
|
|
97
|
-
onchangeMathOperation(mathOperation) {
|
|
98
|
-
this.props.onSmartEditOperationChange(mathOperation);
|
|
99
|
-
}
|
|
100
109
|
onApplySmartEdit() {
|
|
101
110
|
this.props.onRunSmartEdit();
|
|
102
111
|
}
|
|
@@ -104,7 +113,7 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
104
113
|
function mapStateToProps(state, ownProps) {
|
|
105
114
|
return {
|
|
106
115
|
SmartEditValue: state.System.SmartEditValue,
|
|
107
|
-
|
|
116
|
+
SmartEditOperation: state.System.SmartEditOperation,
|
|
108
117
|
IsValidSelection: state.System.IsValidSmartEditSelection,
|
|
109
118
|
PreviewInfo: state.System.SmartEditPreviewInfo,
|
|
110
119
|
InPivotMode: state.Grid.IsGridInPivotMode,
|
|
@@ -162,7 +162,7 @@ exports.OnePageAdaptableWizard = (props) => {
|
|
|
162
162
|
navIndexMap.set(navIndex, index);
|
|
163
163
|
const active = index === currentSection;
|
|
164
164
|
const disabled = false; //!active && !currentSectionValid;
|
|
165
|
-
return (React.createElement(rebass_1.Flex, { className: "ab-OnePageWizard__section-title", flexDirection: "row", style: {
|
|
165
|
+
return (React.createElement(rebass_1.Flex, { className: "ab-OnePageWizard__section-title", "data-name": section.title, flexDirection: "row", style: {
|
|
166
166
|
cursor: disabled ? 'auto' : 'pointer',
|
|
167
167
|
zIndex: 10,
|
|
168
168
|
transition: 'color 0.2s',
|
|
@@ -131,6 +131,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
131
131
|
private getAlertRowClass;
|
|
132
132
|
private getAlertRowStyle;
|
|
133
133
|
private getFlashingCellStyle;
|
|
134
|
+
private getFlashingCellClass;
|
|
134
135
|
private getCellHighlightStyle;
|
|
135
136
|
private getRowHighlightStyle;
|
|
136
137
|
private getRowHighlightClass;
|
|
@@ -165,8 +166,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
165
166
|
[key: string]: boolean;
|
|
166
167
|
}): GridCell[];
|
|
167
168
|
private addDistinctColumnValue;
|
|
168
|
-
private
|
|
169
|
-
getDisplayValue(
|
|
169
|
+
private isCustomRenderedColumn;
|
|
170
|
+
getDisplayValue(primaryKey: any, columnId: string): string | undefined;
|
|
170
171
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
171
172
|
getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): string | undefined;
|
|
172
173
|
getDisplayValueFromRawValue(columnId: string, rawValue: any): string | undefined;
|
|
@@ -313,7 +314,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
313
314
|
getGridData(): any[];
|
|
314
315
|
getFilteredData(): any[];
|
|
315
316
|
loadDataSource(dataSource: any[]): void;
|
|
316
|
-
updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]
|
|
317
|
+
updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
317
318
|
addRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
318
319
|
deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
319
320
|
getFirstGroupedColumn(): AdaptableColumn | undefined;
|
|
@@ -329,7 +330,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
329
330
|
showQuickFilter(): void;
|
|
330
331
|
hideQuickFilter(): void;
|
|
331
332
|
getAgGridColumnType(columnId: string): string | string[];
|
|
332
|
-
getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (
|
|
333
|
+
getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (valueA: any, valueB: any, nodeA?: RowNode, nodeB?: RowNode, isInverted?: boolean) => number | undefined;
|
|
333
334
|
getAgGridLightThemeName(): string;
|
|
334
335
|
getAgGridCurrentThemeName(): string;
|
|
335
336
|
applyAdaptableTheme(theme: AdaptableTheme | string): void;
|