@adaptabletools/adaptable 12.1.4 → 12.1.5
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 +116 -143
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/PredefinedConfig/AlertState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -1
- package/src/PredefinedConfig/Common/Types.d.ts +1 -0
- package/src/PredefinedConfig/Common/Types.js +38 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +1 -1
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StateManagementModule.js +1 -1
- package/src/Strategy/StatusBarModule.js +1 -1
- package/src/Strategy/SystemStatusModule.js +1 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ThemeModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +68 -0
- package/src/Utilities/Constants/ModuleConstants.js +70 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +5 -0
- package/src/Utilities/Services/MetamodelService.d.ts +4 -4
- package/src/Utilities/Services/MetamodelService.js +19 -12
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +193 -135
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +23 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +3 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +148 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +33 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +82 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +109 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +8 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +16 -0
- package/src/View/AdaptableWizardView/Wizard.js +2 -1
- package/src/View/AdaptableWizardView/helper.d.ts +1 -1
- package/src/View/AdaptableWizardView/helper.js +3 -10
- package/src/View/Components/FilterForm/FilterForm.js +2 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
- package/src/agGrid/Adaptable.js +4 -1
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -9,9 +9,19 @@ const OnePageWizards_1 = require("../../Wizard/OnePageWizards");
|
|
|
9
9
|
const ConfigurationWizardColumnsStep_1 = require("./ConfigurationWizardColumnsStep");
|
|
10
10
|
const GridOptionsForm_1 = tslib_1.__importDefault(require("./GridOptionsForm"));
|
|
11
11
|
const AdaptableOptionsForm_1 = tslib_1.__importDefault(require("./AdaptableOptionsForm"));
|
|
12
|
+
const EntitlementsForm_1 = tslib_1.__importDefault(require("./EntitlementsForm"));
|
|
13
|
+
const UiOptionsForm_1 = require("./UIOptions/UiOptionsForm");
|
|
12
14
|
const ConfigurationWizard = (props) => {
|
|
13
15
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
14
|
-
const [adaptableOptions, setAdaptableOptions] = react_1.useState(
|
|
16
|
+
const [adaptableOptions, setAdaptableOptions] = react_1.useState(() => {
|
|
17
|
+
var _a;
|
|
18
|
+
const gridOptionDefaults = {
|
|
19
|
+
sideBar: {
|
|
20
|
+
toolPanels: ['columns', 'filters', 'adaptable'],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
return Object.assign(Object.assign({}, props.adaptableOptions), { gridOptions: Object.assign(Object.assign({}, gridOptionDefaults), (_a = props === null || props === void 0 ? void 0 : props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) });
|
|
24
|
+
});
|
|
15
25
|
const [selectedColumns, setSelectedColumns] = react_1.useState(() => {
|
|
16
26
|
return props.adaptableOptions.gridOptions.columnDefs.reduce((acc, col) => {
|
|
17
27
|
acc[col.field] = true;
|
|
@@ -77,22 +87,20 @@ const ConfigurationWizard = (props) => {
|
|
|
77
87
|
setAdaptableOptions(abOptions);
|
|
78
88
|
} })),
|
|
79
89
|
},
|
|
80
|
-
// JW - I would like at some point to do a page of Entitlements
|
|
81
|
-
// to show all the Modules and let users select which are Full, ReadOnly or Hidden
|
|
82
|
-
/*
|
|
83
90
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
title: 'UI Elements',
|
|
92
|
+
details: 'Configure UI Elements',
|
|
93
|
+
render: () => (React.createElement(UiOptionsForm_1.UIElementsForm, { adaptableOptions: adaptableOptions, onChangeadaptableOptions: (abOptions) => {
|
|
94
|
+
setAdaptableOptions(abOptions);
|
|
95
|
+
} })),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: 'Entitlements',
|
|
99
|
+
details: 'Configure Entitlements',
|
|
100
|
+
render: () => (React.createElement(EntitlementsForm_1.default, { adaptableOptions: adaptableOptions, onChangeadaptableOptions: (abOptions) => {
|
|
101
|
+
setAdaptableOptions(abOptions);
|
|
102
|
+
} })),
|
|
94
103
|
},
|
|
95
|
-
*/
|
|
96
104
|
];
|
|
97
105
|
if (props.startSections) {
|
|
98
106
|
sections = [
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js
CHANGED
|
@@ -3,15 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConfigurationWizardColumnsStep = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel"));
|
|
7
6
|
const ColumnsList_1 = tslib_1.__importDefault(require("./ColumnsList"));
|
|
8
7
|
const ConfigurationWizardColumnsStep = (props) => {
|
|
9
8
|
var _a, _b;
|
|
10
|
-
return (React.createElement(
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
React.createElement(ColumnsList_1.default, { handle: props.columnsHandle, onValidityChange: (valid) => {
|
|
14
|
-
props.setPrimaryKeyIsNotSelected(valid);
|
|
15
|
-
}, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (_b = (_a = props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) === null || _b === void 0 ? void 0 : _b.columnDefs })));
|
|
9
|
+
return (React.createElement(ColumnsList_1.default, { handle: props.columnsHandle, onValidityChange: (valid) => {
|
|
10
|
+
props.setPrimaryKeyIsNotSelected(valid);
|
|
11
|
+
}, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (_b = (_a = props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) === null || _b === void 0 ? void 0 : _b.columnDefs }));
|
|
16
12
|
};
|
|
17
13
|
exports.ConfigurationWizardColumnsStep = ConfigurationWizardColumnsStep;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
interface EntitlementsFormOptions {
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
5
|
onChangeadaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}
|
|
7
|
-
declare const EntitlementsForm:
|
|
7
|
+
declare const EntitlementsForm: React.FunctionComponent<EntitlementsFormOptions>;
|
|
8
8
|
export default EntitlementsForm;
|
|
@@ -2,16 +2,156 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
6
5
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
7
|
-
const
|
|
6
|
+
const Types_1 = require("../../../PredefinedConfig/Common/Types");
|
|
7
|
+
const AdaptableObjectRow_1 = require("../../Components/AdaptableObjectRow");
|
|
8
|
+
const rebass_1 = require("rebass");
|
|
9
|
+
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
10
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
11
|
+
const ModuleConstants_1 = require("../../../Utilities/Constants/ModuleConstants");
|
|
12
|
+
const InfiniteTable_1 = require("../../../components/InfiniteTable");
|
|
13
|
+
const ALL_ENTITLEMENTS_MODULES = Types_1.ALL_MODULES;
|
|
14
|
+
const tableDOMProps = {
|
|
15
|
+
style: {
|
|
16
|
+
height: '100%',
|
|
17
|
+
minWidth: '10rem',
|
|
18
|
+
minHeight: 600,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const EntitlementsListForm = (props) => {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
let abOptions = props.adaptableOptions;
|
|
24
|
+
const entitlements = (_b = (_a = abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions) === null || _a === void 0 ? void 0 : _a.moduleEntitlements) !== null && _b !== void 0 ? _b : [];
|
|
25
|
+
if (typeof entitlements === 'function') {
|
|
26
|
+
return (React.createElement(HelpBlock_1.default, { mt: 2 }, "Entitlements cannot be customized, they are handled by a custom function."));
|
|
27
|
+
}
|
|
28
|
+
const entitlementsMap = React.useMemo(() => {
|
|
29
|
+
return entitlements.reduce((acc, entitlement) => {
|
|
30
|
+
acc[entitlement.adaptableModule] = entitlement.accessLevel;
|
|
31
|
+
return acc;
|
|
32
|
+
}, {});
|
|
33
|
+
}, [abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions]);
|
|
34
|
+
const colItems = [
|
|
35
|
+
{
|
|
36
|
+
Content: React.createElement(rebass_1.Box, { style: { textAlign: 'left' } }, "Entitlement"),
|
|
37
|
+
Size: 3,
|
|
38
|
+
key: 'name',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
Content: 'Visible',
|
|
42
|
+
Size: 3,
|
|
43
|
+
key: 'Visible',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
Content: 'Read Only',
|
|
47
|
+
Size: 3,
|
|
48
|
+
key: 'ReadOnly',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
Content: 'Hidden',
|
|
52
|
+
Size: 3,
|
|
53
|
+
key: 'Hidden',
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
const handleOnChange = React.useCallback((module, accessLevel) => {
|
|
57
|
+
let newEntitlements = entitlements;
|
|
58
|
+
// change
|
|
59
|
+
if (entitlementsMap[module]) {
|
|
60
|
+
newEntitlements = newEntitlements.map((entitlement) => {
|
|
61
|
+
if (entitlement.adaptableModule === module) {
|
|
62
|
+
entitlement.accessLevel = accessLevel;
|
|
63
|
+
}
|
|
64
|
+
return entitlement;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// new
|
|
69
|
+
newEntitlements = [
|
|
70
|
+
...newEntitlements,
|
|
71
|
+
{ adaptableModule: module, accessLevel: accessLevel },
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
props.onChangeadaptableOptions(Object.assign(Object.assign({}, abOptions), { entitlementOptions: Object.assign(Object.assign({}, abOptions.entitlementOptions), { moduleEntitlements: newEntitlements }) }));
|
|
75
|
+
}, [abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions]);
|
|
76
|
+
const items = ALL_ENTITLEMENTS_MODULES.map((module) => {
|
|
77
|
+
const cItems = colItems.map((item) => (Object.assign({}, item)));
|
|
78
|
+
const accessLevel = entitlementsMap[module];
|
|
79
|
+
cItems[0].Content = React.createElement(rebass_1.Box, { style: { textAlign: 'left' } }, ModuleConstants_1.ADAPTABLE_MODULE_MAP[module]);
|
|
80
|
+
cItems[1].Content = (React.createElement(Radio_1.default, { onClick: () => handleOnChange(module, 'Full'), checked: accessLevel === 'Full' }));
|
|
81
|
+
cItems[2].Content = (React.createElement(Radio_1.default, { onClick: () => handleOnChange(module, 'ReadOnly'), checked: accessLevel === 'ReadOnly' }));
|
|
82
|
+
cItems[3].Content = (React.createElement(Radio_1.default, { onClick: () => handleOnChange(module, 'Hidden'), checked: accessLevel === 'Hidden' }));
|
|
83
|
+
return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: module, colItems: cItems, style: { cursor: 'pointer' } });
|
|
84
|
+
});
|
|
85
|
+
if (typeof entitlements === 'function') {
|
|
86
|
+
return (React.createElement(HelpBlock_1.default, { mb: 2 }, "Entitlements cannot be customized, they are handled by a custom function."));
|
|
87
|
+
}
|
|
88
|
+
const columnsMap = {
|
|
89
|
+
name: {
|
|
90
|
+
header: 'Module Name',
|
|
91
|
+
align: 'start',
|
|
92
|
+
renderValue: (params) => {
|
|
93
|
+
return React.createElement(React.Fragment, null, params.data.name);
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
full: {
|
|
97
|
+
header: 'Full',
|
|
98
|
+
render: (params) => {
|
|
99
|
+
const module = params.data.name;
|
|
100
|
+
const accessLevel = entitlementsMap[module];
|
|
101
|
+
return (React.createElement(Radio_1.default, { onClick: () => handleOnChange(module, 'Full'), checked: accessLevel === 'Full' }));
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
readonly: {
|
|
105
|
+
header: 'Read Only',
|
|
106
|
+
render: (params) => {
|
|
107
|
+
const module = params.data.name;
|
|
108
|
+
const accessLevel = entitlementsMap[module];
|
|
109
|
+
return (React.createElement(Radio_1.default, { onClick: () => handleOnChange(module, 'ReadOnly'), checked: accessLevel === 'ReadOnly' }));
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
hidden: {
|
|
113
|
+
header: 'Hidden',
|
|
114
|
+
render: (params) => {
|
|
115
|
+
const module = params.data.name;
|
|
116
|
+
const accessLevel = entitlementsMap[module];
|
|
117
|
+
return (React.createElement(Radio_1.default, { onClick: () => handleOnChange(module, 'Hidden'), checked: accessLevel === 'Hidden' }));
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
const data = ALL_ENTITLEMENTS_MODULES.map((module) => ({ name: ModuleConstants_1.ADAPTABLE_MODULE_MAP[module] }));
|
|
122
|
+
return (React.createElement(rebass_1.Box, { flex: 1, height: "100%", className: "light" },
|
|
123
|
+
React.createElement(InfiniteTable_1.DataSource, { data: data, primaryKey: "name" },
|
|
124
|
+
React.createElement(InfiniteTable_1.InfiniteTable, { columnTypes: {
|
|
125
|
+
default: {
|
|
126
|
+
defaultFlex: 1,
|
|
127
|
+
align: 'center',
|
|
128
|
+
sortable: false,
|
|
129
|
+
},
|
|
130
|
+
}, headerOptions: {
|
|
131
|
+
alwaysReserveSpaceForSortIcon: false,
|
|
132
|
+
}, columnHeaderHeight: 50, domProps: tableDOMProps, columns: columnsMap }))));
|
|
133
|
+
};
|
|
134
|
+
const DefaultEntitlementForm = (props) => {
|
|
135
|
+
var _a, _b;
|
|
136
|
+
const abOptions = props.adaptableOptions;
|
|
137
|
+
const entitlementOptions = (_a = props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.entitlementOptions;
|
|
138
|
+
const defaultEntitlement = entitlementOptions === null || entitlementOptions === void 0 ? void 0 : entitlementOptions.defaultAccessLevel;
|
|
139
|
+
if (typeof defaultEntitlement === 'function') {
|
|
140
|
+
return React.createElement(HelpBlock_1.default, { mb: 2 }, "Default Entitlement is controlled by a custom function");
|
|
141
|
+
}
|
|
142
|
+
const handleDefaultEntitlementChange = React.useCallback((accessLevel) => {
|
|
143
|
+
props.onChangeadaptableOptions(Object.assign(Object.assign({}, abOptions), { entitlementOptions: Object.assign(Object.assign({}, abOptions.entitlementOptions), { defaultAccessLevel: accessLevel }) }));
|
|
144
|
+
}, [(_b = abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions) === null || _b === void 0 ? void 0 : _b.defaultAccessLevel]);
|
|
145
|
+
return (React.createElement(FormLayout_1.default, { mb: 2 },
|
|
146
|
+
React.createElement(FormLayout_1.FormRow, { label: "Default Entitlement:" },
|
|
147
|
+
React.createElement(Radio_1.default, { onClick: () => handleDefaultEntitlementChange('Full'), checked: defaultEntitlement === 'Full', mr: 3 }, "Visible"),
|
|
148
|
+
React.createElement(Radio_1.default, { onClick: () => handleDefaultEntitlementChange('ReadOnly'), checked: defaultEntitlement === 'ReadOnly', mr: 3 }, "Read Only"),
|
|
149
|
+
React.createElement(Radio_1.default, { onClick: () => handleDefaultEntitlementChange('Hidden'), checked: defaultEntitlement === 'Hidden' }, "Hidden"))));
|
|
150
|
+
};
|
|
8
151
|
const EntitlementsForm = (props) => {
|
|
9
152
|
let abOptions = props.adaptableOptions;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
React.createElement(HelpBlock_1.default, null, "EntitlementOptions Options"),
|
|
14
|
-
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
15
|
-
React.createElement(FormLayout_1.FormRow, { label: "Entitlements to be set here" }))));
|
|
153
|
+
return (React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column", p: 2 },
|
|
154
|
+
React.createElement(DefaultEntitlementForm, Object.assign({}, props)),
|
|
155
|
+
React.createElement(EntitlementsListForm, Object.assign({}, props))));
|
|
16
156
|
};
|
|
17
157
|
exports.default = EntitlementsForm;
|
|
@@ -13,13 +13,6 @@ const GridOptionsForm = (props) => {
|
|
|
13
13
|
return (React.createElement(React.Fragment, null,
|
|
14
14
|
React.createElement(HelpBlock_1.default, null, "Grid Options"),
|
|
15
15
|
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
16
|
-
React.createElement(FormLayout_1.FormRow, { label: "Show ToolPanel" },
|
|
17
|
-
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.sideBar == true, onChange: (addSideBar) => {
|
|
18
|
-
abOptions = Object.assign({}, abOptions);
|
|
19
|
-
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
20
|
-
abOptions.gridOptions.sideBar = addSideBar;
|
|
21
|
-
props.onChangeadaptableOptions(abOptions);
|
|
22
|
-
} })),
|
|
23
16
|
React.createElement(FormLayout_1.FormRow, { label: "Enable Range Selection" },
|
|
24
17
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
|
|
25
18
|
abOptions = Object.assign({}, abOptions);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIOptionsActionColumnsForm = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
9
|
+
const UIOptionsActionColumnsForm = (props) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const options = [
|
|
12
|
+
{ value: 'clone', label: 'Clone' },
|
|
13
|
+
{ value: 'create', label: 'Create' },
|
|
14
|
+
{ value: 'edit', label: 'Edit' },
|
|
15
|
+
{ value: 'delete', label: 'Delete' },
|
|
16
|
+
];
|
|
17
|
+
const actionRowButtons = (_c = (_b = (_a = props.abOptions) === null || _a === void 0 ? void 0 : _a.actionOptions) === null || _b === void 0 ? void 0 : _b.actionRowButtons) !== null && _c !== void 0 ? _c : [];
|
|
18
|
+
const handleCheckChange = (type, checked) => {
|
|
19
|
+
var _a;
|
|
20
|
+
let newActionRowButtons = actionRowButtons;
|
|
21
|
+
if (checked) {
|
|
22
|
+
newActionRowButtons = [...newActionRowButtons, type];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
newActionRowButtons = newActionRowButtons.filter((item) => item !== type);
|
|
26
|
+
}
|
|
27
|
+
props.onChange(Object.assign(Object.assign({}, props.abOptions), { actionOptions: Object.assign(Object.assign({}, (_a = props.abOptions) === null || _a === void 0 ? void 0 : _a.actionOptions), { actionRowButtons: newActionRowButtons }) }));
|
|
28
|
+
};
|
|
29
|
+
return (React.createElement(rebass_1.Box, null,
|
|
30
|
+
React.createElement(HelpBlock_1.default, null, "Row Action Buttons"),
|
|
31
|
+
React.createElement(rebass_1.Flex, { width: "100%", m: 2 }, options.map((option) => (React.createElement(CheckBox_1.CheckBox, { mr: 3, key: option.value, checked: actionRowButtons.some((buttonName) => buttonName === option.value), onChange: (check) => handleCheckChange(option.value, check) }, option.label))))));
|
|
32
|
+
};
|
|
33
|
+
exports.UIOptionsActionColumnsForm = UIOptionsActionColumnsForm;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIOptionsSidebarForm = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
|
+
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
9
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
11
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
|
|
12
|
+
const ALL_SIDEBAR_OPTIONS = ['columns', 'filters', 'adaptable'];
|
|
13
|
+
const prepareSidebarDef = (sideBar) => {
|
|
14
|
+
sideBar = sideBar;
|
|
15
|
+
if (typeof sideBar === 'boolean') {
|
|
16
|
+
sideBar = {
|
|
17
|
+
toolPanels: ALL_SIDEBAR_OPTIONS,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
if (typeof sideBar === 'string') {
|
|
21
|
+
sideBar = {
|
|
22
|
+
toolPanels: [sideBar],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(sideBar)) {
|
|
26
|
+
sideBar = {
|
|
27
|
+
toolPanels: sideBar,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return sideBar !== null && sideBar !== void 0 ? sideBar : { toolPanels: [] };
|
|
31
|
+
};
|
|
32
|
+
const isSidebarChecked = (sideBar, panelName) => {
|
|
33
|
+
var _a;
|
|
34
|
+
return ((_a = sideBar === null || sideBar === void 0 ? void 0 : sideBar.toolPanels) !== null && _a !== void 0 ? _a : []).some((panel) => {
|
|
35
|
+
const panelId = typeof panel === 'string' ? panel : panel.id;
|
|
36
|
+
return panelId === panelName;
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const UIOptionsSidebarForm = (props) => {
|
|
40
|
+
var _a;
|
|
41
|
+
const { abOptions, onChange } = props;
|
|
42
|
+
const { gridOptions } = props.abOptions;
|
|
43
|
+
const sideBar = prepareSidebarDef(gridOptions.sideBar);
|
|
44
|
+
const renderSidebarCheckbox = (sidebarName) => {
|
|
45
|
+
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
|
+
};
|
|
47
|
+
const handleToolpanelsChange = (panelName, check) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
let newPanels = (_a = sideBar === null || sideBar === void 0 ? void 0 : sideBar.toolPanels) !== null && _a !== void 0 ? _a : [];
|
|
50
|
+
if (check) {
|
|
51
|
+
newPanels = [...newPanels, panelName];
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
newPanels = newPanels.filter((panel) => {
|
|
55
|
+
const panelId = typeof panel === 'string' ? panel : panel.id;
|
|
56
|
+
return panelId !== panelName;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
let hiddenByDefault = (_b = sideBar.hiddenByDefault) !== null && _b !== void 0 ? _b : false;
|
|
60
|
+
if (newPanels.length === 0) {
|
|
61
|
+
hiddenByDefault = true;
|
|
62
|
+
}
|
|
63
|
+
const newAbOptions = Object.assign(Object.assign({}, abOptions), { gridOptions: Object.assign(Object.assign({}, abOptions.gridOptions), { sideBar: Object.assign(Object.assign({}, sideBar), { toolPanels: newPanels, hiddenByDefault }) }) });
|
|
64
|
+
props.onChange(newAbOptions);
|
|
65
|
+
};
|
|
66
|
+
let sidebarPosition = (_a = sideBar === null || sideBar === void 0 ? void 0 : sideBar.position) !== null && _a !== void 0 ? _a : 'right';
|
|
67
|
+
const handleSidebarPositionChange = (position) => {
|
|
68
|
+
const newAbOptions = Object.assign(Object.assign({}, abOptions), { gridOptions: Object.assign(Object.assign({}, abOptions.gridOptions), { sideBar: Object.assign(Object.assign({}, sideBar), { position }) }) });
|
|
69
|
+
props.onChange(newAbOptions);
|
|
70
|
+
};
|
|
71
|
+
return (React.createElement(rebass_1.Box, null,
|
|
72
|
+
React.createElement(HelpBlock_1.default, null, "Tool Panels"),
|
|
73
|
+
React.createElement(rebass_1.Box, { m: 2 },
|
|
74
|
+
React.createElement(rebass_1.Flex, { mb: 2 }, ALL_SIDEBAR_OPTIONS.map(renderSidebarCheckbox)),
|
|
75
|
+
React.createElement(FormLayout_1.default, { columns: [{ name: 'label' }, { name: 'children' }] },
|
|
76
|
+
React.createElement(FormLayout_1.FormRow, { label: "Position" },
|
|
77
|
+
React.createElement(DropdownButton_1.default, { columns: ['label'], items: [
|
|
78
|
+
{ label: 'Left', onClick: () => handleSidebarPositionChange('left') },
|
|
79
|
+
{ label: 'Right', onClick: () => handleSidebarPositionChange('right') },
|
|
80
|
+
] }, sidebarPosition === 'left' ? 'Left' : 'Right'))))));
|
|
81
|
+
};
|
|
82
|
+
exports.UIOptionsSidebarForm = UIOptionsSidebarForm;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIOptionsStatusbarForm = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const ModuleManager_1 = require("../../../../components/DragAndDropContext/ModuleManager");
|
|
8
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
9
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
11
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
|
|
12
|
+
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
13
|
+
const UIOptionsStatusbarForm = (props) => {
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
|
+
const allPanels = (_c = (_b = (_a = props.abOptions.gridOptions) === null || _a === void 0 ? void 0 : _a.statusBar) === null || _b === void 0 ? void 0 : _b.statusPanels) !== null && _c !== void 0 ? _c : [];
|
|
16
|
+
const panelIdtoPanel = (panelsIds, align) => panelsIds.map((panelId) => {
|
|
17
|
+
const previousItem = allPanels.find((panel) => panel.key === panelId || panel.statusPanel === panelId);
|
|
18
|
+
if (previousItem) {
|
|
19
|
+
return Object.assign(Object.assign({}, previousItem), { align });
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const newPanel = {
|
|
23
|
+
statusPanel: panelId,
|
|
24
|
+
align,
|
|
25
|
+
};
|
|
26
|
+
return newPanel;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const leftPanels = allPanels.filter((panel) => !(panel === null || panel === void 0 ? void 0 : panel.align) || panel.align === 'left');
|
|
30
|
+
const centerPanels = allPanels.filter((panel) => panel.align === 'center');
|
|
31
|
+
const rightPanels = allPanels.filter((panel) => panel.align === 'right');
|
|
32
|
+
const handleTabChange = (tabs) => {
|
|
33
|
+
const leftPanels = panelIdtoPanel(tabs[0].Items, 'left');
|
|
34
|
+
const centerPanels = panelIdtoPanel(tabs[1].Items, 'center');
|
|
35
|
+
const rightPanels = panelIdtoPanel(tabs[2].Items, 'right');
|
|
36
|
+
const newStatusbarPanels = [...leftPanels, ...centerPanels, ...rightPanels];
|
|
37
|
+
props.onChange(Object.assign(Object.assign({}, props.abOptions), { gridOptions: Object.assign(Object.assign({}, props.abOptions.gridOptions), { statusBar: Object.assign(Object.assign({}, props.abOptions.gridOptions.statusBar), { statusPanels: newStatusbarPanels }) }) }));
|
|
38
|
+
};
|
|
39
|
+
const disabled = false;
|
|
40
|
+
const panelToTabItemId = (panel) => { var _a; return (_a = panel.key) !== null && _a !== void 0 ? _a : panel.statusPanel; };
|
|
41
|
+
const tabs = [
|
|
42
|
+
{
|
|
43
|
+
Name: 'Left',
|
|
44
|
+
Items: leftPanels.map(panelToTabItemId),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
Name: 'Center',
|
|
48
|
+
Items: centerPanels.map(panelToTabItemId),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
Name: 'Right',
|
|
52
|
+
Items: rightPanels.map(panelToTabItemId),
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
const allOptions = [
|
|
56
|
+
{ Id: 'agTotalRowCountComponent', Title: 'Row Count' },
|
|
57
|
+
{ Id: 'agTotalAndFilteredRowCountComponent', Title: 'Totals and Filtered Row Count' },
|
|
58
|
+
{ Id: 'agFilteredRowCountComponent', Title: 'Filtered Row Count' },
|
|
59
|
+
{ Id: 'agSelectedRowCountComponent', Title: 'Selected Row Count' },
|
|
60
|
+
{ Id: 'agAggregationComponent', Title: 'Aggregation' },
|
|
61
|
+
];
|
|
62
|
+
const availableItems = allOptions;
|
|
63
|
+
const [adaptablePanelTitle, setAdaptablePanelTitle] = React.useState('');
|
|
64
|
+
const [adaptablePanelAlign, setAdaptablePanelAlign] = React.useState('left');
|
|
65
|
+
const isAdaptablePanelTitleAvailable = !allPanels.some((panel) => panel.key === adaptablePanelTitle);
|
|
66
|
+
const alignOptions = [
|
|
67
|
+
{ onClick: () => setAdaptablePanelAlign('left'), value: 'left', label: 'Left' },
|
|
68
|
+
{ onClick: () => setAdaptablePanelAlign('center'), value: 'center', label: 'Center' },
|
|
69
|
+
{ onClick: () => setAdaptablePanelAlign('right'), value: 'right', label: 'Right' },
|
|
70
|
+
];
|
|
71
|
+
const handleNewAdaptablePanel = () => {
|
|
72
|
+
const newAdaptablePanel = {
|
|
73
|
+
statusPanel: 'AdaptableStatusPanel',
|
|
74
|
+
align: adaptablePanelAlign,
|
|
75
|
+
key: adaptablePanelTitle,
|
|
76
|
+
};
|
|
77
|
+
const newStatusbarPanels = [...allPanels, newAdaptablePanel];
|
|
78
|
+
setAdaptablePanelTitle('');
|
|
79
|
+
setAdaptablePanelAlign('left');
|
|
80
|
+
props.onChange(Object.assign(Object.assign({}, props.abOptions), { gridOptions: Object.assign(Object.assign({}, props.abOptions.gridOptions), { statusBar: Object.assign(Object.assign({}, props.abOptions.gridOptions.statusBar), { statusPanels: newStatusbarPanels }) }) }));
|
|
81
|
+
};
|
|
82
|
+
return (React.createElement(rebass_1.Box, null,
|
|
83
|
+
React.createElement(HelpBlock_1.default, null, "Status Bar"),
|
|
84
|
+
React.createElement(rebass_1.Box, { p: 2 },
|
|
85
|
+
React.createElement(rebass_1.Box, { style: {
|
|
86
|
+
border: '1px solid var(--ab-color-primarydark)',
|
|
87
|
+
borderRadius: 'var(--ab__border-radius)',
|
|
88
|
+
marginBottom: 'var(--ab-space-2)',
|
|
89
|
+
paddingBottom: 'var(--ab-space-1)',
|
|
90
|
+
backgroundColor: 'var(--ab-color-defaultbackground)',
|
|
91
|
+
padding: 'var(--ab-space-2)',
|
|
92
|
+
} },
|
|
93
|
+
React.createElement(rebass_1.Box, { as: "b" }, "Create Adaptable Statusbar Panel"),
|
|
94
|
+
React.createElement(FormLayout_1.default, { mt: 2 },
|
|
95
|
+
React.createElement(FormLayout_1.FormRow, { label: "Panel Name" },
|
|
96
|
+
React.createElement(Input_1.default, { value: adaptablePanelTitle, placehoder: 'Adaptable Panel Name', onChange: (event) => setAdaptablePanelTitle(event.target.value) })),
|
|
97
|
+
React.createElement(FormLayout_1.FormRow, { label: "Align" },
|
|
98
|
+
React.createElement(DropdownButton_1.default, { columns: ['label'], items: alignOptions }, (_d = alignOptions.find((option) => option.value === adaptablePanelAlign)) === null || _d === void 0 ? void 0 : _d.label)),
|
|
99
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
100
|
+
React.createElement(SimpleButton_1.default, { disabled: !isAdaptablePanelTitleAvailable, onClick: handleNewAdaptablePanel, icon: "plus", variant: "raised" }, "Add"),
|
|
101
|
+
!isAdaptablePanelTitleAvailable && (React.createElement(rebass_1.Box, { mt: 2, color: "var(--ab-color-error)" }, "Adaptable panel name must be unique."))))),
|
|
102
|
+
React.createElement(ModuleManager_1.ModuleManager, { permittedActions: {
|
|
103
|
+
createTab: false,
|
|
104
|
+
dragAndDropTab: false,
|
|
105
|
+
deleteTab: false,
|
|
106
|
+
editTabName: false,
|
|
107
|
+
}, onTabsChange: handleTabChange, disabled: disabled, tabs: tabs, availableItems: availableItems, tabsTitle: 'Status Bar Panels', unusedPanelTitle: "Ag Grid Status Bar Panels", dragItemText: "Drag into a Status Bar Panel below" }))));
|
|
108
|
+
};
|
|
109
|
+
exports.UIOptionsStatusbarForm = UIOptionsStatusbarForm;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableOptions } from '../../../../types';
|
|
3
|
+
interface UIElementsOptionsProps {
|
|
4
|
+
adaptableOptions: AdaptableOptions;
|
|
5
|
+
onChangeadaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const UIElementsForm: React.FunctionComponent<UIElementsOptionsProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIElementsForm = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const UIOptionsActionColumnsForm_1 = require("./UIOptionsActionColumnsForm");
|
|
7
|
+
const UIOptionsSidebarForm_1 = require("./UIOptionsSidebarForm");
|
|
8
|
+
const UIOptionsStatusbarForm_1 = require("./UIOptionsStatusbarForm");
|
|
9
|
+
const UIElementsForm = (props) => {
|
|
10
|
+
let abOptions = props.adaptableOptions;
|
|
11
|
+
return (React.createElement(React.Fragment, null,
|
|
12
|
+
React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions: abOptions, onChange: props.onChangeadaptableOptions }),
|
|
13
|
+
React.createElement(UIOptionsSidebarForm_1.UIOptionsSidebarForm, { abOptions: abOptions, onChange: props.onChangeadaptableOptions }),
|
|
14
|
+
React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, { abOptions: abOptions, onChange: props.onChangeadaptableOptions })));
|
|
15
|
+
};
|
|
16
|
+
exports.UIElementsForm = UIElementsForm;
|
|
@@ -41,6 +41,7 @@ const Wizard = (props) => {
|
|
|
41
41
|
const [droppableKey, setDroppableKey] = react_1.useState(Date.now());
|
|
42
42
|
const [isDataLoading, setIsDataLoading] = react_1.useState(false);
|
|
43
43
|
const handleDataSource = (array, file) => {
|
|
44
|
+
var _a;
|
|
44
45
|
const dataSourceInfo = (props.prepareData || helper_1.prepareDataSource)(array, file);
|
|
45
46
|
try {
|
|
46
47
|
Utils_1.validDataSource(dataSourceInfo);
|
|
@@ -51,7 +52,7 @@ const Wizard = (props) => {
|
|
|
51
52
|
payload: `Invalid adaptable configuration - ${err}`,
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
|
-
const gridOptions = helper_1.prepareGridOptions(dataSourceInfo);
|
|
55
|
+
const gridOptions = helper_1.prepareGridOptions(dataSourceInfo, (_a = props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions);
|
|
55
56
|
const adaptableOptions = Object.assign({}, props.adaptableOptions);
|
|
56
57
|
adaptableOptions.adaptableId = adaptableOptions.adaptableId || (file ? file.name : '');
|
|
57
58
|
adaptableOptions.gridOptions = gridOptions;
|
|
@@ -16,4 +16,4 @@ export interface WizardDataSourceInfo {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const prepareDataSource: (json: any, _file?: File) => WizardDataSourceInfo;
|
|
18
18
|
export declare const getColTypeFromValue: (value: any) => string;
|
|
19
|
-
export declare const prepareGridOptions: (dataSourceInfo: WizardDataSourceInfo) => GridOptions;
|
|
19
|
+
export declare const prepareGridOptions: (dataSourceInfo: WizardDataSourceInfo, defaultGridOptions: Partial<GridOptions>) => GridOptions;
|
|
@@ -65,7 +65,7 @@ const getColTypeFromValue = (value) => {
|
|
|
65
65
|
return columnType;
|
|
66
66
|
};
|
|
67
67
|
exports.getColTypeFromValue = getColTypeFromValue;
|
|
68
|
-
const prepareGridOptions = (dataSourceInfo) => {
|
|
68
|
+
const prepareGridOptions = (dataSourceInfo, defaultGridOptions) => {
|
|
69
69
|
const firstItem = dataSourceInfo.data[0];
|
|
70
70
|
const columnDefs = dataSourceInfo.columns.map((columnName) => {
|
|
71
71
|
const firstItemValue = firstItem[columnName];
|
|
@@ -81,16 +81,9 @@ const prepareGridOptions = (dataSourceInfo) => {
|
|
|
81
81
|
editable: true,
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
|
-
const gridOptions = {
|
|
85
|
-
defaultColDef: {
|
|
84
|
+
const gridOptions = Object.assign(Object.assign({}, defaultGridOptions), { defaultColDef: {
|
|
86
85
|
floatingFilter: true,
|
|
87
|
-
},
|
|
88
|
-
rowData: dataSourceInfo.data,
|
|
89
|
-
columnDefs,
|
|
90
|
-
enableRangeSelection: true,
|
|
91
|
-
rowSelection: 'multiple',
|
|
92
|
-
rowHeight: 30,
|
|
93
|
-
};
|
|
86
|
+
}, rowData: dataSourceInfo.data, columnDefs, enableRangeSelection: true, rowSelection: 'multiple', rowHeight: 30 });
|
|
94
87
|
return gridOptions;
|
|
95
88
|
};
|
|
96
89
|
exports.prepareGridOptions = prepareGridOptions;
|
|
@@ -210,7 +210,8 @@ class FilterFormComponent extends React.Component {
|
|
|
210
210
|
if (editedColumnFilter.Predicate === undefined ||
|
|
211
211
|
(editedColumnFilter.Predicate.PredicateId === 'Values' &&
|
|
212
212
|
editedColumnFilter.Predicate.Inputs.length === 0)) {
|
|
213
|
-
this.props.
|
|
213
|
+
this.props.api.filterApi.clearColumnFilterByColumn(editedColumnFilter.ColumnId);
|
|
214
|
+
this.onCloseForm();
|
|
214
215
|
}
|
|
215
216
|
else {
|
|
216
217
|
if (this.props.api.internalApi.getAdaptableOptions().filterOptions.autoApplyFilter) {
|
|
@@ -18,16 +18,16 @@ const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
|
18
18
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
19
19
|
const ColumnLabels_1 = require("../LayoutEditor/ColumnLabels");
|
|
20
20
|
const Utilities_1 = require("./Utilities");
|
|
21
|
-
const lodash_1 = require("lodash");
|
|
22
21
|
const icons_1 = require("../../../../components/icons");
|
|
23
22
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
23
|
+
const Helper_1 = require("../../../../Utilities/Helpers/Helper");
|
|
24
24
|
const PropertyOrderText = (props) => (React.createElement(rebass_1.Text, { fontWeight: 600, fontSize: 2 }, props.children));
|
|
25
25
|
const ColumnsSectionSummary = () => {
|
|
26
26
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
27
27
|
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
28
28
|
const rowHeight = 40;
|
|
29
29
|
const headerHeight = 40;
|
|
30
|
-
const tableHeight = headerHeight +
|
|
30
|
+
const tableHeight = headerHeight + Helper_1.clamp(rowHeight * layout.Columns.length, 100, 360);
|
|
31
31
|
const data = React.useMemo(() => {
|
|
32
32
|
return layout.Columns.map((columnId) => {
|
|
33
33
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|