@adaptabletools/adaptable 11.3.0 → 12.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +22 -4
- package/bundle.cjs.js +108 -108
- package/index.css +26 -4
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
- package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
- package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +75 -62
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +2 -2
- package/src/Api/ConditionalStyleApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/DashboardApi.d.ts +6 -19
- package/src/Api/DataSetApi.d.ts +40 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +15 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/SearchChanged.d.ts +3 -4
- package/src/Api/FilterApi.d.ts +1 -77
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +5 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +2 -2
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +2 -24
- package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
- package/src/Api/Implementation/DashboardApiImpl.js +5 -29
- package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
- package/src/Api/Implementation/DataSetApiImpl.js +42 -0
- package/src/Api/Implementation/EventApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
- package/src/Api/Implementation/FilterApiImpl.js +5 -159
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +14 -3
- package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
- package/src/Api/Implementation/LayoutApiImpl.js +172 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +6 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
- package/src/Api/InternalApi.d.ts +3 -2
- package/src/Api/LayoutApi.d.ts +88 -1
- package/src/Api/SmartEditApi.d.ts +8 -2
- package/src/Api/TeamSharingApi.d.ts +18 -5
- package/src/Api/UserInterfaceApi.d.ts +4 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
- package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.js +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +6 -5
- package/src/PredefinedConfig/Common/Types.js +2 -3
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +22 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
- package/src/Redux/Store/AdaptableStore.js +37 -39
- package/src/Strategy/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +28 -14
- package/src/Strategy/DataSetModule.d.ts +25 -0
- package/src/Strategy/DataSetModule.js +65 -0
- package/src/Strategy/ExportModule.js +6 -1
- package/src/Strategy/FilterModule.d.ts +7 -11
- package/src/Strategy/FilterModule.js +24 -15
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +24 -2
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StatusBarModule.js +1 -3
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
- package/src/Utilities/Constants/GeneralConstants.js +6 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -15
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
- package/src/Utilities/ObjectFactory.d.ts +3 -6
- package/src/Utilities/ObjectFactory.js +3 -7
- package/src/Utilities/Services/EntitlementService.js +7 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/TeamSharingService.js +4 -4
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
- package/src/View/Alert/ActiveAlertsPanel.js +15 -0
- package/src/View/Alert/AlertStatusSubPanel.js +3 -8
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CellSummary/CellSummaryDetails.js +2 -2
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
- package/src/View/CellSummary/CellSummaryPopover.js +3 -6
- package/src/View/CellSummary/CellSummaryPopup.js +8 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
- package/src/View/Components/ExternalRenderer.d.ts +3 -6
- package/src/View/Components/ExternalRenderer.js +5 -5
- package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +9 -7
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
- package/src/View/Components/Popups/AdaptableToaster.js +29 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
- package/src/View/Dashboard/CustomDashboardButton.js +47 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
- package/src/View/Dashboard/Dashboard.d.ts +1 -0
- package/src/View/Dashboard/Dashboard.js +8 -34
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
- package/src/View/DataSet/DataSetSelector.d.ts +7 -0
- package/src/View/DataSet/DataSetSelector.js +18 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
- package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
- package/src/View/DataSet/DataSetViewPanel.js +58 -0
- package/src/View/Filter/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +5 -5
- package/src/View/Filter/FilterSummary.js +6 -5
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +11 -14
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/SmartEdit/SmartEditPopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
- package/src/View/StatusBar/StatusBarPanel.js +5 -4
- package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
- package/src/View/UIHelper.d.ts +4 -4
- package/src/View/UIHelper.js +4 -4
- package/src/agGrid/ActionColumnRenderer.js +3 -2
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +79 -52
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +6 -6
- package/src/agGrid/agGridHelper.js +34 -56
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -2
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/SelectList.d.ts +10 -0
- package/src/components/SelectList.js +9 -0
- package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +162 -77
- package/src/metamodel/adaptable.metamodel.js +422 -375
- package/src/types.d.ts +15 -12
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -10
- package/src/Api/DataSourceApi.d.ts +0 -58
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
- package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
- package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
- package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
- package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
- package/src/Strategy/DataSourceModule.d.ts +0 -20
- package/src/Strategy/DataSourceModule.js +0 -56
- package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
- package/src/View/DataSource/DataSourceViewPanel.js +0 -69
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
|
@@ -3,32 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LayoutStatusBarSubPanelPopover = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
6
|
+
const SelectList_1 = require("../../components/SelectList");
|
|
8
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
-
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
10
|
-
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
11
|
-
const LayoutRadioSelector_1 = require("./LayoutRadioSelector");
|
|
12
|
-
const colItems = [
|
|
13
|
-
{ Content: 'Current', Size: 2 },
|
|
14
|
-
{ Content: 'Layout Name', Size: 4 },
|
|
15
|
-
];
|
|
16
8
|
exports.LayoutStatusBarSubPanelPopover = () => {
|
|
17
9
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
18
|
-
const accessLevel = adaptable.EntitlementService.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
19
10
|
const layouts = adaptable.api.layoutApi.getAllLayout();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Content: (React.createElement(LayoutRadioSelector_1.LayoutRadioSelector, { accessLevel: accessLevel, id: layout.Name, data: layout })),
|
|
26
|
-
Size: 1,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: layout.Name }, layout.Name)),
|
|
30
|
-
Size: 4,
|
|
31
|
-
},
|
|
32
|
-
] }));
|
|
33
|
-
})));
|
|
11
|
+
const options = layouts.map((layout) => ({ label: layout.Name, value: layout.Uuid }));
|
|
12
|
+
const handleChange = (option) => {
|
|
13
|
+
adaptable.api.layoutApi.setLayout(option.label);
|
|
14
|
+
};
|
|
15
|
+
return React.createElement(SelectList_1.SelectList, { options: options, onChange: handleChange });
|
|
34
16
|
};
|
|
@@ -223,7 +223,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
223
223
|
// JW: Not sure we do - why not just make it always visible as we ignore if if not required.
|
|
224
224
|
const aggregateEnabled = true;
|
|
225
225
|
const customHeader = headerColumnsMap[c.columnId];
|
|
226
|
-
const initialHeader = api.
|
|
226
|
+
const initialHeader = api.columnApi.getFriendlyNameFromColumnId(c.columnId);
|
|
227
227
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "stretch", "data-name": "drag-item", "data-col-id": c.columnId },
|
|
228
228
|
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", backgroundColor: "secondary", color: "text-on-secondary" },
|
|
229
229
|
React.createElement(rebass_1.Flex, { flex: 1, alignItems: "center" },
|
|
@@ -27,6 +27,7 @@ export declare class LayoutEditorWizard extends React.Component<LayoutEditorWiza
|
|
|
27
27
|
[columnId: string]: number;
|
|
28
28
|
};
|
|
29
29
|
ColumnSorts?: import("../../../types").ColumnSort[];
|
|
30
|
+
ColumnFilters?: import("../../../types").ColumnFilter[];
|
|
30
31
|
RowGroupedColumns?: string[];
|
|
31
32
|
ExpandedRowGroupValues?: any[];
|
|
32
33
|
AggregationColumns?: Record<string, string | true>;
|
|
@@ -47,7 +47,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
47
47
|
operationMenuItems.push(...customOperations.map((operation) => {
|
|
48
48
|
return {
|
|
49
49
|
onClick: () => this.props.onSmartEditOperationChange(operation),
|
|
50
|
-
label: operation.
|
|
50
|
+
label: operation.name,
|
|
51
51
|
};
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
@@ -60,7 +60,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
60
60
|
} },
|
|
61
61
|
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, "data-name": "smart-edit-operation" },
|
|
62
62
|
React.createElement(DropdownButton_1.default, { items: operationMenuItems, columns: ['label'], onMouseDown: preventDefault }, typeof this.props.SmartEditOperation === 'object'
|
|
63
|
-
? this.props.SmartEditOperation.
|
|
63
|
+
? this.props.SmartEditOperation.name
|
|
64
64
|
: this.props.SmartEditOperation),
|
|
65
65
|
React.createElement(Input_1.default, { value: this.props.SmartEditValue.toString(), marginLeft: 2, marginRight: 2, type: "number", placeholder: "Enter a Number", onChange: (e) => this.onSmartEditValueChange(e) }),
|
|
66
66
|
React.createElement(SimpleButton_1.default, { tone: this.getButtonStyle(), variant: "raised", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
|
|
@@ -55,7 +55,7 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
55
55
|
operationMenuItems.push(...customOperations.map((operation) => {
|
|
56
56
|
return {
|
|
57
57
|
onClick: () => this.props.onSmartEditOperationChange(operation),
|
|
58
|
-
label: operation.
|
|
58
|
+
label: operation.name,
|
|
59
59
|
};
|
|
60
60
|
}));
|
|
61
61
|
}
|
|
@@ -70,7 +70,7 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
70
70
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__SmartEdit__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
71
71
|
React.createElement(rebass_1.Flex, null,
|
|
72
72
|
React.createElement(DropdownButton_1.default, { className: `ab-${elementType}__SmartEdit__select`, marginRight: 2, items: operationMenuItems, style: { fontSize: 'small' }, columns: ['label'], disabled: shouldDisable, variant: "outlined" }, typeof this.props.SmartEditOperation === 'object'
|
|
73
|
-
? this.props.SmartEditOperation.
|
|
73
|
+
? this.props.SmartEditOperation.name
|
|
74
74
|
: this.props.SmartEditOperation),
|
|
75
75
|
React.createElement(Input_1.default, { style: {
|
|
76
76
|
width: '5rem',
|
|
@@ -12,7 +12,7 @@ const AdaptableContext_1 = require("./AdaptableContext");
|
|
|
12
12
|
exports.SpecialColumnSettingsWizardStep = (props) => {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
15
|
-
const possibleColumnTypes = adaptable.api.internalApi.getAdaptableOptions().
|
|
15
|
+
const possibleColumnTypes = adaptable.api.internalApi.getAdaptableOptions().columnOptions.columnTypes;
|
|
16
16
|
const { Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable, SuppressMenu, SuppressMovable, } = (_a = props.settings) !== null && _a !== void 0 ? _a : {};
|
|
17
17
|
const handleColumnTypeChange = (columnType, checked) => {
|
|
18
18
|
var _a, _b, _c;
|
|
@@ -39,6 +39,6 @@ exports.AdaptableStatusBar = (props) => {
|
|
|
39
39
|
dispatch(menuItem.reduxAction);
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
return (React.createElement(StatusBarPanel_1.StatusBarPanel, Object.assign({ "data-name": subPanel }, statusBarPanelProps, { onAction: onAction, icon: (_f = statusBarPanelProps.icon) !== null && _f !== void 0 ? _f : moduleInfo.Glyph, key: subPanel })));
|
|
42
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, Object.assign({ "data-name": subPanel }, statusBarPanelProps, { tooltip: moduleInfo.FriendlyName, onAction: onAction, icon: (_f = statusBarPanelProps.icon) !== null && _f !== void 0 ? _f : moduleInfo.Glyph, key: subPanel })));
|
|
43
43
|
})));
|
|
44
44
|
};
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
7
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
8
9
|
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
9
10
|
/**
|
|
10
11
|
* Statusbar sub panel are similar to vs code:
|
|
@@ -14,7 +15,7 @@ const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
|
14
15
|
*/
|
|
15
16
|
exports.StatusBarPanel = (props) => {
|
|
16
17
|
var _a;
|
|
17
|
-
const { icon, content, popover, popoverMinWidth, view, onAction, extraActions, triggerActionOnWrapperClick = true } = props, flexProps = tslib_1.__rest(props, ["icon", "content", "popover", "popoverMinWidth", "view", "onAction", "extraActions", "triggerActionOnWrapperClick"]);
|
|
18
|
+
const { icon, content, popover, popoverMinWidth, view, onAction, extraActions, triggerActionOnWrapperClick = true, tooltip } = props, flexProps = tslib_1.__rest(props, ["icon", "content", "popover", "popoverMinWidth", "view", "onAction", "extraActions", "triggerActionOnWrapperClick", "tooltip"]);
|
|
18
19
|
const handleAction = () => onAction();
|
|
19
20
|
if (view) {
|
|
20
21
|
const View = view;
|
|
@@ -39,7 +40,7 @@ exports.StatusBarPanel = (props) => {
|
|
|
39
40
|
? React.createElement(content)
|
|
40
41
|
: content;
|
|
41
42
|
return (React.createElement(rebass_1.Flex, Object.assign({}, flexProps, { alignItems: "center", justifyContent: "center", as: shouldTriggerActionOnWrapperClick ? 'button' : 'div', className: baseClassName, onClick: handleWrapperClick }),
|
|
42
|
-
props.icon && (React.createElement(SimpleButton_1.default, { color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, mr: preparedContent ? 1 : 0 })),
|
|
43
|
-
popover ? (React.createElement(AdaptablePopover_1.AdaptablePopover, { showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth }, preparedContent)) : (preparedContent),
|
|
44
|
-
_a.call(extraActions, (action, index) => React.createElement(action, { key: index }))));
|
|
43
|
+
props.icon && (React.createElement(SimpleButton_1.default, { tooltip: tooltip, color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, mr: preparedContent ? 1 : 0 })),
|
|
44
|
+
popover ? (React.createElement(AdaptablePopover_1.AdaptablePopover, { tooltipText: tooltip, showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth }, preparedContent)) : (preparedContent),
|
|
45
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(extraActions) && (React.createElement(rebass_1.Box, { ml: 1 }, (_a = extraActions === null || extraActions === void 0 ? void 0 : extraActions.map) === null || _a === void 0 ? void 0 : _a.call(extraActions, (action, index) => React.createElement(action, { key: index }))))));
|
|
45
46
|
};
|
|
@@ -3,34 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ThemeStatusPanelPopover = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
|
|
6
|
+
const SelectList_1 = require("../../components/SelectList");
|
|
8
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
-
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
10
|
-
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
11
|
-
const colItems = [
|
|
12
|
-
{ Content: 'Current', Size: 2 },
|
|
13
|
-
{ Content: 'Theme Name', Size: 4 },
|
|
14
|
-
];
|
|
15
8
|
exports.ThemeStatusPanelPopover = () => {
|
|
16
9
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
17
10
|
const themes = adaptable.api.themeApi.getAllTheme();
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
adaptable.api.themeApi.loadTheme(theme.Name);
|
|
11
|
+
const handleThemeChange = React.useCallback((option) => {
|
|
12
|
+
adaptable.api.themeApi.loadTheme(option.label);
|
|
21
13
|
}, []);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
themes.map((theme) => {
|
|
25
|
-
return (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: theme.Name, colItems: [
|
|
26
|
-
{
|
|
27
|
-
Content: (React.createElement(Radio_1.default, { onClick: () => handleThemeChange(theme), id: theme.Name, checked: currentTheme === theme.Name })),
|
|
28
|
-
Size: 1,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: theme.Name }, theme.Name)),
|
|
32
|
-
Size: 4,
|
|
33
|
-
},
|
|
34
|
-
] }));
|
|
35
|
-
})));
|
|
14
|
+
const options = themes.map((theme) => ({ label: theme.Name, value: theme.Uuid }));
|
|
15
|
+
return React.createElement(SelectList_1.SelectList, { options: options, onChange: handleThemeChange });
|
|
36
16
|
};
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { EditableConfigEntityState } from './Components/SharedProps/EditableConf
|
|
|
3
3
|
import { StatusColour } from '../PredefinedConfig/Common/Enums';
|
|
4
4
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
5
5
|
import { Schedule, Weekday } from '../PredefinedConfig/Common/Schedule';
|
|
6
|
-
import { AdaptableOptions } from '../types';
|
|
6
|
+
import { AdaptableColumnDataType, AdaptableOptions } from '../types';
|
|
7
7
|
import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
8
8
|
import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessageType';
|
|
9
9
|
export declare const BLACK: string;
|
|
@@ -29,8 +29,8 @@ export declare const ORANGE: string;
|
|
|
29
29
|
export declare function getHexForName(name: string): string;
|
|
30
30
|
export declare function getDefaultColors(): string[];
|
|
31
31
|
export declare function getEmptyConfigState(): EditableConfigEntityState;
|
|
32
|
-
export declare function getDescriptionForDataType(dataType:
|
|
33
|
-
export declare function
|
|
32
|
+
export declare function getDescriptionForDataType(dataType: AdaptableColumnDataType): "string" | "number" | "date";
|
|
33
|
+
export declare function getPlaceholderForDataType(dataType: AdaptableColumnDataType): "Enter Value" | "Enter Number" | "Enter Date";
|
|
34
34
|
export declare function getModalContainer(adaptableOptions: AdaptableOptions, document: Document): HTMLElement;
|
|
35
35
|
export declare function IsEmptyStyle(style: AdaptableStyle): boolean;
|
|
36
36
|
export declare function IsNotEmptyStyle(style: AdaptableStyle): boolean;
|
|
@@ -58,7 +58,7 @@ export declare const UIHelper: {
|
|
|
58
58
|
getDefaultColors: typeof getDefaultColors;
|
|
59
59
|
getEmptyConfigState: typeof getEmptyConfigState;
|
|
60
60
|
getDescriptionForDataType: typeof getDescriptionForDataType;
|
|
61
|
-
getPlaceHolderforDataType: typeof
|
|
61
|
+
getPlaceHolderforDataType: typeof getPlaceholderForDataType;
|
|
62
62
|
getModalContainer: typeof getModalContainer;
|
|
63
63
|
IsEmptyStyle: typeof IsEmptyStyle;
|
|
64
64
|
IsNotEmptyStyle: typeof IsNotEmptyStyle;
|
package/src/View/UIHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.
|
|
3
|
+
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.getPlaceholderForDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const EditableConfigEntityState_1 = require("./Components/SharedProps/EditableConfigEntityState");
|
|
6
6
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
@@ -118,7 +118,7 @@ function getDescriptionForDataType(dataType) {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
exports.getDescriptionForDataType = getDescriptionForDataType;
|
|
121
|
-
function
|
|
121
|
+
function getPlaceholderForDataType(dataType) {
|
|
122
122
|
switch (dataType) {
|
|
123
123
|
case Enums_1.DataType.String:
|
|
124
124
|
return 'Enter Value';
|
|
@@ -128,7 +128,7 @@ function getPlaceHolderforDataType(dataType) {
|
|
|
128
128
|
return 'Enter Date';
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
exports.
|
|
131
|
+
exports.getPlaceholderForDataType = getPlaceholderForDataType;
|
|
132
132
|
function getModalContainer(adaptableOptions, document) {
|
|
133
133
|
let modalContainer;
|
|
134
134
|
if (adaptableOptions.containerOptions.modalContainer) {
|
|
@@ -466,7 +466,7 @@ exports.UIHelper = {
|
|
|
466
466
|
getDefaultColors,
|
|
467
467
|
getEmptyConfigState,
|
|
468
468
|
getDescriptionForDataType,
|
|
469
|
-
getPlaceHolderforDataType,
|
|
469
|
+
getPlaceHolderforDataType: getPlaceholderForDataType,
|
|
470
470
|
getModalContainer,
|
|
471
471
|
IsEmptyStyle,
|
|
472
472
|
IsNotEmptyStyle,
|
|
@@ -51,7 +51,8 @@ class ActionColumnRenderer {
|
|
|
51
51
|
width: 15,
|
|
52
52
|
},
|
|
53
53
|
};
|
|
54
|
-
const
|
|
54
|
+
const buttonIcon = adaptableApi.internalApi.getIconForButton(button, context);
|
|
55
|
+
const iconProps = buttonIcon && Object.assign({}, defaultIconProps, buttonIcon);
|
|
55
56
|
const buttonStyle = adaptableApi.internalApi.getStyleForButton(button, context);
|
|
56
57
|
const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
|
|
57
58
|
const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
|
|
@@ -66,7 +67,7 @@ class ActionColumnRenderer {
|
|
|
66
67
|
};
|
|
67
68
|
const disabled = button.disabled && button.disabled(button, context);
|
|
68
69
|
return (React.createElement(SimpleButton_1.default, { key: button.Uuid, "data-name": `action-button-${index + 1}`, variant: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'text', disabled: disabled, tooltip: buttonTooltip, tone: (_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'none', onClick: handleClick, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, accessLevel: 'Full' },
|
|
69
|
-
|
|
70
|
+
buttonIcon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
70
71
|
buttonLabel));
|
|
71
72
|
})));
|
|
72
73
|
};
|
|
@@ -18,6 +18,7 @@ import { SelectedRowInfo } from '../PredefinedConfig/Selection/SelectedRowInfo';
|
|
|
18
18
|
import { AdaptableTheme } from '../PredefinedConfig/ThemeState';
|
|
19
19
|
import { IAdaptableStore } from '../Redux/Store/Interface/IAdaptableStore';
|
|
20
20
|
import { IModuleCollection } from '../Strategy/Interface/IModule';
|
|
21
|
+
import { AdaptableColumnType } from '../types';
|
|
21
22
|
import { EmitterCallback } from '../Utilities/Emitter';
|
|
22
23
|
import { IPPStyle } from '../Utilities/Interface/IPPStyle';
|
|
23
24
|
import { LicenseService } from '../Utilities/Services/LicenseService';
|
|
@@ -61,6 +62,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
61
62
|
embedColumnMenu: boolean;
|
|
62
63
|
gridOptions: GridOptions;
|
|
63
64
|
isInitialised: boolean;
|
|
65
|
+
hasAdaptableToolPanel: boolean;
|
|
64
66
|
private useRowNodeLookUp;
|
|
65
67
|
private abContainerElement;
|
|
66
68
|
private gridContainerElement;
|
|
@@ -119,6 +121,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
119
121
|
private initializeAgGrid;
|
|
120
122
|
private isAgGridReady;
|
|
121
123
|
private initAgGridContainerFromInitializedAgGrid;
|
|
124
|
+
private createAdaptableSideBarDef;
|
|
122
125
|
private createStatusBars;
|
|
123
126
|
getAgGridStatusPanels(): import("@ag-grid-community/all-modules").StatusPanelDef[];
|
|
124
127
|
debouncedSetColumnIntoStore: import("lodash").DebouncedFunc<() => void>;
|
|
@@ -238,7 +241,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
238
241
|
suppressMovable: boolean;
|
|
239
242
|
headerTooltip: string;
|
|
240
243
|
cellEditor: string | typeof AdaptableNumberEditor | typeof AdaptableDateEditor;
|
|
241
|
-
type:
|
|
244
|
+
type: AdaptableColumnType[];
|
|
242
245
|
valueSetter: (params: ValueSetterParams) => any;
|
|
243
246
|
cellRenderer: import("@ag-grid-community/all-modules").ICellRendererFunc;
|
|
244
247
|
valueGetter: (params: ValueGetterParams) => any;
|
|
@@ -281,7 +284,6 @@ export declare class Adaptable implements IAdaptable {
|
|
|
281
284
|
setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
282
285
|
setupColumnTooltipValueGetter({ col, colId }: ColumnSetupInfo): void;
|
|
283
286
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
284
|
-
getUserDefinedHeaderName(columnId: string): string;
|
|
285
287
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
286
288
|
setupColumnFloatingFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
287
289
|
setupColumnValueFormatter({ col, abColumn }: ColumnSetupInfo): void;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -375,7 +375,7 @@ class Adaptable {
|
|
|
375
375
|
// Build the default group sort comparator - will get custom sort values (but not functions) in real time
|
|
376
376
|
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
377
377
|
if (!this.getInitialGroupOrderComparator(this.gridOptions) &&
|
|
378
|
-
this.adaptableOptions.
|
|
378
|
+
this.adaptableOptions.columnOptions.autoOrderGroupedColumns) {
|
|
379
379
|
this.gridOptions.initialGroupOrderComparator =
|
|
380
380
|
this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
381
381
|
}
|
|
@@ -455,6 +455,13 @@ class Adaptable {
|
|
|
455
455
|
}).then(async () => {
|
|
456
456
|
this.api.internalApi.hideLoadingScreen();
|
|
457
457
|
this.isInitialised = true;
|
|
458
|
+
this._adaptableReady = true;
|
|
459
|
+
// setTimeout(() => {
|
|
460
|
+
// this.api.eventApi.emit('AdaptableReady', {
|
|
461
|
+
// adaptableApi: this.api,
|
|
462
|
+
// gridOptions: this.adaptableOptions.gridOptions,
|
|
463
|
+
// });
|
|
464
|
+
// }, 0);
|
|
458
465
|
});
|
|
459
466
|
if (this.abContainerElement == null) {
|
|
460
467
|
this.abContainerElement = this.getAdaptableContainerElement();
|
|
@@ -519,16 +526,18 @@ class Adaptable {
|
|
|
519
526
|
this.performAudit(data.action, data.state, data.newState);
|
|
520
527
|
this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
|
|
521
528
|
if (eventName == AdaptableStore_1.INIT_STATE) {
|
|
522
|
-
this._adaptableReady = true;
|
|
523
529
|
LoggingHelper_1.LogAdaptableInfo(`Updating obsolete configuration/state`);
|
|
524
530
|
this.adaptableModules.forEach((m) => m.updateOldConfig());
|
|
525
531
|
// call stuff here
|
|
526
532
|
// and reset state also?
|
|
527
533
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
534
|
+
this._adaptableReady = true;
|
|
535
|
+
// setTimeout(() => {
|
|
528
536
|
this.api.eventApi.emit('AdaptableReady', {
|
|
529
537
|
adaptableApi: this.api,
|
|
530
538
|
gridOptions: this.adaptableOptions.gridOptions,
|
|
531
539
|
});
|
|
540
|
+
// }, 0);
|
|
532
541
|
}
|
|
533
542
|
});
|
|
534
543
|
}
|
|
@@ -569,39 +578,19 @@ class Adaptable {
|
|
|
569
578
|
// this.gridOptions.components.__adaptableGroupCellRenderer = AdaptableGroupCellRenderer;
|
|
570
579
|
// }
|
|
571
580
|
}
|
|
572
|
-
|
|
573
|
-
if (
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
else if (sidebar === 'columns') {
|
|
584
|
-
// Possibility 2: Sidebar is 'columns' (string) - meaning column only so create just that
|
|
585
|
-
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(false, true);
|
|
586
|
-
}
|
|
587
|
-
else if (sidebar === 'filters') {
|
|
588
|
-
// Possibility 3: Sidebar is 'filters' (string) - meaning filters only so create just that
|
|
589
|
-
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(true, false);
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
// Possibilty 4: either no sidebar or they created their own; in either case, should add adaptable Tool panel
|
|
593
|
-
const sidebarDef = this.gridOptions.sideBar;
|
|
594
|
-
if (sidebarDef) {
|
|
595
|
-
sidebarDef.toolPanels = sidebarDef.toolPanels || [];
|
|
596
|
-
sidebarDef.toolPanels.push(this.agGridHelper.createAdaptableToolPanel());
|
|
597
|
-
this.agGridHelper.orderToolPanels(sidebarDef.toolPanels);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
|
|
601
|
-
if (this.gridOptions.api) {
|
|
602
|
-
this.gridOptions.api.setSideBar(this.gridOptions.sideBar);
|
|
603
|
-
}
|
|
581
|
+
const adaptableSideBarDef = this.createAdaptableSideBarDef();
|
|
582
|
+
if (!!adaptableSideBarDef) {
|
|
583
|
+
this.gridOptions.components = this.gridOptions.components || {};
|
|
584
|
+
this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
|
|
585
|
+
}
|
|
586
|
+
if (this.agGridHelper.isSideBarDefObject(adaptableSideBarDef)) {
|
|
587
|
+
if (this.gridOptions.api) {
|
|
588
|
+
this.gridOptions.api.setSideBar(adaptableSideBarDef);
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
this.gridOptions.sideBar = adaptableSideBarDef;
|
|
604
592
|
}
|
|
593
|
+
this.hasAdaptableToolPanel = true;
|
|
605
594
|
}
|
|
606
595
|
this.createStatusBars();
|
|
607
596
|
const checkAgGridContainer = () => {
|
|
@@ -683,6 +672,50 @@ class Adaptable {
|
|
|
683
672
|
}
|
|
684
673
|
return (this.adaptableOptions.containerOptions.agGridContainer = agGridContainer);
|
|
685
674
|
}
|
|
675
|
+
createAdaptableSideBarDef() {
|
|
676
|
+
var _a;
|
|
677
|
+
if (
|
|
678
|
+
// no need to create the sidebar if it is not enabled
|
|
679
|
+
!this.gridOptions.sideBar) {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
if (this.gridOptions.sideBar === true) {
|
|
683
|
+
// create all tool panels with default settings
|
|
684
|
+
return {
|
|
685
|
+
toolPanels: [
|
|
686
|
+
GeneralConstants.AGGRID_TOOLPANEL_FILTERS,
|
|
687
|
+
GeneralConstants.AGGRID_TOOLPANEL_COLUMNS,
|
|
688
|
+
this.agGridHelper.buildAdaptableToolPanelDef(),
|
|
689
|
+
],
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
else if (typeof this.gridOptions.sideBar === 'string') {
|
|
693
|
+
// there is only one tool panel, and it's the adaptable one => we have to handle it
|
|
694
|
+
if (this.gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
|
|
695
|
+
return {
|
|
696
|
+
toolPanels: [this.agGridHelper.buildAdaptableToolPanelDef()],
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
else if (Array.isArray(this.gridOptions.sideBar)) {
|
|
701
|
+
if (!this.gridOptions.sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
// if it's an array, process the tool panel definitions
|
|
705
|
+
const sidebarDef = {};
|
|
706
|
+
sidebarDef.toolPanels = this.agGridHelper.mapToolPanelDefs(this.gridOptions.sideBar);
|
|
707
|
+
return sidebarDef;
|
|
708
|
+
}
|
|
709
|
+
else if (this.agGridHelper.isSideBarDefObject(this.gridOptions.sideBar)) {
|
|
710
|
+
if ((_a = this.gridOptions.sideBar.toolPanels) === null || _a === void 0 ? void 0 : _a.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
|
|
711
|
+
toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
|
|
712
|
+
// return the boolean flag so that we know that we need the custom AdaptableToolPanel component
|
|
713
|
+
return true;
|
|
714
|
+
}
|
|
715
|
+
// if it's fully-fledged SideBarDef, process its tool panel definitions
|
|
716
|
+
return Object.assign(Object.assign({}, this.gridOptions.sideBar), { toolPanels: this.agGridHelper.mapToolPanelDefs(this.gridOptions.sideBar.toolPanels) });
|
|
717
|
+
}
|
|
718
|
+
}
|
|
686
719
|
createStatusBars() {
|
|
687
720
|
var _a, _b;
|
|
688
721
|
const statusBarOptions = Object.assign({}, this.gridOptions.statusBar);
|
|
@@ -2151,11 +2184,11 @@ class Adaptable {
|
|
|
2151
2184
|
}
|
|
2152
2185
|
}
|
|
2153
2186
|
getColDefsForRowEditColumns() {
|
|
2154
|
-
|
|
2155
|
-
if (!(
|
|
2187
|
+
const actionRowButtons = this.adaptableOptions.userInterfaceOptions.actionOptions.actionRowButtons;
|
|
2188
|
+
if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
|
|
2156
2189
|
return [];
|
|
2157
2190
|
}
|
|
2158
|
-
const editButtons =
|
|
2191
|
+
const editButtons = actionRowButtons
|
|
2159
2192
|
.map((buttonName) => {
|
|
2160
2193
|
if (buttonName === 'edit') {
|
|
2161
2194
|
// we need this dirty hack until ActionColumn support for custom icons is improved
|
|
@@ -2219,7 +2252,8 @@ class Adaptable {
|
|
|
2219
2252
|
filter: false,
|
|
2220
2253
|
sortable: false,
|
|
2221
2254
|
enableRowGroup: false,
|
|
2222
|
-
pinned: this.adaptableOptions.userInterfaceOptions.
|
|
2255
|
+
pinned: this.adaptableOptions.userInterfaceOptions.actionOptions.actionRowButtonsPosition ===
|
|
2256
|
+
'pinnedRight'
|
|
2223
2257
|
? 'right'
|
|
2224
2258
|
: 'left',
|
|
2225
2259
|
cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
@@ -2709,6 +2743,7 @@ class Adaptable {
|
|
|
2709
2743
|
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2710
2744
|
all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
|
|
2711
2745
|
];
|
|
2746
|
+
// ADD filter event
|
|
2712
2747
|
this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
2713
2748
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
2714
2749
|
this.debouncedSaveGridLayout();
|
|
@@ -2722,7 +2757,7 @@ class Adaptable {
|
|
|
2722
2757
|
if (this.api.internalApi.isGridInPivotMode()) {
|
|
2723
2758
|
return;
|
|
2724
2759
|
}
|
|
2725
|
-
if (this.adaptableOptions.
|
|
2760
|
+
if (this.adaptableOptions.columnOptions.hideColumnWhenGrouped === true &&
|
|
2726
2761
|
params.source !== 'api') {
|
|
2727
2762
|
params.columns.forEach((col) => {
|
|
2728
2763
|
if (col.isVisible()) {
|
|
@@ -2822,7 +2857,7 @@ class Adaptable {
|
|
|
2822
2857
|
if (this.isDestroyed) {
|
|
2823
2858
|
return true;
|
|
2824
2859
|
}
|
|
2825
|
-
const columnFilters = this.api.
|
|
2860
|
+
const columnFilters = this.api.layoutApi.getAllColumnFilter();
|
|
2826
2861
|
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
|
|
2827
2862
|
const isQueryActive = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.api.queryApi.getCurrentQuery());
|
|
2828
2863
|
return (isFilterActive ||
|
|
@@ -2853,10 +2888,10 @@ class Adaptable {
|
|
|
2853
2888
|
try {
|
|
2854
2889
|
// we then assess filters (if running locally)
|
|
2855
2890
|
if (evaluateFilterOnClient) {
|
|
2856
|
-
const columnFilters = this.api.
|
|
2891
|
+
const columnFilters = this.api.layoutApi.getAllColumnFilter();
|
|
2857
2892
|
if (columnFilters.length > 0) {
|
|
2858
2893
|
for (const columnFilter of columnFilters) {
|
|
2859
|
-
if (!this.api.
|
|
2894
|
+
if (!this.api.layoutApi.evaluateColumnFilter(columnFilter, node)) {
|
|
2860
2895
|
return false;
|
|
2861
2896
|
}
|
|
2862
2897
|
}
|
|
@@ -2883,7 +2918,7 @@ class Adaptable {
|
|
|
2883
2918
|
this.prepareGrid();
|
|
2884
2919
|
}
|
|
2885
2920
|
updateColumnFilterActiveState() {
|
|
2886
|
-
const columnFilters = this.api.
|
|
2921
|
+
const columnFilters = this.api.layoutApi.getAllColumnFilter();
|
|
2887
2922
|
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
|
|
2888
2923
|
const columnsWithActiveFilters = {};
|
|
2889
2924
|
if (isFilterActive) {
|
|
@@ -3216,14 +3251,6 @@ class Adaptable {
|
|
|
3216
3251
|
const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
|
|
3217
3252
|
return previousColumnHeader !== newColumnHeader;
|
|
3218
3253
|
}
|
|
3219
|
-
getUserDefinedHeaderName(columnId) {
|
|
3220
|
-
const column = this.gridOptions.columnApi.getColumn(columnId);
|
|
3221
|
-
if (!column) {
|
|
3222
|
-
return columnId;
|
|
3223
|
-
}
|
|
3224
|
-
const userHeaderName = this.getUserColDefProperty(column.getColId(), 'headerName');
|
|
3225
|
-
return userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(column.getColDef().field);
|
|
3226
|
-
}
|
|
3227
3254
|
setupColumnFilter({ col, colDef }) {
|
|
3228
3255
|
this.setColDefProperty(col, 'filter', () => {
|
|
3229
3256
|
if (!colDef.filter) {
|
|
@@ -3703,7 +3730,7 @@ class Adaptable {
|
|
|
3703
3730
|
}
|
|
3704
3731
|
getRowCount() {
|
|
3705
3732
|
return this.gridOptions.rowData
|
|
3706
|
-
? this.
|
|
3733
|
+
? this.getGridData().length
|
|
3707
3734
|
: this.gridOptions.api.getDisplayedRowCount();
|
|
3708
3735
|
}
|
|
3709
3736
|
getColumnCount() {
|
|
@@ -15,7 +15,7 @@ exports.FilterWrapperFactory = (adaptable) => {
|
|
|
15
15
|
}
|
|
16
16
|
isFilterActive() {
|
|
17
17
|
//make the small filter icon to appear when there is a filter
|
|
18
|
-
return (adaptable.api.
|
|
18
|
+
return (adaptable.api.layoutApi
|
|
19
19
|
.getAllColumnFilter()
|
|
20
20
|
.findIndex((x) => x.ColumnId == this.params.column.getColId()) > -1);
|
|
21
21
|
}
|
|
@@ -3,7 +3,7 @@ import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
|
|
|
3
3
|
import { AdaptableColumn, AdaptableColumnGroup } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { AdaptableNodeComparerFunction } from '../PredefinedConfig/Common/AdaptableComparerFunction';
|
|
5
5
|
import { DataType } from '../PredefinedConfig/Common/Enums';
|
|
6
|
-
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
6
|
+
import { AdaptableColumnType, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
7
7
|
import { IModule } from '../Strategy/Interface/IModule';
|
|
8
8
|
import { IPPStyle } from '../Utilities/Interface/IPPStyle';
|
|
9
9
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
@@ -26,9 +26,9 @@ export declare class agGridHelper {
|
|
|
26
26
|
getCleanValue(value: string): string | undefined;
|
|
27
27
|
getRenderedValue(colDef: ColDef, valueToRender: any): any;
|
|
28
28
|
createAdaptableColumnFromAgGridColumn(agGridColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
buildAdaptableToolPanelDef(): ToolPanelDef;
|
|
30
|
+
isSideBarDefObject(sidebarDef: unknown): sidebarDef is SideBarDef;
|
|
31
|
+
mapToolPanelDefs(toolPanelDefs?: (ToolPanelDef | string)[]): (ToolPanelDef | string)[];
|
|
32
32
|
reselectSelectedCells(): void;
|
|
33
33
|
fireSelectionChangedEvent(): void;
|
|
34
34
|
private isColumnReadonly;
|
|
@@ -46,8 +46,8 @@ export declare class agGridHelper {
|
|
|
46
46
|
private isColumnGrouped;
|
|
47
47
|
private isColumnSparkline;
|
|
48
48
|
private getColumnDataType;
|
|
49
|
-
private
|
|
50
|
-
getAgGridDataType(dataType: DataType):
|
|
49
|
+
private getAbColDefValue;
|
|
50
|
+
getAgGridDataType(dataType: DataType): AdaptableColumnType;
|
|
51
51
|
checkShouldClearExistingFiltersOrSearches(): void;
|
|
52
52
|
runAdaptableGroupComparerFunction(): AdaptableNodeComparerFunction;
|
|
53
53
|
getCurrentIPPStyle(): IPPStyle;
|