@adaptabletools/adaptable 17.0.0-canary.1 → 17.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/base.css +1 -1
- package/index.css +1 -1
- package/package.json +4 -7
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -3
- package/src/Redux/Store/AdaptableStore.js +1 -1
- package/src/Strategy/LayoutModule.js +4 -8
- package/src/Strategy/ThemeModule.js +2 -10
- package/src/View/Alert/Utilities/getAlertType.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertType.js +9 -1
- package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +5 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +2 -6
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +8 -5
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -1
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Charting/useChartingElements.js +8 -10
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/Export/ExportSelector.js +15 -17
- package/src/View/Export/ExportViewPanel.d.ts +4 -4
- package/src/View/Export/ExportViewPanel.js +14 -19
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.d.ts +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +12 -7
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
- package/src/View/Layout/LayoutViewPanel.js +7 -7
- package/src/View/Theme/ThemePopup.js +3 -18
- package/src/View/Theme/ThemeSelector.d.ts +5 -0
- package/src/View/Theme/ThemeSelector.js +29 -0
- package/src/View/Theme/ThemeStatusbar.d.ts +2 -0
- package/src/View/Theme/ThemeStatusbar.js +9 -0
- package/src/View/Theme/ThemeViewPanel.d.ts +2 -13
- package/src/View/Theme/ThemeViewPanel.js +6 -53
- package/src/agGrid/Adaptable.js +1 -1
- package/src/agGrid/AdaptableLogger.js +1 -1
- package/src/agGrid/agGridHelper.js +1 -1
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +7 -6
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +12 -9
- package/src/metamodel/adaptable.metamodel.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.js +5 -5
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +3 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +9 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.d.ts +0 -2
- package/src/View/Theme/ThemeStatusPanelPopover.js +0 -20
package/base.css
CHANGED
|
@@ -1749,7 +1749,7 @@ input[type=number].ab-Input:hover::-webkit-inner-spin-button:active {
|
|
|
1749
1749
|
--ab-cmp-listgroupitem--odd__background: transparent;
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
|
-
|
|
1752
|
+
.rdp {
|
|
1753
1753
|
--rdp-cell-size: var(--ab-cmp-datepicker__cell-size);
|
|
1754
1754
|
--rdp-accent-color: var(--ab-cmp-datepicker__selected-color);
|
|
1755
1755
|
--rdp-background-color: var(--ab-cmp-datepicker__hover-color);
|
package/index.css
CHANGED
|
@@ -1750,7 +1750,7 @@ input[type=number].ab-Input:hover::-webkit-inner-spin-button:active {
|
|
|
1750
1750
|
--ab-cmp-listgroupitem--odd__background: transparent;
|
|
1751
1751
|
}
|
|
1752
1752
|
|
|
1753
|
-
|
|
1753
|
+
.rdp {
|
|
1754
1754
|
--rdp-cell-size: var(--ab-cmp-datepicker__cell-size);
|
|
1755
1755
|
--rdp-accent-color: var(--ab-cmp-datepicker__selected-color);
|
|
1756
1756
|
--rdp-background-color: var(--ab-cmp-datepicker__hover-color);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "17.0.0-canary.
|
|
3
|
+
"version": "17.0.0-canary.3",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -48,12 +48,11 @@
|
|
|
48
48
|
"re-resizable": "6.9.9",
|
|
49
49
|
"react": "^18.0.0",
|
|
50
50
|
"react-beautiful-dnd": "13.1.1",
|
|
51
|
-
"react-day-picker": "8.0
|
|
51
|
+
"react-day-picker": "8.1.0",
|
|
52
52
|
"react-dom": "^18.0.0",
|
|
53
53
|
"react-redux": "7.2.8",
|
|
54
54
|
"react-remove-scroll": "2.4.4",
|
|
55
55
|
"react-select": "5.8.0",
|
|
56
|
-
"react-toastify": "9.0.7",
|
|
57
56
|
"rebass": "^3.2.2",
|
|
58
57
|
"redux": "4.0.5",
|
|
59
58
|
"rxjs": "^7.4.0",
|
|
@@ -66,9 +65,7 @@
|
|
|
66
65
|
"peerDependencies": {
|
|
67
66
|
"@ag-grid-community/core": ">=30.2.0"
|
|
68
67
|
},
|
|
69
|
-
"publishTimestamp":
|
|
68
|
+
"publishTimestamp": 1704904757144,
|
|
70
69
|
"type": "module",
|
|
71
|
-
"
|
|
72
|
-
".": "./agGrid.js"
|
|
73
|
-
}
|
|
70
|
+
"module": "agGrid.js"
|
|
74
71
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EMPTY_ARRAY } from '../../Utilities/Constants/GeneralConstants';
|
|
2
2
|
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
3
3
|
/**
|
|
4
4
|
* @ReduxAction Export has been applied
|
|
@@ -59,8 +59,6 @@ export const DestinationSelect = (SelectedDestination) => ({
|
|
|
59
59
|
});
|
|
60
60
|
const initialState = {
|
|
61
61
|
Reports: EMPTY_ARRAY,
|
|
62
|
-
CurrentReport: EMPTY_STRING,
|
|
63
|
-
CurrentDestination: EMPTY_STRING,
|
|
64
62
|
};
|
|
65
63
|
export const ExportReducer = (state = initialState, action) => {
|
|
66
64
|
let reports;
|
|
@@ -1191,7 +1191,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1191
1191
|
if (!selectedReport ||
|
|
1192
1192
|
(selectedReport === VISUAL_DATA_REPORT &&
|
|
1193
1193
|
middlewareAPI.getState().Export.CurrentDestination !== ExportDestination.Excel)) {
|
|
1194
|
-
middlewareAPI.dispatch(ExportRedux.DestinationSelect(
|
|
1194
|
+
middlewareAPI.dispatch(ExportRedux.DestinationSelect(null));
|
|
1195
1195
|
}
|
|
1196
1196
|
return returnAction;
|
|
1197
1197
|
}
|
|
@@ -3,7 +3,7 @@ import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
|
3
3
|
import * as LayoutRedux from '../Redux/ActionsReducers/LayoutRedux';
|
|
4
4
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
5
5
|
import { LayoutRadioSelector } from '../View/Layout/LayoutRadioSelector';
|
|
6
|
-
import {
|
|
6
|
+
import { LayoutStatusbar } from '../View/Layout/LayoutStatusBarSubPanelPopover';
|
|
7
7
|
import { EditCurrentLayoutButton } from '../View/Layout/EditCurrentLayoutButton';
|
|
8
8
|
import { LayoutCloneButton } from '../View/Layout/LayoutCloneButton';
|
|
9
9
|
import { SaveLayoutButton } from '../View/Layout/SaveLayoutButton';
|
|
@@ -387,7 +387,8 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
387
387
|
})
|
|
388
388
|
.filter(Boolean),
|
|
389
389
|
},
|
|
390
|
-
(layout === null || layout === void 0 ? void 0 : layout.GridFilter) &&
|
|
390
|
+
(layout === null || layout === void 0 ? void 0 : layout.GridFilter) &&
|
|
391
|
+
StringExtensions.IsNotNullOrEmpty(layout.GridFilter.Expression) && {
|
|
391
392
|
name: 'Grid Filter',
|
|
392
393
|
values: [layout.GridFilter.Expression],
|
|
393
394
|
},
|
|
@@ -407,13 +408,8 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
407
408
|
},
|
|
408
409
|
getEditWizard: () => LayoutWizard,
|
|
409
410
|
getStatusBarPanelProps: () => {
|
|
410
|
-
const text = this.api.layoutApi.getCurrentLayoutName();
|
|
411
|
-
const layouts = this.api.layoutApi.getLayouts();
|
|
412
|
-
const popover = layouts.length > 1 ? LayoutStatusBarSubPanelPopover : null;
|
|
413
411
|
return {
|
|
414
|
-
content:
|
|
415
|
-
popover: popover,
|
|
416
|
-
popoverMinWidth: 150,
|
|
412
|
+
content: LayoutStatusbar,
|
|
417
413
|
extraActions: [EditCurrentLayoutButton, SaveLayoutButton],
|
|
418
414
|
};
|
|
419
415
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
|
-
import {
|
|
3
|
+
import { ThemeStatusbar } from '../View/Theme/ThemeStatusbar';
|
|
4
4
|
export class ThemeModule extends AdaptableModuleBase {
|
|
5
5
|
constructor(api) {
|
|
6
6
|
super(ModuleConstants.ThemeModuleId, ModuleConstants.ThemeFriendlyName, 'theme', 'ThemePopup', 'Theme AdapTable with a colour configuration set of your choosing', api);
|
|
@@ -14,16 +14,8 @@ export class ThemeModule extends AdaptableModuleBase {
|
|
|
14
14
|
getViewProperties() {
|
|
15
15
|
return {
|
|
16
16
|
getStatusBarPanelProps: () => {
|
|
17
|
-
var _a;
|
|
18
|
-
const currentThemeName = this.api.themeApi.getCurrentTheme();
|
|
19
|
-
const currentTheme = this.api.themeApi
|
|
20
|
-
.getThemes()
|
|
21
|
-
.find((theme) => theme.Name === currentThemeName);
|
|
22
|
-
const text = (_a = currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.Description) !== null && _a !== void 0 ? _a : currentThemeName;
|
|
23
17
|
return {
|
|
24
|
-
content:
|
|
25
|
-
popover: ThemeStatusPanelPopover,
|
|
26
|
-
popoverMinWidth: 120,
|
|
18
|
+
content: ThemeStatusbar,
|
|
27
19
|
};
|
|
28
20
|
},
|
|
29
21
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export var AlertType;
|
|
2
2
|
(function (AlertType) {
|
|
3
3
|
AlertType["DataChange"] = "DataChange";
|
|
4
|
+
AlertType["Validation"] = "Validation";
|
|
4
5
|
AlertType["RowChange"] = "RowChange";
|
|
5
6
|
AlertType["Aggregation"] = "Aggregation";
|
|
6
7
|
AlertType["Observable"] = "Observable";
|
|
@@ -12,6 +13,7 @@ export var AlertType;
|
|
|
12
13
|
* @param alert
|
|
13
14
|
*/
|
|
14
15
|
export const getAlertType = (alert) => {
|
|
16
|
+
var _a, _b;
|
|
15
17
|
if (alert.Rule.ObservableExpression) {
|
|
16
18
|
return AlertType.Observable;
|
|
17
19
|
}
|
|
@@ -19,6 +21,9 @@ export const getAlertType = (alert) => {
|
|
|
19
21
|
return AlertType.Aggregation;
|
|
20
22
|
}
|
|
21
23
|
if (alert.Rule.BooleanExpression) {
|
|
24
|
+
if ((_a = alert.AlertProperties) === null || _a === void 0 ? void 0 : _a.PreventEdit) {
|
|
25
|
+
return AlertType.Validation;
|
|
26
|
+
}
|
|
22
27
|
return AlertType.DataChange;
|
|
23
28
|
}
|
|
24
29
|
const predicates = alert.Rule.Predicates;
|
|
@@ -27,7 +32,7 @@ export const getAlertType = (alert) => {
|
|
|
27
32
|
return AlertType.RowChange;
|
|
28
33
|
}
|
|
29
34
|
else {
|
|
30
|
-
return AlertType.DataChange;
|
|
35
|
+
return ((_b = alert.AlertProperties) === null || _b === void 0 ? void 0 : _b.PreventEdit) ? AlertType.Validation : AlertType.DataChange;
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
// the object is not a valid alert
|
|
@@ -39,6 +44,9 @@ export const getAlertTypeText = (alertType) => {
|
|
|
39
44
|
case AlertType.DataChange:
|
|
40
45
|
text = 'Data Change';
|
|
41
46
|
break;
|
|
47
|
+
case AlertType.Validation:
|
|
48
|
+
text = 'Data Validation';
|
|
49
|
+
break;
|
|
42
50
|
case AlertType.RowChange:
|
|
43
51
|
text = 'Row Change';
|
|
44
52
|
break;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const getAvailablePredicateDefinitions = (api, scope, alertType) => {
|
|
2
2
|
let predicateDefs = [];
|
|
3
|
-
if (alertType === 'DataChange') {
|
|
3
|
+
if (alertType === 'DataChange' || alertType === 'Validation') {
|
|
4
4
|
predicateDefs = api.alertApi.internalApi
|
|
5
5
|
.getAlertPredicateDefsForScope(scope)
|
|
6
6
|
.filter((predicateDef) => !['AddedRow', 'RemovedRow'].includes(predicateDef.id));
|
|
@@ -101,7 +101,7 @@ export const AlertBehaviourWizardSection = (props) => {
|
|
|
101
101
|
const { AlertProperties = {} } = data;
|
|
102
102
|
const rowRemovedAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(data);
|
|
103
103
|
// data change only
|
|
104
|
-
const hasPreventCellEdit = props.alertType === '
|
|
104
|
+
const hasPreventCellEdit = props.alertType === 'Validation';
|
|
105
105
|
// except row change
|
|
106
106
|
const hasHighlightCell = props.alertType !== 'RowChange';
|
|
107
107
|
// except row removed
|
|
@@ -120,11 +120,7 @@ export const AlertBehaviourWizardSection = (props) => {
|
|
|
120
120
|
return (React.createElement(Tabs, null,
|
|
121
121
|
React.createElement(Tabs.Tab, null, api.internalApi.getCorrectEnglishVariant('Behaviour')),
|
|
122
122
|
React.createElement(Tabs.Content, null,
|
|
123
|
-
hasPreventCellEdit && (React.createElement(CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit,
|
|
124
|
-
onChange({
|
|
125
|
-
PreventEdit,
|
|
126
|
-
});
|
|
127
|
-
} },
|
|
123
|
+
hasPreventCellEdit && (React.createElement(CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, disabled: true },
|
|
128
124
|
"Prevent Cell Edit",
|
|
129
125
|
React.createElement(Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
|
|
130
126
|
hasHighlightCell && (React.createElement(HighlightStyle, { dataName: "highlight-cell", highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
@@ -12,9 +12,11 @@ export const getRuleStepDescription = (alertType) => {
|
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
"Build the Rule ",
|
|
14
14
|
React.createElement("b", null, "when"),
|
|
15
|
-
" the Alert should trigger
|
|
15
|
+
" the Alert should trigger (using a Predicate or a Query)"));
|
|
16
16
|
case 'RowChange':
|
|
17
17
|
return React.createElement(React.Fragment, null, "Specify which type of Row Change will trigger the Alert");
|
|
18
|
+
case 'Validation':
|
|
19
|
+
return React.createElement(React.Fragment, null, "Create the Validation Rule which will trigger the Alert (using a Predicate or a Query)");
|
|
18
20
|
case 'Aggregation':
|
|
19
21
|
return React.createElement(React.Fragment, null, "Build an Aggregation Boolean Rule to specify when the Alert should trigger");
|
|
20
22
|
case 'Observable':
|
|
@@ -53,14 +55,15 @@ export const AlertRulesWizardSection = (props) => {
|
|
|
53
55
|
const predicateDefs = getAvailablePredicateDefinitions(api, data.Scope, props.alertType);
|
|
54
56
|
const showObservable = props.alertType === 'Observable';
|
|
55
57
|
const showAggregation = props.alertType === 'Aggregation';
|
|
56
|
-
const showBoolean = props.alertType === 'DataChange';
|
|
57
|
-
const showPredicate = props.alertType === 'DataChange' || props.alertType === 'RowChange';
|
|
58
|
-
const enablePredicateColumnId = props.alertType === 'DataChange';
|
|
58
|
+
const showBoolean = props.alertType === 'DataChange' || props.alertType == 'Validation';
|
|
59
|
+
const showPredicate = props.alertType === 'DataChange' || props.alertType == 'Validation' || props.alertType === 'RowChange';
|
|
60
|
+
const enablePredicateColumnId = props.alertType === 'DataChange' || props.alertType == 'Validation';
|
|
61
|
+
;
|
|
59
62
|
if (props.alertType === 'RowChange') {
|
|
60
63
|
return React.createElement(RowChangeEditor, { alert: data, onChange: props.onChange });
|
|
61
64
|
}
|
|
62
65
|
return (React.createElement(EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "AnyChange", data: data, predicateDefs: predicateDefs, enablePredicateColumnId: enablePredicateColumnId, getPredicateDefsForColId: (colId) => getAvailablePredicateDefinitions(api, { ColumnIds: [colId] }, props.alertType), onChange: props.onChange, showAggregation: showAggregation, showObservable: showObservable, showBoolean: showBoolean, showPredicate: showPredicate, descriptions: {
|
|
63
|
-
selectPredicate: '
|
|
66
|
+
selectPredicate: 'Build the Predicate',
|
|
64
67
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
65
68
|
"Use an BooleanQuery if ",
|
|
66
69
|
React.createElement("i", null, "Scope"),
|
|
@@ -6,7 +6,7 @@ export const AlertScopeWizardSection = (props) => {
|
|
|
6
6
|
const { data, api } = useOnePageAdaptableWizardContext();
|
|
7
7
|
let disableDataTypes = true;
|
|
8
8
|
let disableColumns = true;
|
|
9
|
-
if (props.alertType === 'DataChange') {
|
|
9
|
+
if (props.alertType === 'DataChange' || props.alertType == 'Validation') {
|
|
10
10
|
disableDataTypes = false;
|
|
11
11
|
disableColumns = false;
|
|
12
12
|
}
|
|
@@ -17,5 +17,6 @@ export const AlertTypeWizardSection = (props) => {
|
|
|
17
17
|
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === AlertType.DataChange, onClick: () => props.onAlertTypeChange(AlertType.DataChange) }),
|
|
18
18
|
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === AlertType.RowChange, onClick: () => props.onAlertTypeChange(AlertType.RowChange) }),
|
|
19
19
|
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(AlertType.Aggregation), checked: props.alertType === AlertType.Aggregation }),
|
|
20
|
-
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(AlertType.Observable), checked: props.alertType === AlertType.Observable })
|
|
20
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(AlertType.Observable), checked: props.alertType === AlertType.Observable }),
|
|
21
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === AlertType.Validation, onClick: () => props.onAlertTypeChange(AlertType.Validation) })))));
|
|
21
22
|
};
|
|
@@ -81,7 +81,7 @@ export const AlertWizard = (props) => {
|
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
title: 'Trigger',
|
|
84
|
-
isVisible: () => alertType === AlertType.DataChange,
|
|
84
|
+
isVisible: () => alertType === AlertType.DataChange || alertType == AlertType.Validation,
|
|
85
85
|
details: (React.createElement(React.Fragment, null,
|
|
86
86
|
"Specify ",
|
|
87
87
|
React.createElement("b", null, "where"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
|
-
import
|
|
3
|
+
import { Select } from '../../components/Select';
|
|
4
4
|
import SimpleButton from '../../components/SimpleButton';
|
|
5
5
|
import { isAgChartDefinition } from '../../PredefinedConfig/ChartingState';
|
|
6
6
|
import * as ChartingRedux from '../../Redux/ActionsReducers/ChartingRedux';
|
|
@@ -11,7 +11,7 @@ import { EditChartButton } from './EditChartButton';
|
|
|
11
11
|
import { useAgChartState } from './useAgChartState';
|
|
12
12
|
import { useExternalChartState } from './useExternalChartState';
|
|
13
13
|
export const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) => {
|
|
14
|
-
var _a
|
|
14
|
+
var _a;
|
|
15
15
|
const adaptable = useAdaptable();
|
|
16
16
|
const chartDefinitions = useSelector(ChartingRedux.ChartingGetChartModels);
|
|
17
17
|
const extenralChartDefinitions = useSelector(ChartingRedux.ChartingGetExternalChartDefinitions);
|
|
@@ -61,17 +61,13 @@ export const useChartingElements = ({ elementType, accessLevel, size = 'normal',
|
|
|
61
61
|
let containerOptions = chartContainers
|
|
62
62
|
? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
|
|
63
63
|
label: contianerDef.name,
|
|
64
|
-
|
|
65
|
-
setSelectedContainer(contianerDef);
|
|
66
|
-
},
|
|
64
|
+
value: contianerDef.name,
|
|
67
65
|
}))
|
|
68
66
|
: [];
|
|
69
67
|
if (isAgChartDefinition(selectedChart)) {
|
|
70
68
|
containerOptions.unshift({
|
|
71
69
|
label: chartingOptions.agGridContainerName,
|
|
72
|
-
|
|
73
|
-
setSelectedContainer(null);
|
|
74
|
-
},
|
|
70
|
+
value: null,
|
|
75
71
|
});
|
|
76
72
|
}
|
|
77
73
|
const style = {};
|
|
@@ -81,8 +77,10 @@ export const useChartingElements = ({ elementType, accessLevel, size = 'normal',
|
|
|
81
77
|
style.fontSize = 'small';
|
|
82
78
|
iconSize = 15;
|
|
83
79
|
}
|
|
84
|
-
const chartSelector = (React.createElement(
|
|
85
|
-
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(
|
|
80
|
+
const chartSelector = (React.createElement(Select, { className: `ab-${elementType}__Chart__select`, size: size, value: selectedChartId, options: options, placeholder: 'Select Chart', disabled: !hasCharts, onChange: (chartUuid) => setSelectedChartId(chartUuid) }));
|
|
81
|
+
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(Select, { value: selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name, size: size, onChange: (containerName) => {
|
|
82
|
+
setSelectedContainer(chartContainers.find((containerOption) => containerOption.name === containerName));
|
|
83
|
+
}, options: containerOptions, placeholder: "Select Container" }));
|
|
86
84
|
const chartButton = (React.createElement(SimpleButton, { style: style, mr: 1, onClick: () => (isOpen ? hideChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'text', tone: 'neutral', icon: isOpen ? 'visibility-off' : 'visibility-on', tooltip: isOpen ? 'Hide Chart' : 'Show Chart' }));
|
|
87
85
|
const deleteButton = (React.createElement(DeleteChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel }));
|
|
88
86
|
const editButton = (React.createElement(EditChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel, isOpen: isOpen }));
|
|
@@ -21,7 +21,7 @@ export const ColumnSelector = function (props) {
|
|
|
21
21
|
}
|
|
22
22
|
return true;
|
|
23
23
|
});
|
|
24
|
-
return (React.createElement(Select, { "data-name": "column-selector", disabled: props.disabled, isMulti: props.isMulti, menuPosition: props.menuPosition, value: props.value, onChange: (colId) => {
|
|
24
|
+
return (React.createElement(Select, { "data-name": "column-selector", disabled: props.disabled, isMulti: props.isMulti, menuPosition: props.menuPosition, value: props.value, placeholder: "Select Column", onChange: (colId) => {
|
|
25
25
|
props.onChange(colId);
|
|
26
26
|
}, options: options }));
|
|
27
27
|
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { Select } from '../../components/Select';
|
|
3
3
|
import SimpleButton from '../../components/SimpleButton';
|
|
4
4
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
5
5
|
import { useAdaptable } from '../AdaptableContext';
|
|
6
|
-
import { SELECT_DESTINATION_STRING, SELECT_REPORT_STRING } from './constants';
|
|
7
|
-
const dropdownStyle = {
|
|
8
|
-
padding: 2,
|
|
9
|
-
fontSize: 'small',
|
|
10
|
-
};
|
|
11
6
|
const isCustomDestination = (destination) => {
|
|
12
7
|
return !!destination.name;
|
|
13
8
|
};
|
|
@@ -23,7 +18,6 @@ export const ExportSelector = () => {
|
|
|
23
18
|
return {
|
|
24
19
|
label: report,
|
|
25
20
|
value: report,
|
|
26
|
-
onClick: () => handleReportChange(report),
|
|
27
21
|
};
|
|
28
22
|
});
|
|
29
23
|
const currentReport = adaptable.api.exportApi.getCurrentReport();
|
|
@@ -37,25 +31,22 @@ export const ExportSelector = () => {
|
|
|
37
31
|
const destinationItems = [
|
|
38
32
|
...adaptable.api.exportApi.getAvailableExportDestinations().map((destination) => ({
|
|
39
33
|
label: destination,
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
value: destination,
|
|
35
|
+
isDisabled: !adaptable.api.exportApi.internalApi.isDestinationEnabled(destination),
|
|
42
36
|
})),
|
|
43
37
|
...adaptable.api.exportApi.getCustomDestinations().map((destination) => ({
|
|
44
38
|
label: destination.name,
|
|
45
|
-
|
|
39
|
+
value: destination.name,
|
|
46
40
|
})),
|
|
47
41
|
];
|
|
48
42
|
const currentDestination = adaptable.api.exportApi.getCurrentDestination();
|
|
49
|
-
let currentDestinationId =
|
|
43
|
+
let currentDestinationId = undefined;
|
|
50
44
|
if (typeof currentDestination === 'string') {
|
|
51
45
|
currentDestinationId = currentDestination;
|
|
52
46
|
}
|
|
53
47
|
else if (currentDestination && 'name' in currentDestination) {
|
|
54
48
|
currentDestinationId = currentDestination.name;
|
|
55
49
|
}
|
|
56
|
-
else {
|
|
57
|
-
currentDestinationId = SELECT_DESTINATION_STRING;
|
|
58
|
-
}
|
|
59
50
|
// export
|
|
60
51
|
const handleExport = () => {
|
|
61
52
|
if (isCustomDestination(currentDestination)) {
|
|
@@ -66,7 +57,14 @@ export const ExportSelector = () => {
|
|
|
66
57
|
}
|
|
67
58
|
};
|
|
68
59
|
return (React.createElement(React.Fragment, null,
|
|
69
|
-
React.createElement(
|
|
70
|
-
React.createElement(
|
|
71
|
-
|
|
60
|
+
React.createElement(Select, { size: "small", isClearable: true, placeholder: 'Select Report', value: currentReportId, options: reportItems, onChange: handleReportChange }),
|
|
61
|
+
React.createElement(Select, { size: "small", isClearable: true, placeholder: 'Select Destination', value: currentDestinationId, options: destinationItems, onChange: (destination) => {
|
|
62
|
+
if (destination) {
|
|
63
|
+
handleDestinationChange(destination);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
handleDestinationChange(null);
|
|
67
|
+
}
|
|
68
|
+
} }),
|
|
69
|
+
React.createElement(SimpleButton, { disabled: !currentDestinationId || !currentReportId, iconSize: 15, icon: "export", variant: "text", onClick: handleExport })));
|
|
72
70
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { ExportDestination } from '../../PredefinedConfig/Common/Enums';
|
|
4
|
+
import { Report, ReportSchedule } from '../../PredefinedConfig/ExportState';
|
|
4
5
|
import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
|
|
5
6
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
6
|
-
import {
|
|
7
|
-
import * as React from 'react';
|
|
7
|
+
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
8
8
|
export interface ExportViewPanelComponentProps extends ViewPanelProps {
|
|
9
9
|
onApplyExport: (report: Report, exportDestination: ExportDestination | string) => ExportRedux.ExportApplyAction;
|
|
10
10
|
onSelectReport: (Report: string) => ExportRedux.ReportSelectAction;
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { Flex } from 'rebass';
|
|
4
|
+
import { Select } from '../../components/Select';
|
|
5
|
+
import join from '../../components/utils/join';
|
|
1
6
|
import { ExportDestination } from '../../PredefinedConfig/Common/Enums';
|
|
2
7
|
import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
|
|
3
8
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
|
|
6
9
|
import * as GeneralConstants from '../../Utilities/Constants/GeneralConstants';
|
|
7
10
|
import { VISUAL_DATA_REPORT } from '../../Utilities/Constants/GeneralConstants';
|
|
11
|
+
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
12
|
+
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
8
13
|
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { ButtonExport } from '../Components/Buttons/ButtonExport';
|
|
14
|
+
import ObjectFactory from '../../Utilities/ObjectFactory';
|
|
15
|
+
import { ButtonDelete } from '../Components/Buttons/ButtonDelete';
|
|
12
16
|
import { ButtonEdit } from '../Components/Buttons/ButtonEdit';
|
|
17
|
+
import { ButtonExport } from '../Components/Buttons/ButtonExport';
|
|
13
18
|
import { ButtonNew } from '../Components/Buttons/ButtonNew';
|
|
14
|
-
import { ButtonDelete } from '../Components/Buttons/ButtonDelete';
|
|
15
19
|
import { ButtonSchedule } from '../Components/Buttons/ButtonSchedule';
|
|
16
|
-
import ObjectFactory from '../../Utilities/ObjectFactory';
|
|
17
|
-
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
18
|
-
import { connect } from 'react-redux';
|
|
19
20
|
import { SELECT_DESTINATION_STRING, SELECT_REPORT_STRING } from './constants';
|
|
20
|
-
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
21
|
-
import { Select } from '../../components/Select';
|
|
22
21
|
class ExportViewPanelComponent extends React.Component {
|
|
23
22
|
render() {
|
|
24
23
|
let currentReport = this.props.api.exportApi.getReportByName(this.props.CurrentReport);
|
|
25
|
-
let currentReportId =
|
|
26
|
-
? SELECT_REPORT_STRING
|
|
27
|
-
: this.props.CurrentReport;
|
|
24
|
+
let currentReportId = this.props.CurrentReport;
|
|
28
25
|
const allReportNames = this.getAllReportNames();
|
|
29
26
|
const reportItems = allReportNames.map((report) => {
|
|
30
27
|
return {
|
|
@@ -36,12 +33,10 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
36
33
|
if (currentReport && !allReportNames.includes(currentReport.Name)) {
|
|
37
34
|
// current report is not available
|
|
38
35
|
currentReport = undefined;
|
|
39
|
-
currentReportId =
|
|
36
|
+
currentReportId = undefined;
|
|
40
37
|
}
|
|
41
38
|
let currentDestination = this.props.api.exportApi.getDestinationByName(this.props.CurrentDestination);
|
|
42
|
-
let currentDestinationId =
|
|
43
|
-
? SELECT_DESTINATION_STRING
|
|
44
|
-
: this.props.CurrentDestination;
|
|
39
|
+
let currentDestinationId = this.props.CurrentDestination;
|
|
45
40
|
const destinationItems = [
|
|
46
41
|
...this.props.api.exportApi.getAvailableExportDestinations().map((destination) => ({
|
|
47
42
|
label: destination,
|
|
@@ -66,7 +61,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
66
61
|
.includes(this.props.CurrentDestination)) {
|
|
67
62
|
// current destination is not available
|
|
68
63
|
currentDestination = undefined;
|
|
69
|
-
currentDestinationId =
|
|
64
|
+
currentDestinationId = undefined;
|
|
70
65
|
}
|
|
71
66
|
let accessLevel = AdaptableHelper.getAppropriateAccessLevel(currentReport, this.props.accessLevel);
|
|
72
67
|
let deleteMessage = "Are you sure you want to delete '";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LayoutStatusbar: React.FunctionComponent;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useSelector } from 'react-redux';
|
|
3
|
+
import { Box } from 'rebass';
|
|
4
|
+
import { Select } from '../../components/Select';
|
|
3
5
|
import { useAdaptable } from '../AdaptableContext';
|
|
4
|
-
export const
|
|
6
|
+
export const LayoutStatusbar = () => {
|
|
5
7
|
const adaptable = useAdaptable();
|
|
6
8
|
const layouts = adaptable.api.layoutApi.getLayouts();
|
|
7
|
-
const options = layouts.map((layout) => ({ label: layout.Name, value: layout.
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const options = layouts.map((layout) => ({ label: layout.Name, value: layout.Name }));
|
|
10
|
+
const currentLayout = useSelector((state) => state.Layout.CurrentLayout);
|
|
11
|
+
return (React.createElement(Box, { onClick: (event) => {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
} },
|
|
14
|
+
React.createElement(Select, { size: "small", options: options, value: currentLayout, onChange: (value) => {
|
|
15
|
+
adaptable.api.layoutApi.setLayout(value);
|
|
16
|
+
} })));
|
|
12
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
3
2
|
import { Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
3
|
import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
4
|
+
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
5
5
|
export declare const COMPONENT_LAYOUT_POPUP_NAME = "LayoutEditorStandalonePopup";
|
|
6
6
|
export interface LayoutViewPanelComponentProps extends ViewPanelProps {
|
|
7
7
|
onSelectLayout: (layoutName: string) => LayoutRedux.LayoutSelectAction;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { connect } from 'react-redux';
|
|
3
|
-
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
4
3
|
import { Flex } from 'rebass';
|
|
4
|
+
import { Select } from '../../components/Select';
|
|
5
5
|
import join from '../../components/utils/join';
|
|
6
|
+
import * as GridRedux from '../../Redux/ActionsReducers/GridRedux';
|
|
7
|
+
import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
6
8
|
import * as GeneralConstants from '../../Utilities/Constants/GeneralConstants';
|
|
7
|
-
import
|
|
9
|
+
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
10
|
+
import { ButtonClone } from '../Components/Buttons/ButtonClone';
|
|
11
|
+
import { ButtonDelete } from '../Components/Buttons/ButtonDelete';
|
|
8
12
|
import { ButtonEdit } from '../Components/Buttons/ButtonEdit';
|
|
9
13
|
import { ButtonNew } from '../Components/Buttons/ButtonNew';
|
|
10
|
-
import {
|
|
11
|
-
import { ButtonClone } from '../Components/Buttons/ButtonClone';
|
|
12
|
-
import * as GridRedux from '../../Redux/ActionsReducers/GridRedux';
|
|
13
|
-
import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
14
|
-
import { Select } from '../../components/Select';
|
|
14
|
+
import { ButtonSave } from '../Components/Buttons/ButtonSave';
|
|
15
15
|
export const COMPONENT_LAYOUT_POPUP_NAME = 'LayoutEditorStandalonePopup';
|
|
16
16
|
class LayoutViewPanelComponent extends React.Component {
|
|
17
17
|
render() {
|