@adaptabletools/adaptable 16.0.0-canary.1 → 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 +68 -68
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -2
- 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/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/Redux/Store/AdaptableStore.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -2
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
- 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 +6 -7
- 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/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.js +1 -1
- 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 +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/src/AdaptableOptions/{SearchOptions.js → FormatColumnOptions.js} +0 -0
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,9 +38,8 @@ const isSidebarChecked = (sideBar, panelName) => {
|
|
|
38
38
|
};
|
|
39
39
|
const UIOptionsSidebarForm = (props) => {
|
|
40
40
|
var _a;
|
|
41
|
-
const {
|
|
42
|
-
const
|
|
43
|
-
const sideBar = prepareSidebarDef(_gridOptions.sideBar);
|
|
41
|
+
const { gridOptions, onChange } = props;
|
|
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)));
|
|
46
45
|
};
|
|
@@ -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();
|
|
@@ -388,11 +388,11 @@ const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormat
|
|
|
388
388
|
] })))));
|
|
389
389
|
};
|
|
390
390
|
const FormatColumnFormatWizardSection = (props) => {
|
|
391
|
-
var _a
|
|
391
|
+
var _a;
|
|
392
392
|
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
393
393
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
394
394
|
const formatColumnApi = adaptable.api.formatColumnApi;
|
|
395
|
-
const customDisplayFormatters = (
|
|
395
|
+
const customDisplayFormatters = (_a = adaptable.api.optionsApi.getFormatColumnOptions().customDisplayFormatters) !== null && _a !== void 0 ? _a : [];
|
|
396
396
|
const update = (updated) => {
|
|
397
397
|
props.onChange(Object.assign(Object.assign({}, data), updated));
|
|
398
398
|
};
|
|
@@ -18,7 +18,7 @@ const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
|
|
|
18
18
|
const QuickSearchPopupComponent = (props) => {
|
|
19
19
|
const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
|
|
20
20
|
const [state, setState] = (0, react_1.useState)({
|
|
21
|
-
RunQueryAfterQuickSearch: props.api.optionsApi.
|
|
21
|
+
RunQueryAfterQuickSearch: props.api.optionsApi.getQuickSearchOptions().filterResultsAfterQuickSearch,
|
|
22
22
|
EditedStyle: props.QuickSearchStyle,
|
|
23
23
|
});
|
|
24
24
|
const onUpdateStyle = (style) => {
|
|
@@ -27,14 +27,14 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
const onQuickSearchBehaviourChange = (checked) => {
|
|
29
29
|
setState(Object.assign(Object.assign({}, state), { RunQueryAfterQuickSearch: checked }));
|
|
30
|
-
props.api.optionsApi.getAdaptableOptions().
|
|
30
|
+
props.api.optionsApi.getAdaptableOptions().quickSearchOptions.filterResultsAfterQuickSearch =
|
|
31
31
|
checked;
|
|
32
32
|
};
|
|
33
33
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
34
34
|
React.createElement(Panel_1.default, { header: props.moduleInfo.FriendlyName + ' Text', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
|
|
35
35
|
' ',
|
|
36
36
|
React.createElement(FormLayout_1.default, null,
|
|
37
|
-
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "data-name": "quick-search-text", type: "text", marginLeft: 2, marginRight: 5, padding: 20, style: { height: '100%' }, placeholder: props.api.optionsApi.
|
|
37
|
+
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "data-name": "quick-search-text", type: "text", marginLeft: 2, marginRight: 5, padding: 20, style: { height: '100%' }, placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, value: searchText, OnTextChange: search }))),
|
|
38
38
|
React.createElement(Panel_1.default, { header: props.api.internalApi.getCorrectEnglishVariant('Behaviour'), style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
|
|
39
39
|
' ',
|
|
40
40
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
@@ -12,6 +12,6 @@ const QuickSearchStatusBarContent = () => {
|
|
|
12
12
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
13
13
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
14
14
|
const handleTextChange = React.useCallback((text) => dispatch(QuickSearchRedux.QuickSearchRun(text)), []);
|
|
15
|
-
return (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { onClick: (event) => event.stopPropagation(), type: "text", inputStyle: { padding: '2px 3px', width: 90 }, placeholder: adaptable.api.optionsApi.
|
|
15
|
+
return (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { onClick: (event) => event.stopPropagation(), type: "text", inputStyle: { padding: '2px 3px', width: 90 }, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, value: text, OnTextChange: handleTextChange }));
|
|
16
16
|
};
|
|
17
17
|
exports.QuickSearchStatusBarContent = QuickSearchStatusBarContent;
|
|
@@ -10,7 +10,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
10
10
|
const QuickSearchViewPanelComponent = (props) => {
|
|
11
11
|
const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
|
|
12
12
|
const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
13
|
-
return (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", placeholder: props.api.optionsApi.
|
|
13
|
+
return (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: `ab-${elementType}__QuickSearch__text`, value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: '7rem' } }));
|
|
14
14
|
};
|
|
15
15
|
function mapStateToProps(state) {
|
|
16
16
|
return {
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1256,7 +1256,7 @@ class Adaptable {
|
|
|
1256
1256
|
if (!params.node) {
|
|
1257
1257
|
return false;
|
|
1258
1258
|
}
|
|
1259
|
-
if (!this.api.optionsApi.
|
|
1259
|
+
if (!this.api.optionsApi.getQuickSearchOptions().runQuickSearchOnRowGroups && params.node.group) {
|
|
1260
1260
|
return false;
|
|
1261
1261
|
}
|
|
1262
1262
|
let quickSearchValue = this.api.quickSearchApi.getQuickSearchValue();
|
|
@@ -221,7 +221,7 @@ class agGridHelper {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
// lets set this here one as the function cannot change the result so dont need to run it each time
|
|
224
|
-
let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.
|
|
224
|
+
let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.quickSearchOptions.excludeColumnFromQuickSearch;
|
|
225
225
|
if (excludeColumnFromQuickSearch) {
|
|
226
226
|
if (excludeColumnFromQuickSearch(abColumn)) {
|
|
227
227
|
abColumn.isExcludedFromQuickSearch = true;
|
|
@@ -540,7 +540,7 @@ class agGridHelper {
|
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
// if they have selected to clear searches on startup then do it
|
|
543
|
-
if (this.adaptable.adaptableOptions.
|
|
543
|
+
if (this.adaptable.adaptableOptions.quickSearchOptions.clearSearchesOnStartUp) {
|
|
544
544
|
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.adaptable.api.quickSearchApi.getQuickSearchState().QuickSearchText) ||
|
|
545
545
|
StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.adaptable.api.queryApi.getCurrentQuery()) ||
|
|
546
546
|
ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.dataSetApi.getDataSets())) {
|
|
@@ -964,6 +964,22 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
964
964
|
kind: string;
|
|
965
965
|
desc: string;
|
|
966
966
|
};
|
|
967
|
+
AgGridConfig: {
|
|
968
|
+
name: string;
|
|
969
|
+
kind: string;
|
|
970
|
+
desc: string;
|
|
971
|
+
props: ({
|
|
972
|
+
name: string;
|
|
973
|
+
kind: string;
|
|
974
|
+
desc: string;
|
|
975
|
+
ref: string;
|
|
976
|
+
} | {
|
|
977
|
+
name: string;
|
|
978
|
+
kind: string;
|
|
979
|
+
desc: string;
|
|
980
|
+
ref?: undefined;
|
|
981
|
+
})[];
|
|
982
|
+
};
|
|
967
983
|
AlertButton: {
|
|
968
984
|
name: string;
|
|
969
985
|
kind: string;
|
|
@@ -2975,6 +2991,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2975
2991
|
defVal?: undefined;
|
|
2976
2992
|
})[];
|
|
2977
2993
|
};
|
|
2994
|
+
FormatColumnOptions: {
|
|
2995
|
+
name: string;
|
|
2996
|
+
kind: string;
|
|
2997
|
+
desc: string;
|
|
2998
|
+
props: {
|
|
2999
|
+
name: string;
|
|
3000
|
+
kind: string;
|
|
3001
|
+
desc: string;
|
|
3002
|
+
isOpt: boolean;
|
|
3003
|
+
}[];
|
|
3004
|
+
};
|
|
2978
3005
|
FormatColumnPredicate: {
|
|
2979
3006
|
name: string;
|
|
2980
3007
|
kind: string;
|
|
@@ -3986,6 +4013,36 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3986
4013
|
isOpt: boolean;
|
|
3987
4014
|
}[];
|
|
3988
4015
|
};
|
|
4016
|
+
QuickSearchOptions: {
|
|
4017
|
+
name: string;
|
|
4018
|
+
kind: string;
|
|
4019
|
+
desc: string;
|
|
4020
|
+
props: ({
|
|
4021
|
+
name: string;
|
|
4022
|
+
kind: string;
|
|
4023
|
+
desc: string;
|
|
4024
|
+
isOpt: boolean;
|
|
4025
|
+
gridInfo: string;
|
|
4026
|
+
defVal: string;
|
|
4027
|
+
noCode?: undefined;
|
|
4028
|
+
} | {
|
|
4029
|
+
name: string;
|
|
4030
|
+
kind: string;
|
|
4031
|
+
desc: string;
|
|
4032
|
+
isOpt: boolean;
|
|
4033
|
+
defVal: string;
|
|
4034
|
+
gridInfo?: undefined;
|
|
4035
|
+
noCode?: undefined;
|
|
4036
|
+
} | {
|
|
4037
|
+
name: string;
|
|
4038
|
+
kind: string;
|
|
4039
|
+
desc: string;
|
|
4040
|
+
isOpt: boolean;
|
|
4041
|
+
gridInfo: string;
|
|
4042
|
+
noCode: string;
|
|
4043
|
+
defVal: string;
|
|
4044
|
+
})[];
|
|
4045
|
+
};
|
|
3989
4046
|
QuickSearchState: {
|
|
3990
4047
|
name: string;
|
|
3991
4048
|
kind: string;
|
|
@@ -4215,36 +4272,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4215
4272
|
isOpt: boolean;
|
|
4216
4273
|
}[];
|
|
4217
4274
|
};
|
|
4218
|
-
SearchOptions: {
|
|
4219
|
-
name: string;
|
|
4220
|
-
kind: string;
|
|
4221
|
-
desc: string;
|
|
4222
|
-
props: ({
|
|
4223
|
-
name: string;
|
|
4224
|
-
kind: string;
|
|
4225
|
-
desc: string;
|
|
4226
|
-
isOpt: boolean;
|
|
4227
|
-
gridInfo: string;
|
|
4228
|
-
defVal: string;
|
|
4229
|
-
noCode?: undefined;
|
|
4230
|
-
} | {
|
|
4231
|
-
name: string;
|
|
4232
|
-
kind: string;
|
|
4233
|
-
desc: string;
|
|
4234
|
-
isOpt: boolean;
|
|
4235
|
-
defVal: string;
|
|
4236
|
-
gridInfo?: undefined;
|
|
4237
|
-
noCode?: undefined;
|
|
4238
|
-
} | {
|
|
4239
|
-
name: string;
|
|
4240
|
-
kind: string;
|
|
4241
|
-
desc: string;
|
|
4242
|
-
isOpt: boolean;
|
|
4243
|
-
gridInfo: string;
|
|
4244
|
-
noCode: string;
|
|
4245
|
-
defVal: string;
|
|
4246
|
-
})[];
|
|
4247
|
-
};
|
|
4248
4275
|
SelectedCellInfo: {
|
|
4249
4276
|
name: string;
|
|
4250
4277
|
kind: string;
|