@adaptabletools/adaptable 13.0.10 → 13.1.0-canary.1
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 +92 -0
- package/base.css.map +1 -1
- package/bundle.cjs.js +179 -177
- package/index.css +107 -0
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -2
- package/src/AdaptableOptions/ActionOptions.d.ts +52 -34
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/ChartingOptions.d.ts +27 -0
- package/src/AdaptableOptions/ChartingOptions.js +2 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +2 -2
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/ChartingApi.d.ts +38 -1
- package/src/Api/ColumnApi.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +4 -0
- package/src/Api/Implementation/ChartingApiImpl.d.ts +9 -1
- package/src/Api/Implementation/ChartingApiImpl.js +35 -6
- package/src/Api/Implementation/GridApiImpl.js +3 -2
- package/src/PredefinedConfig/AlertState.d.ts +7 -3
- package/src/PredefinedConfig/ChartingState.d.ts +13 -4
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +6 -6
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +3 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +9 -0
- package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -5
- package/src/Redux/ActionsReducers/ChartingRedux.js +45 -5
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +7 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +22 -4
- package/src/Strategy/ChartingModule.d.ts +7 -1
- package/src/Strategy/ChartingModule.js +97 -0
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/Interface/IModule.d.ts +1 -0
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.js +0 -3
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -10
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
- package/src/Utilities/ObjectFactory.d.ts +5 -4
- package/src/Utilities/ObjectFactory.js +9 -14
- package/src/Utilities/Services/ChartingService.d.ts +10 -0
- package/src/Utilities/Services/ChartingService.js +100 -0
- package/src/Utilities/Services/Interface/IChartingService.d.ts +5 -0
- package/src/Utilities/Services/Interface/IChartingService.js +2 -0
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +2 -0
- package/src/Utilities/Services/RowEditService.d.ts +3 -3
- package/src/Utilities/Services/RowEditService.js +4 -4
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -5
- package/src/View/Components/Charting/ChartingStatusBarPopover.d.ts +2 -0
- package/src/View/Components/Charting/ChartingStatusBarPopover.js +23 -0
- package/src/View/Components/Charting/ChartingViewPanel.d.ts +3 -0
- package/src/View/Components/Charting/ChartingViewPanel.js +79 -0
- package/src/View/Components/Charting/ChartingWizard/ChartingWizard.d.ts +6 -0
- package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +37 -0
- package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.d.ts +6 -0
- package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.js +34 -0
- package/src/View/Components/Charting/ChartingWizard/SettingsSection.d.ts +8 -0
- package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +53 -0
- package/src/View/Components/Charting/ShowChartButton.d.ts +5 -0
- package/src/View/Components/Charting/ShowChartButton.js +38 -0
- package/src/View/Components/Charting/useChartState.d.ts +9 -0
- package/src/View/Components/Charting/useChartState.js +71 -0
- package/src/View/Components/ExpressionWizard.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +8 -7
- package/src/View/Components/Popups/AdaptableToaster.js +2 -0
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +6 -6
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +0 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +1 -1
- package/src/agGrid/Adaptable.d.ts +8 -4
- package/src/agGrid/Adaptable.js +47 -12
- package/src/agGrid/agGridHelper.js +0 -1
- package/src/{View → components/ColorPicker}/ColorPicker.d.ts +3 -2
- package/src/{View → components/ColorPicker}/ColorPicker.js +19 -6
- package/src/components/ColorPicker/index.d.ts +1 -0
- package/src/components/ColorPicker/index.js +4 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/icons/index.js +0 -2
- package/src/metamodel/adaptable.metamodel.d.ts +70 -16
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +3 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Strategy/ConditionalStyleModule.d.ts +0 -6
- package/src/Strategy/ConditionalStyleModule.js +0 -12
- package/src/components/icons/conditional-style.d.ts +0 -3
- package/src/components/icons/conditional-style.js +0 -7
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { IModule } from './Interface/IModule';
|
|
1
|
+
import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
2
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
3
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
|
+
import { ChartDefinition } from '../types';
|
|
4
5
|
export declare class ChartingModule extends AdaptableModuleBase implements IModule {
|
|
5
6
|
constructor(api: AdaptableApi);
|
|
7
|
+
updateOldConfig(): void;
|
|
6
8
|
isModuleAvailable(): boolean;
|
|
9
|
+
getModuleAdaptableObjects(): ChartDefinition[];
|
|
10
|
+
toViewAll(): AdaptableObjectView[];
|
|
11
|
+
toView(chart: ChartDefinition): AdaptableObjectView;
|
|
12
|
+
getViewProperties(): AdaptableModuleView;
|
|
7
13
|
}
|
|
@@ -4,12 +4,109 @@ exports.ChartingModule = 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 ShowChartButton_1 = require("../View/Components/Charting/ShowChartButton");
|
|
8
|
+
const ChartingWizard_1 = require("../View/Components/Charting/ChartingWizard/ChartingWizard");
|
|
9
|
+
const ChartingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/ChartingRedux"));
|
|
10
|
+
const ChartingStatusBarPopover_1 = require("../View/Components/Charting/ChartingStatusBarPopover");
|
|
7
11
|
class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
12
|
constructor(api) {
|
|
9
13
|
super(ModuleConstants.ChartingModuleId, ModuleConstants.ChartingFriendlyName, 'chart', 'ChartPopup', 'Create AG Grid Charts in order to see Adaptable Data visually', api);
|
|
10
14
|
}
|
|
15
|
+
updateOldConfig() {
|
|
16
|
+
const allChartDefinitions = this.getModuleAdaptableObjects();
|
|
17
|
+
const chartDefinitionsToUpdate = allChartDefinitions
|
|
18
|
+
.filter((chartDefinition) => 'model' in chartDefinition || !('Name' in chartDefinition))
|
|
19
|
+
.map((charDefinition) => {
|
|
20
|
+
const newChartDefinition = Object.assign({}, charDefinition);
|
|
21
|
+
if ('model' in newChartDefinition) {
|
|
22
|
+
newChartDefinition.Model = charDefinition.model;
|
|
23
|
+
delete newChartDefinition.model;
|
|
24
|
+
}
|
|
25
|
+
if (!('Name' in newChartDefinition)) {
|
|
26
|
+
// default to chartId
|
|
27
|
+
newChartDefinition.Name = newChartDefinition.Model.chartId;
|
|
28
|
+
}
|
|
29
|
+
return newChartDefinition;
|
|
30
|
+
});
|
|
31
|
+
if (chartDefinitionsToUpdate.length > 0) {
|
|
32
|
+
chartDefinitionsToUpdate.forEach((chartDefinition) => this.api.chartingApi.editChartDefinition(chartDefinition));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
11
35
|
isModuleAvailable() {
|
|
12
36
|
return this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
|
|
37
|
+
// return false;
|
|
38
|
+
}
|
|
39
|
+
getModuleAdaptableObjects() {
|
|
40
|
+
return this.api.chartingApi.getAllChartDefinitions();
|
|
41
|
+
}
|
|
42
|
+
toViewAll() {
|
|
43
|
+
return this.getModuleAdaptableObjects().map((layout) => this.toView(layout));
|
|
44
|
+
}
|
|
45
|
+
toView(chart) {
|
|
46
|
+
var _a;
|
|
47
|
+
return {
|
|
48
|
+
items: [
|
|
49
|
+
{
|
|
50
|
+
name: 'Name',
|
|
51
|
+
values: [chart.Name],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'About',
|
|
55
|
+
values: [
|
|
56
|
+
`Chart Type: ${chart.Model.chartType}`,
|
|
57
|
+
chart.Model.aggFunc && `Aggregation Function: ${chart.Model.aggFunc}`,
|
|
58
|
+
].filter(Boolean),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Settings',
|
|
62
|
+
values: [
|
|
63
|
+
`Unlink from data: ${chart.Model.unlinkChart ? 'Yes' : 'No'}`,
|
|
64
|
+
`Suppress Chart Ranges: ${chart.Model.suppressChartRanges ? 'Yes' : 'No'}`,
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Range',
|
|
69
|
+
values: [
|
|
70
|
+
`Row start index: ${chart.Model.cellRange.rowStartIndex}`,
|
|
71
|
+
`Row end index: ${chart.Model.cellRange.rowEndIndex}`,
|
|
72
|
+
chart.Model.cellRange.columnStart &&
|
|
73
|
+
`Column start: ${typeof chart.Model.cellRange.columnStart === 'string'
|
|
74
|
+
? chart.Model.cellRange.columnStart
|
|
75
|
+
: chart.Model.cellRange.columnStart.getColId()}`,
|
|
76
|
+
chart.Model.cellRange.columnEnd &&
|
|
77
|
+
`Column start: ${typeof chart.Model.cellRange.columnEnd === 'string'
|
|
78
|
+
? chart.Model.cellRange.columnEnd
|
|
79
|
+
: chart.Model.cellRange.columnEnd.getColId()}`,
|
|
80
|
+
((_a = chart.Model.cellRange.columns) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
81
|
+
`Columns ${chart.Model.cellRange.columns
|
|
82
|
+
.map((column) => (typeof column === 'string' ? column : column.getColId()))
|
|
83
|
+
.join(', ')}`,
|
|
84
|
+
].filter(Boolean),
|
|
85
|
+
},
|
|
86
|
+
].filter(Boolean),
|
|
87
|
+
abObject: chart,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
getViewProperties() {
|
|
91
|
+
return {
|
|
92
|
+
actions: [ShowChartButton_1.ShowChartButton],
|
|
93
|
+
getEditWizard: () => ChartingWizard_1.ChartingWizard,
|
|
94
|
+
// not sure if charts should be created via adaptable wizard
|
|
95
|
+
hideNewButton: true,
|
|
96
|
+
getDeleteAction: (chartDefinition) => {
|
|
97
|
+
return ChartingRedux.ChartingDeleteChart(chartDefinition.Name);
|
|
98
|
+
},
|
|
99
|
+
emptyView: 'To create a chart select a few cells and right click. Then select "Chart Range" from the context menu.',
|
|
100
|
+
getStatusBarPanelProps: () => {
|
|
101
|
+
const chartDefinitions = this.getModuleAdaptableObjects();
|
|
102
|
+
const popover = chartDefinitions.length > 0 ? ChartingStatusBarPopover_1.ChartingStatusBarPopover : null;
|
|
103
|
+
const content = popover ? 'See Charts' : 'No Charts';
|
|
104
|
+
return {
|
|
105
|
+
content,
|
|
106
|
+
popover,
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
};
|
|
13
110
|
}
|
|
14
111
|
}
|
|
15
112
|
exports.ChartingModule = ChartingModule;
|
|
@@ -94,8 +94,12 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
94
94
|
if (menuContext.adaptableColumn && menuContext.rowNode) {
|
|
95
95
|
const flashingCellForRow = this.api.internalApi.getAdaptableFlashingCellFor(menuContext.primaryKeyValue);
|
|
96
96
|
const flashingCellForCell = this.api.internalApi.getAdaptableFlashingCellFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
97
|
-
if (flashingCellForRow
|
|
98
|
-
|
|
97
|
+
if (flashingCellForRow) {
|
|
98
|
+
if (flashingCellForRow.flashTarget === 'row' ||
|
|
99
|
+
(Array.isArray(flashingCellForRow.flashTarget) &&
|
|
100
|
+
flashingCellForRow.flashTarget.includes('row'))) {
|
|
101
|
+
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
else if (flashingCellForCell && flashingCellForCell.flashTarget === 'cell') {
|
|
101
105
|
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
@@ -103,6 +103,7 @@ export interface AdaptableModuleView {
|
|
|
103
103
|
module: IModule;
|
|
104
104
|
}>> | string;
|
|
105
105
|
newTooltipText?: string;
|
|
106
|
+
hideNewButton?: boolean;
|
|
106
107
|
/**
|
|
107
108
|
* Specifieds the types of objects the module manages.
|
|
108
109
|
* When specified the new button will have these options.
|
|
@@ -425,7 +425,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
425
425
|
.getModuleService()
|
|
426
426
|
.getModuleById('Schedule')
|
|
427
427
|
.setUpScheduleJobs();
|
|
428
|
-
//
|
|
428
|
+
// CustomSort, FlashingCell, FormatColumn
|
|
429
429
|
// we need to refresh the column defs, as some configs may have changed
|
|
430
430
|
this.api.internalApi.getAdaptableInstance().setupColumns();
|
|
431
431
|
}
|
|
@@ -94,9 +94,6 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
94
94
|
}
|
|
95
95
|
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
96
96
|
let styledColumn = this.api.styledColumnApi.getStyledColumnByColumnId(column.columnId);
|
|
97
|
-
if (!styledColumn) {
|
|
98
|
-
styledColumn = Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyStyledColumn()), { ColumnId: column.columnId, CheckBoxStyle: true });
|
|
99
|
-
}
|
|
100
97
|
const hasCheckBox = styledColumn && (styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.CheckBoxStyle);
|
|
101
98
|
if (hasCheckBox) {
|
|
102
99
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'unchecked', () => {
|
|
@@ -100,16 +100,18 @@ exports.DefaultAdaptableOptions = {
|
|
|
100
100
|
actionOptions: {
|
|
101
101
|
actionColumns: undefined,
|
|
102
102
|
actionRowButtons: undefined,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
actionRowButtonOptions: {
|
|
104
|
+
customConfiguration: undefined,
|
|
105
|
+
position: 'pinnedLeft',
|
|
106
|
+
autoHandle: true,
|
|
107
|
+
setPrimaryKeyValue: undefined,
|
|
108
|
+
actionRowFormOptions: {
|
|
109
|
+
formTitle: undefined,
|
|
110
|
+
formDescription: undefined,
|
|
111
|
+
formFieldLabel: undefined,
|
|
112
|
+
formButtons: undefined,
|
|
113
|
+
onFormSubmit: undefined,
|
|
114
|
+
},
|
|
113
115
|
},
|
|
114
116
|
},
|
|
115
117
|
editOptions: {
|
|
@@ -272,4 +274,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
272
274
|
alwaysShowInDashboard: false,
|
|
273
275
|
alwaysShowInToolPanel: false,
|
|
274
276
|
},
|
|
277
|
+
chartingOptions: {
|
|
278
|
+
saveStrategy: 'none',
|
|
279
|
+
},
|
|
275
280
|
};
|
|
@@ -114,7 +114,7 @@ exports.scalarExpressionFunctions = {
|
|
|
114
114
|
if (!column.queryable) {
|
|
115
115
|
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('COL', `Column name "${columnId}" is not queryable`);
|
|
116
116
|
}
|
|
117
|
-
return (_b = context.adaptableApi) === null || _b === void 0 ? void 0 : _b.gridApi.
|
|
117
|
+
return (_b = context.adaptableApi) === null || _b === void 0 ? void 0 : _b.gridApi.getNormalisedValueFromRowNode(context.node, columnId);
|
|
118
118
|
},
|
|
119
119
|
description: 'Returns the value of a column',
|
|
120
120
|
signatures: ['[colName]', 'COL(name: string)'],
|
|
@@ -24,7 +24,9 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
24
24
|
returnedAdaptableOptions.dashboardOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dashboardOptions, adaptableOptions.dashboardOptions);
|
|
25
25
|
returnedAdaptableOptions.editOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.editOptions, adaptableOptions.editOptions);
|
|
26
26
|
returnedAdaptableOptions.actionOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionOptions, adaptableOptions.actionOptions);
|
|
27
|
-
returnedAdaptableOptions.actionOptions.
|
|
27
|
+
returnedAdaptableOptions.actionOptions.actionRowButtonOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionOptions.actionRowButtonOptions, returnedAdaptableOptions.actionOptions.actionRowButtonOptions);
|
|
28
|
+
returnedAdaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions =
|
|
29
|
+
Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions, returnedAdaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions);
|
|
28
30
|
returnedAdaptableOptions.containerOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions, adaptableOptions.containerOptions);
|
|
29
31
|
returnedAdaptableOptions.generalOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.generalOptions, adaptableOptions.generalOptions);
|
|
30
32
|
returnedAdaptableOptions.searchOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.searchOptions, adaptableOptions.searchOptions);
|
|
@@ -37,6 +39,7 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
37
39
|
returnedAdaptableOptions.teamSharingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.teamSharingOptions, adaptableOptions.teamSharingOptions);
|
|
38
40
|
returnedAdaptableOptions.toolPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.toolPanelOptions, adaptableOptions.toolPanelOptions);
|
|
39
41
|
returnedAdaptableOptions.dataChangeHistoryOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dataChangeHistoryOptions, adaptableOptions.dataChangeHistoryOptions);
|
|
42
|
+
returnedAdaptableOptions.chartingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.chartingOptions, adaptableOptions.chartingOptions);
|
|
40
43
|
returnedAdaptableOptions.settingsPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.settingsPanelOptions, adaptableOptions.settingsPanelOptions);
|
|
41
44
|
const { predefinedConfig } = returnedAdaptableOptions;
|
|
42
45
|
if (predefinedConfig) {
|
|
@@ -8,7 +8,6 @@ import { Report, ReportSchedule } from '../PredefinedConfig/ExportState';
|
|
|
8
8
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
9
9
|
import { BaseSchedule, Schedule } from '../PredefinedConfig/Common/Schedule';
|
|
10
10
|
import { Shortcut } from '../PredefinedConfig/ShortcutState';
|
|
11
|
-
import { ConditionalStyle } from '../PredefinedConfig/ConditionalStyleState';
|
|
12
11
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
13
12
|
import { FreeTextColumn } from '../PredefinedConfig/FreeTextColumnState';
|
|
14
13
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
@@ -24,7 +23,7 @@ import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessag
|
|
|
24
23
|
import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
25
24
|
import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
26
25
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
27
|
-
import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
26
|
+
import { ChartDefinition, ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
28
27
|
import { RowNode } from '@ag-grid-community/core';
|
|
29
28
|
import { AdaptableApi } from '../../types';
|
|
30
29
|
import { ToastOptions } from '../components/Toastify';
|
|
@@ -55,7 +54,6 @@ export declare function CreateGlue42Schedule(glue42Report: Glue42Report): Glue42
|
|
|
55
54
|
export declare function CreateReportSchedule(reportName: string): ReportSchedule;
|
|
56
55
|
export declare function CreateEmptySchedule(): Schedule;
|
|
57
56
|
export declare function CreateEmptyShortcut(): Shortcut;
|
|
58
|
-
export declare function CreateEmptyConditionalStyle(): ConditionalStyle;
|
|
59
57
|
export declare function CreateEmptyFormatColumn(): FormatColumn;
|
|
60
58
|
export declare function CreateEmptyFreeTextColumn(): FreeTextColumn;
|
|
61
59
|
export declare function CreateEmptyLayout(layout?: Partial<Layout> & {
|
|
@@ -66,10 +64,13 @@ export declare function CreateSystemStatusMessageInfo(message: string, type: Ada
|
|
|
66
64
|
export declare function CreateEmptyCellSummmary(): CellSummmary;
|
|
67
65
|
export declare function CreateColumnFilter(ColumnId: string, PredicateId: SystemFilterPredicateId, Inputs: any[]): ColumnFilter;
|
|
68
66
|
export declare function CreateEmptyStyledColumn(): StyledColumn;
|
|
67
|
+
export declare function CreateEmptyChartDefinition(chartDefinition?: ChartDefinition): ChartDefinition;
|
|
69
68
|
export declare function CreateCustomDisplayFormatterContext(value: any, node: RowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
70
69
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
71
70
|
onClose?: VoidFunction;
|
|
72
71
|
containerId: string;
|
|
72
|
+
}, overides?: {
|
|
73
|
+
duration: number | 'always';
|
|
73
74
|
}): ToastOptions;
|
|
74
75
|
export declare const ObjectFactory: {
|
|
75
76
|
CreateEmptyCustomSort: typeof CreateEmptyCustomSort;
|
|
@@ -96,7 +97,6 @@ export declare const ObjectFactory: {
|
|
|
96
97
|
CreateEmptyOpenFinSchedule: typeof CreateEmptyOpenFinSchedule;
|
|
97
98
|
CreateEmptySchedule: typeof CreateEmptySchedule;
|
|
98
99
|
CreateEmptyShortcut: typeof CreateEmptyShortcut;
|
|
99
|
-
CreateEmptyConditionalStyle: typeof CreateEmptyConditionalStyle;
|
|
100
100
|
CreateEmptyFormatColumn: typeof CreateEmptyFormatColumn;
|
|
101
101
|
CreateEmptyFreeTextColumn: typeof CreateEmptyFreeTextColumn;
|
|
102
102
|
CreateEmptyLayout: typeof CreateEmptyLayout;
|
|
@@ -109,5 +109,6 @@ export declare const ObjectFactory: {
|
|
|
109
109
|
CreateToastOptions: typeof CreateToastOptions;
|
|
110
110
|
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
111
111
|
CreateEmptyStyledColumn: typeof CreateEmptyStyledColumn;
|
|
112
|
+
CreateEmptyChartDefinition: typeof CreateEmptyChartDefinition;
|
|
112
113
|
};
|
|
113
114
|
export default ObjectFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -275,16 +275,6 @@ function CreateEmptyShortcut() {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
exports.CreateEmptyShortcut = CreateEmptyShortcut;
|
|
278
|
-
function CreateEmptyConditionalStyle() {
|
|
279
|
-
return {
|
|
280
|
-
Uuid: (0, Uuid_1.createUuid)(),
|
|
281
|
-
Scope: undefined,
|
|
282
|
-
Rule: undefined,
|
|
283
|
-
Style: CreateEmptyStyle(),
|
|
284
|
-
IncludeGroupedRows: false,
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
exports.CreateEmptyConditionalStyle = CreateEmptyConditionalStyle;
|
|
288
278
|
function CreateEmptyFormatColumn() {
|
|
289
279
|
return {
|
|
290
280
|
Scope: undefined,
|
|
@@ -374,6 +364,10 @@ function CreateEmptyStyledColumn() {
|
|
|
374
364
|
};
|
|
375
365
|
}
|
|
376
366
|
exports.CreateEmptyStyledColumn = CreateEmptyStyledColumn;
|
|
367
|
+
function CreateEmptyChartDefinition(chartDefinition) {
|
|
368
|
+
return Object.assign({ Uuid: (0, Uuid_1.createUuid)() }, chartDefinition);
|
|
369
|
+
}
|
|
370
|
+
exports.CreateEmptyChartDefinition = CreateEmptyChartDefinition;
|
|
377
371
|
function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
378
372
|
return {
|
|
379
373
|
adaptableColumn: abColumn,
|
|
@@ -383,10 +377,11 @@ function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
|
383
377
|
};
|
|
384
378
|
}
|
|
385
379
|
exports.CreateCustomDisplayFormatterContext = CreateCustomDisplayFormatterContext;
|
|
386
|
-
function CreateToastOptions(notificationsOptions, { onClose, containerId }) {
|
|
380
|
+
function CreateToastOptions(notificationsOptions, { onClose, containerId }, overides) {
|
|
381
|
+
var _a;
|
|
387
382
|
const adaptableToastPosition = notificationsOptions.position;
|
|
388
383
|
const position = getToastPosition(adaptableToastPosition);
|
|
389
|
-
const duration = notificationsOptions.duration;
|
|
384
|
+
const duration = (_a = overides.duration) !== null && _a !== void 0 ? _a : notificationsOptions.duration;
|
|
390
385
|
const showProgressBar = notificationsOptions.showProgressBar;
|
|
391
386
|
const closeWhenClicked = notificationsOptions.closeWhenClicked;
|
|
392
387
|
const pauseWhenHovering = notificationsOptions.pauseWhenHovering;
|
|
@@ -461,7 +456,6 @@ exports.ObjectFactory = {
|
|
|
461
456
|
CreateEmptyOpenFinSchedule,
|
|
462
457
|
CreateEmptySchedule,
|
|
463
458
|
CreateEmptyShortcut,
|
|
464
|
-
CreateEmptyConditionalStyle,
|
|
465
459
|
CreateEmptyFormatColumn,
|
|
466
460
|
CreateEmptyFreeTextColumn,
|
|
467
461
|
CreateEmptyLayout,
|
|
@@ -474,5 +468,6 @@ exports.ObjectFactory = {
|
|
|
474
468
|
CreateToastOptions,
|
|
475
469
|
CreateCustomDisplayFormatterContext,
|
|
476
470
|
CreateEmptyStyledColumn,
|
|
471
|
+
CreateEmptyChartDefinition,
|
|
477
472
|
};
|
|
478
473
|
exports.default = exports.ObjectFactory;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartModel } from '@ag-grid-community/core';
|
|
2
|
+
import { AdaptableApi } from '../../types';
|
|
3
|
+
import { IChartingService } from './Interface/IChartingService';
|
|
4
|
+
export declare class ChartingService implements IChartingService {
|
|
5
|
+
private api;
|
|
6
|
+
constructor(api: AdaptableApi);
|
|
7
|
+
onChartModelChange(models: ChartModel[], eventType: string, params: any): void;
|
|
8
|
+
saveNewChart(chartModel: ChartModel): void;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartingService = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@ag-grid-community/core");
|
|
6
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
7
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
|
|
8
|
+
class ChartingService {
|
|
9
|
+
constructor(api) {
|
|
10
|
+
this.api = api;
|
|
11
|
+
}
|
|
12
|
+
onChartModelChange(models, eventType, params) {
|
|
13
|
+
const allChartDefinitions = this.api.chartingApi.getAllChartDefinitions();
|
|
14
|
+
const currentChartModel = models.find((model) => model.chartId === params.chartId);
|
|
15
|
+
const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model.chartId === params.chartId);
|
|
16
|
+
switch (eventType) {
|
|
17
|
+
case core_1.Events.EVENT_CHART_CREATED:
|
|
18
|
+
const createParams = params;
|
|
19
|
+
if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model.chartId === createParams.chartId)) {
|
|
20
|
+
// chart already exists
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const chartModel = models.find((model) => model.chartId === createParams.chartId);
|
|
24
|
+
this.saveNewChart(chartModel);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
case core_1.Events.EVENT_CHART_OPTIONS_CHANGED:
|
|
28
|
+
case core_1.Events.EVENT_CHART_RANGE_SELECTION_CHANGED:
|
|
29
|
+
if (!currentChartDefinition) {
|
|
30
|
+
// editing a non-saved chart
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
const updatedChartDefinition = Object.assign(Object.assign({}, currentChartDefinition), { Model: currentChartModel });
|
|
34
|
+
this.api.chartingApi.editChartDefinition(updatedChartDefinition);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
this.api.internalApi.dispatchReduxAction(SystemRedux.SystemChartingSetCurrentChartModels(models));
|
|
38
|
+
}
|
|
39
|
+
saveNewChart(chartModel) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
const chartingOptions = (_a = this.api.internalApi.getAdaptableOptions().chartingOptions) !== null && _a !== void 0 ? _a : {};
|
|
42
|
+
const saveStragegy = (_b = chartingOptions.saveStrategy) !== null && _b !== void 0 ? _b : 'manual';
|
|
43
|
+
if (saveStragegy === 'none') {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (saveStragegy === 'manual') {
|
|
47
|
+
const alert = {
|
|
48
|
+
alertType: 'generic',
|
|
49
|
+
header: 'Save chart',
|
|
50
|
+
message: 'Do you want to save this Chart?',
|
|
51
|
+
alertDefinition: Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyAlertDefinition()), { MessageType: 'Info', AlertProperties: {
|
|
52
|
+
DisplayNotification: true,
|
|
53
|
+
NotificationDuration: 'always',
|
|
54
|
+
}, AlertForm: {
|
|
55
|
+
Buttons: [
|
|
56
|
+
{
|
|
57
|
+
Label: 'Save',
|
|
58
|
+
Action: (context) => {
|
|
59
|
+
const chartName = context.formData.name || chartModel.chartId;
|
|
60
|
+
this.api.chartingApi.addChartDefinition(ObjectFactory_1.default.CreateEmptyChartDefinition({
|
|
61
|
+
Name: chartName,
|
|
62
|
+
Model: chartModel,
|
|
63
|
+
}));
|
|
64
|
+
},
|
|
65
|
+
ButtonStyle: {
|
|
66
|
+
tone: 'info',
|
|
67
|
+
variant: 'raised',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
Label: 'Dismiss',
|
|
72
|
+
ButtonStyle: {
|
|
73
|
+
tone: 'neutral',
|
|
74
|
+
variant: 'raised',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
fields: [
|
|
79
|
+
{
|
|
80
|
+
name: 'name',
|
|
81
|
+
label: 'Name',
|
|
82
|
+
fieldType: 'text',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
} }),
|
|
86
|
+
};
|
|
87
|
+
this.api.alertApi.displayAlert(alert);
|
|
88
|
+
}
|
|
89
|
+
else if (saveStragegy === 'auto') {
|
|
90
|
+
this.api.chartingApi.addChartDefinition(ObjectFactory_1.default.CreateEmptyChartDefinition({
|
|
91
|
+
Name: chartModel.chartId,
|
|
92
|
+
Model: chartModel,
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
destroy() {
|
|
97
|
+
this.api = null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.ChartingService = ChartingService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RowNode } from '@ag-grid-community/core';
|
|
2
2
|
import { IAdaptableService } from './IAdaptableService';
|
|
3
3
|
import { AdaptableForm } from '../../../PredefinedConfig/Common/AdaptableForm';
|
|
4
|
-
import {
|
|
4
|
+
import { CreateActionRowFormContext, EditActionRowFormContext } from '../../../AdaptableOptions/ActionOptions';
|
|
5
5
|
export interface IRowEditService extends IAdaptableService {
|
|
6
|
-
buildRowEditForm(rowNode: RowNode): AdaptableForm<
|
|
7
|
-
buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<
|
|
6
|
+
buildRowEditForm(rowNode: RowNode): AdaptableForm<EditActionRowFormContext>;
|
|
7
|
+
buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateActionRowFormContext>;
|
|
8
8
|
}
|
|
@@ -141,6 +141,8 @@ class ModuleService {
|
|
|
141
141
|
return learnUrl + 'integrations-openfin';
|
|
142
142
|
case 'StyledColumn':
|
|
143
143
|
return learnUrl + 'handbook-styled-column-overview';
|
|
144
|
+
case 'Charting':
|
|
145
|
+
return learnUrl + 'reference-config-charting';
|
|
144
146
|
default:
|
|
145
147
|
return 'good';
|
|
146
148
|
}
|
|
@@ -2,14 +2,14 @@ import { IRowEditService } from './Interface/IRowEditService';
|
|
|
2
2
|
import { RowNode } from '@ag-grid-community/core';
|
|
3
3
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
4
4
|
import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
5
|
-
import {
|
|
5
|
+
import { CreateActionRowFormContext, EditActionRowFormContext } from '../../AdaptableOptions/ActionOptions';
|
|
6
6
|
export declare class RowEditService implements IRowEditService {
|
|
7
7
|
private adaptableApi;
|
|
8
8
|
private adaptableInstance;
|
|
9
9
|
private rowEditFormOptions;
|
|
10
10
|
constructor(adaptableApi: AdaptableApi);
|
|
11
|
-
buildRowEditForm(rowNode: RowNode): AdaptableForm<
|
|
12
|
-
buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<
|
|
11
|
+
buildRowEditForm(rowNode: RowNode): AdaptableForm<EditActionRowFormContext>;
|
|
12
|
+
buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateActionRowFormContext>;
|
|
13
13
|
private buildActionRow;
|
|
14
14
|
private getFormTitle;
|
|
15
15
|
private getFormDescription;
|
|
@@ -6,8 +6,8 @@ class RowEditService {
|
|
|
6
6
|
this.adaptableApi = adaptableApi;
|
|
7
7
|
this.adaptableInstance = this.adaptableApi.internalApi.getAdaptableInstance();
|
|
8
8
|
this.rowEditFormOptions =
|
|
9
|
-
this.adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.actionOptions.actionRowFormOptions;
|
|
10
|
-
if (this.adaptableInstance.adaptableOptions.actionOptions.
|
|
9
|
+
this.adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions;
|
|
10
|
+
if (this.adaptableInstance.adaptableOptions.actionOptions.actionRowButtonOptions.autoHandle) {
|
|
11
11
|
this.adaptableInstance.api.eventApi.on('ActionRowSubmitted', (eventInfo) => this.autoHandleActionRowButtons(eventInfo));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -95,7 +95,7 @@ class RowEditService {
|
|
|
95
95
|
adaptableApi: context.adaptableApi,
|
|
96
96
|
};
|
|
97
97
|
this.adaptableApi.eventApi.emit('ActionRowSubmitted', eventInfo);
|
|
98
|
-
(_b = (_a = this.adaptableInstance.adaptableOptions.actionOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
98
|
+
(_b = (_a = this.adaptableInstance.adaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
99
99
|
},
|
|
100
100
|
};
|
|
101
101
|
return [cancelButton, saveButton];
|
|
@@ -182,7 +182,7 @@ class RowEditService {
|
|
|
182
182
|
if (actionRowSubmittedInfo.type === 'rowCreated') {
|
|
183
183
|
const { formData } = actionRowSubmittedInfo;
|
|
184
184
|
const setPrimaryKeyValueFunction = adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.actionOptions
|
|
185
|
-
.setPrimaryKeyValue;
|
|
185
|
+
.actionRowButtonOptions.setPrimaryKeyValue;
|
|
186
186
|
const newRowData = typeof setPrimaryKeyValueFunction === 'function'
|
|
187
187
|
? setPrimaryKeyValueFunction({
|
|
188
188
|
rowData: formData,
|
|
@@ -30,6 +30,7 @@ const DataChangeHistoryPopup_1 = require("./DataChangeHistory/DataChangeHistoryP
|
|
|
30
30
|
const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHistoryViewPanel");
|
|
31
31
|
const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
|
|
32
32
|
const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
|
|
33
|
+
const ChartingViewPanel_1 = require("./Components/Charting/ChartingViewPanel");
|
|
33
34
|
exports.AdaptableViewFactory = {
|
|
34
35
|
BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
|
|
35
36
|
DashboardPopup: DashboardPopup_1.DashboardPopup,
|
|
@@ -60,4 +61,5 @@ exports.AdaptableViewPanelFactory = new Map([
|
|
|
60
61
|
[ModuleConstants.DataSetModuleId, DataSetViewPanel_1.DataSetViewPanelControl],
|
|
61
62
|
[ModuleConstants.DataChangeHistoryModuleId, DataChangeHistoryViewPanel_1.DataChangeHistoryViewPanelControl],
|
|
62
63
|
[ModuleConstants.StateManagementModuleId, StateManagementViewPanel_1.StateManagementViewPanel],
|
|
64
|
+
[ModuleConstants.ChartingModuleId, ChartingViewPanel_1.ChartingViewPanel],
|
|
63
65
|
]);
|
|
@@ -62,7 +62,7 @@ const AlertButtonsEditor = (props) => {
|
|
|
62
62
|
var _a, _b;
|
|
63
63
|
let buttonStyle = button.ButtonStyle;
|
|
64
64
|
let buttonLabel = button.Label;
|
|
65
|
-
const btnActions = button.Action
|
|
65
|
+
const btnActions = button.Action && typeof button.Action === 'string'
|
|
66
66
|
? !Array.isArray(button.Action)
|
|
67
67
|
? [button.Action]
|
|
68
68
|
: button.Action
|
|
@@ -55,14 +55,14 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
55
55
|
};
|
|
56
56
|
exports.AdaptableObjectListItemView = AdaptableObjectListItemView;
|
|
57
57
|
const AdaptableObjectListItem = (props) => {
|
|
58
|
-
var _a, _b, _c, _d, _e, _f;
|
|
58
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
59
59
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
60
60
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
61
61
|
const [isEditWizardVisible, setIsEditWizardVisible] = React.useState(false);
|
|
62
62
|
const [wizardStepName, setWizardStepName] = React.useState(null);
|
|
63
|
-
const viewOptions = (_b = (_a = props.module) === null || _a === void 0 ? void 0 : _a.getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
64
|
-
const EditWizard = (
|
|
65
|
-
const deleteAction = (
|
|
63
|
+
const viewOptions = (_c = (_b = (_a = props.module) === null || _a === void 0 ? void 0 : _a.getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : {};
|
|
64
|
+
const EditWizard = (_d = viewOptions.getEditWizard) === null || _d === void 0 ? void 0 : _d.call(viewOptions, props.data.abObject);
|
|
65
|
+
const deleteAction = (_e = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.getDeleteAction) === null || _e === void 0 ? void 0 : _e.call(viewOptions, props.data.abObject);
|
|
66
66
|
const isObjectShareable = props.module.isModuleObjectsShareable();
|
|
67
67
|
const teamSharingActivated = isObjectShareable &&
|
|
68
68
|
adaptable.api.teamSharingApi.isTeamSharingActivated() &&
|
|
@@ -89,7 +89,7 @@ const AdaptableObjectListItem = (props) => {
|
|
|
89
89
|
(_a = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.onOpenEditPopup) === null || _a === void 0 ? void 0 : _a.call(viewOptions, props.data.abObject);
|
|
90
90
|
}, []);
|
|
91
91
|
const hasSuspend = Boolean(viewOptions.getSuspendAction);
|
|
92
|
-
const actions = (
|
|
92
|
+
const actions = (_g = (_f = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.actions) === null || _f === void 0 ? void 0 : _f.map) === null || _g === void 0 ? void 0 : _g.call(_f, (component, index) => {
|
|
93
93
|
return React.createElement(component, {
|
|
94
94
|
data: props.data.abObject,
|
|
95
95
|
key: index,
|