@adaptabletools/adaptable-cjs 17.0.0-canary.2 → 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 +3 -3
- package/src/Redux/ActionsReducers/ExportRedux.js +0 -2
- package/src/Redux/Store/AdaptableStore.js +1 -1
- package/src/Strategy/LayoutModule.js +3 -7
- 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 +14 -9
- 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 +34 -0
- package/src/View/Theme/ThemeStatusbar.d.ts +2 -0
- package/src/View/Theme/ThemeStatusbar.js +14 -0
- package/src/View/Theme/ThemeViewPanel.d.ts +2 -13
- package/src/View/Theme/ThemeViewPanel.js +7 -53
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +6 -5
- 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.cjs.tsbuildinfo +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.d.ts +0 -2
- package/src/View/Theme/ThemeStatusPanelPopover.js +0 -25
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-cjs",
|
|
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",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"re-resizable": "6.9.9",
|
|
50
50
|
"react": "^18.0.0",
|
|
51
51
|
"react-beautiful-dnd": "13.1.1",
|
|
52
|
-
"react-day-picker": "8.0
|
|
52
|
+
"react-day-picker": "8.1.0",
|
|
53
53
|
"react-dom": "^18.0.0",
|
|
54
54
|
"react-redux": "7.2.8",
|
|
55
55
|
"react-remove-scroll": "2.4.4",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"ag-grid-community": ">=30.2.0"
|
|
68
68
|
},
|
|
69
|
-
"publishTimestamp":
|
|
69
|
+
"publishTimestamp": 1704904757187
|
|
70
70
|
}
|
|
@@ -70,8 +70,6 @@ const DestinationSelect = (SelectedDestination) => ({
|
|
|
70
70
|
exports.DestinationSelect = DestinationSelect;
|
|
71
71
|
const initialState = {
|
|
72
72
|
Reports: GeneralConstants_1.EMPTY_ARRAY,
|
|
73
|
-
CurrentReport: GeneralConstants_1.EMPTY_STRING,
|
|
74
|
-
CurrentDestination: GeneralConstants_1.EMPTY_STRING,
|
|
75
73
|
};
|
|
76
74
|
const ExportReducer = (state = initialState, action) => {
|
|
77
75
|
let reports;
|
|
@@ -1198,7 +1198,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1198
1198
|
if (!selectedReport ||
|
|
1199
1199
|
(selectedReport === GeneralConstants_1.VISUAL_DATA_REPORT &&
|
|
1200
1200
|
middlewareAPI.getState().Export.CurrentDestination !== Enums_1.ExportDestination.Excel)) {
|
|
1201
|
-
middlewareAPI.dispatch(ExportRedux.DestinationSelect(
|
|
1201
|
+
middlewareAPI.dispatch(ExportRedux.DestinationSelect(null));
|
|
1202
1202
|
}
|
|
1203
1203
|
return returnAction;
|
|
1204
1204
|
}
|
|
@@ -391,7 +391,8 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
391
391
|
})
|
|
392
392
|
.filter(Boolean),
|
|
393
393
|
},
|
|
394
|
-
(layout === null || layout === void 0 ? void 0 : layout.GridFilter) &&
|
|
394
|
+
(layout === null || layout === void 0 ? void 0 : layout.GridFilter) &&
|
|
395
|
+
StringExtensions_1.default.IsNotNullOrEmpty(layout.GridFilter.Expression) && {
|
|
395
396
|
name: 'Grid Filter',
|
|
396
397
|
values: [layout.GridFilter.Expression],
|
|
397
398
|
},
|
|
@@ -411,13 +412,8 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
411
412
|
},
|
|
412
413
|
getEditWizard: () => LayoutWizard_1.LayoutWizard,
|
|
413
414
|
getStatusBarPanelProps: () => {
|
|
414
|
-
const text = this.api.layoutApi.getCurrentLayoutName();
|
|
415
|
-
const layouts = this.api.layoutApi.getLayouts();
|
|
416
|
-
const popover = layouts.length > 1 ? LayoutStatusBarSubPanelPopover_1.LayoutStatusBarSubPanelPopover : null;
|
|
417
415
|
return {
|
|
418
|
-
content:
|
|
419
|
-
popover: popover,
|
|
420
|
-
popoverMinWidth: 150,
|
|
416
|
+
content: LayoutStatusBarSubPanelPopover_1.LayoutStatusbar,
|
|
421
417
|
extraActions: [EditCurrentLayoutButton_1.EditCurrentLayoutButton, SaveLayoutButton_1.SaveLayoutButton],
|
|
422
418
|
};
|
|
423
419
|
},
|
|
@@ -4,7 +4,7 @@ exports.ThemeModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
-
const
|
|
7
|
+
const ThemeStatusbar_1 = require("../View/Theme/ThemeStatusbar");
|
|
8
8
|
class ThemeModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
9
9
|
constructor(api) {
|
|
10
10
|
super(ModuleConstants.ThemeModuleId, ModuleConstants.ThemeFriendlyName, 'theme', 'ThemePopup', 'Theme AdapTable with a colour configuration set of your choosing', api);
|
|
@@ -18,16 +18,8 @@ class ThemeModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
18
18
|
getViewProperties() {
|
|
19
19
|
return {
|
|
20
20
|
getStatusBarPanelProps: () => {
|
|
21
|
-
var _a;
|
|
22
|
-
const currentThemeName = this.api.themeApi.getCurrentTheme();
|
|
23
|
-
const currentTheme = this.api.themeApi
|
|
24
|
-
.getThemes()
|
|
25
|
-
.find((theme) => theme.Name === currentThemeName);
|
|
26
|
-
const text = (_a = currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.Description) !== null && _a !== void 0 ? _a : currentThemeName;
|
|
27
21
|
return {
|
|
28
|
-
content:
|
|
29
|
-
popover: ThemeStatusPanelPopover_1.ThemeStatusPanelPopover,
|
|
30
|
-
popoverMinWidth: 120,
|
|
22
|
+
content: ThemeStatusbar_1.ThemeStatusbar,
|
|
31
23
|
};
|
|
32
24
|
},
|
|
33
25
|
};
|
|
@@ -4,6 +4,7 @@ exports.getAlertTypeText = exports.getAlertType = exports.AlertType = void 0;
|
|
|
4
4
|
var AlertType;
|
|
5
5
|
(function (AlertType) {
|
|
6
6
|
AlertType["DataChange"] = "DataChange";
|
|
7
|
+
AlertType["Validation"] = "Validation";
|
|
7
8
|
AlertType["RowChange"] = "RowChange";
|
|
8
9
|
AlertType["Aggregation"] = "Aggregation";
|
|
9
10
|
AlertType["Observable"] = "Observable";
|
|
@@ -15,6 +16,7 @@ var AlertType;
|
|
|
15
16
|
* @param alert
|
|
16
17
|
*/
|
|
17
18
|
const getAlertType = (alert) => {
|
|
19
|
+
var _a, _b;
|
|
18
20
|
if (alert.Rule.ObservableExpression) {
|
|
19
21
|
return AlertType.Observable;
|
|
20
22
|
}
|
|
@@ -22,6 +24,9 @@ const getAlertType = (alert) => {
|
|
|
22
24
|
return AlertType.Aggregation;
|
|
23
25
|
}
|
|
24
26
|
if (alert.Rule.BooleanExpression) {
|
|
27
|
+
if ((_a = alert.AlertProperties) === null || _a === void 0 ? void 0 : _a.PreventEdit) {
|
|
28
|
+
return AlertType.Validation;
|
|
29
|
+
}
|
|
25
30
|
return AlertType.DataChange;
|
|
26
31
|
}
|
|
27
32
|
const predicates = alert.Rule.Predicates;
|
|
@@ -30,7 +35,7 @@ const getAlertType = (alert) => {
|
|
|
30
35
|
return AlertType.RowChange;
|
|
31
36
|
}
|
|
32
37
|
else {
|
|
33
|
-
return AlertType.DataChange;
|
|
38
|
+
return ((_b = alert.AlertProperties) === null || _b === void 0 ? void 0 : _b.PreventEdit) ? AlertType.Validation : AlertType.DataChange;
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
// the object is not a valid alert
|
|
@@ -43,6 +48,9 @@ const getAlertTypeText = (alertType) => {
|
|
|
43
48
|
case AlertType.DataChange:
|
|
44
49
|
text = 'Data Change';
|
|
45
50
|
break;
|
|
51
|
+
case AlertType.Validation:
|
|
52
|
+
text = 'Data Validation';
|
|
53
|
+
break;
|
|
46
54
|
case AlertType.RowChange:
|
|
47
55
|
text = 'Row Change';
|
|
48
56
|
break;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getAvailablePredicateDefinitions = void 0;
|
|
4
4
|
const getAvailablePredicateDefinitions = (api, scope, alertType) => {
|
|
5
5
|
let predicateDefs = [];
|
|
6
|
-
if (alertType === 'DataChange') {
|
|
6
|
+
if (alertType === 'DataChange' || alertType === 'Validation') {
|
|
7
7
|
predicateDefs = api.alertApi.internalApi
|
|
8
8
|
.getAlertPredicateDefsForScope(scope)
|
|
9
9
|
.filter((predicateDef) => !['AddedRow', 'RemovedRow'].includes(predicateDef.id));
|
|
@@ -27,6 +27,11 @@ const getDefaultAlertDefinition = (alertDefinition, type) => {
|
|
|
27
27
|
],
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
if (type === getAlertType_1.AlertType.Validation) {
|
|
31
|
+
newAlert.AlertProperties = {
|
|
32
|
+
PreventEdit: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
30
35
|
return newAlert;
|
|
31
36
|
};
|
|
32
37
|
exports.getDefaultAlertDefinition = getDefaultAlertDefinition;
|
|
@@ -107,7 +107,7 @@ const AlertBehaviourWizardSection = (props) => {
|
|
|
107
107
|
const { AlertProperties = {} } = data;
|
|
108
108
|
const rowRemovedAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(data);
|
|
109
109
|
// data change only
|
|
110
|
-
const hasPreventCellEdit = props.alertType === '
|
|
110
|
+
const hasPreventCellEdit = props.alertType === 'Validation';
|
|
111
111
|
// except row change
|
|
112
112
|
const hasHighlightCell = props.alertType !== 'RowChange';
|
|
113
113
|
// except row removed
|
|
@@ -126,11 +126,7 @@ const AlertBehaviourWizardSection = (props) => {
|
|
|
126
126
|
return (React.createElement(Tabs_1.Tabs, null,
|
|
127
127
|
React.createElement(Tabs_1.Tabs.Tab, null, api.internalApi.getCorrectEnglishVariant('Behaviour')),
|
|
128
128
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
129
|
-
hasPreventCellEdit && (React.createElement(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit,
|
|
130
|
-
onChange({
|
|
131
|
-
PreventEdit,
|
|
132
|
-
});
|
|
133
|
-
} },
|
|
129
|
+
hasPreventCellEdit && (React.createElement(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, disabled: true },
|
|
134
130
|
"Prevent Cell Edit",
|
|
135
131
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
|
|
136
132
|
hasHighlightCell && (React.createElement(HighlightStyle, { dataName: "highlight-cell", highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
@@ -16,9 +16,11 @@ const getRuleStepDescription = (alertType) => {
|
|
|
16
16
|
return (React.createElement(React.Fragment, null,
|
|
17
17
|
"Build the Rule ",
|
|
18
18
|
React.createElement("b", null, "when"),
|
|
19
|
-
" the Alert should trigger
|
|
19
|
+
" the Alert should trigger (using a Predicate or a Query)"));
|
|
20
20
|
case 'RowChange':
|
|
21
21
|
return React.createElement(React.Fragment, null, "Specify which type of Row Change will trigger the Alert");
|
|
22
|
+
case 'Validation':
|
|
23
|
+
return React.createElement(React.Fragment, null, "Create the Validation Rule which will trigger the Alert (using a Predicate or a Query)");
|
|
22
24
|
case 'Aggregation':
|
|
23
25
|
return React.createElement(React.Fragment, null, "Build an Aggregation Boolean Rule to specify when the Alert should trigger");
|
|
24
26
|
case 'Observable':
|
|
@@ -59,14 +61,15 @@ const AlertRulesWizardSection = (props) => {
|
|
|
59
61
|
const predicateDefs = (0, getAvailablePredicates_1.getAvailablePredicateDefinitions)(api, data.Scope, props.alertType);
|
|
60
62
|
const showObservable = props.alertType === 'Observable';
|
|
61
63
|
const showAggregation = props.alertType === 'Aggregation';
|
|
62
|
-
const showBoolean = props.alertType === 'DataChange';
|
|
63
|
-
const showPredicate = props.alertType === 'DataChange' || props.alertType === 'RowChange';
|
|
64
|
-
const enablePredicateColumnId = props.alertType === 'DataChange';
|
|
64
|
+
const showBoolean = props.alertType === 'DataChange' || props.alertType == 'Validation';
|
|
65
|
+
const showPredicate = props.alertType === 'DataChange' || props.alertType == 'Validation' || props.alertType === 'RowChange';
|
|
66
|
+
const enablePredicateColumnId = props.alertType === 'DataChange' || props.alertType == 'Validation';
|
|
67
|
+
;
|
|
65
68
|
if (props.alertType === 'RowChange') {
|
|
66
69
|
return React.createElement(RowChangeEditor, { alert: data, onChange: props.onChange });
|
|
67
70
|
}
|
|
68
71
|
return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "AnyChange", data: data, predicateDefs: predicateDefs, enablePredicateColumnId: enablePredicateColumnId, getPredicateDefsForColId: (colId) => (0, getAvailablePredicates_1.getAvailablePredicateDefinitions)(api, { ColumnIds: [colId] }, props.alertType), onChange: props.onChange, showAggregation: showAggregation, showObservable: showObservable, showBoolean: showBoolean, showPredicate: showPredicate, descriptions: {
|
|
69
|
-
selectPredicate: '
|
|
72
|
+
selectPredicate: 'Build the Predicate',
|
|
70
73
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
71
74
|
"Use an BooleanQuery if ",
|
|
72
75
|
React.createElement("i", null, "Scope"),
|
|
@@ -10,7 +10,7 @@ const AlertScopeWizardSection = (props) => {
|
|
|
10
10
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
11
11
|
let disableDataTypes = true;
|
|
12
12
|
let disableColumns = true;
|
|
13
|
-
if (props.alertType === 'DataChange') {
|
|
13
|
+
if (props.alertType === 'DataChange' || props.alertType == 'Validation') {
|
|
14
14
|
disableDataTypes = false;
|
|
15
15
|
disableColumns = false;
|
|
16
16
|
}
|
|
@@ -22,6 +22,7 @@ const AlertTypeWizardSection = (props) => {
|
|
|
22
22
|
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === getAlertType_1.AlertType.DataChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.DataChange) }),
|
|
23
23
|
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === getAlertType_1.AlertType.RowChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.RowChange) }),
|
|
24
24
|
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Aggregation), checked: props.alertType === getAlertType_1.AlertType.Aggregation }),
|
|
25
|
-
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable })
|
|
25
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable }),
|
|
26
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === getAlertType_1.AlertType.Validation, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Validation) })))));
|
|
26
27
|
};
|
|
27
28
|
exports.AlertTypeWizardSection = AlertTypeWizardSection;
|
|
@@ -85,7 +85,7 @@ const AlertWizard = (props) => {
|
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
title: 'Trigger',
|
|
88
|
-
isVisible: () => alertType === getAlertType_1.AlertType.DataChange,
|
|
88
|
+
isVisible: () => alertType === getAlertType_1.AlertType.DataChange || alertType == getAlertType_1.AlertType.Validation,
|
|
89
89
|
details: (React.createElement(React.Fragment, null,
|
|
90
90
|
"Specify ",
|
|
91
91
|
React.createElement("b", null, "where"),
|
|
@@ -4,7 +4,7 @@ exports.useChartingElements = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
|
-
const
|
|
7
|
+
const Select_1 = require("../../components/Select");
|
|
8
8
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
9
9
|
const ChartingState_1 = require("../../PredefinedConfig/ChartingState");
|
|
10
10
|
const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
|
|
@@ -15,7 +15,7 @@ const EditChartButton_1 = require("./EditChartButton");
|
|
|
15
15
|
const useAgChartState_1 = require("./useAgChartState");
|
|
16
16
|
const useExternalChartState_1 = require("./useExternalChartState");
|
|
17
17
|
const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) => {
|
|
18
|
-
var _a
|
|
18
|
+
var _a;
|
|
19
19
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
20
20
|
const chartDefinitions = (0, react_redux_1.useSelector)(ChartingRedux.ChartingGetChartModels);
|
|
21
21
|
const extenralChartDefinitions = (0, react_redux_1.useSelector)(ChartingRedux.ChartingGetExternalChartDefinitions);
|
|
@@ -65,17 +65,13 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
65
65
|
let containerOptions = chartContainers
|
|
66
66
|
? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
|
|
67
67
|
label: contianerDef.name,
|
|
68
|
-
|
|
69
|
-
setSelectedContainer(contianerDef);
|
|
70
|
-
},
|
|
68
|
+
value: contianerDef.name,
|
|
71
69
|
}))
|
|
72
70
|
: [];
|
|
73
71
|
if ((0, ChartingState_1.isAgChartDefinition)(selectedChart)) {
|
|
74
72
|
containerOptions.unshift({
|
|
75
73
|
label: chartingOptions.agGridContainerName,
|
|
76
|
-
|
|
77
|
-
setSelectedContainer(null);
|
|
78
|
-
},
|
|
74
|
+
value: null,
|
|
79
75
|
});
|
|
80
76
|
}
|
|
81
77
|
const style = {};
|
|
@@ -85,8 +81,10 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
85
81
|
style.fontSize = 'small';
|
|
86
82
|
iconSize = 15;
|
|
87
83
|
}
|
|
88
|
-
const chartSelector = (React.createElement(
|
|
89
|
-
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(
|
|
84
|
+
const chartSelector = (React.createElement(Select_1.Select, { className: `ab-${elementType}__Chart__select`, size: size, value: selectedChartId, options: options, placeholder: 'Select Chart', disabled: !hasCharts, onChange: (chartUuid) => setSelectedChartId(chartUuid) }));
|
|
85
|
+
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(Select_1.Select, { value: selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name, size: size, onChange: (containerName) => {
|
|
86
|
+
setSelectedContainer(chartContainers.find((containerOption) => containerOption.name === containerName));
|
|
87
|
+
}, options: containerOptions, placeholder: "Select Container" }));
|
|
90
88
|
const chartButton = (React.createElement(SimpleButton_1.default, { 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' }));
|
|
91
89
|
const deleteButton = (React.createElement(DeleteChartButton_1.DeleteChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel }));
|
|
92
90
|
const editButton = (React.createElement(EditChartButton_1.EditChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel, isOpen: isOpen }));
|
|
@@ -25,7 +25,7 @@ const ColumnSelector = function (props) {
|
|
|
25
25
|
}
|
|
26
26
|
return true;
|
|
27
27
|
});
|
|
28
|
-
return (React.createElement(Select_1.Select, { "data-name": "column-selector", disabled: props.disabled, isMulti: props.isMulti, menuPosition: props.menuPosition, value: props.value, onChange: (colId) => {
|
|
28
|
+
return (React.createElement(Select_1.Select, { "data-name": "column-selector", disabled: props.disabled, isMulti: props.isMulti, menuPosition: props.menuPosition, value: props.value, placeholder: "Select Column", onChange: (colId) => {
|
|
29
29
|
props.onChange(colId);
|
|
30
30
|
}, options: options }));
|
|
31
31
|
};
|
|
@@ -3,15 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExportSelector = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const Select_1 = require("../../components/Select");
|
|
7
7
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
8
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
9
9
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
10
|
-
const constants_1 = require("./constants");
|
|
11
|
-
const dropdownStyle = {
|
|
12
|
-
padding: 2,
|
|
13
|
-
fontSize: 'small',
|
|
14
|
-
};
|
|
15
10
|
const isCustomDestination = (destination) => {
|
|
16
11
|
return !!destination.name;
|
|
17
12
|
};
|
|
@@ -27,7 +22,6 @@ const ExportSelector = () => {
|
|
|
27
22
|
return {
|
|
28
23
|
label: report,
|
|
29
24
|
value: report,
|
|
30
|
-
onClick: () => handleReportChange(report),
|
|
31
25
|
};
|
|
32
26
|
});
|
|
33
27
|
const currentReport = adaptable.api.exportApi.getCurrentReport();
|
|
@@ -41,25 +35,22 @@ const ExportSelector = () => {
|
|
|
41
35
|
const destinationItems = [
|
|
42
36
|
...adaptable.api.exportApi.getAvailableExportDestinations().map((destination) => ({
|
|
43
37
|
label: destination,
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
value: destination,
|
|
39
|
+
isDisabled: !adaptable.api.exportApi.internalApi.isDestinationEnabled(destination),
|
|
46
40
|
})),
|
|
47
41
|
...adaptable.api.exportApi.getCustomDestinations().map((destination) => ({
|
|
48
42
|
label: destination.name,
|
|
49
|
-
|
|
43
|
+
value: destination.name,
|
|
50
44
|
})),
|
|
51
45
|
];
|
|
52
46
|
const currentDestination = adaptable.api.exportApi.getCurrentDestination();
|
|
53
|
-
let currentDestinationId =
|
|
47
|
+
let currentDestinationId = undefined;
|
|
54
48
|
if (typeof currentDestination === 'string') {
|
|
55
49
|
currentDestinationId = currentDestination;
|
|
56
50
|
}
|
|
57
51
|
else if (currentDestination && 'name' in currentDestination) {
|
|
58
52
|
currentDestinationId = currentDestination.name;
|
|
59
53
|
}
|
|
60
|
-
else {
|
|
61
|
-
currentDestinationId = constants_1.SELECT_DESTINATION_STRING;
|
|
62
|
-
}
|
|
63
54
|
// export
|
|
64
55
|
const handleExport = () => {
|
|
65
56
|
if (isCustomDestination(currentDestination)) {
|
|
@@ -70,8 +61,15 @@ const ExportSelector = () => {
|
|
|
70
61
|
}
|
|
71
62
|
};
|
|
72
63
|
return (React.createElement(React.Fragment, null,
|
|
73
|
-
React.createElement(
|
|
74
|
-
React.createElement(
|
|
75
|
-
|
|
64
|
+
React.createElement(Select_1.Select, { size: "small", isClearable: true, placeholder: 'Select Report', value: currentReportId, options: reportItems, onChange: handleReportChange }),
|
|
65
|
+
React.createElement(Select_1.Select, { size: "small", isClearable: true, placeholder: 'Select Destination', value: currentDestinationId, options: destinationItems, onChange: (destination) => {
|
|
66
|
+
if (destination) {
|
|
67
|
+
handleDestinationChange(destination);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
handleDestinationChange(null);
|
|
71
|
+
}
|
|
72
|
+
} }),
|
|
73
|
+
React.createElement(SimpleButton_1.default, { disabled: !currentDestinationId || !currentReportId, iconSize: 15, icon: "export", variant: "text", onClick: handleExport })));
|
|
76
74
|
};
|
|
77
75
|
exports.ExportSelector = ExportSelector;
|
|
@@ -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;
|
|
@@ -2,33 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExportViewPanelControl = void 0;
|
|
4
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 Select_1 = require("../../components/Select");
|
|
9
|
+
const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
|
|
5
10
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
6
11
|
const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
|
|
7
12
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
8
|
-
const React = tslib_1.__importStar(require("react"));
|
|
9
|
-
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
10
13
|
const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants/GeneralConstants"));
|
|
11
14
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
15
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
16
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
12
17
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const ButtonExport_1 = require("../Components/Buttons/ButtonExport");
|
|
18
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
19
|
+
const ButtonDelete_1 = require("../Components/Buttons/ButtonDelete");
|
|
16
20
|
const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
|
|
21
|
+
const ButtonExport_1 = require("../Components/Buttons/ButtonExport");
|
|
17
22
|
const ButtonNew_1 = require("../Components/Buttons/ButtonNew");
|
|
18
|
-
const ButtonDelete_1 = require("../Components/Buttons/ButtonDelete");
|
|
19
23
|
const ButtonSchedule_1 = require("../Components/Buttons/ButtonSchedule");
|
|
20
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
21
|
-
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
22
|
-
const react_redux_1 = require("react-redux");
|
|
23
24
|
const constants_1 = require("./constants");
|
|
24
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
25
|
-
const Select_1 = require("../../components/Select");
|
|
26
25
|
class ExportViewPanelComponent extends React.Component {
|
|
27
26
|
render() {
|
|
28
27
|
let currentReport = this.props.api.exportApi.getReportByName(this.props.CurrentReport);
|
|
29
|
-
let currentReportId =
|
|
30
|
-
? constants_1.SELECT_REPORT_STRING
|
|
31
|
-
: this.props.CurrentReport;
|
|
28
|
+
let currentReportId = this.props.CurrentReport;
|
|
32
29
|
const allReportNames = this.getAllReportNames();
|
|
33
30
|
const reportItems = allReportNames.map((report) => {
|
|
34
31
|
return {
|
|
@@ -40,12 +37,10 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
40
37
|
if (currentReport && !allReportNames.includes(currentReport.Name)) {
|
|
41
38
|
// current report is not available
|
|
42
39
|
currentReport = undefined;
|
|
43
|
-
currentReportId =
|
|
40
|
+
currentReportId = undefined;
|
|
44
41
|
}
|
|
45
42
|
let currentDestination = this.props.api.exportApi.getDestinationByName(this.props.CurrentDestination);
|
|
46
|
-
let currentDestinationId =
|
|
47
|
-
? constants_1.SELECT_DESTINATION_STRING
|
|
48
|
-
: this.props.CurrentDestination;
|
|
43
|
+
let currentDestinationId = this.props.CurrentDestination;
|
|
49
44
|
const destinationItems = [
|
|
50
45
|
...this.props.api.exportApi.getAvailableExportDestinations().map((destination) => ({
|
|
51
46
|
label: destination,
|
|
@@ -70,7 +65,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
70
65
|
.includes(this.props.CurrentDestination)) {
|
|
71
66
|
// current destination is not available
|
|
72
67
|
currentDestination = undefined;
|
|
73
|
-
currentDestinationId =
|
|
68
|
+
currentDestinationId = undefined;
|
|
74
69
|
}
|
|
75
70
|
let accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(currentReport, this.props.accessLevel);
|
|
76
71
|
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,17 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.LayoutStatusbar = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const Select_1 = require("../../components/Select");
|
|
7
9
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
-
const
|
|
10
|
+
const LayoutStatusbar = () => {
|
|
9
11
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
10
12
|
const layouts = adaptable.api.layoutApi.getLayouts();
|
|
11
|
-
const options = layouts.map((layout) => ({ label: layout.Name, value: layout.
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const options = layouts.map((layout) => ({ label: layout.Name, value: layout.Name }));
|
|
14
|
+
const currentLayout = (0, react_redux_1.useSelector)((state) => state.Layout.CurrentLayout);
|
|
15
|
+
return (React.createElement(rebass_1.Box, { onClick: (event) => {
|
|
16
|
+
event.stopPropagation();
|
|
17
|
+
} },
|
|
18
|
+
React.createElement(Select_1.Select, { size: "small", options: options, value: currentLayout, onChange: (value) => {
|
|
19
|
+
adaptable.api.layoutApi.setLayout(value);
|
|
20
|
+
} })));
|
|
16
21
|
};
|
|
17
|
-
exports.
|
|
22
|
+
exports.LayoutStatusbar = LayoutStatusbar;
|
|
@@ -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;
|
|
@@ -4,18 +4,18 @@ exports.LayoutViewPanelControl = exports.COMPONENT_LAYOUT_POPUP_NAME = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
|
-
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
8
7
|
const rebass_1 = require("rebass");
|
|
8
|
+
const Select_1 = require("../../components/Select");
|
|
9
9
|
const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
|
|
10
|
+
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
11
|
+
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
10
12
|
const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants/GeneralConstants"));
|
|
11
|
-
const
|
|
13
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
14
|
+
const ButtonClone_1 = require("../Components/Buttons/ButtonClone");
|
|
15
|
+
const ButtonDelete_1 = require("../Components/Buttons/ButtonDelete");
|
|
12
16
|
const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
|
|
13
17
|
const ButtonNew_1 = require("../Components/Buttons/ButtonNew");
|
|
14
|
-
const
|
|
15
|
-
const ButtonClone_1 = require("../Components/Buttons/ButtonClone");
|
|
16
|
-
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
17
|
-
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
18
|
-
const Select_1 = require("../../components/Select");
|
|
18
|
+
const ButtonSave_1 = require("../Components/Buttons/ButtonSave");
|
|
19
19
|
exports.COMPONENT_LAYOUT_POPUP_NAME = 'LayoutEditorStandalonePopup';
|
|
20
20
|
class LayoutViewPanelComponent extends React.Component {
|
|
21
21
|
render() {
|