@adaptabletools/adaptable 16.0.0-canary.0 → 16.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs.js +71 -71
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +15 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -7
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +51 -0
- package/src/AdaptableOptions/{SearchOptions.d.ts → QuickSearchOptions.d.ts} +2 -2
- package/src/AdaptableOptions/QuickSearchOptions.js +2 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +0 -43
- package/src/Api/Implementation/ApiBase.d.ts +3 -2
- package/src/Api/Implementation/ApiBase.js +5 -2
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
- package/src/Api/Implementation/OptionsApiImpl.js +5 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
- package/src/Api/OptionsApi.d.ts +6 -2
- package/src/PredefinedConfig/Common/CellSummary.d.ts +1 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/Redux/Store/AdaptableStore.js +1 -1
- package/src/Strategy/CellSummaryModule.js +1 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/MetamodelService.js +4 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +32 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +11 -11
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +11 -21
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +5 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +4 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -4
- package/src/View/AdaptableWizardView/Wizard.d.ts +4 -1
- package/src/View/AdaptableWizardView/Wizard.js +11 -10
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +6 -2
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +1 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
- package/src/agGrid/Adaptable.d.ts +7 -7
- package/src/agGrid/Adaptable.js +38 -36
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +57 -30
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/src/AdaptableOptions/{SearchOptions.js → FormatColumnOptions.js} +0 -0
|
@@ -16,44 +16,47 @@ const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/He
|
|
|
16
16
|
const ConfigurationWizard = (props) => {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
19
|
-
const [
|
|
20
|
-
var _a;
|
|
19
|
+
const [adaptableConfig, setAdaptableConfig] = (0, react_1.useState)(() => {
|
|
21
20
|
const gridOptionDefaults = {
|
|
22
21
|
sideBar: {
|
|
23
22
|
toolPanels: ['columns', 'filters', 'adaptable'],
|
|
24
23
|
},
|
|
25
24
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
25
|
+
const gridOptions = Object.assign(Object.assign({}, gridOptionDefaults), props.adaptableConfig.gridOptions);
|
|
26
|
+
const adaptableOptions = AdaptableHelper_1.default.assignAdaptableOptions(props.adaptableConfig.adaptableOptions);
|
|
27
|
+
return { gridOptions, adaptableOptions };
|
|
28
28
|
});
|
|
29
29
|
const [selectedColumns, setSelectedColumns] = (0, react_1.useState)(() => {
|
|
30
|
-
|
|
30
|
+
var _a, _b;
|
|
31
|
+
return (_b = (_a = props.adaptableConfig.gridOptions) === null || _a === void 0 ? void 0 : _a.columnDefs) === null || _b === void 0 ? void 0 : _b.reduce((acc, col) => {
|
|
31
32
|
acc[col.field] = true;
|
|
32
33
|
return acc;
|
|
33
34
|
}, {});
|
|
34
35
|
});
|
|
35
36
|
const columnsHandle = React.useRef();
|
|
36
37
|
const handleFinish = () => {
|
|
37
|
-
const newAdaptableOptions = Object.assign({}, adaptableOptions);
|
|
38
|
-
|
|
38
|
+
const newAdaptableOptions = Object.assign({}, adaptableConfig.adaptableOptions);
|
|
39
|
+
const newGridOptions = Object.assign({}, adaptableConfig.gridOptions);
|
|
39
40
|
if (columnsHandle.current) {
|
|
40
|
-
|
|
41
|
-
.current.getColumns()
|
|
42
|
-
.map((column) => {
|
|
41
|
+
adaptableConfig.gridOptions.columnDefs = columnsHandle.current.getColumns().map((column) => {
|
|
43
42
|
const newColumn = Object.assign(Object.assign({}, column), { headerName: column.caption || StringExtensions_1.default.Humanize(column.field) });
|
|
44
43
|
delete newColumn.caption;
|
|
45
44
|
return newColumn;
|
|
46
45
|
});
|
|
47
46
|
newAdaptableOptions.primaryKey = columnsHandle.current.getPrimaryKey();
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const newAdaptableConfig = {
|
|
49
|
+
adaptableOptions: newAdaptableOptions,
|
|
50
|
+
gridOptions: newGridOptions,
|
|
51
|
+
};
|
|
52
|
+
setAdaptableConfig(newAdaptableConfig);
|
|
53
|
+
props.onFinish(newAdaptableConfig);
|
|
51
54
|
};
|
|
52
55
|
const handlePrimaryKeyColumnIsNotSelected = React.useCallback((newIsValid) => {
|
|
53
56
|
setIsValid(newIsValid);
|
|
54
57
|
}, []);
|
|
55
58
|
const handleColumnsChange = React.useCallback((columns) => {
|
|
56
|
-
|
|
59
|
+
setAdaptableConfig((adaptableConfig) => (Object.assign(Object.assign({}, adaptableConfig), { gridOptions: Object.assign(Object.assign({}, adaptableConfig.gridOptions), { columnDefs: columns }) })));
|
|
57
60
|
}, []);
|
|
58
61
|
const handleColumnSelectionChange = React.useCallback((col, flag) => {
|
|
59
62
|
setSelectedColumns((selectedColumns) => {
|
|
@@ -62,7 +65,13 @@ const ConfigurationWizard = (props) => {
|
|
|
62
65
|
return newSelectedColumns;
|
|
63
66
|
});
|
|
64
67
|
}, []);
|
|
65
|
-
const
|
|
68
|
+
const handleAdaptableOptionsChange = React.useCallback((adaptableOptions) => {
|
|
69
|
+
setAdaptableConfig((adaptableConfig) => (Object.assign(Object.assign({}, adaptableConfig), { adaptableOptions: adaptableOptions })));
|
|
70
|
+
}, []);
|
|
71
|
+
const handleGridOptionsChange = React.useCallback((gridOptions) => {
|
|
72
|
+
setAdaptableConfig((adaptableConfig) => (Object.assign(Object.assign({}, adaptableConfig), { gridOptions: gridOptions })));
|
|
73
|
+
}, []);
|
|
74
|
+
const financePlugin = (_b = (_a = adaptableConfig.adaptableOptions.plugins) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (plugin) => plugin.pluginId === 'finance');
|
|
66
75
|
let sections = [
|
|
67
76
|
{
|
|
68
77
|
title: 'Columns',
|
|
@@ -73,33 +82,33 @@ const ConfigurationWizard = (props) => {
|
|
|
73
82
|
}
|
|
74
83
|
return true;
|
|
75
84
|
},
|
|
76
|
-
render: () => (React.createElement(ConfigurationWizardColumnsStep_1.ConfigurationWizardColumnsStep, {
|
|
85
|
+
render: () => (React.createElement(ConfigurationWizardColumnsStep_1.ConfigurationWizardColumnsStep, { adaptableConfig: adaptableConfig, setPrimaryKeyIsNotSelected: handlePrimaryKeyColumnIsNotSelected, onChange: setAdaptableConfig, selectedColumns: selectedColumns, onSelectionChange: handleColumnSelectionChange, onColumnChange: handleColumnsChange, columnsHandle: columnsHandle })),
|
|
77
86
|
},
|
|
78
87
|
{
|
|
79
88
|
title: 'AdapTable Options',
|
|
80
89
|
details: 'Configure Adaptable Options',
|
|
81
|
-
isValid: () =>
|
|
82
|
-
render: () => (React.createElement(AdaptableOptionsForm_1.AdaptableOptionsForm, { adaptableOptions: adaptableOptions,
|
|
90
|
+
isValid: () => adaptableConfig.adaptableOptions.adaptableId ? true : 'Adaptable ID is required',
|
|
91
|
+
render: () => (React.createElement(AdaptableOptionsForm_1.AdaptableOptionsForm, { adaptableOptions: adaptableConfig.adaptableOptions, onChangedAdaptableOptions: handleAdaptableOptionsChange })),
|
|
83
92
|
},
|
|
84
93
|
{
|
|
85
94
|
title: 'AG Grid Options',
|
|
86
95
|
details: 'Configure AG Grid Options',
|
|
87
|
-
render: () => (React.createElement(GridOptionsForm_1.default, {
|
|
96
|
+
render: () => (React.createElement(GridOptionsForm_1.default, { gridOptions: adaptableConfig.gridOptions, onChangedGridOptions: handleGridOptionsChange })),
|
|
88
97
|
},
|
|
89
98
|
{
|
|
90
99
|
title: 'UI Elements',
|
|
91
100
|
details: 'Configure UI Elements',
|
|
92
|
-
render: () => (React.createElement(UiOptionsForm_1.UIElementsForm, { adaptableOptions: adaptableOptions,
|
|
101
|
+
render: () => (React.createElement(UiOptionsForm_1.UIElementsForm, { adaptableOptions: adaptableConfig.adaptableOptions, gridOptions: adaptableConfig.gridOptions, onChangedAdaptableOptions: handleAdaptableOptionsChange, onChangedGridOptions: handleGridOptionsChange })),
|
|
93
102
|
},
|
|
94
103
|
{
|
|
95
104
|
title: 'Entitlements',
|
|
96
105
|
details: 'Configure Entitlements',
|
|
97
|
-
render: () => (React.createElement(EntitlementsForm_1.default, { adaptableOptions: adaptableOptions,
|
|
106
|
+
render: () => (React.createElement(EntitlementsForm_1.default, { adaptableOptions: adaptableConfig.adaptableOptions, onChangedAptableOptions: handleAdaptableOptionsChange })),
|
|
98
107
|
},
|
|
99
108
|
financePlugin && {
|
|
100
109
|
title: 'Finance',
|
|
101
110
|
details: 'Finance Options',
|
|
102
|
-
render: () => (React.createElement(FinanceForm_1.FinanceForm, {
|
|
111
|
+
render: () => (React.createElement(FinanceForm_1.FinanceForm, { adaptableConfig: adaptableConfig, onChangedAdaptableConfig: setAdaptableConfig })),
|
|
103
112
|
},
|
|
104
113
|
].filter(Boolean);
|
|
105
114
|
if (props.startSections) {
|
|
@@ -110,13 +119,13 @@ const ConfigurationWizard = (props) => {
|
|
|
110
119
|
isValid: section.isValid,
|
|
111
120
|
isVisible: section.isVisible,
|
|
112
121
|
render: () => {
|
|
113
|
-
return section.render(
|
|
122
|
+
return section.render(adaptableConfig, setAdaptableConfig, setSelectedColumns);
|
|
114
123
|
},
|
|
115
124
|
};
|
|
116
125
|
}),
|
|
117
126
|
...sections,
|
|
118
127
|
];
|
|
119
128
|
}
|
|
120
|
-
return (React.createElement(OnePageWizards_1.OnePageWizard, { data:
|
|
129
|
+
return (React.createElement(OnePageWizards_1.OnePageWizard, { data: adaptableConfig, name: "Configure", defaultCurrentSectionName: 'default section name', onHide: () => null, onFinish: handleFinish, sections: sections }));
|
|
121
130
|
};
|
|
122
131
|
exports.ConfigurationWizard = ConfigurationWizard;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { NocodeColumn } from './ColumnsList';
|
|
3
|
-
import {
|
|
3
|
+
import { AdaptableConfig } from './AdaptableConfig';
|
|
4
4
|
export interface ConfigurationWizardColumnsStepProps {
|
|
5
|
-
|
|
6
|
-
onChange: (
|
|
5
|
+
adaptableConfig: AdaptableConfig;
|
|
6
|
+
onChange: (newConfig: AdaptableConfig) => void;
|
|
7
7
|
columnsHandle: React.MutableRefObject<{
|
|
8
8
|
getColumns: () => any[];
|
|
9
9
|
getPrimaryKey: () => string;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js
CHANGED
|
@@ -5,14 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ColumnsList_1 = tslib_1.__importDefault(require("./ColumnsList"));
|
|
7
7
|
const ConfigurationWizardColumnsStep = (props) => {
|
|
8
|
-
var _a, _b
|
|
8
|
+
var _a, _b;
|
|
9
9
|
let theme = 'light';
|
|
10
|
-
if (typeof props.adaptableOptions.predefinedConfig === 'object' &&
|
|
11
|
-
((_a = props.adaptableOptions.predefinedConfig.Theme) === null || _a === void 0 ? void 0 : _a.CurrentTheme)) {
|
|
12
|
-
theme = props.adaptableOptions.predefinedConfig.Theme.CurrentTheme;
|
|
10
|
+
if (typeof props.adaptableConfig.adaptableOptions.predefinedConfig === 'object' &&
|
|
11
|
+
((_a = props.adaptableConfig.adaptableOptions.predefinedConfig.Theme) === null || _a === void 0 ? void 0 : _a.CurrentTheme)) {
|
|
12
|
+
theme = props.adaptableConfig.adaptableOptions.predefinedConfig.Theme.CurrentTheme;
|
|
13
13
|
}
|
|
14
14
|
return (React.createElement(ColumnsList_1.default, { theme: theme, handle: props.columnsHandle, onValidityChange: (valid) => {
|
|
15
15
|
props.setPrimaryKeyIsNotSelected(valid);
|
|
16
|
-
}, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (
|
|
16
|
+
}, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (_b = props.adaptableConfig.gridOptions) === null || _b === void 0 ? void 0 : _b.columnDefs }));
|
|
17
17
|
};
|
|
18
18
|
exports.ConfigurationWizardColumnsStep = ConfigurationWizardColumnsStep;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
interface EntitlementsFormOptions {
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
5
|
+
onChangedAptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}
|
|
7
7
|
declare const EntitlementsForm: React.FunctionComponent<EntitlementsFormOptions>;
|
|
8
8
|
export default EntitlementsForm;
|
|
@@ -48,7 +48,7 @@ const EntitlementsListForm = (props) => {
|
|
|
48
48
|
{ adaptableModule: module, accessLevel: accessLevel },
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
|
-
props.
|
|
51
|
+
props.onChangedAptableOptions(Object.assign(Object.assign({}, abOptions), { entitlementOptions: Object.assign(Object.assign({}, abOptions.entitlementOptions), { moduleEntitlements: newEntitlements }) }));
|
|
52
52
|
}, [abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions]);
|
|
53
53
|
if (typeof entitlements === 'function') {
|
|
54
54
|
return (React.createElement(HelpBlock_1.default, { mb: 2 }, "Entitlements cannot be customized, they are handled by a custom function."));
|
|
@@ -113,7 +113,7 @@ const DefaultEntitlementForm = (props) => {
|
|
|
113
113
|
return React.createElement(HelpBlock_1.default, { mb: 2 }, "Default Entitlement is controlled by a custom function");
|
|
114
114
|
}
|
|
115
115
|
const handleDefaultEntitlementChange = React.useCallback((accessLevel) => {
|
|
116
|
-
props.
|
|
116
|
+
props.onChangedAptableOptions(Object.assign(Object.assign({}, abOptions), { entitlementOptions: Object.assign(Object.assign({}, abOptions.entitlementOptions), { defaultAccessLevel: accessLevel }) }));
|
|
117
117
|
}, [(_b = abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions) === null || _b === void 0 ? void 0 : _b.defaultAccessLevel]);
|
|
118
118
|
return (React.createElement(FormLayout_1.default, { mb: 2 },
|
|
119
119
|
React.createElement(FormLayout_1.FormRow, { label: "Default Entitlement:" },
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableConfig } from '../../../../types';
|
|
3
3
|
export interface FinanceFormProps {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
adaptableConfig: AdaptableConfig;
|
|
5
|
+
onChangedAdaptableConfig: (adaptableConfig: AdaptableConfig) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const FinanceForm: React.FunctionComponent<React.PropsWithChildren<FinanceFormProps>>;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js
CHANGED
|
@@ -216,17 +216,17 @@ const FDC3ColumnCreator = (props) => {
|
|
|
216
216
|
const FinanceFormSectionTitle = (props) => (React.createElement(rebass_1.Box, Object.assign({}, props, { mb: 2 }),
|
|
217
217
|
React.createElement(HelpBlock_1.default, null, props.children)));
|
|
218
218
|
const FinanceForm = (props) => {
|
|
219
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
220
|
-
const columnOptions = (
|
|
219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
220
|
+
const columnOptions = (_c = (_b = (_a = props.adaptableConfig.gridOptions) === null || _a === void 0 ? void 0 : _a.columnDefs) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, (item) => {
|
|
221
221
|
var _a;
|
|
222
222
|
return ({
|
|
223
223
|
label: StringExtensions_1.default.Humanize((_a = item.headerName) !== null && _a !== void 0 ? _a : item.field),
|
|
224
224
|
value: item.field,
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
|
-
const financePlugin = (
|
|
228
|
-
const financePluginOptions = ((
|
|
229
|
-
const fdc3Columns = (
|
|
227
|
+
const financePlugin = (_e = (_d = props.adaptableConfig.adaptableOptions) === null || _d === void 0 ? void 0 : _d.plugins) === null || _e === void 0 ? void 0 : _e.find((item) => item.pluginId === 'finance');
|
|
228
|
+
const financePluginOptions = ((_f = financePlugin === null || financePlugin === void 0 ? void 0 : financePlugin.options) !== null && _f !== void 0 ? _f : {});
|
|
229
|
+
const fdc3Columns = (_g = financePluginOptions === null || financePluginOptions === void 0 ? void 0 : financePluginOptions.fdc3Columns) !== null && _g !== void 0 ? _g : {};
|
|
230
230
|
const handleSetFdc3Columns = (key, newFDC3Columns) => {
|
|
231
231
|
var _a;
|
|
232
232
|
// Unfurtunatly finance plugin options need to be mutated.
|
|
@@ -235,7 +235,7 @@ const FinanceForm = (props) => {
|
|
|
235
235
|
financePluginOptions.fdc3Columns = (_a = financePluginOptions.fdc3Columns) !== null && _a !== void 0 ? _a : {};
|
|
236
236
|
financePluginOptions.fdc3Columns[key] = newFDC3Columns;
|
|
237
237
|
// on change is called with a new array of plugins so the component refreshes.
|
|
238
|
-
props.
|
|
238
|
+
props.onChangedAdaptableConfig(Object.assign(Object.assign({}, props.adaptableConfig), { adaptableOptions: Object.assign(Object.assign({}, props.adaptableConfig.adaptableOptions), { plugins: [...props.adaptableConfig.adaptableOptions.plugins] }) }));
|
|
239
239
|
};
|
|
240
240
|
const renderEditor = (fdc3ColumnType, fdc3ColumnsItems) => {
|
|
241
241
|
return fdc3ColumnsItems.map((fdc3Column, currentFDCColumnId) => (React.createElement(rebass_1.Box, { key: currentFDCColumnId, mb: 3 },
|
|
@@ -261,19 +261,19 @@ const FinanceForm = (props) => {
|
|
|
261
261
|
var _a;
|
|
262
262
|
handleSetFdc3Columns(type, [...((_a = fdc3Columns[type]) !== null && _a !== void 0 ? _a : []), fdc3Column]);
|
|
263
263
|
} })),
|
|
264
|
-
Boolean((
|
|
264
|
+
Boolean((_h = fdc3Columns.instrumentColumns) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement(rebass_1.Box, null,
|
|
265
265
|
React.createElement(FinanceFormSectionTitle, null, "Instrument Columns"),
|
|
266
266
|
renderEditor('instrumentColumns', fdc3Columns.instrumentColumns))),
|
|
267
|
-
Boolean((
|
|
267
|
+
Boolean((_j = fdc3Columns.positionColumns) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement(rebass_1.Box, null,
|
|
268
268
|
React.createElement(FinanceFormSectionTitle, null, "Position Columns"),
|
|
269
269
|
renderEditor('positionColumns', fdc3Columns.positionColumns))),
|
|
270
|
-
Boolean((
|
|
270
|
+
Boolean((_k = fdc3Columns.contactColumns) === null || _k === void 0 ? void 0 : _k.length) && (React.createElement(rebass_1.Box, null,
|
|
271
271
|
React.createElement(FinanceFormSectionTitle, null, "Contact Columns"),
|
|
272
272
|
renderEditor('contactColumns', fdc3Columns.contactColumns))),
|
|
273
|
-
Boolean((
|
|
273
|
+
Boolean((_l = fdc3Columns.countryColumns) === null || _l === void 0 ? void 0 : _l.length) && (React.createElement(rebass_1.Box, null,
|
|
274
274
|
React.createElement(FinanceFormSectionTitle, null, "Country Columns"),
|
|
275
275
|
renderEditor('countryColumns', fdc3Columns.countryColumns))),
|
|
276
|
-
Boolean((
|
|
276
|
+
Boolean((_m = fdc3Columns.organizationColumns) === null || _m === void 0 ? void 0 : _m.length) && (React.createElement(rebass_1.Box, null,
|
|
277
277
|
React.createElement(FinanceFormSectionTitle, null, "Organization Columns"),
|
|
278
278
|
renderEditor('organizationColumns', fdc3Columns.organizationColumns)))));
|
|
279
279
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
3
3
|
interface GridOptionsFormOptions {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
gridOptions: GridOptions;
|
|
5
|
+
onChangedGridOptions: (gridOptions: GridOptions) => void;
|
|
6
6
|
}
|
|
7
7
|
declare const GridOptionsForm: (props: GridOptionsFormOptions) => JSX.Element;
|
|
8
8
|
export default GridOptionsForm;
|
|
@@ -5,44 +5,34 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
6
6
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
7
7
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
8
|
-
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
9
8
|
const rebass_1 = require("rebass");
|
|
10
9
|
const GridOptionsForm = (props) => {
|
|
11
10
|
var _a;
|
|
12
|
-
let
|
|
13
|
-
const gridOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.gridOptions), abOptions.gridOptions);
|
|
11
|
+
let { gridOptions } = props;
|
|
14
12
|
return (React.createElement(rebass_1.Box, { p: 2 },
|
|
15
13
|
React.createElement(HelpBlock_1.default, null, "Grid Options"),
|
|
16
14
|
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
17
15
|
React.createElement(FormLayout_1.FormRow, { label: "Enable Range Selection" },
|
|
18
16
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
abOptions.gridOptions.enableRangeSelection = enableRangeSelection;
|
|
22
|
-
props.onChangeadAptableOptions(abOptions);
|
|
17
|
+
gridOptions = Object.assign(Object.assign({}, gridOptions), { enableRangeSelection: enableRangeSelection });
|
|
18
|
+
props.onChangedGridOptions(gridOptions);
|
|
23
19
|
} })),
|
|
24
20
|
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
25
21
|
React.createElement(CheckBox_1.CheckBox, { checked: (_a = gridOptions.defaultColDef) === null || _a === void 0 ? void 0 : _a.floatingFilter, onChange: (floatingFilter) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
props.onChangeadAptableOptions(abOptions);
|
|
22
|
+
gridOptions = Object.assign(Object.assign({}, gridOptions), { defaultColDef: {
|
|
23
|
+
floatingFilter,
|
|
24
|
+
} });
|
|
25
|
+
props.onChangedGridOptions(gridOptions);
|
|
32
26
|
} })),
|
|
33
27
|
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
34
28
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
abOptions.gridOptions.suppressColumnVirtualisation = suppressColumnVirtualisation;
|
|
38
|
-
props.onChangeadAptableOptions(abOptions);
|
|
29
|
+
gridOptions = Object.assign(Object.assign({}, gridOptions), { suppressColumnVirtualisation: suppressColumnVirtualisation });
|
|
30
|
+
props.onChangedGridOptions(gridOptions);
|
|
39
31
|
} })),
|
|
40
32
|
React.createElement(FormLayout_1.FormRow, { label: "Show Column Menu Button" },
|
|
41
33
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
abOptions.gridOptions.suppressMenuHide = suppressMenuHide;
|
|
45
|
-
props.onChangeadAptableOptions(abOptions);
|
|
34
|
+
gridOptions = Object.assign(Object.assign({}, gridOptions), { suppressMenuHide: suppressMenuHide });
|
|
35
|
+
props.onChangedGridOptions(gridOptions);
|
|
46
36
|
} })))));
|
|
47
37
|
};
|
|
48
38
|
exports.default = GridOptionsForm;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import { AdaptableOptions } from '../../../../../types';
|
|
3
3
|
export declare const UIOptionsSidebarForm: React.FunctionComponent<{
|
|
4
|
-
|
|
5
|
-
onChange: (
|
|
4
|
+
gridOptions: GridOptions;
|
|
5
|
+
onChange: (gridOptions: GridOptions) => void;
|
|
6
6
|
}>;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js
CHANGED
|
@@ -38,8 +38,7 @@ const isSidebarChecked = (sideBar, panelName) => {
|
|
|
38
38
|
};
|
|
39
39
|
const UIOptionsSidebarForm = (props) => {
|
|
40
40
|
var _a;
|
|
41
|
-
const {
|
|
42
|
-
const { gridOptions } = props.abOptions;
|
|
41
|
+
const { gridOptions, onChange } = props;
|
|
43
42
|
const sideBar = prepareSidebarDef(gridOptions.sideBar);
|
|
44
43
|
const renderSidebarCheckbox = (sidebarName) => {
|
|
45
44
|
return (React.createElement(CheckBox_1.CheckBox, { mr: 3, key: sidebarName, checked: isSidebarChecked(sideBar, sidebarName), onChange: (check) => handleToolpanelsChange(sidebarName, check) }, StringExtensions_1.default.Humanize(sidebarName)));
|
|
@@ -60,13 +59,13 @@ const UIOptionsSidebarForm = (props) => {
|
|
|
60
59
|
if (newPanels.length === 0) {
|
|
61
60
|
hiddenByDefault = true;
|
|
62
61
|
}
|
|
63
|
-
const
|
|
64
|
-
props.onChange(
|
|
62
|
+
const newGridOptions = Object.assign(Object.assign({}, gridOptions), { sideBar: Object.assign(Object.assign({}, sideBar), { toolPanels: newPanels, hiddenByDefault }) });
|
|
63
|
+
props.onChange(newGridOptions);
|
|
65
64
|
};
|
|
66
65
|
let sidebarPosition = (_a = sideBar === null || sideBar === void 0 ? void 0 : sideBar.position) !== null && _a !== void 0 ? _a : 'right';
|
|
67
66
|
const handleSidebarPositionChange = (position) => {
|
|
68
|
-
const
|
|
69
|
-
props.onChange(
|
|
67
|
+
const newGridOptions = Object.assign(Object.assign({}, gridOptions), { sideBar: Object.assign(Object.assign({}, sideBar), { position }) });
|
|
68
|
+
props.onChange(newGridOptions);
|
|
70
69
|
};
|
|
71
70
|
return (React.createElement(rebass_1.Box, null,
|
|
72
71
|
React.createElement(HelpBlock_1.default, null, "Tool Panels"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
3
3
|
export declare const UIOptionsStatusbarForm: React.FunctionComponent<{
|
|
4
|
-
|
|
5
|
-
onChange: (
|
|
4
|
+
gridOptions: GridOptions;
|
|
5
|
+
onChange: (gridOptions: GridOptions) => void;
|
|
6
6
|
}>;
|
|
@@ -13,7 +13,7 @@ const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components
|
|
|
13
13
|
const FormBox_1 = require("../Components/FormBox");
|
|
14
14
|
const UIOptionsStatusbarForm = (props) => {
|
|
15
15
|
var _a, _b, _c, _d;
|
|
16
|
-
const allPanels = (_c = (_b = (_a = props.
|
|
16
|
+
const allPanels = (_c = (_b = (_a = props.gridOptions) === null || _a === void 0 ? void 0 : _a.statusBar) === null || _b === void 0 ? void 0 : _b.statusPanels) !== null && _c !== void 0 ? _c : [];
|
|
17
17
|
const panelIdtoPanel = (panelsIds, align) => panelsIds.map((panelId) => {
|
|
18
18
|
const previousItem = allPanels.find((panel) => panel.key === panelId || panel.statusPanel === panelId);
|
|
19
19
|
if (previousItem) {
|
|
@@ -35,7 +35,7 @@ const UIOptionsStatusbarForm = (props) => {
|
|
|
35
35
|
const centerPanels = panelIdtoPanel(tabs[1].Items, 'center');
|
|
36
36
|
const rightPanels = panelIdtoPanel(tabs[2].Items, 'right');
|
|
37
37
|
const newStatusbarPanels = [...leftPanels, ...centerPanels, ...rightPanels];
|
|
38
|
-
props.onChange(Object.assign(Object.assign({}, props.
|
|
38
|
+
props.onChange(Object.assign(Object.assign({}, props.gridOptions), { statusBar: Object.assign(Object.assign({}, props.gridOptions.statusBar), { statusPanels: newStatusbarPanels }) }));
|
|
39
39
|
};
|
|
40
40
|
const disabled = false;
|
|
41
41
|
const panelToTabItemId = (panel) => { var _a; return (_a = panel.key) !== null && _a !== void 0 ? _a : panel.statusPanel; };
|
|
@@ -78,7 +78,7 @@ const UIOptionsStatusbarForm = (props) => {
|
|
|
78
78
|
const newStatusbarPanels = [...allPanels, newAdaptablePanel];
|
|
79
79
|
setAdaptablePanelTitle('');
|
|
80
80
|
setAdaptablePanelAlign('left');
|
|
81
|
-
props.onChange(Object.assign(Object.assign({}, props.
|
|
81
|
+
props.onChange(Object.assign(Object.assign({}, props.gridOptions), { statusBar: Object.assign(Object.assign({}, props.gridOptions.statusBar), { statusPanels: newStatusbarPanels }) }));
|
|
82
82
|
};
|
|
83
83
|
return (React.createElement(rebass_1.Box, null,
|
|
84
84
|
React.createElement(HelpBlock_1.default, null, "Status Bar"),
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { AdaptableOptions } from '../../../../types';
|
|
3
4
|
interface UIElementsOptionsProps {
|
|
4
5
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
6
|
+
gridOptions: GridOptions;
|
|
7
|
+
onChangedAdaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
8
|
+
onChangedGridOptions: (gridOptions: GridOptions) => void;
|
|
6
9
|
}
|
|
7
10
|
export declare const UIElementsForm: React.FunctionComponent<UIElementsOptionsProps>;
|
|
8
11
|
export {};
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js
CHANGED
|
@@ -9,18 +9,17 @@ const UIOptionsActionColumnsForm_1 = require("./UIOptionsActionColumnsForm");
|
|
|
9
9
|
const UIOptionsSidebarForm_1 = require("./UIOptionsSidebarForm");
|
|
10
10
|
const UIOptionsStatusbarForm_1 = require("./UIOptionsStatusbarForm");
|
|
11
11
|
const UIElementsForm = (props) => {
|
|
12
|
-
let abOptions = props.adaptableOptions;
|
|
13
12
|
return (React.createElement(rebass_1.Box, { p: 2 },
|
|
14
13
|
React.createElement(Tabs_1.Tabs, null,
|
|
15
14
|
React.createElement(Tabs_1.Tabs.Tab, null, "Tool Panel"),
|
|
16
15
|
React.createElement(Tabs_1.Tabs.Tab, null, "Status Bar"),
|
|
17
16
|
React.createElement(Tabs_1.Tabs.Tab, null, "Action Rows"),
|
|
18
17
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
19
|
-
React.createElement(UIOptionsSidebarForm_1.UIOptionsSidebarForm, {
|
|
18
|
+
React.createElement(UIOptionsSidebarForm_1.UIOptionsSidebarForm, { gridOptions: props.gridOptions, onChange: props.onChangedGridOptions })),
|
|
20
19
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
21
|
-
React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, {
|
|
20
|
+
React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, { gridOptions: props.gridOptions, onChange: props.onChangedGridOptions })),
|
|
22
21
|
' ',
|
|
23
22
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
24
|
-
React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions:
|
|
23
|
+
React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions: props.adaptableOptions, onChange: props.onChangedAdaptableOptions })))));
|
|
25
24
|
};
|
|
26
25
|
exports.UIElementsForm = UIElementsForm;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Reducer, ReactNode } from 'react';
|
|
3
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
3
4
|
import { AdaptableOptions } from '../../types';
|
|
4
5
|
import { ConfigurationWizardProps } from './AdaptableConfigurationDialog/ConfigurationWizard';
|
|
5
6
|
export interface AdaptableWizardViewProps {
|
|
6
7
|
adaptableOptions?: Omit<AdaptableOptions, 'primaryKey'> & {
|
|
7
8
|
primaryKey?: string;
|
|
8
9
|
};
|
|
10
|
+
gridOptions?: GridOptions;
|
|
9
11
|
/**
|
|
10
12
|
* Default true.
|
|
11
13
|
*/
|
|
@@ -16,7 +18,7 @@ export interface AdaptableWizardViewProps {
|
|
|
16
18
|
* This mode skips over interpreting data to figure-out columns.
|
|
17
19
|
*/
|
|
18
20
|
skipToWizard?: boolean;
|
|
19
|
-
onInit: (adaptableOptions: AdaptableOptions) => any;
|
|
21
|
+
onInit: (adaptableOptions: AdaptableOptions, gridOptions: GridOptions) => any;
|
|
20
22
|
fileContentsToJSON?: (str: string) => Promise<any> | any;
|
|
21
23
|
readFile?: (file: File) => Promise<any>;
|
|
22
24
|
fileAccept?: string;
|
|
@@ -39,6 +41,7 @@ interface WizardState {
|
|
|
39
41
|
dropped: boolean;
|
|
40
42
|
error: any;
|
|
41
43
|
adaptableOptions: AdaptableOptions;
|
|
44
|
+
gridOptions: GridOptions;
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
44
47
|
* The wizard in a few modes:
|
|
@@ -14,7 +14,7 @@ exports.initialState = {
|
|
|
14
14
|
};
|
|
15
15
|
const reducer = (state, action) => {
|
|
16
16
|
if (action.type === 'DROPPED') {
|
|
17
|
-
return Object.assign(Object.assign({}, state), { adaptableOptions: action.payload, dropped: true, error: null });
|
|
17
|
+
return Object.assign(Object.assign({}, state), { adaptableOptions: action.payload.adaptableOptions, gridOptions: action.payload.gridOptions, dropped: true, error: null });
|
|
18
18
|
}
|
|
19
19
|
if (action.type === 'ERROR') {
|
|
20
20
|
return Object.assign(Object.assign({}, state), { dropped: false, error: action.payload });
|
|
@@ -37,11 +37,10 @@ exports.reducer = reducer;
|
|
|
37
37
|
*/
|
|
38
38
|
const Wizard = (props) => {
|
|
39
39
|
var _a;
|
|
40
|
-
const [state, dispatch] = (0, react_1.useReducer)(exports.reducer, Object.assign(Object.assign({}, exports.initialState), { adaptableOptions: props.adaptableOptions }));
|
|
40
|
+
const [state, dispatch] = (0, react_1.useReducer)(exports.reducer, Object.assign(Object.assign({}, exports.initialState), { adaptableOptions: props.adaptableOptions, gridOptions: props.gridOptions }));
|
|
41
41
|
const [droppableKey, setDroppableKey] = (0, react_1.useState)(Date.now());
|
|
42
42
|
const [isDataLoading, setIsDataLoading] = (0, react_1.useState)(false);
|
|
43
43
|
const handleDataSource = (array, file) => {
|
|
44
|
-
var _a;
|
|
45
44
|
const dataSourceInfo = (props.prepareData || helper_1.prepareDataSource)(array, file);
|
|
46
45
|
try {
|
|
47
46
|
(0, Utils_1.validDataSource)(dataSourceInfo);
|
|
@@ -52,10 +51,9 @@ const Wizard = (props) => {
|
|
|
52
51
|
payload: `Invalid adaptable configuration - ${err}`,
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
|
-
const gridOptions = (0, helper_1.prepareGridOptions)(dataSourceInfo,
|
|
54
|
+
const gridOptions = (0, helper_1.prepareGridOptions)(dataSourceInfo, props.gridOptions);
|
|
56
55
|
const adaptableOptions = Object.assign({}, props.adaptableOptions);
|
|
57
56
|
adaptableOptions.adaptableId = adaptableOptions.adaptableId || (file ? file.name : '');
|
|
58
|
-
adaptableOptions.gridOptions = gridOptions;
|
|
59
57
|
if (dataSourceInfo.primaryKey) {
|
|
60
58
|
adaptableOptions.primaryKey = dataSourceInfo.primaryKey;
|
|
61
59
|
}
|
|
@@ -63,24 +61,27 @@ const Wizard = (props) => {
|
|
|
63
61
|
if (shouldShowWizard) {
|
|
64
62
|
dispatch({
|
|
65
63
|
type: 'DROPPED',
|
|
66
|
-
payload: adaptableOptions,
|
|
64
|
+
payload: { adaptableOptions, gridOptions },
|
|
67
65
|
});
|
|
68
66
|
}
|
|
69
67
|
else {
|
|
70
|
-
props.onInit(adaptableOptions);
|
|
68
|
+
props.onInit(adaptableOptions, gridOptions);
|
|
71
69
|
}
|
|
72
70
|
};
|
|
73
71
|
let wizard;
|
|
74
72
|
if (props.skipToWizard || state.dropped) {
|
|
75
|
-
wizard = (React.createElement(AdaptableConfigurationDialog_1.default, { startSections: props.startSections,
|
|
73
|
+
wizard = (React.createElement(AdaptableConfigurationDialog_1.default, { startSections: props.startSections, adaptableConfig: {
|
|
74
|
+
adaptableOptions: state.adaptableOptions,
|
|
75
|
+
gridOptions: state.gridOptions,
|
|
76
|
+
}, onCancel: () => {
|
|
76
77
|
// change the file droppable component key
|
|
77
78
|
// so it's remounted and it's in the initial state
|
|
78
79
|
setDroppableKey(Date.now());
|
|
79
80
|
dispatch({
|
|
80
81
|
type: 'CANCEL',
|
|
81
82
|
});
|
|
82
|
-
}, onFinish: (
|
|
83
|
-
props.onInit(adaptableOptions);
|
|
83
|
+
}, onFinish: (adaptableConfig) => {
|
|
84
|
+
props.onInit(adaptableConfig.adaptableOptions, adaptableConfig.gridOptions);
|
|
84
85
|
} }));
|
|
85
86
|
}
|
|
86
87
|
(0, react_1.useEffect)(() => {
|
|
@@ -99,7 +99,7 @@ const DashboardComponent = (props) => {
|
|
|
99
99
|
};
|
|
100
100
|
const renderQuickSearch = () => {
|
|
101
101
|
return (React.createElement(rebass_1.Box, { ml: 2 },
|
|
102
|
-
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", placeholder: props.api.optionsApi.
|
|
102
|
+
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: "ab-DashboardToolbar__QuickSearch__text", value: searchText, OnTextChange: search, style: { width: 'auto' }, inputStyle: { width: '7rem' } })));
|
|
103
103
|
};
|
|
104
104
|
let instanceName = props.api.internalApi.getToolbarTitle();
|
|
105
105
|
let dashboardOptions = props.api.optionsApi.getDashboardOptions();
|
|
@@ -23,9 +23,13 @@ const DataChangeHistoryGrid = (props) => {
|
|
|
23
23
|
const initializeAdaptableGrid = async () => {
|
|
24
24
|
const gridOptions = buildGridOptions(mainAdaptableInstance, changeHistoryLog);
|
|
25
25
|
const adaptableOptions = buildAdaptableOptions(mainAdaptableInstance, gridOptions, adaptableContainerId, agGridContainerId, undoChangeEnabled, onUndoChange);
|
|
26
|
+
const agGridOptions = {
|
|
27
|
+
gridOptions,
|
|
28
|
+
modules: mainAdaptableInstance.getAgGridRegisteredModules(),
|
|
29
|
+
};
|
|
26
30
|
// to avoid direct dependency to Adaptable.ts and thus creating a circular dependency;
|
|
27
31
|
const adaptableInitFn = Object.getPrototypeOf(mainAdaptableInstance).constructor.init;
|
|
28
|
-
const dataChangeHistoryAdaptableApi = await adaptableInitFn(adaptableOptions);
|
|
32
|
+
const dataChangeHistoryAdaptableApi = await adaptableInitFn(adaptableOptions, agGridOptions);
|
|
29
33
|
setAdaptableApi(dataChangeHistoryAdaptableApi);
|
|
30
34
|
};
|
|
31
35
|
initializeAdaptableGrid();
|
|
@@ -97,7 +101,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
97
101
|
};
|
|
98
102
|
}
|
|
99
103
|
const options = {
|
|
100
|
-
|
|
104
|
+
_gridOptions: gridOptions,
|
|
101
105
|
primaryKey: 'primaryKey',
|
|
102
106
|
licenseKey: mainAdaptableOptions.licenseKey,
|
|
103
107
|
userName: `${mainAdaptableOptions.userName}`,
|
|
@@ -25,5 +25,5 @@ declare class ExportViewPanelComponent extends React.Component<ExportViewPanelCo
|
|
|
25
25
|
private isCustomDestination;
|
|
26
26
|
private onNewReportSchedule;
|
|
27
27
|
}
|
|
28
|
-
export declare let ExportViewPanelControl: import("react-redux").ConnectedComponent<typeof ExportViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<ExportViewPanelComponent> & ExportViewPanelComponentProps, "api" | "accessLevel" | "moduleInfo" | "
|
|
28
|
+
export declare let ExportViewPanelControl: import("react-redux").ConnectedComponent<typeof ExportViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<ExportViewPanelComponent> & ExportViewPanelComponentProps, "api" | "accessLevel" | "moduleInfo" | "Columns" | "CurrentReport" | "CurrentDestination" | "viewType" | "onApplyExport" | "onSelectReport" | "onSelectDestination" | "onNewReport" | "onEditReport" | "onNewReportSchedule" | "UserReports">>;
|
|
29
29
|
export {};
|