@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
|
@@ -74,6 +74,9 @@ class ApiBase {
|
|
|
74
74
|
getOptions() {
|
|
75
75
|
return this.adaptable.adaptableOptions;
|
|
76
76
|
}
|
|
77
|
+
getColumnOptions() {
|
|
78
|
+
return this.getOptions().columnOptions;
|
|
79
|
+
}
|
|
77
80
|
getContainerOptions() {
|
|
78
81
|
return this.getOptions().containerOptions;
|
|
79
82
|
}
|
|
@@ -128,5 +131,8 @@ class ApiBase {
|
|
|
128
131
|
getAdaptableApi() {
|
|
129
132
|
return this.adaptable.api;
|
|
130
133
|
}
|
|
134
|
+
destroy() {
|
|
135
|
+
delete this.adaptable;
|
|
136
|
+
}
|
|
131
137
|
}
|
|
132
138
|
exports.ApiBase = ApiBase;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
|
+
import { AdaptableColumn, AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { DataType } from '../../PredefinedConfig/Common/Enums';
|
|
4
4
|
import { ColumnApi } from '../ColumnApi';
|
|
5
5
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
@@ -27,7 +27,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
27
27
|
isNumericColumn(column: AdaptableColumn): boolean;
|
|
28
28
|
isBooleanColumn(column: AdaptableColumn): boolean;
|
|
29
29
|
isDateColumn(column: AdaptableColumn): boolean;
|
|
30
|
-
getColumnDataTypeFromColumnId(columnId: string):
|
|
30
|
+
getColumnDataTypeFromColumnId(columnId: string): AdaptableColumnDataType | undefined;
|
|
31
31
|
getFriendlyNameFromColumn(columnId: string, column: AdaptableColumn): string;
|
|
32
32
|
getFriendlyNameFromColumnId(columnId: string): string;
|
|
33
33
|
getFriendlyNamesFromColumnIds(columnIds: string[]): string[];
|
|
@@ -268,8 +268,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
268
268
|
return this.getColumns().filter((c) => c.queryable);
|
|
269
269
|
}
|
|
270
270
|
LogMissingColumnWarning(columnId) {
|
|
271
|
-
if (this.adaptable.adaptableOptions.
|
|
272
|
-
this.adaptable.adaptableOptions.
|
|
271
|
+
if (this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning &&
|
|
272
|
+
this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning === true) {
|
|
273
273
|
if (!this.isAutoRowGroupColumn(columnId) &&
|
|
274
274
|
!this.isCalculatedColumn(columnId) &&
|
|
275
275
|
!this.isFreeTextColumn(columnId) &&
|
|
@@ -13,6 +13,8 @@ export declare class ConditionalStyleApiImpl extends ApiBase implements Conditio
|
|
|
13
13
|
getAllSuspendedConditionalStyle(): ConditionalStyle[];
|
|
14
14
|
editConditionalStyle(conditionalStyle: ConditionalStyle): ConditionalStyle;
|
|
15
15
|
editConditionalStyles(conditionalStyles: ConditionalStyle[]): ConditionalStyle[];
|
|
16
|
+
deleteConditionalStyles(conditionalStyles: ConditionalStyle[]): void;
|
|
17
|
+
deleteConditionalStyle(conditionalStyle: ConditionalStyle): void;
|
|
16
18
|
addConditionalStyle(conditionalStyle: ConditionalStyle): ConditionalStyle;
|
|
17
19
|
showConditionalStylePopup(): void;
|
|
18
20
|
getRowConditionalStyles(): ConditionalStyle[] | undefined;
|
|
@@ -33,6 +33,14 @@ class ConditionalStyleApiImpl extends ApiBase_1.ApiBase {
|
|
|
33
33
|
});
|
|
34
34
|
return conditionalStyles === null || conditionalStyles === void 0 ? void 0 : conditionalStyles.map((conditionalStyle) => this.getConditionalStyleById(conditionalStyle.Uuid));
|
|
35
35
|
}
|
|
36
|
+
deleteConditionalStyles(conditionalStyles) {
|
|
37
|
+
conditionalStyles.forEach((cs) => {
|
|
38
|
+
this.deleteConditionalStyle(cs);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
deleteConditionalStyle(conditionalStyle) {
|
|
42
|
+
this.dispatchAction(ConditionalStyleRedux.ConditionalStyleDelete(conditionalStyle));
|
|
43
|
+
}
|
|
36
44
|
addConditionalStyle(conditionalStyle) {
|
|
37
45
|
this.addUidToAdaptableObject(conditionalStyle);
|
|
38
46
|
this.dispatchAction(ConditionalStyleRedux.ConditionalStyleAdd(conditionalStyle));
|
|
@@ -5,7 +5,6 @@ import { PlusMinusState } from '../../PredefinedConfig/PlusMinusState';
|
|
|
5
5
|
import { LayoutState } from '../../PredefinedConfig/LayoutState';
|
|
6
6
|
import { FormatColumnState } from '../../PredefinedConfig/FormatColumnState';
|
|
7
7
|
import { ExportState } from '../../PredefinedConfig/ExportState';
|
|
8
|
-
import { DataSourceState } from '../../PredefinedConfig/DataSourceState';
|
|
9
8
|
import { DashboardState } from '../../PredefinedConfig/DashboardState';
|
|
10
9
|
import { CustomSortState } from '../../PredefinedConfig/CustomSortState';
|
|
11
10
|
import { ConditionalStyleState } from '../../PredefinedConfig/ConditionalStyleState';
|
|
@@ -16,7 +15,6 @@ import { AdaptablePersistentState, AdaptableState } from '../../PredefinedConfig
|
|
|
16
15
|
import { ApiBase } from './ApiBase';
|
|
17
16
|
import { ApplicationState } from '../../PredefinedConfig/ApplicationState';
|
|
18
17
|
import { FreeTextColumnState } from '../../PredefinedConfig/FreeTextColumnState';
|
|
19
|
-
import { FilterState } from '../../PredefinedConfig/FilterState';
|
|
20
18
|
import { ToolPanelState } from '../../PredefinedConfig/ToolPanelState';
|
|
21
19
|
import { ConfigApi } from '../ConfigApi';
|
|
22
20
|
import { AdaptableStateKey, AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
@@ -52,9 +50,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
|
52
50
|
getConditionalStyleState(returnJson?: boolean): ConditionalStyleState;
|
|
53
51
|
getCustomSortState(returnJson?: boolean): CustomSortState;
|
|
54
52
|
getDashboardState(returnJson?: boolean): DashboardState;
|
|
55
|
-
getDataSourceState(returnJson?: boolean): DataSourceState;
|
|
56
53
|
getExportState(returnJson?: boolean): ExportState;
|
|
57
|
-
getFilterState(returnJson?: boolean): FilterState;
|
|
58
54
|
getFreeTextColumnState(returnJson?: boolean): FreeTextColumnState;
|
|
59
55
|
getFormatColumnState(returnJson?: boolean): FormatColumnState;
|
|
60
56
|
getLayoutState(returnJson?: boolean): LayoutState;
|
|
@@ -13,9 +13,7 @@ const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducer
|
|
|
13
13
|
const CalculatedColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CalculatedColumnRedux"));
|
|
14
14
|
const ConditionalStyleRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ConditionalStyleRedux"));
|
|
15
15
|
const CustomSortRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CustomSortRedux"));
|
|
16
|
-
const DataSourceRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/DataSourceRedux"));
|
|
17
16
|
const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
|
|
18
|
-
const FilterRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FilterRedux"));
|
|
19
17
|
const FormatColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FormatColumnRedux"));
|
|
20
18
|
const FreeTextColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FreeTextColumnRedux"));
|
|
21
19
|
const PlusMinusRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PlusMinusRedux"));
|
|
@@ -88,12 +86,12 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
88
86
|
getAdaptableSearchState() {
|
|
89
87
|
const currentQuery = this.adaptable.api.queryApi.getCurrentQuery();
|
|
90
88
|
const adaptableSearchState = {
|
|
91
|
-
|
|
89
|
+
dataSet: this.adaptable.api.dataSetApi.getCurrentDataSet(),
|
|
92
90
|
currentQuery,
|
|
93
91
|
queryAST: currentQuery
|
|
94
92
|
? this.adaptable.api.queryLanguageApi.getASTForExpression(currentQuery)
|
|
95
93
|
: null,
|
|
96
|
-
columnFilters: this.adaptable.api.
|
|
94
|
+
columnFilters: this.adaptable.api.layoutApi.getAllColumnFilter(),
|
|
97
95
|
};
|
|
98
96
|
return adaptableSearchState;
|
|
99
97
|
}
|
|
@@ -168,18 +166,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
168
166
|
return returnJson
|
|
169
167
|
? JSON.stringify(this.getAdaptableState().Dashboard)
|
|
170
168
|
: this.getAdaptableState().Dashboard;
|
|
171
|
-
case 'DataSource':
|
|
172
|
-
return returnJson
|
|
173
|
-
? JSON.stringify(this.getAdaptableState().DataSource)
|
|
174
|
-
: this.getAdaptableState().DataSource;
|
|
175
169
|
case 'Export':
|
|
176
170
|
return returnJson
|
|
177
171
|
? JSON.stringify(this.getAdaptableState().Export)
|
|
178
172
|
: this.getAdaptableState().Export;
|
|
179
|
-
case 'Filter':
|
|
180
|
-
return returnJson
|
|
181
|
-
? JSON.stringify(this.getAdaptableState().Filter)
|
|
182
|
-
: this.getAdaptableState().Filter;
|
|
183
173
|
case 'FormatColumn':
|
|
184
174
|
return returnJson
|
|
185
175
|
? JSON.stringify(this.getAdaptableState().FormatColumn)
|
|
@@ -250,15 +240,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
250
240
|
getDashboardState(returnJson = false) {
|
|
251
241
|
return this.getUserStateByStateKey('Dashboard', returnJson);
|
|
252
242
|
}
|
|
253
|
-
getDataSourceState(returnJson = false) {
|
|
254
|
-
return this.getUserStateByStateKey('DataSource', returnJson);
|
|
255
|
-
}
|
|
256
243
|
getExportState(returnJson = false) {
|
|
257
244
|
return this.getUserStateByStateKey('Export', returnJson);
|
|
258
245
|
}
|
|
259
|
-
getFilterState(returnJson = false) {
|
|
260
|
-
return this.getUserStateByStateKey('Filter', returnJson);
|
|
261
|
-
}
|
|
262
246
|
getFreeTextColumnState(returnJson = false) {
|
|
263
247
|
return this.getUserStateByStateKey('FreeTextColumn', returnJson);
|
|
264
248
|
}
|
|
@@ -309,15 +293,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
309
293
|
case 'Dashboard':
|
|
310
294
|
this.dispatchAction(DashboardRedux.DashboardReady(this.getDashboardState()));
|
|
311
295
|
break;
|
|
312
|
-
case 'DataSource':
|
|
313
|
-
this.dispatchAction(DataSourceRedux.DataSourceReady(this.getDataSourceState()));
|
|
314
|
-
break;
|
|
315
296
|
case 'Export':
|
|
316
297
|
this.dispatchAction(ExportRedux.ExportReady(this.getExportState()));
|
|
317
298
|
break;
|
|
318
|
-
case 'Filter':
|
|
319
|
-
this.dispatchAction(FilterRedux.FilterReady(this.getFilterState()));
|
|
320
|
-
break;
|
|
321
299
|
case 'FormatColumn':
|
|
322
300
|
this.dispatchAction(FormatColumnRedux.FormatColumnReady(this.getFormatColumnState()));
|
|
323
301
|
break;
|
|
@@ -4,25 +4,22 @@ import { DashboardState, DashboardTab } from '../../PredefinedConfig/DashboardSt
|
|
|
4
4
|
import { AdaptableModuleButtons, AdaptableDashboardToolbars, AdaptableDashboardToolbar } from '../../PredefinedConfig/Common/Types';
|
|
5
5
|
import { DashboardChangedInfo } from '../Events/DashboardChanged';
|
|
6
6
|
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
7
|
-
import {
|
|
7
|
+
import { DashboardButtonContext } from '../../types';
|
|
8
8
|
import { CustomToolbar } from '../../AdaptableOptions/DashboardOptions';
|
|
9
9
|
export declare class DashboardApiImpl extends ApiBase implements DashboardApi {
|
|
10
10
|
getDashboardState(): DashboardState;
|
|
11
11
|
getCustomToolbars(): CustomToolbar[];
|
|
12
|
-
getCustomDashboardButtons(): AdaptableButton<DashboardButtonContext>[]
|
|
12
|
+
getCustomDashboardButtons(): AdaptableButton<DashboardButtonContext>[];
|
|
13
13
|
getCustomDashboardButtonByLabel(buttonLabel: string): AdaptableButton<DashboardButtonContext> | undefined;
|
|
14
14
|
setModuleButtons(moduleButtons: AdaptableModuleButtons): void;
|
|
15
15
|
setDashboardTitle(title: string): void;
|
|
16
16
|
getCustomToolbarContentsDiv(customToolbarName: string): HTMLElement | null;
|
|
17
17
|
setCustomToolbarContents(customToolbarName: string, contents: string): void;
|
|
18
18
|
getCustomToolbarByName(customToolbarName: string): CustomToolbar;
|
|
19
|
-
setCustomToolbarButtons(customToolbarName: string, buttons: AdaptableButton<CustomToolbarButtonContext>[]): void;
|
|
20
|
-
addCustomToolbarButtons(customToolbarName: string, buttons: AdaptableButton<CustomToolbarButtonContext>[]): void;
|
|
21
|
-
clearCustomToolbarButtons(customToolbarName: string): void;
|
|
22
|
-
private updateCustomToolbarButtons;
|
|
23
19
|
getTabByName(tabName: string): DashboardTab;
|
|
24
20
|
collapseDashboard(): void;
|
|
25
21
|
expandDashboard(): void;
|
|
22
|
+
refreshDashboard(): void;
|
|
26
23
|
floatDashboard(): void;
|
|
27
24
|
dockDashboard(): void;
|
|
28
25
|
hideDashboard(): void;
|
|
@@ -6,10 +6,9 @@ const DashboardRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers
|
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
9
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
10
|
-
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
11
9
|
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
12
10
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
11
|
+
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
13
12
|
class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
14
13
|
constructor() {
|
|
15
14
|
super(...arguments);
|
|
@@ -35,7 +34,7 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
35
34
|
return this.getDashboardOptions().customToolbars || [];
|
|
36
35
|
}
|
|
37
36
|
getCustomDashboardButtons() {
|
|
38
|
-
return this.getDashboardOptions().customDashboardButtons;
|
|
37
|
+
return this.getDashboardOptions().customDashboardButtons || [];
|
|
39
38
|
}
|
|
40
39
|
getCustomDashboardButtonByLabel(buttonLabel) {
|
|
41
40
|
const api = this.getAdaptableApi();
|
|
@@ -70,32 +69,6 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
70
69
|
getCustomToolbarByName(customToolbarName) {
|
|
71
70
|
return this.getCustomToolbars().find((ct) => ct.name == customToolbarName);
|
|
72
71
|
}
|
|
73
|
-
setCustomToolbarButtons(customToolbarName, buttons) {
|
|
74
|
-
this.updateCustomToolbarButtons(customToolbarName, buttons, 'override');
|
|
75
|
-
}
|
|
76
|
-
addCustomToolbarButtons(customToolbarName, buttons) {
|
|
77
|
-
this.updateCustomToolbarButtons(customToolbarName, buttons, 'add');
|
|
78
|
-
}
|
|
79
|
-
clearCustomToolbarButtons(customToolbarName) {
|
|
80
|
-
this.updateCustomToolbarButtons(customToolbarName, [], 'clear');
|
|
81
|
-
}
|
|
82
|
-
updateCustomToolbarButtons(customToolbarName, buttons, action) {
|
|
83
|
-
let customToolbars = this.getCustomToolbars();
|
|
84
|
-
if (ArrayExtensions_1.default.IsNotNullOrEmpty(customToolbars)) {
|
|
85
|
-
let customToolbar = customToolbars.find((c) => c.name == customToolbarName);
|
|
86
|
-
if (customToolbarName) {
|
|
87
|
-
let clonedCustomToolbar = Helper_1.default.cloneObject(customToolbar);
|
|
88
|
-
if (action == 'add') {
|
|
89
|
-
clonedCustomToolbar.toolbarButtons.push(...buttons);
|
|
90
|
-
}
|
|
91
|
-
else if (action == 'override') {
|
|
92
|
-
}
|
|
93
|
-
else if (action == 'clear') {
|
|
94
|
-
clonedCustomToolbar.toolbarButtons = [];
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
72
|
getTabByName(tabName) {
|
|
100
73
|
return (this.getDashboardState().Tabs || []).find((tab) => tab.Name == tabName);
|
|
101
74
|
}
|
|
@@ -105,6 +78,9 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
105
78
|
expandDashboard() {
|
|
106
79
|
this.dispatchAction(DashboardRedux.DashboardSetIsCollapsed(false));
|
|
107
80
|
}
|
|
81
|
+
refreshDashboard() {
|
|
82
|
+
this.dispatchAction(SystemRedux_1.SystemDashboardRefresh());
|
|
83
|
+
}
|
|
108
84
|
floatDashboard() {
|
|
109
85
|
this.dispatchAction(DashboardRedux.DashboardSetIsFloating(true));
|
|
110
86
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { DataSetApi } from '../DataSetApi';
|
|
3
|
+
import { DataSet } from '../../AdaptableOptions/GeneralOptions';
|
|
4
|
+
export declare class DataSetApiImpl extends ApiBase implements DataSetApi {
|
|
5
|
+
getAllDataSets(): DataSet[];
|
|
6
|
+
getCurrentDataSet(): DataSet | undefined;
|
|
7
|
+
getDataSetByName(dataSetName: string): DataSet | undefined;
|
|
8
|
+
setDataSet(dataSetName: string): void;
|
|
9
|
+
clearCurrentDataSet(): void;
|
|
10
|
+
showDataSetPopup(): void;
|
|
11
|
+
fireDataSetChangeEvent(dataSet: DataSet): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataSetApiImpl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
6
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
7
|
+
const ApiBase_1 = require("./ApiBase");
|
|
8
|
+
class DataSetApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
getAllDataSets() {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
return (_c = (_b = (_a = this.adaptable.adaptableOptions) === null || _a === void 0 ? void 0 : _a.generalOptions) === null || _b === void 0 ? void 0 : _b.dataSets) !== null && _c !== void 0 ? _c : [];
|
|
12
|
+
}
|
|
13
|
+
getCurrentDataSet() {
|
|
14
|
+
let currentDataSetName = this.getAdaptableState().System.CurrentDataSet;
|
|
15
|
+
return this.getDataSetByName(currentDataSetName);
|
|
16
|
+
}
|
|
17
|
+
getDataSetByName(dataSetName) {
|
|
18
|
+
return this.getAllDataSets().find((a) => a.name == dataSetName);
|
|
19
|
+
}
|
|
20
|
+
setDataSet(dataSetName) {
|
|
21
|
+
const dataSet = this.getDataSetByName(dataSetName);
|
|
22
|
+
if (this.checkItemExists(dataSet, dataSetName, 'Data Source')) {
|
|
23
|
+
this.dispatchAction(SystemRedux.SystemDataSetSelect(dataSet));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
clearCurrentDataSet() {
|
|
27
|
+
this.dispatchAction(SystemRedux.SystemDataSetSelect(null));
|
|
28
|
+
}
|
|
29
|
+
showDataSetPopup() {
|
|
30
|
+
this.showModulePopup(ModuleConstants.DataSetModuleId);
|
|
31
|
+
}
|
|
32
|
+
fireDataSetChangeEvent(dataSet) {
|
|
33
|
+
if (this.adaptable.isInitialised) {
|
|
34
|
+
const dataSetChangedInfo = {
|
|
35
|
+
adaptableApi: this.adaptable.api,
|
|
36
|
+
dataSet,
|
|
37
|
+
};
|
|
38
|
+
this.adaptable.api.eventApi.emit('DataSetChanged', dataSetChangedInfo);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.DataSetApiImpl = DataSetApiImpl;
|
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { FilterApi } from '../FilterApi';
|
|
3
|
-
import { FilterState, ColumnFilter, SystemFilterPredicateIds } from '../../PredefinedConfig/FilterState';
|
|
4
3
|
import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
5
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
6
|
-
import {
|
|
5
|
+
import { SystemFilterPredicateIds } from '../../types';
|
|
7
6
|
export declare class FilterApiImpl extends ApiBase implements FilterApi {
|
|
8
|
-
getFilterState(): FilterState;
|
|
9
7
|
getAllSystemFilterIds(): SystemFilterPredicateIds;
|
|
10
8
|
findPredicateDefByShortcut(shortcut: string, column: AdaptableColumn): AdaptablePredicateDef;
|
|
11
9
|
getFilterPredicateDefsForColumn(column: AdaptableColumn): AdaptablePredicateDef[];
|
|
12
10
|
getFilterPredicateDefsForColumnId(columnId: string): AdaptablePredicateDef[] | undefined;
|
|
13
11
|
private getAllFilterPredicates;
|
|
14
|
-
getAllColumnFilter(): ColumnFilter[];
|
|
15
|
-
getColumnFilterById(id: ColumnFilter['Uuid']): ColumnFilter;
|
|
16
|
-
setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
|
|
17
|
-
clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
|
|
18
|
-
clearColumnFilter(columnFilter: ColumnFilter): void;
|
|
19
|
-
clearColumnFilterByColumns(columns: string[]): void;
|
|
20
|
-
clearColumnFilterByColumn(column: string): void;
|
|
21
|
-
clearAllColumnFilter(): void;
|
|
22
|
-
getAllColumnFilterForColumn(column: string): ColumnFilter[];
|
|
23
|
-
createColumnFilterForCell(columnId: string, primarykeyValues: any[]): ColumnFilter | null;
|
|
24
|
-
columnFilterToString(columnFilter: ColumnFilter): string;
|
|
25
|
-
columnFiltersToString(columnFilters: ColumnFilter[]): string;
|
|
26
|
-
evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
|
|
27
12
|
showQuickFilterBar(): void;
|
|
28
13
|
hideQuickFilterBar(): void;
|
|
29
14
|
isQuickFilterAvailable(): boolean;
|
|
@@ -2,14 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FilterApiImpl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
|
-
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
8
|
-
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
9
7
|
class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
-
getFilterState() {
|
|
11
|
-
return this.getAdaptableState().Filter;
|
|
12
|
-
}
|
|
13
8
|
getAllSystemFilterIds() {
|
|
14
9
|
return this.getFilterOptions().systemFilters;
|
|
15
10
|
}
|
|
@@ -30,167 +25,18 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
30
25
|
...this.adaptable.api.predicateApi.getCustomPredicateDefs(),
|
|
31
26
|
].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
|
|
32
27
|
}
|
|
33
|
-
getAllColumnFilter() {
|
|
34
|
-
return this.getFilterState().ColumnFilters;
|
|
35
|
-
}
|
|
36
|
-
getColumnFilterById(id) {
|
|
37
|
-
var _a;
|
|
38
|
-
return (_a = this.getAllColumnFilter()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
|
|
39
|
-
}
|
|
40
|
-
setColumnFilter(columnFilters) {
|
|
41
|
-
columnFilters.forEach((columnFilter) => {
|
|
42
|
-
if (!columnFilter.Predicate) {
|
|
43
|
-
LoggingHelper_1.LogAdaptableWarning('Column Filter has no Predicate', columnFilter);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
const isValidPredicate = this.adaptable.api.predicateApi.isValidPredicate(columnFilter.Predicate);
|
|
47
|
-
if (!isValidPredicate) {
|
|
48
|
-
LoggingHelper_1.LogAdaptableWarning('Column Filter Predicate is not valid', columnFilter);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.addUidToAdaptableObject(columnFilter);
|
|
52
|
-
if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
53
|
-
this.dispatchAction(FilterRedux.ColumnFilterSet(columnFilter));
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
this.dispatchAction(FilterRedux.ColumnFilterAdd(columnFilter));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.map((columnFilter) => this.getColumnFilterById(columnFilter.Uuid));
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
clearAndSetColumnFilter(columnFilters) {
|
|
65
|
-
this.clearAllColumnFilter();
|
|
66
|
-
columnFilters.forEach((columnFilter) => {
|
|
67
|
-
if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
68
|
-
this.dispatchAction(FilterRedux.ColumnFilterSet(columnFilter));
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.dispatchAction(FilterRedux.ColumnFilterAdd(columnFilter));
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
clearColumnFilter(columnFilter) {
|
|
76
|
-
this.dispatchAction(FilterRedux.ColumnFilterClear(columnFilter));
|
|
77
|
-
}
|
|
78
|
-
clearColumnFilterByColumns(columns) {
|
|
79
|
-
columns.forEach((c) => {
|
|
80
|
-
this.clearColumnFilterByColumn(c);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
clearColumnFilterByColumn(column) {
|
|
84
|
-
let columnFiltersForColumn = this.getAllColumnFilterForColumn(column);
|
|
85
|
-
if (columnFiltersForColumn) {
|
|
86
|
-
columnFiltersForColumn.forEach((cf) => {
|
|
87
|
-
this.dispatchAction(FilterRedux.ColumnFilterClear(cf));
|
|
88
|
-
});
|
|
89
|
-
this.adaptable.clearColumnFiltering([column]);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
clearAllColumnFilter() {
|
|
93
|
-
this.dispatchAction(FilterRedux.ColumnFilterClearAll());
|
|
94
|
-
this.adaptable.clearGridFiltering();
|
|
95
|
-
}
|
|
96
|
-
getAllColumnFilterForColumn(column) {
|
|
97
|
-
let columnFilters = this.getAllColumnFilter();
|
|
98
|
-
if (columnFilters) {
|
|
99
|
-
return columnFilters.filter((cf) => cf.ColumnId == column);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
return [];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
createColumnFilterForCell(columnId, primarykeyValues) {
|
|
106
|
-
let cellValues = [];
|
|
107
|
-
let predicateId;
|
|
108
|
-
if (primarykeyValues.length == 1) {
|
|
109
|
-
const normalisedValue = this.adaptable.api.gridApi.getCellNormalisedValue(primarykeyValues[0], columnId);
|
|
110
|
-
if (normalisedValue) {
|
|
111
|
-
cellValues.push(normalisedValue);
|
|
112
|
-
const dataType = this.adaptable.api.columnApi.getColumnDataTypeFromColumnId(columnId);
|
|
113
|
-
if (dataType) {
|
|
114
|
-
if (dataType == 'Number') {
|
|
115
|
-
predicateId = 'Equals';
|
|
116
|
-
}
|
|
117
|
-
else if (dataType == 'Date') {
|
|
118
|
-
predicateId = 'On';
|
|
119
|
-
}
|
|
120
|
-
else if (dataType == 'String') {
|
|
121
|
-
predicateId = 'Is';
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
predicateId = 'Equals';
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
primarykeyValues.forEach((pk) => {
|
|
131
|
-
const displayValue = this.adaptable.api.gridApi.getCellDisplayValue(pk, columnId);
|
|
132
|
-
if (displayValue && !cellValues.includes(displayValue)) {
|
|
133
|
-
cellValues.push(displayValue);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
predicateId = 'Values';
|
|
137
|
-
}
|
|
138
|
-
const filter = {
|
|
139
|
-
ColumnId: columnId,
|
|
140
|
-
Predicate: {
|
|
141
|
-
PredicateId: predicateId,
|
|
142
|
-
Inputs: [...new Set(cellValues)],
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
const [savedFilter] = this.setColumnFilter([filter]) || [null];
|
|
146
|
-
return savedFilter;
|
|
147
|
-
}
|
|
148
|
-
columnFilterToString(columnFilter) {
|
|
149
|
-
const friendlyName = this.adaptable.api.columnApi.getFriendlyNameFromColumnId(columnFilter.ColumnId);
|
|
150
|
-
return ('[' +
|
|
151
|
-
friendlyName +
|
|
152
|
-
'] ' +
|
|
153
|
-
this.adaptable.api.predicateApi.predicateToString(columnFilter.Predicate));
|
|
154
|
-
}
|
|
155
|
-
columnFiltersToString(columnFilters) {
|
|
156
|
-
return columnFilters.map((cf) => this.columnFilterToString(cf)).join(', ');
|
|
157
|
-
}
|
|
158
|
-
evaluateColumnFilter(columnFilter, node) {
|
|
159
|
-
var _a;
|
|
160
|
-
if (!columnFilter.Predicate) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
if ((_a = columnFilter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a.some((input) => StringExtensions_1.default.IsNullOrEmpty(input))) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
const column = this.adaptable.api.columnApi.getColumnFromId(columnFilter.ColumnId);
|
|
167
|
-
if (!column) {
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
const gridCell = this.adaptable.api.gridApi.getGridCellFromRowNode(node, columnFilter.ColumnId);
|
|
171
|
-
if (!gridCell) {
|
|
172
|
-
return true;
|
|
173
|
-
}
|
|
174
|
-
let value = gridCell.normalisedValue;
|
|
175
|
-
return this.adaptable.api.predicateApi.handlePredicate(columnFilter.Predicate, {
|
|
176
|
-
value: value,
|
|
177
|
-
oldValue: null,
|
|
178
|
-
displayValue: gridCell.displayValue,
|
|
179
|
-
node,
|
|
180
|
-
column,
|
|
181
|
-
}, true);
|
|
182
|
-
}
|
|
183
28
|
showQuickFilterBar() {
|
|
184
|
-
this.dispatchAction(
|
|
29
|
+
this.dispatchAction(SystemRedux.SystemQuickFilterBarShow());
|
|
185
30
|
}
|
|
186
31
|
hideQuickFilterBar() {
|
|
187
|
-
this.dispatchAction(
|
|
32
|
+
this.dispatchAction(SystemRedux.SystemQuickFilterBarHide());
|
|
188
33
|
}
|
|
189
34
|
isQuickFilterAvailable() {
|
|
190
35
|
return this.adaptable.isQuickFilterAvailable();
|
|
191
36
|
}
|
|
192
37
|
isQuickFilterVisible() {
|
|
193
|
-
return this.isQuickFilterAvailable() &&
|
|
38
|
+
return (this.isQuickFilterAvailable() &&
|
|
39
|
+
this.adaptable.api.internalApi.getSystemState().IsQuickFilterVisible);
|
|
194
40
|
}
|
|
195
41
|
}
|
|
196
42
|
exports.FilterApiImpl = FilterApiImpl;
|
|
@@ -281,7 +281,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
281
281
|
return value;
|
|
282
282
|
}
|
|
283
283
|
const adaptableOptions = this.adaptable.adaptableOptions;
|
|
284
|
-
const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.
|
|
284
|
+
const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters;
|
|
285
285
|
// formatters are applied in the order they are defined in the options
|
|
286
286
|
const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
|
|
287
287
|
return customFormatters.reduce((acc, formatter) => {
|
|
@@ -84,7 +84,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
84
84
|
isGroupRowNode(rowNode: RowNode): boolean;
|
|
85
85
|
isQuickFilterAvailable(): boolean;
|
|
86
86
|
redrawGrid(): void;
|
|
87
|
-
fireSearchChangedEvent(searchChangedTrigger: '
|
|
87
|
+
fireSearchChangedEvent(searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort'): void;
|
|
88
88
|
fireCellChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
89
89
|
fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
|
|
90
90
|
jumpToRow(primaryKeyValue: any): void;
|
|
@@ -90,7 +90,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
90
90
|
}
|
|
91
91
|
clearGridFiltering() {
|
|
92
92
|
// slightly round the houses but we have to call FilterAPI as it does it properly
|
|
93
|
-
this.adaptable.api.
|
|
93
|
+
this.adaptable.api.layoutApi.clearAllColumnFilter();
|
|
94
94
|
}
|
|
95
95
|
getAgGridInstance() {
|
|
96
96
|
return this.adaptable.adaptableOptions.gridOptions;
|
|
@@ -11,7 +11,7 @@ import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInf
|
|
|
11
11
|
import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
|
|
12
12
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
|
-
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo } from '../../types';
|
|
14
|
+
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo, SharedEntity, AdaptableIcon } from '../../types';
|
|
15
15
|
import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
|
|
16
16
|
import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
|
|
17
17
|
import { IReportService } from '../../Utilities/Services/Interface/IReportService';
|
|
@@ -114,10 +114,11 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
114
114
|
getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
115
115
|
getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
116
116
|
getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
|
|
117
|
+
getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
|
|
117
118
|
isDocumentationLinksDisplayed(): boolean;
|
|
118
119
|
getQueryPreviewData(): any;
|
|
120
|
+
getLocalTeamSharingEntities(): SharedEntity[];
|
|
119
121
|
waitForTeamSharingImportEnd(): Promise<boolean>;
|
|
120
|
-
getUserDefinedHeaderName(columnId: string): string;
|
|
121
122
|
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
122
123
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
123
124
|
initializeDataChangeHistory(): void;
|
|
@@ -360,6 +360,17 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
360
360
|
return button.buttonStyle;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
+
getIconForButton(button, context) {
|
|
364
|
+
if (!button.icon) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
if (button.icon != null && typeof button.icon === 'function') {
|
|
368
|
+
return button.icon(button, context);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
return button.icon;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
363
374
|
isDocumentationLinksDisplayed() {
|
|
364
375
|
return this.adaptable.adaptableOptions.userInterfaceOptions.showDocumentationLinks;
|
|
365
376
|
}
|
|
@@ -380,6 +391,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
380
391
|
});
|
|
381
392
|
return firstRowData;
|
|
382
393
|
}
|
|
394
|
+
getLocalTeamSharingEntities() {
|
|
395
|
+
return this.getAdaptableState().TeamSharing.SharedEntities;
|
|
396
|
+
}
|
|
383
397
|
waitForTeamSharingImportEnd() {
|
|
384
398
|
// we have no deterministic means to ensure the teamsharing import is finished (because the import actions are opaque and may have side-effects)
|
|
385
399
|
// therefore we will listen for state changes and
|
|
@@ -406,9 +420,6 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
406
420
|
});
|
|
407
421
|
});
|
|
408
422
|
}
|
|
409
|
-
getUserDefinedHeaderName(columnId) {
|
|
410
|
-
return this.adaptable.getUserDefinedHeaderName(columnId);
|
|
411
|
-
}
|
|
412
423
|
createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
413
424
|
const createComponentFn = () =>
|
|
414
425
|
// delegate the logic to framework wrapper
|