@adaptabletools/adaptable 10.0.3 → 10.0.4-canary.3
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 +16 -6
- package/bundle.cjs.js +350 -0
- package/index.css +20 -6
- 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 +14 -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 +8 -8
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- 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 +29 -12
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +16 -5
- 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/Api/Events/BaseEventInfo.js +2 -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 +10 -10
- package/src/Api/Implementation/AlertApiImpl.js +17 -17
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -3
- package/src/Api/Implementation/ColumnApiImpl.js +43 -44
- package/src/Api/Implementation/ConfigApiImpl.js +0 -24
- 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 +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -2
- package/src/Api/Implementation/GridApiImpl.js +14 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -2
- package/src/Api/Implementation/InternalApiImpl.js +5 -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 +5 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +18 -13
- package/src/Api/InternalApi.d.ts +2 -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 +6 -5
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +2 -3
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
- 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 +3 -3
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- 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 +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -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/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 +21 -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 -2
- package/src/Strategy/ExportModule.js +1 -1
- 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 +8 -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/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/MetamodelService.js +0 -1
- package/src/Utilities/Services/ReportService.js +12 -11
- package/src/Utilities/Services/ValidationService.js +4 -5
- 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/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -3
- 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.js +18 -20
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -17
- 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/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.js +4 -4
- 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/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 +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +2 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- 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/agGrid/ActionColumnRenderer.js +1 -1
- package/src/agGrid/Adaptable.d.ts +9 -8
- package/src/agGrid/Adaptable.js +174 -132
- 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/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/ExpressionEditor/index.js +7 -7
- 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.js +1 -1
- 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 +104 -50
- package/src/metamodel/adaptable.metamodel.js +358 -300
- package/src/types.d.ts +2 -2
- 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/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -50,24 +50,23 @@ class FilterFormComponent extends React.Component {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
static createColumnFilterFromProps(props) {
|
|
53
|
-
let existingColumnFilter = props.columnFilters.find((cf) => cf.ColumnId == props.currentColumn.
|
|
53
|
+
let existingColumnFilter = props.columnFilters.find((cf) => cf.ColumnId == props.currentColumn.columnId);
|
|
54
54
|
if (!existingColumnFilter) {
|
|
55
|
-
const filterOptions = props.api.internalApi.getAdaptableOptions()
|
|
56
|
-
.filterOptions;
|
|
55
|
+
const filterOptions = props.api.internalApi.getAdaptableOptions().filterOptions;
|
|
57
56
|
if (filterOptions.defaultFilterFormTab == 'Values') {
|
|
58
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
57
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, 'Values', []);
|
|
59
58
|
}
|
|
60
|
-
if (props.currentColumn.
|
|
61
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
59
|
+
if (props.currentColumn.dataType === 'Number') {
|
|
60
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultNumericColumnFilter), ['']);
|
|
62
61
|
}
|
|
63
|
-
if (props.currentColumn.
|
|
64
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
62
|
+
if (props.currentColumn.dataType === 'String') {
|
|
63
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultStringColumnFilter), ['']);
|
|
65
64
|
}
|
|
66
|
-
if (props.currentColumn.
|
|
67
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
65
|
+
if (props.currentColumn.dataType === 'Date') {
|
|
66
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultDateColumnFilter), ['']);
|
|
68
67
|
}
|
|
69
|
-
if (props.currentColumn.
|
|
70
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
68
|
+
if (props.currentColumn.dataType === 'Boolean') {
|
|
69
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, 'BooleanToggle', [
|
|
71
70
|
'all',
|
|
72
71
|
]);
|
|
73
72
|
}
|
|
@@ -102,12 +101,12 @@ class FilterFormComponent extends React.Component {
|
|
|
102
101
|
this._isMounted = false;
|
|
103
102
|
}
|
|
104
103
|
componentDidMount() {
|
|
105
|
-
if (this.props.currentColumn.
|
|
104
|
+
if (this.props.currentColumn.dataType != Enums_1.DataType.Boolean) {
|
|
106
105
|
this.loadPermittedValues();
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
108
|
async loadPermittedValues(filter = '') {
|
|
110
|
-
const { values: distinctColumnValues, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.
|
|
109
|
+
const { values: distinctColumnValues, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
|
|
111
110
|
if (!this._isMounted) {
|
|
112
111
|
return;
|
|
113
112
|
}
|
|
@@ -120,8 +119,7 @@ class FilterFormComponent extends React.Component {
|
|
|
120
119
|
render() {
|
|
121
120
|
var _a, _b;
|
|
122
121
|
let isFilterable = this.isFilterable();
|
|
123
|
-
const filterOptions = this.props.api.internalApi.getAdaptableOptions()
|
|
124
|
-
.filterOptions;
|
|
122
|
+
const filterOptions = this.props.api.internalApi.getAdaptableOptions().filterOptions;
|
|
125
123
|
const predicateDefs = this.props.api.filterApi
|
|
126
124
|
.getFilterPredicateDefsForColumn(this.props.currentColumn)
|
|
127
125
|
.filter((predicate) => !predicate.onlyQuickFilter);
|
|
@@ -133,15 +131,15 @@ class FilterFormComponent extends React.Component {
|
|
|
133
131
|
Helper_1.default.objectNotExists(this.state.editedColumnFilter.Predicate.PredicateId);
|
|
134
132
|
let closeButton = (React.createElement(ButtonClose_1.ButtonClose, { onClick: () => this.onCloseForm(), tooltip: null, accessLevel: 'Full' }));
|
|
135
133
|
let clearFilterButton = (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.onClearFilter(), disabled: isEmptyFilter, tooltip: null, accessLevel: 'Full', showText: true, showIcon: false }));
|
|
136
|
-
const
|
|
137
|
-
return (React.createElement("div", { "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false,
|
|
134
|
+
const useAgGridStyle = !!filterOptions.useAgGridFilterFormStyle;
|
|
135
|
+
return (React.createElement("div", { "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement("div", null,
|
|
138
136
|
this.state.showTab && (React.createElement("div", null,
|
|
139
137
|
React.createElement(Radio_1.default, { marginLeft: 1, flex: 1, checked: this.state.currentTab == 'values', onChange: () => this.setState({ currentTab: 'values' }) },
|
|
140
138
|
React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Column Values")),
|
|
141
139
|
React.createElement(Radio_1.default, { marginLeft: 2, flex: 1, checked: this.state.currentTab == 'predicates', onChange: () => this.setState({ currentTab: 'predicates' }) },
|
|
142
140
|
React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Filters")))),
|
|
143
141
|
this.state.currentTab === 'values' && (React.createElement("div", null,
|
|
144
|
-
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: this.props.columns, columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.
|
|
142
|
+
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: this.props.columns, columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: uiSelectedColumnValues, useAgGridStyle: useAgGridStyle, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) }))),
|
|
145
143
|
this.state.currentTab === 'predicates' && (React.createElement("div", null,
|
|
146
144
|
' ',
|
|
147
145
|
this.state.showTab && React.createElement("hr", null),
|
|
@@ -185,7 +183,7 @@ class FilterFormComponent extends React.Component {
|
|
|
185
183
|
} }))));
|
|
186
184
|
}
|
|
187
185
|
isFilterable() {
|
|
188
|
-
if (!this.props.currentColumn.
|
|
186
|
+
if (!this.props.currentColumn.filterable) {
|
|
189
187
|
return 'Column is not filterable';
|
|
190
188
|
}
|
|
191
189
|
return '';
|
|
@@ -4,7 +4,7 @@ import { ListGroupProps } from '../../../components/List/ListGroup';
|
|
|
4
4
|
export interface ListBoxFilterFormProps extends ListGroupProps {
|
|
5
5
|
currentColumn: AdaptableColumn;
|
|
6
6
|
columns: AdaptableColumn[];
|
|
7
|
-
|
|
7
|
+
useAgGridStyle?: boolean;
|
|
8
8
|
columnDistinctValues: any[];
|
|
9
9
|
uiSelectedColumnValues: Array<string>;
|
|
10
10
|
onColumnValueSelectedChange: (SelectedValues: Array<any>) => void;
|
|
@@ -26,7 +26,7 @@ exports.ListBoxFilterForm = (props) => {
|
|
|
26
26
|
react_1.useEffect(() => {
|
|
27
27
|
internalUpdateUISelectedColumnValues(props.uiSelectedColumnValues);
|
|
28
28
|
}, [props.uiSelectedColumnValues]);
|
|
29
|
-
const
|
|
29
|
+
const renderItemForAgGridStyle = (props) => {
|
|
30
30
|
return (React.createElement(CheckBox_1.CheckBox, Object.assign({}, props, { variant: "agGrid", fontSize: 2, marginTop: 1, marginBottom: 1, marginLeft: 1, marginRight: 1 })));
|
|
31
31
|
};
|
|
32
32
|
const onClickItemColumnValue = (item) => {
|
|
@@ -51,15 +51,15 @@ exports.ListBoxFilterForm = (props) => {
|
|
|
51
51
|
columnValue.toLocaleLowerCase().indexOf(FilterValue.toLocaleLowerCase()) < 0) {
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
if (props.
|
|
55
|
-
return
|
|
54
|
+
if (props.useAgGridStyle) {
|
|
55
|
+
return renderItemForAgGridStyle({
|
|
56
56
|
key: 'columnValue' + y,
|
|
57
57
|
children: columnValue,
|
|
58
58
|
checked: isActive,
|
|
59
59
|
onChange: () => onClickItemColumnValue(x),
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
return (React.createElement(ListGroupItem_1.default, { noZebra: props.
|
|
62
|
+
return (React.createElement(ListGroupItem_1.default, { noZebra: props.useAgGridStyle, key: 'columnValue' + y, onClick: () => onClickItemColumnValue(x), active: isActive, value: columnValue }, columnValue));
|
|
63
63
|
});
|
|
64
64
|
const textClear = (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { autoFocus: true, type: "text", placeholder: "Search Column Values", value: FilterValue, style: {
|
|
65
65
|
paddingTop: 'var(--ab-space-1)',
|
|
@@ -68,10 +68,10 @@ exports.ListBoxFilterForm = (props) => {
|
|
|
68
68
|
borderRadius: 'var(--ab__border-radius)',
|
|
69
69
|
}, OnTextChange: handleFilterValueChange }));
|
|
70
70
|
const baseClassName = 'ab-ListBoxFilterForm';
|
|
71
|
-
return (React.createElement("div", { className: join_1.default(baseClassName, props.
|
|
71
|
+
return (React.createElement("div", { className: join_1.default(baseClassName, props.useAgGridStyle ? `${baseClassName}--aggrid-style` : null, props.isLoading && `${baseClassName}--loading`) },
|
|
72
72
|
React.createElement(rebass_1.Box, { px: 2 },
|
|
73
|
-
React.createElement(rebass_1.Box, { mx: props.
|
|
73
|
+
React.createElement(rebass_1.Box, { mx: props.useAgGridStyle ? 0 : '2px', marginBottom: 2 },
|
|
74
74
|
textClear,
|
|
75
75
|
props.isLoading && React.createElement(Loader_1.Loader, null, "Loading"))),
|
|
76
|
-
!props.isLoading && (React.createElement(GridList_1.default, { showZebraRows: false, className: !props.
|
|
76
|
+
!props.isLoading && (React.createElement(GridList_1.default, { showZebraRows: false, className: !props.useAgGridStyle ? 'ab-padding-horizontal-0' : '' }, columnValuesItemsElements))));
|
|
77
77
|
};
|
|
@@ -29,7 +29,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
this.loadPermittedValues = async (filter = '') => {
|
|
32
|
-
const { values, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.
|
|
32
|
+
const { values, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
|
|
33
33
|
if (!this._isMounted) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
@@ -71,32 +71,32 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
getFilterFromProps(props = this.props) {
|
|
74
|
-
const filter = props.columnFilters.find((cf) => cf.ColumnId == props.currentColumn.
|
|
74
|
+
const filter = props.columnFilters.find((cf) => cf.ColumnId == props.currentColumn.columnId);
|
|
75
75
|
const filterOptions = props.api.internalApi.getAdaptableOptions().filterOptions;
|
|
76
76
|
if (filter) {
|
|
77
77
|
return filter;
|
|
78
78
|
}
|
|
79
|
-
if (!filter && props.currentColumn.
|
|
80
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
79
|
+
if (!filter && props.currentColumn.dataType === 'Number') {
|
|
80
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultNumericColumnFilter), ['']);
|
|
81
81
|
}
|
|
82
|
-
if (!filter && props.currentColumn.
|
|
83
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
82
|
+
if (!filter && props.currentColumn.dataType === 'String') {
|
|
83
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultStringColumnFilter), ['']);
|
|
84
84
|
}
|
|
85
|
-
if (!filter && props.currentColumn.
|
|
86
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.
|
|
85
|
+
if (!filter && props.currentColumn.dataType === 'Date') {
|
|
86
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultDateColumnFilter), ['']);
|
|
87
87
|
}
|
|
88
|
-
if (!filter && props.currentColumn.
|
|
89
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.
|
|
88
|
+
if (!filter && props.currentColumn.dataType === 'Boolean') {
|
|
89
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.columnId, 'BooleanToggle', [
|
|
90
90
|
'all',
|
|
91
91
|
]);
|
|
92
92
|
}
|
|
93
|
-
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.
|
|
93
|
+
return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.columnId, null, null);
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
96
|
const { filter } = this.state;
|
|
97
97
|
const predicateDefs = this.props.api.filterApi.getFilterPredicateDefsForColumn(this.props.currentColumn);
|
|
98
98
|
const activePredicateDef = this.props.api.predicateApi.getPredicateDefById(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId);
|
|
99
|
-
if (!this.props.currentColumn || !this.props.currentColumn.
|
|
99
|
+
if (!this.props.currentColumn || !this.props.currentColumn.filterable) {
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
102
|
let showEvent = 'mouseenter';
|
|
@@ -106,14 +106,12 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
106
106
|
hideEvent = 'blur';
|
|
107
107
|
}
|
|
108
108
|
let showQuickFilterDropdown = true;
|
|
109
|
-
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
110
|
-
.filterOptions.hideQuickFilterDropdown;
|
|
109
|
+
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterDropdown;
|
|
111
110
|
if (hideQuickFilterDropdownFunction) {
|
|
112
111
|
showQuickFilterDropdown = !hideQuickFilterDropdownFunction(this.props.currentColumn);
|
|
113
112
|
}
|
|
114
113
|
let showQuickFilterInput = true;
|
|
115
|
-
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
116
|
-
.filterOptions.hideQuickFilterInput;
|
|
114
|
+
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterInput;
|
|
117
115
|
if (hideQuickFilterInputFunction) {
|
|
118
116
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
119
117
|
}
|
|
@@ -234,7 +232,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
234
232
|
React.createElement(SimpleButton_1.default, { onClick: () => this.clearFilter() }, "Clear Filter"),
|
|
235
233
|
((_a = this.props.api.internalApi.getAdaptableOptions().filterOptions) === null || _a === void 0 ? void 0 : _a.autoApplyFilter) ==
|
|
236
234
|
false && (React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => this.updateFilter(this.state.filter) }, "Apply Filter"))),
|
|
237
|
-
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: [], columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.
|
|
235
|
+
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: [], columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: this.state.filter.Predicate.Inputs, useAgGridStyle: true, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) })));
|
|
238
236
|
} },
|
|
239
237
|
React.createElement(SimpleButton_1.default, { style: {
|
|
240
238
|
flex: 1,
|
|
@@ -54,7 +54,7 @@ exports.renderScopeSummary = (scope, labels) => {
|
|
|
54
54
|
React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: 0 }, scopeApi.scopeIsAll(scope) ? labels.scopeWholeRow : null)),
|
|
55
55
|
React.createElement(rebass_1.Box, { style: { overflow: 'hidden' } }, 'ColumnIds' in scope ? (React.createElement(React.Fragment, null,
|
|
56
56
|
React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: columnsInScope.length ? 2 : 0 }, labels.scopeColumns),
|
|
57
|
-
columnsInScope.length ? (React.createElement(ValueSelector_1.ValueOptionsTags, { options: columnsInScope, value: columnsInScope.map((c) => c.
|
|
57
|
+
columnsInScope.length ? (React.createElement(ValueSelector_1.ValueOptionsTags, { options: columnsInScope, value: columnsInScope.map((c) => c.columnId), toLabel: (c) => c.friendlyName, allowWrap: true, readOnly: true, renderLabel: (c) => React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: 0 }, c), toIdentifier: (c) => c.columnId })) : null)) : null),
|
|
58
58
|
React.createElement(rebass_1.Box, null, 'DataTypes' in scope ? (React.createElement(React.Fragment, null,
|
|
59
59
|
React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, labels.scopeDataTypes),
|
|
60
60
|
React.createElement(ValueSelector_1.ValueOptionsTags, { readOnly: true, options: scope.DataTypes, value: scope.DataTypes, toLabel: (c) => c, allowWrap: true, renderLabel: (c) => React.createElement(rebass_1.Text, { fontSize: 2 }, `DataType: ${c}`), toIdentifier: (c) => c }))) : null)));
|
|
@@ -10,7 +10,7 @@ export interface FilterFormPanelProps extends PanelProps {
|
|
|
10
10
|
onFilterApplied: () => void;
|
|
11
11
|
IsAlwaysFilter: boolean;
|
|
12
12
|
showCloseButton: boolean;
|
|
13
|
-
|
|
13
|
+
useAgGridStyle: boolean;
|
|
14
14
|
applyFilterButtonDisabled: boolean;
|
|
15
15
|
autoApplyFilter: boolean;
|
|
16
16
|
}
|