@adaptabletools/adaptable 10.0.2 → 10.0.4-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +84 -32
- package/bundle.cjs.js +350 -0
- package/index.css +100 -34
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +24 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +22 -15
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +108 -6
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +49 -5
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +5 -8
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
- package/src/Api/Events/AlertFired.d.ts +2 -1
- package/src/Api/Events/BaseEventInfo.d.ts +10 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
- package/src/Api/Events/CellChanged.d.ts +2 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
- package/src/Api/Events/DashboardChanged.d.ts +2 -1
- package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
- package/src/Api/Events/GridDataChanged.d.ts +2 -1
- package/src/Api/Events/LayoutChanged.d.ts +2 -1
- package/src/Api/Events/LiveDataChanged.d.ts +2 -1
- package/src/Api/Events/SearchChanged.d.ts +2 -1
- package/src/Api/Events/SelectionChanged.d.ts +2 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
- package/src/Api/Events/ThemeChanged.d.ts +2 -1
- package/src/Api/GridApi.d.ts +44 -18
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +22 -15
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +12 -3
- package/src/Api/Implementation/ColumnApiImpl.js +79 -44
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -41
- package/src/Api/Implementation/DashboardApiImpl.js +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
- package/src/Api/Implementation/GridApiImpl.js +30 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -2
- package/src/Api/Implementation/InternalApiImpl.js +21 -5
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +19 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +15 -11
- package/src/Api/Implementation/UserInterfaceApiImpl.js +73 -91
- package/src/Api/InternalApi.d.ts +4 -2
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +19 -9
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +5 -1
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -38
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +3 -3
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +11 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +25 -16
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +13 -105
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +7 -7
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -4
- package/src/Strategy/ExportModule.js +59 -62
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +22 -9
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +8 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
- package/src/Utilities/Helpers/DateHelper.js +30 -20
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +14 -2
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/ReportService.js +13 -12
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +57 -38
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +18 -9
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +74 -35
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +21 -4
- package/src/agGrid/Adaptable.d.ts +28 -11
- package/src/agGrid/Adaptable.js +326 -168
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +46 -46
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +55 -47
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/ExpressionEditor/index.js +7 -7
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +176 -52
- package/src/metamodel/adaptable.metamodel.js +659 -366
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -18,7 +18,7 @@ class FilterSummaryComponent extends React.Component {
|
|
|
18
18
|
this.state = UIHelper_1.UIHelper.getEmptyConfigState();
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
let columnFilter = this.props.ColumnFilters.find((c) => c.ColumnId == this.props.summarisedColumn.
|
|
21
|
+
let columnFilter = this.props.ColumnFilters.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
22
22
|
let description = this.getDescription(columnFilter);
|
|
23
23
|
let summaryItems = [];
|
|
24
24
|
summaryItems.push(React.createElement("b", null, React.createElement(ModuleProfile_1.ModuleProfile, { moduleInfo: this.props.moduleInfo })));
|
|
@@ -27,7 +27,7 @@ class FilterSummaryComponent extends React.Component {
|
|
|
27
27
|
return React.createElement(SummaryRowItem_1.SummaryRowItem, { SummaryItems: summaryItems });
|
|
28
28
|
}
|
|
29
29
|
getDescription(columnFilter) {
|
|
30
|
-
if (this.props.summarisedColumn && !this.props.summarisedColumn.
|
|
30
|
+
if (this.props.summarisedColumn && !this.props.summarisedColumn.filterable) {
|
|
31
31
|
return 'Column is not filterable';
|
|
32
32
|
}
|
|
33
33
|
if (columnFilter == null) {
|
|
@@ -55,7 +55,7 @@ class FormatColumnPopupComponent extends React.Component {
|
|
|
55
55
|
if (this.props.popupParams.action == 'New') {
|
|
56
56
|
let newFormatColumn = ObjectFactory_1.ObjectFactory.CreateEmptyFormatColumn();
|
|
57
57
|
newFormatColumn.Scope = {
|
|
58
|
-
ColumnIds: [column.
|
|
58
|
+
ColumnIds: [column.columnId],
|
|
59
59
|
};
|
|
60
60
|
this.onNewFromColumn(newFormatColumn);
|
|
61
61
|
}
|
|
@@ -51,7 +51,7 @@ class FormatColumnSummaryComponent extends React.Component {
|
|
|
51
51
|
onNew() {
|
|
52
52
|
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFormatColumn();
|
|
53
53
|
configEntity.Scope = {
|
|
54
|
-
ColumnIds: [this.props.summarisedColumn.
|
|
54
|
+
ColumnIds: [this.props.summarisedColumn.columnId],
|
|
55
55
|
};
|
|
56
56
|
this.setState({
|
|
57
57
|
editedAdaptableObject: configEntity,
|
|
@@ -104,7 +104,7 @@ exports.getFormatDisplayTypeForScope = (scope, api) => {
|
|
|
104
104
|
// need to see if all columns are numeric or date
|
|
105
105
|
if ('ColumnIds' in scope) {
|
|
106
106
|
const columns = scope.ColumnIds.map((c) => api.columnApi.getColumnFromId(c));
|
|
107
|
-
const columnDataTypes = uniq_1.default(columns.map((c) => c.
|
|
107
|
+
const columnDataTypes = uniq_1.default(columns.map((c) => c.dataType));
|
|
108
108
|
if (columnDataTypes.length == 1 && columnDataTypes[0] == 'Number') {
|
|
109
109
|
return 'Number';
|
|
110
110
|
}
|
|
@@ -44,7 +44,7 @@ class FreeTextColumnPopupComponent extends React.Component {
|
|
|
44
44
|
if (this.props.popupParams) {
|
|
45
45
|
if (this.props.popupParams.action && this.props.popupParams.column) {
|
|
46
46
|
if (this.props.popupParams.action == 'Edit') {
|
|
47
|
-
let editFreeTextColumn = this.props.FreeTextColumns.find((x) => x.ColumnId == this.props.popupParams.column.
|
|
47
|
+
let editFreeTextColumn = this.props.FreeTextColumns.find((x) => x.ColumnId == this.props.popupParams.column.columnId);
|
|
48
48
|
let index = this.props.FreeTextColumns.indexOf(editFreeTextColumn);
|
|
49
49
|
this.onEdit(editFreeTextColumn);
|
|
50
50
|
}
|
|
@@ -74,7 +74,9 @@ class FreeTextColumnPopupComponent extends React.Component {
|
|
|
74
74
|
this.state.editedAdaptableObject != null && (React.createElement(FreeTextColumnWizard_1.FreeTextColumnWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.FreeTextColumns, wizardStartIndex: this.state.wizardStartIndex, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard })))));
|
|
75
75
|
}
|
|
76
76
|
onNew() {
|
|
77
|
-
const
|
|
77
|
+
const specialColumnsAreFilterable = this.props.api.internalApi.getAdaptableOptions()
|
|
78
|
+
.filterOptions.enableFilterOnSpecialColumns;
|
|
79
|
+
const editedAdaptableObject = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn(specialColumnsAreFilterable);
|
|
78
80
|
// we want to do this here, as we need a way to differentiate in the wizard
|
|
79
81
|
// if it's a new or existing column
|
|
80
82
|
delete editedAdaptableObject.Uuid;
|
|
@@ -35,7 +35,7 @@ class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
35
35
|
this.state = UIHelper_1.UIHelper.getEmptyConfigState();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
let freeTextColumn = this.props.FreeTextColumns.find((c) => c.ColumnId == this.props.summarisedColumn.
|
|
38
|
+
let freeTextColumn = this.props.FreeTextColumns.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
39
39
|
let noFreeTextColumn = freeTextColumn == null;
|
|
40
40
|
let FreeTextColumnRow;
|
|
41
41
|
if (!noFreeTextColumn) {
|
|
@@ -49,8 +49,10 @@ class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
49
49
|
this.state.editedAdaptableObject && (React.createElement(FreeTextColumnWizard_1.FreeTextColumnWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.FreeTextColumns, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
|
|
50
50
|
}
|
|
51
51
|
onNew() {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const specialColumnsAreFilterable = this.props.api.internalApi.getAdaptableOptions()
|
|
53
|
+
.filterOptions.enableFilterOnSpecialColumns;
|
|
54
|
+
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn(specialColumnsAreFilterable);
|
|
55
|
+
configEntity.ColumnId = this.props.summarisedColumn.columnId;
|
|
54
56
|
this.setState({
|
|
55
57
|
editedAdaptableObject: configEntity,
|
|
56
58
|
wizardStartIndex: 1,
|
|
@@ -47,7 +47,7 @@ exports.isValidFreeTextColumn = (data, api) => {
|
|
|
47
47
|
if (!data.ColumnId) {
|
|
48
48
|
return 'Column id cannot be empty';
|
|
49
49
|
}
|
|
50
|
-
const columnsWithSameIdCount = columns.filter((c) => c.
|
|
50
|
+
const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
|
|
51
51
|
const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
|
|
52
52
|
if (hasAlreadyExistingId) {
|
|
53
53
|
return 'A Column already exists with that id';
|
|
@@ -31,36 +31,36 @@ class ColumnInfoComponent extends React.Component {
|
|
|
31
31
|
{ Content: '', Size: 2 },
|
|
32
32
|
];
|
|
33
33
|
let selectedColumnId = this.state.SelectedColumn
|
|
34
|
-
? this.state.SelectedColumn.
|
|
34
|
+
? this.state.SelectedColumn.columnId
|
|
35
35
|
: null;
|
|
36
36
|
let keyValuePairs = [
|
|
37
37
|
{
|
|
38
38
|
Key: 'Column Id',
|
|
39
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
39
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.columnId : null,
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
Key: 'Header',
|
|
43
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
43
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.friendlyName : null,
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
Key: 'Aggregatable',
|
|
47
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
47
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.aggregatable : null,
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
Key: 'DataType',
|
|
51
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
51
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.dataType : null,
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
Key: 'Groupable',
|
|
55
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
55
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.groupable : null,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
Key: 'Filterable',
|
|
59
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
59
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.filterable : null,
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
Key: 'Hideable',
|
|
63
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
63
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.hideable : null,
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
Key: 'Editable',
|
|
@@ -68,27 +68,27 @@ class ColumnInfoComponent extends React.Component {
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
Key: 'Moveable',
|
|
71
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
71
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.moveable : null,
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
Key: 'Pivotable',
|
|
75
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
75
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.pivotable : null,
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
Key: 'Queryable',
|
|
79
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
79
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.queryable : null,
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
Key: 'Sortable',
|
|
83
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
83
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.sortable : null,
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
Key: 'Visible',
|
|
87
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
87
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.visible : null,
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
Key: 'Grouped',
|
|
91
|
-
Value: this.state.SelectedColumn ? this.state.SelectedColumn.
|
|
91
|
+
Value: this.state.SelectedColumn ? this.state.SelectedColumn.isGrouped : null,
|
|
92
92
|
},
|
|
93
93
|
];
|
|
94
94
|
let moduleService = this.props.api.internalApi.getModuleService();
|
|
@@ -125,14 +125,14 @@ class ColumnInfoComponent extends React.Component {
|
|
|
125
125
|
React.createElement(FreeTextColumnSummary_1.FreeTextColumnSummary, { key: ModuleConstants.FreeTextColumnModuleId, summarisedColumn: this.state.SelectedColumn, teamSharingActivated: this.props.teamSharingActivated, accessLevel: this.getAccessLevel(ModuleConstants.FreeTextColumnModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.FreeTextColumnModuleId) })));
|
|
126
126
|
}
|
|
127
127
|
if (this.isModuleAvailable(ModuleConstants.PlusMinusModuleId) &&
|
|
128
|
-
this.state.SelectedColumn.
|
|
128
|
+
this.state.SelectedColumn.dataType == Enums_1.DataType.Number) {
|
|
129
129
|
summaries.push(React.createElement("div", { key: ModuleConstants.PlusMinusModuleId, className: this.isModuleReadOnly(ModuleConstants.PlusMinusModuleId)
|
|
130
130
|
? GeneralConstants.READ_ONLY_STYLE
|
|
131
131
|
: '' },
|
|
132
132
|
React.createElement(PlusMinusSummary_1.PlusMinusSummary, { key: ModuleConstants.PlusMinusModuleId, summarisedColumn: this.state.SelectedColumn, teamSharingActivated: this.props.teamSharingActivated, accessLevel: this.getAccessLevel(ModuleConstants.PlusMinusModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.PlusMinusModuleId) })));
|
|
133
133
|
}
|
|
134
134
|
if (this.isModuleAvailable(ModuleConstants.CalculatedColumnModuleId) &&
|
|
135
|
-
ArrayExtensions_1.ArrayExtensions.ContainsItem(this.props.api.calculatedColumnApi.getAllCalculatedColumn().map((cc) => cc.ColumnId), this.state.SelectedColumn.
|
|
135
|
+
ArrayExtensions_1.ArrayExtensions.ContainsItem(this.props.api.calculatedColumnApi.getAllCalculatedColumn().map((cc) => cc.ColumnId), this.state.SelectedColumn.columnId)) {
|
|
136
136
|
summaries.push(React.createElement("div", { key: ModuleConstants.CalculatedColumnModuleId, className: this.isModuleReadOnly(ModuleConstants.CalculatedColumnModuleId)
|
|
137
137
|
? GeneralConstants.READ_ONLY_STYLE
|
|
138
138
|
: '' },
|
|
@@ -48,13 +48,16 @@ exports.GridInfoPopup = (props) => {
|
|
|
48
48
|
return props.api.columnApi.getFriendlyNameFromColumnId(gs.ColumnId) + ': ' + gs.SortOrder;
|
|
49
49
|
})
|
|
50
50
|
: null;
|
|
51
|
+
const selectedRowInfo = props.api.gridApi.getSelectedRowInfo();
|
|
51
52
|
returnRows.push(createReadOnlyColItem(colItems, 'AdapTable Version', version_1.default));
|
|
52
53
|
returnRows.push(createReadOnlyColItem(colItems, 'Sorted Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None'));
|
|
53
54
|
returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
|
|
54
55
|
returnRows.push(createReadOnlyColItem(colItems, 'All Rows', props.api.gridApi.getRowCount()));
|
|
55
56
|
returnRows.push(createReadOnlyColItem(colItems, 'Visible Rows', props.api.gridApi.getVisibleRowCount()));
|
|
57
|
+
returnRows.push(createReadOnlyColItem(colItems, 'Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.length));
|
|
58
|
+
returnRows.push(createReadOnlyColItem(colItems, 'Visible Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.filter((gr) => { var _a; return ((_a = gr.rowNode) === null || _a === void 0 ? void 0 : _a.displayed) == true; }).length));
|
|
56
59
|
returnRows.push(createReadOnlyColItem(colItems, 'All Columns', props.api.gridApi.getColumnCount()));
|
|
57
|
-
returnRows.push(createReadOnlyColItem(colItems, 'Visible
|
|
60
|
+
returnRows.push(createReadOnlyColItem(colItems, 'Visible Columns', props.api.gridApi.getVisibleColumnCount()));
|
|
58
61
|
returnRows.push(createReadOnlyColItem(colItems, 'Calculated Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(calcColumns) ? calcColumns : 'None'));
|
|
59
62
|
returnRows.push(createReadOnlyColItem(colItems, 'Free Text Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(freeTextColumns) ? freeTextColumns : 'None'));
|
|
60
63
|
returnRows.push(createReadOnlyColItem(colItems, 'Action Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(actionColumns) ? actionColumns : 'None'));
|
|
@@ -9,7 +9,7 @@ const CheckBox_1 = require("../../components/CheckBox");
|
|
|
9
9
|
class GridOptionsComponent extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
|
-
const gridOptions = props.api.internalApi.
|
|
12
|
+
const gridOptions = props.api.internalApi.getAgGridInstance();
|
|
13
13
|
this.state = {
|
|
14
14
|
testString: 'Hello world',
|
|
15
15
|
showTotalFooter: gridOptions.groupIncludeTotalFooter,
|
|
@@ -30,8 +30,8 @@ class LayoutViewPanelComponent extends React.Component {
|
|
|
30
30
|
});
|
|
31
31
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
32
32
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
33
|
-
React.createElement(rebass_1.Flex,
|
|
34
|
-
React.createElement(DropdownButton_1.default, { marginRight: 2, columns: ['label'], style: {
|
|
33
|
+
React.createElement(rebass_1.Flex, { flex: 1 },
|
|
34
|
+
React.createElement(DropdownButton_1.default, { marginRight: 2, columns: ['label'], style: { width: '100%', fontSize: 'small' }, className: `ab-${elementType}__Layout__select`, items: availableLayoutOptions, disabled: availableLayoutOptions.length == 0 }, layoutEntity ? layoutEntity.Name : null)),
|
|
35
35
|
React.createElement(rebass_1.Flex, { flexDirection: "row", className: join_1.default(this.props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Layout__wrap`) },
|
|
36
36
|
isManualSaveLayout && (React.createElement(ButtonSave_1.ButtonSave, { className: `ab-${elementType}__Layout__save`, onClick: () => this.onSaveLayout(), tooltip: "Save Changes to Current Layout", disabled: !this.props.CanSave, accessLevel: accessLevel })),
|
|
37
37
|
React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.onEditLayout(this.props.moduleInfo.Popup), tooltip: "Edit Layout", className: `ab-${elementType}__Layout__edit`, accessLevel: accessLevel }),
|
|
@@ -24,7 +24,7 @@ exports.ColumnList = (props) => {
|
|
|
24
24
|
source.droppableId !== destination.droppableId) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
if (!source.column || !source.column.
|
|
27
|
+
if (!source.column || !source.column.moveable) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
if (destination.index === source.index) {
|
|
@@ -36,8 +36,8 @@ exports.ColumnList = (props) => {
|
|
|
36
36
|
// cannot drop on this list while searching
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
if (!source.column.
|
|
40
|
-
newColumns.slice(newDropIndex).filter((c) => c.
|
|
39
|
+
if (!source.column.isFixed &&
|
|
40
|
+
newColumns.slice(newDropIndex).filter((c) => c.isFixed).length) {
|
|
41
41
|
// there are fixed cols after this one, so it's an invalid drop
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
@@ -59,7 +59,7 @@ exports.ColumnList = (props) => {
|
|
|
59
59
|
}, [onDragEnd]);
|
|
60
60
|
const renderColumn = react_2.useCallback((c) => {
|
|
61
61
|
const defaultRenderColumn = (c) => {
|
|
62
|
-
return React.createElement(React.Fragment, null, c.
|
|
62
|
+
return React.createElement(React.Fragment, null, c.friendlyName);
|
|
63
63
|
};
|
|
64
64
|
return (props.renderItem || defaultRenderColumn)(c);
|
|
65
65
|
}, [props.renderItem]);
|
|
@@ -68,11 +68,11 @@ exports.ColumnList = (props) => {
|
|
|
68
68
|
React.createElement(rebass_1.Box, { px: 2, mb: 2 },
|
|
69
69
|
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { placeholder: "Search a column", width: "100%", value: search, OnTextChange: setSearch })),
|
|
70
70
|
columns.map((c, index) => {
|
|
71
|
-
return (React.createElement(react_beautiful_dnd_1.Draggable, { key: `${c.
|
|
71
|
+
return (React.createElement(react_beautiful_dnd_1.Draggable, { key: `${c.columnId}-column`, draggableId: c.columnId, index: index }, (provided, snapshot) => {
|
|
72
72
|
const style = props.getItemStyle(c, snapshot, provided.draggableProps.style);
|
|
73
73
|
style.padding = 0;
|
|
74
74
|
if (search &&
|
|
75
|
-
c.
|
|
75
|
+
c.friendlyName.toLowerCase().indexOf(search.toLowerCase()) == -1) {
|
|
76
76
|
style.display = 'none';
|
|
77
77
|
}
|
|
78
78
|
return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__ColumnList__column", style: style }), renderColumn(c)));
|
|
@@ -10,9 +10,9 @@ exports.getItemStyle = (column, layout, dragSource, snapshot, draggableStyle) =>
|
|
|
10
10
|
if (dragSource == droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
11
11
|
draggingOver === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList &&
|
|
12
12
|
//if col not sortable or is already in the sort order
|
|
13
|
-
(!column.
|
|
13
|
+
(!column.sortable ||
|
|
14
14
|
(layout.ColumnSorts &&
|
|
15
|
-
layout.ColumnSorts.filter((sort) => sort.ColumnId === column.
|
|
15
|
+
layout.ColumnSorts.filter((sort) => sort.ColumnId === column.columnId)[0]))) {
|
|
16
16
|
}
|
|
17
17
|
//dragging things on the first column, from any other column
|
|
18
18
|
if (dragSource != droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
@@ -88,7 +88,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
88
88
|
const { layout } = state;
|
|
89
89
|
const allColumnsMap = React.useMemo(() => {
|
|
90
90
|
return allColumns.reduce((acc, col) => {
|
|
91
|
-
acc[col.
|
|
91
|
+
acc[col.columnId] = col;
|
|
92
92
|
return acc;
|
|
93
93
|
}, {});
|
|
94
94
|
}, [allColumns]);
|
|
@@ -99,7 +99,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
99
99
|
return col;
|
|
100
100
|
})
|
|
101
101
|
.concat(allColumns.filter((col) => {
|
|
102
|
-
return !tmpMap[col.
|
|
102
|
+
return !tmpMap[col.columnId];
|
|
103
103
|
}))
|
|
104
104
|
.filter((c) => c));
|
|
105
105
|
const setLayout = (layout) => {
|
|
@@ -118,7 +118,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
118
118
|
}, [props.layout]);
|
|
119
119
|
const visibleColumnsMap = React.useMemo(() => {
|
|
120
120
|
return allColumns.reduce((acc, col) => {
|
|
121
|
-
acc[col.
|
|
121
|
+
acc[col.columnId] = layout.Columns.indexOf(col.columnId) != -1 ? col : null;
|
|
122
122
|
return acc;
|
|
123
123
|
}, {});
|
|
124
124
|
}, [layout, allColumns]);
|
|
@@ -126,7 +126,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
126
126
|
return Object.keys(layout.AggregationColumns || {}).reduce((acc, colId) => {
|
|
127
127
|
let fn = layout.AggregationColumns[colId];
|
|
128
128
|
if (typeof fn === 'boolean') {
|
|
129
|
-
fn = allColumnsMap[colId].
|
|
129
|
+
fn = allColumnsMap[colId].aggregationFunction;
|
|
130
130
|
}
|
|
131
131
|
acc[colId] = fn;
|
|
132
132
|
return acc;
|
|
@@ -145,8 +145,8 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
145
145
|
const setColumnVisibility = (c, visible) => {
|
|
146
146
|
const newLayout = visible
|
|
147
147
|
? Object.assign(Object.assign({}, layout), { Columns: columnList
|
|
148
|
-
.filter((col) => visibleColumnsMap[col.
|
|
149
|
-
.map((c) => c.
|
|
148
|
+
.filter((col) => visibleColumnsMap[col.columnId] || col.columnId === c.columnId)
|
|
149
|
+
.map((c) => c.columnId) }) : Object.assign(Object.assign({}, layout), { Columns: layout.Columns.filter((colId) => colId !== c.columnId) });
|
|
150
150
|
const previousGroupCols = getAgGridGroupAutoColumn(layout);
|
|
151
151
|
const currentGroupCols = getAgGridGroupAutoColumn(newLayout);
|
|
152
152
|
if (previousGroupCols.length !== currentGroupCols.length) {
|
|
@@ -172,7 +172,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
172
172
|
}
|
|
173
173
|
if (source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList) {
|
|
174
174
|
source.column = columnList[source.index];
|
|
175
|
-
source.columnId = source.column.
|
|
175
|
+
source.columnId = source.column.columnId;
|
|
176
176
|
}
|
|
177
177
|
if (destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList) {
|
|
178
178
|
onDragEndRef.current.columnList(result);
|
|
@@ -192,7 +192,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
192
192
|
const dragSource = source.droppableId;
|
|
193
193
|
const column = dragSource === droppableIds_1.LayoutEditorDroppableIds.ColumnList ? allColumnsMap[draggableId] : null;
|
|
194
194
|
const invalidSourceForColumns = source.droppableId !== droppableIds_1.LayoutEditorDroppableIds.ColumnList;
|
|
195
|
-
const dropDisabledOnColumns = !column || !column.
|
|
195
|
+
const dropDisabledOnColumns = !column || !column.moveable || invalidSourceForColumns;
|
|
196
196
|
dispatch({
|
|
197
197
|
type: reducer_1.LayoutEditorActions.SET_DROP_DISABLED_ON_COLUMNS,
|
|
198
198
|
payload: dropDisabledOnColumns,
|
|
@@ -203,37 +203,37 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
203
203
|
});
|
|
204
204
|
const columnAlreadySorted = column &&
|
|
205
205
|
layout.ColumnSorts &&
|
|
206
|
-
!!layout.ColumnSorts.filter((c) => c.ColumnId === column.
|
|
206
|
+
!!layout.ColumnSorts.filter((c) => c.ColumnId === column.columnId)[0];
|
|
207
207
|
const invalidSourceForSort = dragSource !== droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
208
208
|
dragSource !== droppableIds_1.LayoutEditorDroppableIds.ColumnSortList;
|
|
209
|
-
const disableDropOnSort = invalidSourceForSort || columnAlreadySorted || (column && !column.
|
|
209
|
+
const disableDropOnSort = invalidSourceForSort || columnAlreadySorted || (column && !column.sortable);
|
|
210
210
|
dispatch({
|
|
211
211
|
type: reducer_1.LayoutEditorActions.SET_DROP_DISABLED_ON_SORT,
|
|
212
212
|
payload: !!disableDropOnSort,
|
|
213
213
|
});
|
|
214
214
|
const columnAlreadyRowGrouped = column && layout.RowGroupedColumns
|
|
215
|
-
? !!layout.RowGroupedColumns.filter((colId) => colId === column.
|
|
215
|
+
? !!layout.RowGroupedColumns.filter((colId) => colId === column.columnId)[0]
|
|
216
216
|
: false;
|
|
217
217
|
const invalidSourceForRowGroups = dragSource !== droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
218
218
|
dragSource !== droppableIds_1.LayoutEditorDroppableIds.RowGroupsList;
|
|
219
|
-
const disableDropOnRowGroups = invalidSourceForRowGroups || columnAlreadyRowGrouped || (column && !column.
|
|
219
|
+
const disableDropOnRowGroups = invalidSourceForRowGroups || columnAlreadyRowGrouped || (column && !column.groupable);
|
|
220
220
|
dispatch({
|
|
221
221
|
type: reducer_1.LayoutEditorActions.SET_DROP_DISABLED_ON_ROW_GROUPS,
|
|
222
222
|
payload: !!disableDropOnRowGroups,
|
|
223
223
|
});
|
|
224
224
|
const columnAlreadyPivoted = column && layout.PivotColumns
|
|
225
|
-
? !!layout.PivotColumns.filter((colId) => colId === column.
|
|
225
|
+
? !!layout.PivotColumns.filter((colId) => colId === column.columnId)[0]
|
|
226
226
|
: false;
|
|
227
227
|
const invalidSourceForPivot = dragSource !== droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
228
228
|
dragSource !== droppableIds_1.LayoutEditorDroppableIds.PivotList;
|
|
229
|
-
const disableDropOnPivot = invalidSourceForPivot || columnAlreadyPivoted || (column && !column.
|
|
229
|
+
const disableDropOnPivot = invalidSourceForPivot || columnAlreadyPivoted || (column && !column.pivotable);
|
|
230
230
|
dispatch({
|
|
231
231
|
type: reducer_1.LayoutEditorActions.SET_DROP_DISABLED_ON_PIVOT,
|
|
232
232
|
payload: !!disableDropOnPivot,
|
|
233
233
|
});
|
|
234
234
|
}, [state, layout]);
|
|
235
235
|
const onColumnOrderChange = react_1.useCallback((columns) => {
|
|
236
|
-
setLayout(Object.assign(Object.assign({}, layout), { Columns: columns.filter((c) => visibleColumnsMap[c.
|
|
236
|
+
setLayout(Object.assign(Object.assign({}, layout), { Columns: columns.filter((c) => visibleColumnsMap[c.columnId]).map((c) => c.columnId) }));
|
|
237
237
|
setColumnList(columns);
|
|
238
238
|
}, [visibleColumnsMap, layout]);
|
|
239
239
|
const onColumnSortsChange = react_1.useCallback((ColumnSorts) => {
|
|
@@ -257,16 +257,16 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
257
257
|
}, getItemStyle: (c, snapshot, draggableStyle) => {
|
|
258
258
|
return getItemStyle_1.getItemStyle(c, layout, state.dragSource, snapshot, draggableStyle);
|
|
259
259
|
}, columns: columnList, isDropDisabled: state.dropDisabledOnColumns, onColumnOrderChange: onColumnOrderChange, renderItem: (c) => {
|
|
260
|
-
const visible = !!visibleColumnsMap[c.
|
|
261
|
-
const aggregate = !!aggregationColumnsMap[c.
|
|
260
|
+
const visible = !!visibleColumnsMap[c.columnId];
|
|
261
|
+
const aggregate = !!aggregationColumnsMap[c.columnId];
|
|
262
262
|
// enable aggregation if there are row groups or pivoting is enabled
|
|
263
263
|
// const aggregateEnabled =
|
|
264
264
|
// (layout.RowGroupedColumns && layout.RowGroupedColumns.length) || layout.EnablePivot;
|
|
265
265
|
// JW: Not sure we do - why not just make it always visible as we ignore if if not required.
|
|
266
266
|
const aggregateEnabled = true;
|
|
267
|
-
const customHeader = headerColumnsMap[c.
|
|
268
|
-
const initialHeader = api.internalApi.getUserDefinedHeaderName(c.
|
|
269
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "stretch", "data-name": "drag-item", "data-col-id": c.
|
|
267
|
+
const customHeader = headerColumnsMap[c.columnId];
|
|
268
|
+
const initialHeader = api.internalApi.getUserDefinedHeaderName(c.columnId);
|
|
269
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "stretch", "data-name": "drag-item", "data-col-id": c.columnId },
|
|
270
270
|
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", backgroundColor: "secondary", color: "text-on-secondary" },
|
|
271
271
|
React.createElement(rebass_1.Flex, { flex: 1, alignItems: "center" },
|
|
272
272
|
React.createElement(rebass_1.Box, { ml: 2, mr: 2 },
|
|
@@ -279,18 +279,18 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
279
279
|
source: 'ContextMenu',
|
|
280
280
|
});
|
|
281
281
|
} }),
|
|
282
|
-
c.
|
|
282
|
+
c.columnGroup && c.columnGroup.groupCount > 1 ? (React.createElement(rebass_1.Box, { ml: 2, padding: 1, style: {
|
|
283
283
|
borderRadius: 'var(--ab__border-radius)',
|
|
284
284
|
background: 'var(--ab-color-defaultbackground)',
|
|
285
285
|
color: 'var(--ab-color-text-on-defaultbackground)',
|
|
286
286
|
} },
|
|
287
287
|
"Group: ",
|
|
288
|
-
c.
|
|
289
|
-
React.createElement(CheckBox_1.CheckBox, { title: "Visible", readOnly: !c.
|
|
288
|
+
c.columnGroup.friendlyName)) : null),
|
|
289
|
+
React.createElement(CheckBox_1.CheckBox, { title: "Visible", readOnly: !c.hideable && visible, checked: visible, mx: 2, style: {
|
|
290
290
|
whiteSpace: 'nowrap',
|
|
291
291
|
}, onChange: setColumnVisibility.bind(null, c) }, "Visible")),
|
|
292
292
|
React.createElement(rebass_1.Flex, { padding: 2, flexDirection: "column" },
|
|
293
|
-
React.createElement(ColumnLabels, { showTitle: true,
|
|
293
|
+
React.createElement(ColumnLabels, { showTitle: true, sortable: c.sortable, filterable: c.filterable, moveable: c.moveable, pivotable: c.pivotable, groupable: c.groupable, aggregatable: c.aggregatable }, ' '),
|
|
294
294
|
React.createElement(rebass_1.Flex, { flexDirection: "row", mt: 2 },
|
|
295
295
|
React.createElement(rebass_1.Flex, { flex: 3, alignItems: "baseline" },
|
|
296
296
|
React.createElement(rebass_1.Text, { fontSize: 3, mr: 2 }, "Header:"),
|
|
@@ -298,27 +298,27 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
298
298
|
const newTextValue = event.target.value;
|
|
299
299
|
const columnHeaders = Object.assign({}, layout.ColumnHeadersMap) || {};
|
|
300
300
|
if (StringExtensions_1.default.IsNullOrEmptyOrWhiteSpace(newTextValue)) {
|
|
301
|
-
delete columnHeaders[c.
|
|
301
|
+
delete columnHeaders[c.columnId];
|
|
302
302
|
}
|
|
303
303
|
else {
|
|
304
|
-
columnHeaders[c.
|
|
304
|
+
columnHeaders[c.columnId] = newTextValue;
|
|
305
305
|
}
|
|
306
306
|
setLayout(Object.assign(Object.assign({}, layout), { ColumnHeadersMap: columnHeaders }));
|
|
307
307
|
} })),
|
|
308
|
-
React.createElement(rebass_1.Flex, { flex: 2 }, c.
|
|
309
|
-
c.
|
|
310
|
-
c.
|
|
308
|
+
React.createElement(rebass_1.Flex, { flex: 2 }, c.aggregatable &&
|
|
309
|
+
c.availableAggregationFunctions &&
|
|
310
|
+
c.availableAggregationFunctions.length ? (React.createElement(CheckBox_1.CheckBox, { key: "checkbox", ml: 3, my: 0, disabled: !aggregateEnabled, onChange: (checked) => {
|
|
311
311
|
let aggCols = layout.AggregationColumns || {};
|
|
312
312
|
// const aggCols = new Set(layout.AggregationColumns);
|
|
313
313
|
if (checked) {
|
|
314
|
-
let aggFunc = c.
|
|
315
|
-
if (!aggFunc && c.
|
|
316
|
-
aggFunc = c.
|
|
314
|
+
let aggFunc = c.aggregationFunction;
|
|
315
|
+
if (!aggFunc && c.availableAggregationFunctions) {
|
|
316
|
+
aggFunc = c.availableAggregationFunctions[0];
|
|
317
317
|
}
|
|
318
|
-
aggCols[c.
|
|
318
|
+
aggCols[c.columnId] = aggFunc;
|
|
319
319
|
}
|
|
320
320
|
else {
|
|
321
|
-
delete aggCols[c.
|
|
321
|
+
delete aggCols[c.columnId];
|
|
322
322
|
if (!Object.keys(aggCols).length) {
|
|
323
323
|
aggCols = null;
|
|
324
324
|
}
|
|
@@ -328,7 +328,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
328
328
|
"Aggregate",
|
|
329
329
|
React.createElement(DropdownButton_1.default, { style: {
|
|
330
330
|
visibility: aggregate ? 'visible' : 'hidden',
|
|
331
|
-
}, ml: 2, padding: 0, columns: ['label'], variant: "text", items: c.
|
|
331
|
+
}, ml: 2, padding: 0, columns: ['label'], variant: "text", items: c.availableAggregationFunctions.map((fnName) => {
|
|
332
332
|
return {
|
|
333
333
|
label: fnName,
|
|
334
334
|
onClick: () => {
|
|
@@ -336,11 +336,11 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
336
336
|
if (!aggCols) {
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
aggCols[c.
|
|
339
|
+
aggCols[c.columnId] = fnName;
|
|
340
340
|
setLayout(Object.assign(Object.assign({}, layout), { AggregationColumns: aggCols }));
|
|
341
341
|
},
|
|
342
342
|
};
|
|
343
|
-
}) }, aggregationColumnsMap[c.
|
|
343
|
+
}) }, aggregationColumnsMap[c.columnId]))) : null)))));
|
|
344
344
|
} })),
|
|
345
345
|
React.createElement(ListPanel, { header: "Sorting", className: "ab-LayoutEditor__ColumnSortListPanel" },
|
|
346
346
|
React.createElement(ColumnSortList_1.ColumnSortList, { columnSorts: layout.ColumnSorts, onColumnSortsChange: onColumnSortsChange, isDropDisabled: state.dropDisabledOnSort, onReady: (dragEnd) => {
|
|
@@ -356,7 +356,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
356
356
|
React.createElement(rebass_1.Box, { ml: 2, mr: 3 },
|
|
357
357
|
React.createElement(icons_1.Icon, { name: "drag", size: 30 })),
|
|
358
358
|
React.createElement(rebass_1.Flex, { flex: "1", flexDirection: "row", alignItems: "center" },
|
|
359
|
-
column.
|
|
359
|
+
column.friendlyName,
|
|
360
360
|
" [",
|
|
361
361
|
c.SortOrder,
|
|
362
362
|
"]"),
|
|
@@ -381,7 +381,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
381
381
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", "data-name": "drag-item" },
|
|
382
382
|
React.createElement(rebass_1.Box, { ml: 2, mr: 3 },
|
|
383
383
|
React.createElement(icons_1.Icon, { name: "drag", size: 30 })),
|
|
384
|
-
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", flex: 1 }, column.
|
|
384
|
+
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", flex: 1 }, column.friendlyName),
|
|
385
385
|
React.createElement(SimpleButton_1.default, { variant: "text", onClick: (e) => {
|
|
386
386
|
e.stopPropagation();
|
|
387
387
|
clear();
|
|
@@ -400,7 +400,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
400
400
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", "data-name": "drag-item" },
|
|
401
401
|
React.createElement(rebass_1.Box, { ml: 2, mr: 3 },
|
|
402
402
|
React.createElement(icons_1.Icon, { name: "drag", size: 30 })),
|
|
403
|
-
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", flex: 1 }, column.
|
|
403
|
+
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", flex: 1 }, column.friendlyName),
|
|
404
404
|
React.createElement(SimpleButton_1.default, { variant: "text", onClick: (e) => {
|
|
405
405
|
e.stopPropagation();
|
|
406
406
|
clear();
|
|
@@ -424,5 +424,5 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
424
424
|
Groupable: 'Can form a row group',
|
|
425
425
|
Moveable: 'Is draggable and movable',
|
|
426
426
|
Pivotable: 'Eligible for pivoting',
|
|
427
|
-
},
|
|
427
|
+
}, sortable: true, filterable: true, moveable: true, pivotable: true, groupable: true, aggregatable: true })))));
|
|
428
428
|
}, areEqual);
|
|
@@ -45,7 +45,7 @@ class PlusMinusPopupComponent extends React.Component {
|
|
|
45
45
|
let column = this.props.popupParams.column;
|
|
46
46
|
let plusMinus = ObjectFactory_1.ObjectFactory.CreateEmptyPlusMinusNudge();
|
|
47
47
|
plusMinus.Scope = {
|
|
48
|
-
ColumnIds: [column.
|
|
48
|
+
ColumnIds: [column.columnId],
|
|
49
49
|
};
|
|
50
50
|
this.setState({
|
|
51
51
|
editedAdaptableObject: plusMinus,
|
|
@@ -40,7 +40,7 @@ class PlusMinusSummaryComponent extends React.Component {
|
|
|
40
40
|
onNew() {
|
|
41
41
|
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyPlusMinusNudge();
|
|
42
42
|
configEntity.Scope = {
|
|
43
|
-
ColumnIds: [this.props.summarisedColumn.
|
|
43
|
+
ColumnIds: [this.props.summarisedColumn.columnId],
|
|
44
44
|
};
|
|
45
45
|
this.setState({
|
|
46
46
|
editedAdaptableObject: configEntity,
|