@adaptabletools/adaptable 14.0.3 → 14.1.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 +7 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +170 -169
- package/index.css +76 -62
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +3 -0
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +3 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +3 -0
- package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +26 -26
- package/src/AdaptableOptions/ExportOptions.d.ts +17 -3
- package/src/Api/CalculatedColumnApi.d.ts +9 -0
- package/src/Api/ChartingApi.d.ts +41 -14
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/DataSetApi.d.ts +2 -2
- package/src/Api/EventApi.d.ts +15 -1
- package/src/Api/Events/ChartChanged.d.ts +8 -0
- package/src/Api/Events/ChartChanged.js +2 -0
- package/src/Api/ExportApi.d.ts +5 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +24 -0
- package/src/Api/Implementation/ChartingApiImpl.d.ts +16 -2
- package/src/Api/Implementation/ChartingApiImpl.js +54 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +3 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ExportApiImpl.js +10 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +6 -4
- package/src/Api/Implementation/PredicateApiImpl.js +20 -1
- package/src/Api/Implementation/QueryApiImpl.js +8 -2
- package/src/Api/Internal/AdaptableInternalApi.d.ts +7 -1
- package/src/Api/Internal/AdaptableInternalApi.js +2 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +9 -0
- package/src/Api/Internal/ChartingInternalApi.d.ts +6 -0
- package/src/Api/Internal/ChartingInternalApi.js +24 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +5 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +25 -1
- package/src/Api/PredicateApi.d.ts +17 -1
- package/src/PredefinedConfig/AlertState.d.ts +5 -2
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +6 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +15 -11
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +6 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +6 -0
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +15 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +3 -0
- package/src/PredefinedConfig/Common/Types.d.ts +21 -6
- package/src/PredefinedConfig/Common/Types.js +1 -3
- package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +3 -2
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
- package/src/PredefinedConfig/ThemeState.d.ts +0 -4
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +2 -0
- package/src/Redux/ActionsReducers/PopupRedux.js +2 -0
- package/src/Redux/ActionsReducers/StatusBarRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/StatusBarRedux.js +4 -4
- package/src/Redux/Store/AdaptableStore.js +1 -11
- package/src/Strategy/AlertModule.js +7 -3
- package/src/Strategy/ChartingModule.js +5 -3
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +43 -0
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/FormatColumnModule.js +7 -2
- package/src/Strategy/Interface/IModule.d.ts +1 -1
- package/src/Strategy/LayoutModule.js +8 -1
- package/src/Strategy/StyledColumnModule.js +5 -0
- package/src/Strategy/ThemeModule.js +8 -2
- package/src/Strategy/Utilities/Alert/getAlertPreviewViewItems.js +2 -2
- package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.js +13 -0
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +3 -3
- package/src/Utilities/Constants/ModuleConstants.d.ts +0 -3
- package/src/Utilities/Constants/ModuleConstants.js +2 -5
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +64 -3
- package/src/Utilities/Interface/MessagePopups.d.ts +1 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +13 -0
- package/src/Utilities/Services/ChartingService.d.ts +8 -0
- package/src/Utilities/Services/ChartingService.js +16 -0
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/View/AdaptableViewFactory.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +3 -2
- package/src/View/Alert/Utilities/getAlertType.d.ts +15 -0
- package/src/View/Alert/Utilities/getAlertType.js +58 -0
- package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +3 -0
- package/src/View/Alert/Utilities/getAvailablePredicates.js +19 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +37 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +32 -0
- package/src/View/Alert/Utilities/mapAlertDefinition.d.ts +2 -0
- package/src/View/Alert/Utilities/mapAlertDefinition.js +38 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +4 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +18 -11
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +2 -0
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +15 -6
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +10 -0
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +57 -0
- package/src/View/Alert/Wizard/{AlertDisplayWizardSection.d.ts → AlertNotificationWizardSection.d.ts} +7 -5
- package/src/View/Alert/Wizard/{AlertDisplayWizardSection.js → AlertNotificationWizardSection.js} +12 -50
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +7 -4
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +66 -6
- package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +2 -0
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +41 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +9 -0
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +27 -0
- package/src/View/Alert/Wizard/AlertWizard.js +53 -98
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +1 -6
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -39
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.d.ts +0 -0
- package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.js +2 -2
- package/src/View/{Components/Charting → Charting}/ChartingViewPanel.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingViewPanel.js +0 -0
- package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.d.ts +2 -2
- package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.js +12 -2
- package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.js +2 -2
- package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.js +4 -4
- package/src/View/{Components/Charting → Charting}/DeleteChartButton.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/DeleteChartButton.js +3 -3
- package/src/View/{Components/Charting → Charting}/EditChartButton.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/EditChartButton.js +3 -3
- package/src/View/{Components/Charting → Charting}/ShowChartButton.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ShowChartButton.js +5 -5
- package/src/View/{Components/Charting → Charting}/useChartState.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/useChartState.js +5 -5
- package/src/View/{Components/Charting → Charting}/useChartingElements.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/useChartingElements.js +6 -6
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.d.ts +12 -0
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +85 -0
- package/src/View/Components/EntityRulesEditor/{PredicatesEditor.d.ts → EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts} +6 -4
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +87 -0
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.d.ts +1 -0
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.js +5 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +7 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +4 -2
- package/src/View/Components/EntityRulesEditor/index.js +27 -10
- package/src/View/Components/NewScopeComponent.d.ts +9 -5
- package/src/View/Components/NewScopeComponent.js +19 -10
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +2 -2
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +16 -5
- package/src/View/Components/PreviewResultsPanel.js +30 -3
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -0
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Export/ExportTablePopup.d.ts +3 -0
- package/src/View/Export/ExportTablePopup.js +59 -0
- package/src/View/Export/Wizard/NewReportWizard.js +1 -1
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +1 -1
- package/src/View/Query/Wizard/NamedQueryWizard.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +3 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +7 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +5 -5
- package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.js +10 -2
- package/src/View/Wizard/TypeRadio.d.ts +7 -0
- package/src/View/Wizard/TypeRadio.js +12 -0
- package/src/agGrid/Adaptable.d.ts +3 -1
- package/src/agGrid/Adaptable.js +28 -4
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +15 -0
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +4 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.js +5 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
- package/src/components/icons/index.js +4 -0
- package/src/components/icons/visibility-off.d.ts +3 -0
- package/src/components/icons/visibility-off.js +7 -0
- package/src/components/icons/visibility.d.ts +3 -0
- package/src/components/icons/visibility.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +129 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +0 -9
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +0 -30
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +0 -86
|
@@ -45,6 +45,15 @@ export interface CalculatedColumnApi {
|
|
|
45
45
|
* Opens Settings Panel with Calculated Column section selected and visible
|
|
46
46
|
*/
|
|
47
47
|
openCalculatedColumnSettingsPanel(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Re-calculates all aggregated CalculatedColumns (defined with a `AggregatedScalarExpression`)
|
|
50
|
+
*/
|
|
51
|
+
refreshAggregatedCalculatedColumns(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Re-calculates the aggregated CalculatedColumn (defined with a `AggregatedScalarExpression`) with the given `columnId`
|
|
54
|
+
* @param columnId column ID of the aggregated CalculatedColumn
|
|
55
|
+
*/
|
|
56
|
+
refreshAggregatedCalculatedColumn(columnId: string): void;
|
|
48
57
|
/**
|
|
49
58
|
* TO BE REMOVED
|
|
50
59
|
*/
|
package/src/Api/ChartingApi.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { ChartModel, ChartRef } from '@ag-grid-community/core';
|
|
2
|
-
import { ChartDefinition } from '../types';
|
|
2
|
+
import { ChartContainer, ChartDefinition } from '../types';
|
|
3
|
+
export interface ChartingOpenState {
|
|
4
|
+
charts: {
|
|
5
|
+
chartDefinition: ChartDefinition;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
containerName: string | null;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
3
10
|
/**
|
|
4
11
|
* Provides run-time access to Charting Module and related State
|
|
5
12
|
*/
|
|
6
13
|
export interface ChartingApi {
|
|
7
14
|
/**
|
|
8
|
-
* Whether AdapTable's
|
|
15
|
+
* Whether AdapTable's Charting functionality is available
|
|
9
16
|
*/
|
|
10
17
|
isChartingEnabled(): boolean;
|
|
11
18
|
/**
|
|
@@ -17,16 +24,21 @@ export interface ChartingApi {
|
|
|
17
24
|
*/
|
|
18
25
|
getPersistedCharts(): ChartModel[];
|
|
19
26
|
/**
|
|
20
|
-
* Retrieves all adaptable
|
|
27
|
+
* Retrieves all adaptable Chart definitions
|
|
21
28
|
*/
|
|
22
29
|
getChartDefinitions(): ChartDefinition[];
|
|
23
30
|
/**
|
|
24
|
-
* Retrieves
|
|
25
|
-
* @param uuid
|
|
31
|
+
* Retrieves Chart definition by uuid
|
|
32
|
+
* @param uuid Chart uuid
|
|
26
33
|
*/
|
|
27
34
|
getChartDefinitionByUuid(uuid: string): ChartDefinition | undefined;
|
|
28
35
|
/**
|
|
29
|
-
* Retrieves
|
|
36
|
+
* Retrieves Chart definition by name
|
|
37
|
+
* @param name Chart name
|
|
38
|
+
*/
|
|
39
|
+
getChartDefinitionByName(name: string): ChartDefinition | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves AG Grid ChartRef for given ChartId
|
|
30
42
|
*/
|
|
31
43
|
getChartRef(chartId: string): ChartRef | undefined;
|
|
32
44
|
/**
|
|
@@ -41,23 +53,28 @@ export interface ChartingApi {
|
|
|
41
53
|
* Opens a Chart Definition
|
|
42
54
|
*
|
|
43
55
|
* @param chartDefinition chart definition
|
|
56
|
+
* @param container container element or container name
|
|
44
57
|
*/
|
|
45
|
-
showChartDefinition(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
|
|
58
|
+
showChartDefinition(chartDefinition: ChartDefinition, container?: HTMLElement | string): ChartRef;
|
|
46
59
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
60
|
+
* Close chart definition
|
|
61
|
+
* @param chartDefinition Chart Definition
|
|
62
|
+
*/
|
|
63
|
+
closeChartDefinition(chartDefinition: ChartDefinition): void;
|
|
64
|
+
/**
|
|
65
|
+
* Displays a Chart; if Chart is already open, 2nd Chart is not opened
|
|
49
66
|
*
|
|
50
|
-
* @param chartDefinition
|
|
67
|
+
* @param chartDefinition Chart Definition to show
|
|
51
68
|
*/
|
|
52
69
|
showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
|
|
53
70
|
/**
|
|
54
|
-
* Edit existing
|
|
55
|
-
* @param chartDefinition
|
|
71
|
+
* Edit existing Chart
|
|
72
|
+
* @param chartDefinition Chart Definition to edit
|
|
56
73
|
*/
|
|
57
74
|
editChartDefinition(chartDefinition: ChartDefinition): void;
|
|
58
75
|
/**
|
|
59
|
-
* Add new
|
|
60
|
-
* @param chartDefinition
|
|
76
|
+
* Add new Chart Definition
|
|
77
|
+
* @param chartDefinition Chart Definition to add
|
|
61
78
|
*/
|
|
62
79
|
addChartDefinition(chartDefinition: ChartDefinition): void;
|
|
63
80
|
/**
|
|
@@ -67,4 +84,14 @@ export interface ChartingApi {
|
|
|
67
84
|
* @deprecated use `getChartDefinitions()` instead
|
|
68
85
|
*/
|
|
69
86
|
getAllChartDefinitions(): ChartDefinition[];
|
|
87
|
+
/**
|
|
88
|
+
* Returns information about all saved charts, including their open state.
|
|
89
|
+
*/
|
|
90
|
+
getChartingOpenState(): ChartingOpenState;
|
|
91
|
+
/**
|
|
92
|
+
* Retrieves the name of the container in which the chart is open.
|
|
93
|
+
* Return null if the chart is not open.
|
|
94
|
+
* @param chartDefinition
|
|
95
|
+
*/
|
|
96
|
+
getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
|
|
70
97
|
}
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -70,6 +70,10 @@ export interface ColumnApi {
|
|
|
70
70
|
* Returns all Queryable Columns
|
|
71
71
|
*/
|
|
72
72
|
getQueryableColumns(): AdaptableColumn[];
|
|
73
|
+
/**
|
|
74
|
+
* Returns all Exportable Columns
|
|
75
|
+
*/
|
|
76
|
+
getExportableColumns(): AdaptableColumn[];
|
|
73
77
|
/**
|
|
74
78
|
* Returns all Columns that have given DataType
|
|
75
79
|
* @param dataType the DataType of the Columns to retrieve
|
package/src/Api/DataSetApi.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export interface DataSetApi {
|
|
|
20
20
|
*/
|
|
21
21
|
getDataSetByName(dataSetName: string): DataSet;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param dataSetName Name of Data Set to
|
|
23
|
+
* Loads the given Data Set (makes it the Current one)
|
|
24
|
+
* @param dataSetName Name of Data Set to load
|
|
25
25
|
*/
|
|
26
26
|
setDataSet(dataSetName: string): void;
|
|
27
27
|
/**
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdaptableFDC3EventInfo, SelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, SearchChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, CheckboxColumnClickedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, QueryRunInfo, FilterAppliedInfo } from '../types';
|
|
2
|
+
import { ChartChangedInfo } from './Events/ChartChanged';
|
|
2
3
|
/**
|
|
3
4
|
* Responsible for publishing the many Events that AdapTable fires
|
|
4
5
|
*/
|
|
@@ -241,6 +242,19 @@ export interface EventApi {
|
|
|
241
242
|
* @param callback
|
|
242
243
|
*/
|
|
243
244
|
off(eventName: 'DataSetSelected', callback: (dataSetSelectedInfo: DataSetSelectedInfo) => void): void;
|
|
245
|
+
/**
|
|
246
|
+
* Event fired when a Chart is Changed
|
|
247
|
+
*
|
|
248
|
+
* @param eventName ChartChanged
|
|
249
|
+
* @param callback ChartChangedInfo
|
|
250
|
+
*/
|
|
251
|
+
on(eventName: 'ChartChanged', callback: (chartChangedInfo: ChartChangedInfo) => void): () => void;
|
|
252
|
+
/**
|
|
253
|
+
* Unsubscribe from ChartChanged
|
|
254
|
+
* @param eventName ChartChanged
|
|
255
|
+
* @param callbackChartChangedInfo
|
|
256
|
+
*/
|
|
257
|
+
off(eventName: 'ChartChanged', callback: (chartChangedInfo: ChartChangedInfo) => void): void;
|
|
244
258
|
/**
|
|
245
259
|
* Fired when Adaptable is up and running - has no arguments.
|
|
246
260
|
* @param eventName - AdaptableReady
|
|
@@ -292,6 +306,6 @@ export interface EventApi {
|
|
|
292
306
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
293
307
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
294
308
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
295
|
-
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged', data?: any): Promise<any>;
|
|
309
|
+
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged', data?: any): Promise<any>;
|
|
296
310
|
destroy(): void;
|
|
297
311
|
}
|
package/src/Api/ExportApi.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ExportState, Report, ReportData, ReportSchedule, SystemReportNames } fr
|
|
|
3
3
|
import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
|
|
4
4
|
import { CustomDestination, ServerReport, ExportFormContext } from '../AdaptableOptions/ExportOptions';
|
|
5
5
|
import { ExportDestination } from '../PredefinedConfig/Common/Enums';
|
|
6
|
+
import { AdaptableColumnBase } from '../types';
|
|
6
7
|
/**
|
|
7
8
|
* Provides run-time access to the Export Module and Report state
|
|
8
9
|
*/
|
|
@@ -169,4 +170,8 @@ export interface ExportApi {
|
|
|
169
170
|
* @deprecated internal method, will be removed in next major release
|
|
170
171
|
*/
|
|
171
172
|
isDataChangeInReport(cellDataChangedInfo: CellDataChangedInfo, report: Report): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Returns whether the given column is exportable
|
|
175
|
+
*/
|
|
176
|
+
isColumnExportable(adaptablColumn: AdaptableColumnBase): boolean;
|
|
172
177
|
}
|
|
@@ -16,6 +16,8 @@ export declare class CalculatedColumnApiImpl extends ApiBase implements Calculat
|
|
|
16
16
|
editCalculatedColumns(calculatedColumns: CalculatedColumn[]): CalculatedColumn[];
|
|
17
17
|
deleteCalculatedColumn(column: string): void;
|
|
18
18
|
openCalculatedColumnSettingsPanel(): void;
|
|
19
|
+
refreshAggregatedCalculatedColumns(): void;
|
|
20
|
+
refreshAggregatedCalculatedColumn(columnId: string): void;
|
|
19
21
|
showCalculatedColumnPopup(): void;
|
|
20
22
|
getCalculatedColumnModuleReferences(calculatedColumn: CalculatedColumn): string[];
|
|
21
23
|
getCalculatedColumnsReferencingColumnId(columnId: string): CalculatedColumn[];
|
|
@@ -7,6 +7,7 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
9
9
|
const CalculatedColumnInternalApi_1 = require("../Internal/CalculatedColumnInternalApi");
|
|
10
|
+
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
11
|
class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
|
|
11
12
|
constructor(adaptable) {
|
|
12
13
|
super(adaptable);
|
|
@@ -52,6 +53,29 @@ class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
52
53
|
openCalculatedColumnSettingsPanel() {
|
|
53
54
|
this.showModulePopup(ModuleConstants.CalculatedColumnModuleId);
|
|
54
55
|
}
|
|
56
|
+
refreshAggregatedCalculatedColumns() {
|
|
57
|
+
const aggregatedCalculatedColumns = this.getCalculatedColumns().filter((calculatedColumn) => { var _a; return (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.AggregatedScalarExpression; });
|
|
58
|
+
aggregatedCalculatedColumns.forEach((calculatedColumn) => {
|
|
59
|
+
this.getAdaptableApi()
|
|
60
|
+
.internalApi.getCalculatedColumnExpressionService()
|
|
61
|
+
.createAggregatedScalarLiveValue(calculatedColumn);
|
|
62
|
+
});
|
|
63
|
+
// refresh calculated columns
|
|
64
|
+
const aggCalculatedColumnIds = aggregatedCalculatedColumns.map((calculatedColumn) => calculatedColumn.ColumnId);
|
|
65
|
+
this.getGridApi().refreshCells(null, aggCalculatedColumnIds);
|
|
66
|
+
}
|
|
67
|
+
refreshAggregatedCalculatedColumn(columnId) {
|
|
68
|
+
var _a;
|
|
69
|
+
const aggregatedCalculatedColumn = this.getCalculatedColumnForColumnId(columnId);
|
|
70
|
+
if (!((_a = aggregatedCalculatedColumn === null || aggregatedCalculatedColumn === void 0 ? void 0 : aggregatedCalculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.AggregatedScalarExpression)) {
|
|
71
|
+
(0, LoggingHelper_1.LogAdaptableWarning)(`Aggregated calculated column with ID=${columnId} was NOT found (and refreshed)!`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.getAdaptableApi()
|
|
75
|
+
.internalApi.getCalculatedColumnExpressionService()
|
|
76
|
+
.createAggregatedScalarLiveValue(aggregatedCalculatedColumn);
|
|
77
|
+
this.getGridApi().refreshCells(null, [columnId]);
|
|
78
|
+
}
|
|
55
79
|
showCalculatedColumnPopup() {
|
|
56
80
|
(0, logDeprecation_1.logDeprecation)('CalculatedColumnApi', 'showCalculatedColumnPopup', 'openCalculatedColumnSettingsPanel');
|
|
57
81
|
this.showModulePopup(ModuleConstants.CalculatedColumnModuleId);
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { ChartModel, ChartRef } from '@ag-grid-community/core';
|
|
2
2
|
import { ChartingApi } from '../ChartingApi';
|
|
3
3
|
import { ApiBase } from './ApiBase';
|
|
4
|
-
import { ChartDefinition } from '../../types';
|
|
4
|
+
import { ChartContainer, ChartDefinition } from '../../types';
|
|
5
|
+
import { ChartingInternalApi } from '../Internal/ChartingInternalApi';
|
|
6
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
5
7
|
export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
8
|
+
internalApi: ChartingInternalApi;
|
|
9
|
+
constructor(adaptable: IAdaptable);
|
|
6
10
|
isChartingEnabled(): boolean;
|
|
7
11
|
getCurrentChartModels(): ChartModel[];
|
|
8
12
|
getChartRef(chartId: string): ChartRef;
|
|
@@ -11,9 +15,19 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
|
11
15
|
getChartDefinitions(): ChartDefinition[];
|
|
12
16
|
getAllChartDefinitions(): ChartDefinition[];
|
|
13
17
|
getChartDefinitionByUuid(uuid: string): ChartDefinition;
|
|
18
|
+
getChartDefinitionByName(name: string): ChartDefinition | undefined;
|
|
14
19
|
showPersistedCharts(): ChartRef[];
|
|
15
|
-
showChartDefinition(chartDefiniton: ChartDefinition, container?: HTMLElement): ChartRef;
|
|
20
|
+
showChartDefinition(chartDefiniton: ChartDefinition, container?: HTMLElement | string): ChartRef;
|
|
16
21
|
showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
|
|
22
|
+
closeChartDefinition(chartDefinition: ChartDefinition): void;
|
|
17
23
|
editChartDefinition(editedChartDefinition: ChartDefinition): void;
|
|
18
24
|
addChartDefinition(chart: ChartDefinition): void;
|
|
25
|
+
getChartingOpenState(): {
|
|
26
|
+
charts: {
|
|
27
|
+
chartDefinition: ChartDefinition;
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
containerName: string;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
|
|
19
33
|
}
|
|
@@ -7,7 +7,13 @@ const ChartingRedux = tslib_1.__importStar(require("./../../Redux/ActionsReducer
|
|
|
7
7
|
const ChartingRedux_1 = require("./../../Redux/ActionsReducers/ChartingRedux");
|
|
8
8
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
9
9
|
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
10
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
11
|
+
const ChartingInternalApi_1 = require("../Internal/ChartingInternalApi");
|
|
10
12
|
class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
13
|
+
constructor(adaptable) {
|
|
14
|
+
super(adaptable);
|
|
15
|
+
this.internalApi = new ChartingInternalApi_1.ChartingInternalApi(adaptable);
|
|
16
|
+
}
|
|
11
17
|
isChartingEnabled() {
|
|
12
18
|
return this.adaptable.canGenerateCharts();
|
|
13
19
|
}
|
|
@@ -39,24 +45,70 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
39
45
|
getChartDefinitionByUuid(uuid) {
|
|
40
46
|
return this.getChartDefinitions().find((c) => c.Uuid == uuid);
|
|
41
47
|
}
|
|
48
|
+
getChartDefinitionByName(name) {
|
|
49
|
+
if (StringExtensions_1.default.IsNotNullOrEmpty(name)) {
|
|
50
|
+
let chartDefinition = this.getChartDefinitions().find((c) => c.Name == name);
|
|
51
|
+
if (this.checkItemExists(chartDefinition, name, 'Chart')) {
|
|
52
|
+
return chartDefinition;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
42
56
|
showPersistedCharts() {
|
|
43
57
|
return this.adaptable.showCharts(this.getChartDefinitions());
|
|
44
58
|
}
|
|
45
59
|
showChartDefinition(chartDefiniton, container) {
|
|
46
|
-
|
|
60
|
+
let containerElement = container;
|
|
61
|
+
if (typeof containerElement === 'string') {
|
|
62
|
+
containerElement = this.internalApi.getContainerElemetnByName(containerElement);
|
|
63
|
+
}
|
|
64
|
+
return this.adaptable.showChart(chartDefiniton, containerElement);
|
|
47
65
|
}
|
|
48
66
|
showChartDefinitionOnce(chartDefinition, container) {
|
|
49
|
-
|
|
67
|
+
var _a;
|
|
68
|
+
const chartRef = this.adaptable.api.chartingApi.getChartRef((_a = chartDefinition === null || chartDefinition === void 0 ? void 0 : chartDefinition.Model) === null || _a === void 0 ? void 0 : _a.chartId);
|
|
50
69
|
if (chartRef) {
|
|
51
70
|
return;
|
|
52
71
|
}
|
|
53
72
|
return this.showChartDefinition(chartDefinition, container);
|
|
54
73
|
}
|
|
74
|
+
closeChartDefinition(chartDefinition) {
|
|
75
|
+
const chartRef = this.getChartRef(chartDefinition.Model.chartId);
|
|
76
|
+
if (chartRef) {
|
|
77
|
+
chartRef.destroyChart();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
55
80
|
editChartDefinition(editedChartDefinition) {
|
|
56
81
|
this.dispatchAction(ChartingRedux.ChartingEditChart(editedChartDefinition));
|
|
57
82
|
}
|
|
58
83
|
addChartDefinition(chart) {
|
|
59
84
|
this.dispatchAction(ChartingRedux.ChartingAddChart(chart));
|
|
60
85
|
}
|
|
86
|
+
getChartingOpenState() {
|
|
87
|
+
return {
|
|
88
|
+
charts: this.getChartDefinitions().map((chartDefinition) => {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
return {
|
|
91
|
+
chartDefinition,
|
|
92
|
+
isOpen: this.getChartRef((_a = chartDefinition === null || chartDefinition === void 0 ? void 0 : chartDefinition.Model) === null || _a === void 0 ? void 0 : _a.chartId) != null,
|
|
93
|
+
containerName: (_b = this.getOpenChartContainer(chartDefinition)) === null || _b === void 0 ? void 0 : _b.name,
|
|
94
|
+
};
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
getOpenChartContainer(chartDefinition) {
|
|
99
|
+
var _a, _b, _c;
|
|
100
|
+
const containerOptions = (_b = (_a = this.adaptable.api.optionsApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.chartingOptions) === null || _b === void 0 ? void 0 : _b.chartContainers;
|
|
101
|
+
if (!containerOptions || !containerOptions.length) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
return ((_c = containerOptions.find((container) => {
|
|
105
|
+
const chartRef = this.getChartRef(chartDefinition.Model.chartId);
|
|
106
|
+
const containerElement = this.internalApi.getContainerElement(container);
|
|
107
|
+
if (!(chartRef === null || chartRef === void 0 ? void 0 : chartRef.chartElement) || !containerElement) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
return containerElement.contains(chartRef.chartElement);
|
|
111
|
+
})) !== null && _c !== void 0 ? _c : null);
|
|
112
|
+
}
|
|
61
113
|
}
|
|
62
114
|
exports.ChartingApiImpl = ChartingApiImpl;
|
|
@@ -72,6 +72,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
72
72
|
getPivotableColumns(): AdaptableColumn[];
|
|
73
73
|
getAggregatableColumns(): AdaptableColumn[];
|
|
74
74
|
getQueryableColumns(): AdaptableColumn[];
|
|
75
|
+
getExportableColumns(): AdaptableColumn[];
|
|
75
76
|
private logMissingColumnWarning;
|
|
76
77
|
getDistinctDisplayValuesForColumn(columnId: string): any[];
|
|
77
78
|
getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string, showFilteredRowsOnly: boolean): Promise<{
|
|
@@ -367,6 +367,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
367
367
|
getQueryableColumns() {
|
|
368
368
|
return this.getColumns().filter((c) => c.queryable);
|
|
369
369
|
}
|
|
370
|
+
getExportableColumns() {
|
|
371
|
+
return this.getColumns().filter((c) => c.exportable);
|
|
372
|
+
}
|
|
370
373
|
logMissingColumnWarning(columnId) {
|
|
371
374
|
if (this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning === true) {
|
|
372
375
|
if (!this.isAutoRowGroupColumn(columnId) &&
|
|
@@ -7,6 +7,7 @@ import { CustomDestination, ExportFormContext, ServerReport } from '../../Adapta
|
|
|
7
7
|
import { ExportDestination } from '../../PredefinedConfig/Common/Enums';
|
|
8
8
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
9
9
|
import { ExportInternalApi } from '../Internal/ExportInternalApi';
|
|
10
|
+
import { AdaptableColumnBase } from '../../types';
|
|
10
11
|
export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
11
12
|
internalApi: ExportInternalApi;
|
|
12
13
|
constructor(adaptable: IAdaptable);
|
|
@@ -42,4 +43,5 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
42
43
|
isServerReport(report: Report): boolean;
|
|
43
44
|
runServerReport(serverReportName: string): ReportData | undefined;
|
|
44
45
|
getReportDataForReport(reportName: string): ReportData | undefined;
|
|
46
|
+
isColumnExportable(adaptableColumn: AdaptableColumnBase): boolean;
|
|
45
47
|
}
|
|
@@ -168,5 +168,15 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
168
168
|
}
|
|
169
169
|
return this.adaptable.api.internalApi.getReportService().getReportData(report);
|
|
170
170
|
}
|
|
171
|
+
isColumnExportable(adaptableColumn) {
|
|
172
|
+
const isExportableFn = this.getExportOptions().isColumnExportable;
|
|
173
|
+
if (typeof isExportableFn === 'function') {
|
|
174
|
+
return isExportableFn({
|
|
175
|
+
adaptableApi: this.adaptable.api,
|
|
176
|
+
adaptableColumn,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
171
181
|
}
|
|
172
182
|
exports.ExportApiImpl = ExportApiImpl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { PredicateApi } from '../PredicateApi';
|
|
3
|
-
import {
|
|
4
|
-
import { AdaptableColumnDataType, SystemFilterPredicateId } from '../../types';
|
|
3
|
+
import { PredicateDefHandlerParams, PredicateModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
4
|
+
import { AdaptablePredicate, AdaptablePredicateDef, AdaptableColumnDataType, AdaptableColumnPredicate, SystemFilterPredicateId } from '../../types';
|
|
5
5
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
6
|
import { PredicateInternalApi } from '../Internal/PredicateInternalApi';
|
|
7
7
|
export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
@@ -14,10 +14,12 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
|
14
14
|
getPredicateDefById(predicateId: string): AdaptablePredicateDef;
|
|
15
15
|
getSystemPredicateDefById(predicateId: string): AdaptablePredicateDef;
|
|
16
16
|
getCustomPredicateDefById(predicateId: string): AdaptablePredicateDef;
|
|
17
|
-
predicateToString(predicate:
|
|
18
|
-
isValidPredicate(predicate:
|
|
17
|
+
predicateToString(predicate: AdaptableColumnPredicate): string | undefined;
|
|
18
|
+
isValidPredicate(predicate: AdaptableColumnPredicate | undefined): boolean;
|
|
19
19
|
arePredicatesValid(predicates: AdaptablePredicate[]): boolean;
|
|
20
20
|
isEveryPredicateValid(predicates: AdaptablePredicate[]): boolean;
|
|
21
|
+
handleColumnPredicate(predicate: AdaptableColumnPredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
22
|
+
handleColumnPredicates(predicates: AdaptableColumnPredicate[], params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
21
23
|
handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
22
24
|
handlePredicates(predicates: AdaptablePredicate[], params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
23
25
|
getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
|
|
@@ -42,9 +42,13 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
42
42
|
(0, LoggingHelper_1.LogAdaptableWarning)('Cannot find Predicate with Id:' + predicate.PredicateId);
|
|
43
43
|
return '[Predicate Not found]';
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
let strPredicate = predicateDef.hasOwnProperty('toString')
|
|
46
46
|
? predicateDef.toString({ inputs: predicate.Inputs })
|
|
47
47
|
: predicateDef.label;
|
|
48
|
+
if ('ColumnId' in predicate) {
|
|
49
|
+
strPredicate = `[${predicate.ColumnId}] ${strPredicate}`;
|
|
50
|
+
}
|
|
51
|
+
return strPredicate;
|
|
48
52
|
}
|
|
49
53
|
isValidPredicate(predicate) {
|
|
50
54
|
if (!predicate) {
|
|
@@ -71,6 +75,21 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
71
75
|
isEveryPredicateValid(predicates) {
|
|
72
76
|
return predicates.every((predicate) => this.isValidPredicate(predicate));
|
|
73
77
|
}
|
|
78
|
+
handleColumnPredicate(predicate, params, defaultReturn) {
|
|
79
|
+
if (!predicate.ColumnId) {
|
|
80
|
+
return this.handlePredicate(predicate, params, defaultReturn);
|
|
81
|
+
}
|
|
82
|
+
const paramsForColumn = Object.assign(Object.assign({}, params), { column: this.adaptable.api.columnApi.getColumnWithColumnId(predicate.ColumnId),
|
|
83
|
+
// value: params?.node?.data?.[predicate.ColumnId],
|
|
84
|
+
value: this.adaptable.api.gridApi.getRawValueFromRowNode(params.node, predicate.ColumnId) });
|
|
85
|
+
if ('oldValue' in paramsForColumn) {
|
|
86
|
+
delete paramsForColumn.oldValue;
|
|
87
|
+
}
|
|
88
|
+
return this.handlePredicate(predicate, paramsForColumn, defaultReturn);
|
|
89
|
+
}
|
|
90
|
+
handleColumnPredicates(predicates, params, defaultReturn) {
|
|
91
|
+
return predicates.every((predicate) => this.handleColumnPredicate(predicate, params, defaultReturn));
|
|
92
|
+
}
|
|
74
93
|
handlePredicate(predicate, params, defaultReturn) {
|
|
75
94
|
var _a;
|
|
76
95
|
if (!predicate) {
|
|
@@ -67,8 +67,14 @@ class QueryApiImpl extends ApiBase_1.ApiBase {
|
|
|
67
67
|
}
|
|
68
68
|
expandCurrentQuery(query) {
|
|
69
69
|
const preparedQuery = query !== null && query !== void 0 ? query : this.getCurrentQuery();
|
|
70
|
-
this.getAdaptableApi().internalApi.showPopupWindow(
|
|
71
|
-
|
|
70
|
+
this.getAdaptableApi().internalApi.showPopupWindow({
|
|
71
|
+
id: windowFactory_1.WINDOW_QUERY_EDITOR,
|
|
72
|
+
title: 'Current Query',
|
|
73
|
+
icon: 'query',
|
|
74
|
+
factoryId: windowFactory_1.WINDOW_QUERY_EDITOR,
|
|
75
|
+
popupProps: {
|
|
76
|
+
value: preparedQuery,
|
|
77
|
+
},
|
|
72
78
|
});
|
|
73
79
|
}
|
|
74
80
|
fireQueryRunEvent() {
|
|
@@ -34,7 +34,13 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
34
34
|
showPopupScreen(module: AdaptableModule, componentName: string, popupParams?: ModuleParams, popupProps?: {
|
|
35
35
|
[key: string]: any;
|
|
36
36
|
}): void;
|
|
37
|
-
showPopupWindow(id
|
|
37
|
+
showPopupWindow({ id, title, icon, popupProps, factoryId, }: {
|
|
38
|
+
id: string;
|
|
39
|
+
title: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
popupProps: any;
|
|
42
|
+
factoryId: string;
|
|
43
|
+
}): void;
|
|
38
44
|
hidePopupScreen(): void;
|
|
39
45
|
setSettingPanelModuleMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
40
46
|
setModuleButtonMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
@@ -30,12 +30,13 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
30
30
|
showPopupScreen(module, componentName, popupParams, popupProps) {
|
|
31
31
|
this.dispatchAction(PopupRedux.PopupShowScreen(module, componentName, popupParams, popupProps));
|
|
32
32
|
}
|
|
33
|
-
showPopupWindow(id, title, icon, popupProps) {
|
|
33
|
+
showPopupWindow({ id, title, icon, popupProps, factoryId, }) {
|
|
34
34
|
this.dispatchAction(PopupRedux.PopupShowWindow({
|
|
35
35
|
Id: id,
|
|
36
36
|
Title: title,
|
|
37
37
|
Icon: icon,
|
|
38
38
|
PopupProps: popupProps,
|
|
39
|
+
FactoryId: factoryId,
|
|
39
40
|
}));
|
|
40
41
|
}
|
|
41
42
|
hidePopupScreen() {
|
|
@@ -461,7 +461,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
461
461
|
}
|
|
462
462
|
isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
|
|
463
463
|
var _a;
|
|
464
|
-
return this.getAdaptableApi().predicateApi.
|
|
464
|
+
return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, {
|
|
465
465
|
value: dataChangedEvent.newValue,
|
|
466
466
|
oldValue: dataChangedEvent.oldValue,
|
|
467
467
|
// TODO send real display value
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
2
|
import { CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
|
|
3
|
+
import { AdaptableColumn } from '../../types';
|
|
3
4
|
export declare class CalculatedColumnInternalApi extends ApiBase {
|
|
4
5
|
/**
|
|
5
6
|
* Returns all the references in the AdaptableState of the given CalculatedColumn
|
|
@@ -21,4 +22,5 @@ export declare class CalculatedColumnInternalApi extends ApiBase {
|
|
|
21
22
|
* @param calculatedColumnId CalculatedColumnId to check
|
|
22
23
|
*/
|
|
23
24
|
getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId: string): string[];
|
|
25
|
+
getCalculatedColumnsDependentOnColumn(column: AdaptableColumn): string[];
|
|
24
26
|
}
|
|
@@ -53,5 +53,14 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
53
53
|
return this.getReferencedColumnIdsForCalculatedColumn(calculatedColumn);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
getCalculatedColumnsDependentOnColumn(column) {
|
|
57
|
+
const calculatedColumns = this.adaptable.api.calculatedColumnApi.getCalculatedColumns();
|
|
58
|
+
return calculatedColumns
|
|
59
|
+
.filter((calculatedColumn) => {
|
|
60
|
+
const dependentColumns = this.getReferencedColumnIdsForCalculatedColumnId(calculatedColumn.ColumnId);
|
|
61
|
+
return dependentColumns.includes(column.columnId);
|
|
62
|
+
})
|
|
63
|
+
.map((calculatedColumn) => calculatedColumn.ColumnId);
|
|
64
|
+
}
|
|
56
65
|
}
|
|
57
66
|
exports.CalculatedColumnInternalApi = CalculatedColumnInternalApi;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { ChartContainer } from '../../types';
|
|
3
|
+
export declare class ChartingInternalApi extends ApiBase {
|
|
4
|
+
getContainerElement(chartContainer: ChartContainer): HTMLElement | null;
|
|
5
|
+
getContainerElemetnByName(containerName: string): HTMLElement | null;
|
|
6
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartingInternalApi = void 0;
|
|
4
|
+
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
5
|
+
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
6
|
+
class ChartingInternalApi extends ApiBase_1.ApiBase {
|
|
7
|
+
getContainerElement(chartContainer) {
|
|
8
|
+
const element = typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string'
|
|
9
|
+
? document.querySelector(chartContainer.element)
|
|
10
|
+
: chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element;
|
|
11
|
+
if (!element && typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string') {
|
|
12
|
+
(0, LoggingHelper_1.ConsoleLogByMessageType)(`Chart container element not found: ${chartContainer.element}`, 'Error');
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return element;
|
|
16
|
+
}
|
|
17
|
+
getContainerElemetnByName(containerName) {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const chartContainers = (_c = (_b = (_a = this.adaptable.api.optionsApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.chartingOptions) === null || _b === void 0 ? void 0 : _b.chartContainers) !== null && _c !== void 0 ? _c : [];
|
|
20
|
+
const chartContainer = chartContainers.find((container) => container.name === containerName);
|
|
21
|
+
return this.getContainerElement(chartContainer);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ChartingInternalApi = ChartingInternalApi;
|
|
@@ -117,4 +117,9 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
117
117
|
* @returns Format Columns with Expression
|
|
118
118
|
*/
|
|
119
119
|
getFormatColumnsWithExpression(): FormatColumn[];
|
|
120
|
+
getFormatColumnsDependentOnColumns(columnSet: Set<string>): FormatColumn[];
|
|
121
|
+
/**
|
|
122
|
+
* Retrieves the columns that need rerendering based on format column predicates.
|
|
123
|
+
*/
|
|
124
|
+
getFormatColumnColumnsDependentOnColumnChange(column: AdaptableColumn): string[];
|
|
120
125
|
}
|