@adaptabletools/adaptable 12.1.2 → 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/ColumnApi.d.ts +6 -0
- package/src/Api/Events/SearchChanged.d.ts +1 -0
- package/src/Api/FormatColumnApi.d.ts +5 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +14 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +5 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +40 -11
- 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/PredefinedConfig/FormatColumnState.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +8 -0
- 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 +2 -2
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +1 -1
- package/src/Strategy/LayoutModule.js +3 -3
- 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/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +6 -2
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +2 -1
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +11 -4
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +8 -4
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +3 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +14 -10
- package/src/agGrid/PercentBarRenderer.d.ts +2 -1
- package/src/agGrid/PercentBarRenderer.js +3 -3
- package/src/agGrid/agGridHelper.d.ts +1 -1
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -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;
|
|
@@ -4,6 +4,7 @@ import { AdaptableApi } from '../../../types';
|
|
|
4
4
|
declare type AlertBehaviourWizardSectionProps = {
|
|
5
5
|
onChange: (data: AlertDefinition) => void;
|
|
6
6
|
};
|
|
7
|
+
export declare const renderAlertBehaviourWizardSummary: (alertDefinition: AlertDefinition) => JSX.Element;
|
|
7
8
|
export declare const renderAlertBehaviourSummary: (alert: AlertDefinition, api: AdaptableApi, allowWrap?: boolean) => JSX.Element;
|
|
8
9
|
export declare const AlertBehaviourWizardSection: (props: AlertBehaviourWizardSectionProps) => JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlertBehaviourWizardSection = exports.renderAlertBehaviourSummary = void 0;
|
|
3
|
+
exports.AlertBehaviourWizardSection = exports.renderAlertBehaviourSummary = exports.renderAlertBehaviourWizardSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Tabs_1 = require("../../../components/Tabs");
|
|
@@ -47,7 +47,11 @@ const HighlightStyle = (props) => {
|
|
|
47
47
|
props.onChange(style);
|
|
48
48
|
} }))))));
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
const renderAlertBehaviourWizardSummary = (alertDefinition) => {
|
|
51
|
+
const { api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
52
|
+
return exports.renderAlertBehaviourSummary(alertDefinition, api);
|
|
53
|
+
};
|
|
54
|
+
exports.renderAlertBehaviourWizardSummary = renderAlertBehaviourWizardSummary;
|
|
51
55
|
const renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
|
|
52
56
|
const { AlertProperties = {} } = alert;
|
|
53
57
|
const values = [
|
|
@@ -158,7 +158,7 @@ const AlertWizard = (props) => {
|
|
|
158
158
|
title: behaviourSpelling,
|
|
159
159
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
160
160
|
React.createElement(AlertBehaviourWizardSection_1.AlertBehaviourWizardSection, { onChange: setAlertDefinition }))),
|
|
161
|
-
renderSummary: AlertBehaviourWizardSection_1.
|
|
161
|
+
renderSummary: AlertBehaviourWizardSection_1.renderAlertBehaviourWizardSummary,
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
details: 'Select Alert tags',
|
|
@@ -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) {
|
|
@@ -147,7 +147,7 @@ class RangesComponent extends React.Component {
|
|
|
147
147
|
addRange() {
|
|
148
148
|
const lastRange = this.state.ranges[this.state.ranges.length - 1];
|
|
149
149
|
this.state.ranges.push({
|
|
150
|
-
Min: lastRange.Max,
|
|
150
|
+
Min: lastRange.Max == 'Col-Max' ? 0 : lastRange.Max,
|
|
151
151
|
Max: lastRange.Max,
|
|
152
152
|
Color: UIHelper_1.getHexForName(UIHelper_1.GRAY),
|
|
153
153
|
}),
|
|
@@ -10,7 +10,7 @@ export interface FormatColumnFormatWizardState {
|
|
|
10
10
|
DisplayFormat: AdaptableFormat;
|
|
11
11
|
NumericFormat?: 'Percent' | 'Thousand' | 'Million' | 'Dollar' | 'Sterling' | undefined;
|
|
12
12
|
}
|
|
13
|
-
export declare const getFormatColumnFormatSummaryValue: (data: FormatColumn
|
|
14
|
-
export declare const renderFormatColumnFormatSummary: (data: FormatColumn
|
|
13
|
+
export declare const getFormatColumnFormatSummaryValue: (data: FormatColumn) => string;
|
|
14
|
+
export declare const renderFormatColumnFormatSummary: (data: FormatColumn) => JSX.Element;
|
|
15
15
|
export declare const getFormatDisplayTypeForScope: (scope: AdaptableScope, api: AdaptableApi) => 'Number' | 'Date' | 'String' | undefined;
|
|
16
16
|
export declare const FormatColumnFormatWizardSection: (props: FormatColumnFormatWizardSectionProps) => JSX.Element;
|
|
@@ -78,7 +78,7 @@ const DateFormatPresets = [
|
|
|
78
78
|
'yyyyMMdd',
|
|
79
79
|
'HH:mm:ss',
|
|
80
80
|
];
|
|
81
|
-
const getFormatColumnFormatSummaryValue = (data
|
|
81
|
+
const getFormatColumnFormatSummaryValue = (data) => {
|
|
82
82
|
let content = 'N/A';
|
|
83
83
|
if (!data.DisplayFormat) {
|
|
84
84
|
content = 'N/A';
|
|
@@ -112,8 +112,8 @@ const renderCustomFormatter = (data, customFormatter, setFormatOption) => {
|
|
|
112
112
|
setFormatOption('CustomDisplayFormats', newCustomFormats);
|
|
113
113
|
} })));
|
|
114
114
|
};
|
|
115
|
-
const renderFormatColumnFormatSummary = (data
|
|
116
|
-
return React.createElement(Tag_1.Tag, null, exports.getFormatColumnFormatSummaryValue(data
|
|
115
|
+
const renderFormatColumnFormatSummary = (data) => {
|
|
116
|
+
return React.createElement(Tag_1.Tag, null, exports.getFormatColumnFormatSummaryValue(data));
|
|
117
117
|
};
|
|
118
118
|
exports.renderFormatColumnFormatSummary = renderFormatColumnFormatSummary;
|
|
119
119
|
const getFormatDisplayTypeForScope = (scope, api) => {
|
|
@@ -5,6 +5,7 @@ export declare const isFormatColumnStyleValid: (data: FormatColumn, api: Adaptab
|
|
|
5
5
|
declare type FormatColumnStyleWizardSectionProps = {
|
|
6
6
|
onChange: (data: FormatColumn) => void;
|
|
7
7
|
};
|
|
8
|
+
export declare const renderFormatColumnStyleWizardSummary: (data: FormatColumn) => any;
|
|
8
9
|
export declare const renderFormatColumnStyleSummary: (data: FormatColumn, api: AdaptableApi) => any;
|
|
9
10
|
export declare function FormatColumnStyleWizardSection(props: FormatColumnStyleWizardSectionProps): JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormatColumnStyleWizardSection = exports.renderFormatColumnStyleSummary = exports.isFormatColumnStyleValid = void 0;
|
|
3
|
+
exports.FormatColumnStyleWizardSection = exports.renderFormatColumnStyleSummary = exports.renderFormatColumnStyleWizardSummary = exports.isFormatColumnStyleValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
@@ -76,6 +76,11 @@ const getColumnComparison = (columnComparison, api) => {
|
|
|
76
76
|
ForeColor: columnComparison.Color,
|
|
77
77
|
} })));
|
|
78
78
|
};
|
|
79
|
+
const renderFormatColumnStyleWizardSummary = (data) => {
|
|
80
|
+
const { api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
81
|
+
return exports.renderFormatColumnStyleSummary(data, api);
|
|
82
|
+
};
|
|
83
|
+
exports.renderFormatColumnStyleWizardSummary = renderFormatColumnStyleWizardSummary;
|
|
79
84
|
const renderFormatColumnStyleSummary = (data, api) => {
|
|
80
85
|
if (data.ColumnStyle) {
|
|
81
86
|
if (data.ColumnStyle.CheckBoxStyle) {
|
|
@@ -117,7 +117,7 @@ function FormatColumnWizard(props) {
|
|
|
117
117
|
title: 'Style',
|
|
118
118
|
details: 'Format Column Style',
|
|
119
119
|
isValid: FormatColumnStyleWizardSection_1.isFormatColumnStyleValid,
|
|
120
|
-
renderSummary: FormatColumnStyleWizardSection_1.
|
|
120
|
+
renderSummary: FormatColumnStyleWizardSection_1.renderFormatColumnStyleWizardSummary,
|
|
121
121
|
render: () => {
|
|
122
122
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
123
123
|
React.createElement(FormatColumnStyleWizardSection_1.FormatColumnStyleWizardSection, { onChange: setFormatColumn })));
|
|
@@ -125,7 +125,7 @@ function FormatColumnWizard(props) {
|
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
title: 'Display Format',
|
|
128
|
-
renderSummary: (data) => FormatColumnFormatWizardSection_1.renderFormatColumnFormatSummary(data
|
|
128
|
+
renderSummary: (data) => FormatColumnFormatWizardSection_1.renderFormatColumnFormatSummary(data),
|
|
129
129
|
render: () => {
|
|
130
130
|
return React.createElement(FormatColumnFormatWizardSection_1.FormatColumnFormatWizardSection, { onChange: setFormatColumn });
|
|
131
131
|
},
|
|
@@ -26,14 +26,21 @@ const LayoutWizard = (props) => {
|
|
|
26
26
|
const initialLayout = (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
|
|
27
27
|
const [layout, setLayout] = react_1.useState(() => {
|
|
28
28
|
var _a;
|
|
29
|
+
let preparedLayout = null;
|
|
29
30
|
if (initialLayout) {
|
|
30
|
-
|
|
31
|
+
preparedLayout = Helper_1.cloneObject(initialLayout);
|
|
31
32
|
if (((_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Clone') {
|
|
32
33
|
preparedLayout.Name = '';
|
|
33
34
|
}
|
|
34
|
-
return preparedLayout;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
else {
|
|
37
|
+
preparedLayout = ObjectFactory_1.default.CreateEmptyLayout({ Name: '' });
|
|
38
|
+
}
|
|
39
|
+
if (preparedLayout.SuppressAggFuncInHeader === undefined) {
|
|
40
|
+
preparedLayout.SuppressAggFuncInHeader =
|
|
41
|
+
!!adaptable.api.internalApi.getAgGridInstance().suppressAggFuncInHeader;
|
|
42
|
+
}
|
|
43
|
+
return preparedLayout;
|
|
37
44
|
});
|
|
38
45
|
const handleFinish = () => {
|
|
39
46
|
var _a;
|
|
@@ -117,7 +124,7 @@ const LayoutWizard = (props) => {
|
|
|
117
124
|
},
|
|
118
125
|
{
|
|
119
126
|
title: 'Filters',
|
|
120
|
-
details: 'Column Filters',
|
|
127
|
+
details: 'View Column Filters',
|
|
121
128
|
renderSummary: () => React.createElement(FilterSection_1.FilterSectionSummary, null),
|
|
122
129
|
render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
|
|
123
130
|
React.createElement(FilterSection_1.FilterSection, { onChange: (newLayout) => setLayout(newLayout) }))),
|
|
@@ -58,7 +58,7 @@ const AggregationsSection = (props) => {
|
|
|
58
58
|
const allColumns = adaptable.api.columnApi.getColumns();
|
|
59
59
|
const sortedAggregableColumns = React.useMemo(() => {
|
|
60
60
|
var _a, _b;
|
|
61
|
-
return sortWithOrder_1.sortWithOrderArray(allAggregableColumns.map((col) => col.columnId), (_b = Object.keys((_a = layout.AggregationColumns) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], { sortUnorderedItems:
|
|
61
|
+
return sortWithOrder_1.sortWithOrderArray(allAggregableColumns.map((col) => col.columnId), (_b = Object.keys((_a = layout.AggregationColumns) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
62
62
|
}, [layout, allAggregableColumns]);
|
|
63
63
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
64
64
|
props.onChange(Object.assign(Object.assign({}, layout), { AggregationColumns: columnIds.reduce((acc, colId) => {
|
|
@@ -18,19 +18,23 @@ 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;
|
|
34
|
+
if (adaptable.api.columnApi.isAutoPivotColumn(columnId) ||
|
|
35
|
+
adaptable.api.columnApi.isAutoRowGroupColumn(columnId)) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
34
38
|
const friendlyName = adaptable.api.columnApi.getFriendlyNameFromColumnId(columnId);
|
|
35
39
|
const header = (_b = (_a = layout.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[columnId]) !== null && _b !== void 0 ? _b : '';
|
|
36
40
|
const columnWidth = (_c = layout.ColumnWidthMap) === null || _c === void 0 ? void 0 : _c[columnId];
|
|
@@ -57,7 +61,7 @@ const ColumnsSectionSummary = () => {
|
|
|
57
61
|
grouping,
|
|
58
62
|
filter,
|
|
59
63
|
};
|
|
60
|
-
});
|
|
64
|
+
}).filter(Boolean);
|
|
61
65
|
}, [layout]);
|
|
62
66
|
const columns = React.useMemo(() => {
|
|
63
67
|
return {
|
|
@@ -187,7 +191,7 @@ const ColumnsSection = (props) => {
|
|
|
187
191
|
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
188
192
|
const allColumns = adaptable.api.columnApi.getColumns();
|
|
189
193
|
const sortedColumns = React.useMemo(() => {
|
|
190
|
-
return sortWithOrder_1.sortWithOrderArray(allColumns.map((col) => col.columnId), layout.Columns, { sortUnorderedItems:
|
|
194
|
+
return sortWithOrder_1.sortWithOrderArray(allColumns.map((col) => col.columnId), layout.Columns, { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
191
195
|
}, [layout, allColumns]);
|
|
192
196
|
const handlePinChange = (columnId, pinning) => {
|
|
193
197
|
props.onChange(Object.assign(Object.assign({}, layout), { PinnedColumnsMap: Object.assign(Object.assign({}, layout.PinnedColumnsMap), { [columnId]: pinning }) }));
|
|
@@ -12,9 +12,10 @@ const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
|
12
12
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
13
13
|
const Utilities_1 = require("./Utilities");
|
|
14
14
|
const PivotColumnsSectionSummary = () => {
|
|
15
|
+
var _a;
|
|
15
16
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
17
|
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
17
|
-
return (React.createElement(rebass_1.Box, { p: 2, style: { borderRadius: 'var(--ab__border-radius)' }, backgroundColor: "var(--ab-color-defaultbackground)" }, layout.PivotColumns.length ? (layout.PivotColumns.map((columnId) => (React.createElement(Tag_1.Tag, { mr: 1, key: columnId }, adaptable.api.columnApi.getFriendlyNameFromColumnId(columnId))))) : (React.createElement(Tag_1.Tag, null, "No Column Pivoting"))));
|
|
18
|
+
return (React.createElement(rebass_1.Box, { p: 2, style: { borderRadius: 'var(--ab__border-radius)' }, backgroundColor: "var(--ab-color-defaultbackground)" }, ((_a = layout.PivotColumns) === null || _a === void 0 ? void 0 : _a.length) ? (layout.PivotColumns.map((columnId) => (React.createElement(Tag_1.Tag, { mr: 1, key: columnId }, adaptable.api.columnApi.getFriendlyNameFromColumnId(columnId))))) : (React.createElement(Tag_1.Tag, null, "No Column Pivoting"))));
|
|
18
19
|
};
|
|
19
20
|
exports.PivotColumnsSectionSummary = PivotColumnsSectionSummary;
|
|
20
21
|
const PivotColumnsSection = (props) => {
|
|
@@ -24,7 +25,7 @@ const PivotColumnsSection = (props) => {
|
|
|
24
25
|
const allPivotColumns = adaptable.api.columnApi.getPivotableColumns();
|
|
25
26
|
const sortedPivotColumns = React.useMemo(() => {
|
|
26
27
|
var _a;
|
|
27
|
-
return sortWithOrder_1.sortWithOrderArray(allPivotColumns.map((col) => col.columnId), (_a = layout.PivotColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems:
|
|
28
|
+
return sortWithOrder_1.sortWithOrderArray(allPivotColumns.map((col) => col.columnId), (_a = layout.PivotColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
28
29
|
}, [layout, allPivotColumns]);
|
|
29
30
|
const handleColumnsChange = (columnIds) => {
|
|
30
31
|
props.onChange(Object.assign(Object.assign({}, layout), { PivotColumns: columnIds }));
|
|
@@ -26,7 +26,7 @@ const RowGroupingSection = (props) => {
|
|
|
26
26
|
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
27
27
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
28
28
|
var _a;
|
|
29
|
-
return sortWithOrder_1.sortWithOrderArray(allGroupableColumns.map((col) => col.columnId), (_a = layout.RowGroupedColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems:
|
|
29
|
+
return sortWithOrder_1.sortWithOrderArray(allGroupableColumns.map((col) => col.columnId), (_a = layout.RowGroupedColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
30
30
|
}, [layout, allGroupableColumns]);
|
|
31
31
|
const handleColumnsChange = (columnIds) => {
|
|
32
32
|
props.onChange(Object.assign(Object.assign({}, layout), { RowGroupedColumns: columnIds }));
|
|
@@ -17,8 +17,8 @@ const SettingsSectionSummary = () => {
|
|
|
17
17
|
"Layout Name: ",
|
|
18
18
|
layout.Name),
|
|
19
19
|
React.createElement(Tag_1.Tag, { mr: 2 },
|
|
20
|
-
"
|
|
21
|
-
layout.EnablePivot ? '
|
|
20
|
+
"Layout Grid Type: ",
|
|
21
|
+
layout.EnablePivot ? 'Pivot' : 'Table'),
|
|
22
22
|
React.createElement(Tag_1.Tag, { mr: 2 },
|
|
23
23
|
"Suppress Aggregation Function in Header: ",
|
|
24
24
|
layout.SuppressAggFuncInHeader ? 'Yes' : 'No')));
|