@adaptabletools/adaptable 12.1.7 → 12.2.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 +127 -71
- package/bundle.cjs.js +108 -108
- package/index.css +145 -83
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +44 -10
- package/src/AdaptableOptions/FilterOptions.d.ts +12 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +22 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +10 -1
- package/src/AdaptableOptions/StateOptions.d.ts +25 -12
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/ExportApi.d.ts +5 -0
- package/src/Api/FilterApi.d.ts +23 -0
- package/src/Api/GridApi.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +5 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ExportApiImpl.js +19 -3
- package/src/Api/Implementation/FilterApiImpl.d.ts +5 -0
- package/src/Api/Implementation/FilterApiImpl.js +25 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +34 -3
- package/src/Api/Implementation/PredicateApiImpl.js +4 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +14 -1
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/QueryLanguageApi.d.ts +5 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +16 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +6 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +4 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -15
- package/src/PredefinedConfig/Common/Enums.js +1 -18
- package/src/PredefinedConfig/ExportState.d.ts +12 -4
- package/src/PredefinedConfig/LayoutState.d.ts +2 -1
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/AlertRedux.js +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.js +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +28 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +80 -2
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +1 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -28
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
- package/src/Redux/ActionsReducers/ScheduleRedux.js +5 -5
- package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ShortcutRedux.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +15 -6
- package/src/Strategy/AlertModule.d.ts +1 -0
- package/src/Strategy/AlertModule.js +20 -0
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.js +3 -3
- package/src/Strategy/ExportModule.d.ts +0 -1
- package/src/Strategy/ExportModule.js +0 -16
- package/src/Strategy/FilterModule.js +6 -0
- package/src/Strategy/Interface/IModule.d.ts +4 -0
- package/src/Strategy/LayoutModule.js +20 -20
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +0 -13
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +16 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +15 -11
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +3 -4
- package/src/Strategy/Utilities/getExpressionViewItems.js +3 -3
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +12 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +30 -66
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +22 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +423 -220
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +7 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +25 -7
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +0 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -54
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +31 -5
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -4
- package/src/Utilities/ObjectFactory.d.ts +4 -2
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +25 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +103 -0
- package/src/Utilities/Services/AlertService.d.ts +0 -1
- package/src/Utilities/Services/AlertService.js +5 -17
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +4 -4
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +29 -154
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +8 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +8 -4
- package/src/Utilities/Services/QueryLanguageService.js +68 -25
- package/src/Utilities/Services/ReportService.js +48 -48
- package/src/View/AdaptableView.js +1 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +10 -10
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +3 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +9 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +14 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +7 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +280 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.d.ts +1 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.js +5 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -3
- package/src/View/AdaptableWizardView/Wizard.js +2 -2
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -8
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.d.ts +2 -0
- package/src/View/CalculatedColumn/Utilities/{getCalculatedColumnSettingTags.js → getCalculatedColumnSettingsTags.js} +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +80 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +24 -14
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -52
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/Components/AdaptableObjectCollection/index.d.ts +3 -4
- package/src/View/Components/AdaptableObjectCollection/index.js +7 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +42 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/AdaptableObjectRow/index.js +1 -4
- package/src/View/Components/EntityRulesEditor/index.js +28 -7
- package/src/View/Components/FilterForm/FilterForm.js +8 -4
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -0
- package/src/View/Components/FilterForm/QuickFilterForm.js +19 -7
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +9 -0
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +28 -0
- package/src/View/Components/PermittedValuesSelector/index.d.ts +1 -0
- package/src/View/Components/PermittedValuesSelector/index.js +5 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +2 -1
- package/src/View/Components/Popups/AdaptableToaster.js +2 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -4
- package/src/View/Components/ValueSelector/index.js +8 -19
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +11 -10
- package/src/View/Export/ExportViewPanel.d.ts +1 -2
- package/src/View/Export/ExportViewPanel.js +4 -8
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +11 -12
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +12 -13
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +4 -3
- package/src/View/Export/Wizard/ReportSettingsWizard.js +1 -2
- package/src/View/Filter/FilterViewPanel.js +21 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/GridInfo/AdaptableObjectsSummary.js +5 -3
- package/src/View/GridInfo/AdaptableOptionsComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +6 -7
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.d.ts +0 -0
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.js +0 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +69 -8
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Query/QueryViewPanel.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +3 -4
- package/src/View/StateManagement/StateManagementPopup.js +18 -19
- package/src/agGrid/Adaptable.d.ts +12 -3
- package/src/agGrid/Adaptable.js +264 -148
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +5 -3
- package/src/agGrid/agGridMenuHelper.d.ts +1 -0
- package/src/agGrid/agGridMenuHelper.js +4 -2
- package/src/agGrid/weightedAverage.d.ts +6 -0
- package/src/agGrid/weightedAverage.js +66 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -1
- package/src/components/DragAndDropContext/ModuleManager.js +3 -4
- package/src/components/DragAndDropContext/TabList.js +9 -30
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -7
- package/src/components/DropdownButton/index.js +2 -2
- package/src/components/EmptyContent/index.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +24 -4
- package/src/components/ExpressionEditor/{EditorInputReactive.d.ts → EditorInputWithWhereClause.d.ts} +3 -3
- package/src/components/ExpressionEditor/{EditorInputReactive.js → EditorInputWithWhereClause.js} +6 -5
- package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.d.ts +2 -0
- package/src/components/ExpressionEditor/{editorButtonsReactive.js → editorButtonsAggregatedBoolean.js} +22 -37
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +50 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.js +40 -0
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +50 -19
- package/src/metamodel/adaptable.metamodel.d.ts +86 -5
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +14 -10
- package/src/types.d.ts +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.d.ts +0 -2
- package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +0 -3
- package/src/View/Layout/LayoutEditorStandalonePopup.js +0 -78
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +0 -27
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +0 -86
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +0 -16
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +0 -89
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +0 -7
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +0 -11
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +0 -6
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +0 -26
- package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +0 -9
- package/src/View/Layout/Wizard/LayoutEditor/index.js +0 -367
- package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +0 -28
- package/src/View/Layout/Wizard/LayoutEditor/reducer.js +0 -46
- package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +0 -10
- package/src/View/Layout/Wizard/LayoutEditor/utils.js +0 -14
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +0 -30
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +0 -132
- package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +0 -2
package/src/Api/FilterApi.d.ts
CHANGED
|
@@ -48,6 +48,11 @@ export interface FilterApi {
|
|
|
48
48
|
* @returns column filters
|
|
49
49
|
*/
|
|
50
50
|
getColumnFilters(): ColumnFilter[];
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves all active/no-suspedned Column Filters in currently applied Layout
|
|
53
|
+
* @returns column filters
|
|
54
|
+
*/
|
|
55
|
+
getActiveColumnFilters(): ColumnFilter[];
|
|
51
56
|
/**
|
|
52
57
|
* Retrieves the Column Filter for the specified Column.
|
|
53
58
|
* @param columnId Column ID to lookup
|
|
@@ -144,4 +149,22 @@ export interface FilterApi {
|
|
|
144
149
|
* @param filters2
|
|
145
150
|
*/
|
|
146
151
|
areColumnFiltersDifferent(filters1: ColumnFilter[], filters2: ColumnFilter[]): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Suspends a Column Filter
|
|
154
|
+
* @param columnFilter Column Filter to Suspend
|
|
155
|
+
*/
|
|
156
|
+
suspendColumnFilter(columnFilter: ColumnFilter): void;
|
|
157
|
+
/**
|
|
158
|
+
* Unsuspends a Column Filter
|
|
159
|
+
* @param columnFilter Column Filter to UnSuspend
|
|
160
|
+
*/
|
|
161
|
+
unSuspendColumnFilter(columnFilter: ColumnFilter): void;
|
|
162
|
+
/**
|
|
163
|
+
* Suspends all Column Filters
|
|
164
|
+
*/
|
|
165
|
+
suspendAllColumnFilters(): void;
|
|
166
|
+
/**
|
|
167
|
+
* Unsuspends all Column Filters
|
|
168
|
+
*/
|
|
169
|
+
unSuspendAllColumnFilters(): void;
|
|
147
170
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -313,10 +313,9 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
313
313
|
return scopeDescription + ' - ' + ruleDescription;
|
|
314
314
|
}
|
|
315
315
|
getAlertRuleDescription(alert) {
|
|
316
|
-
var _a, _b;
|
|
317
316
|
let ruleDescription = alert.Rule.Predicate
|
|
318
317
|
? this.adaptable.api.predicateApi.predicateToString(alert.Rule.Predicate)
|
|
319
|
-
:
|
|
318
|
+
: this.adaptable.api.internalApi.getAdaptableQueryExpressionText(alert.Rule);
|
|
320
319
|
return ruleDescription;
|
|
321
320
|
}
|
|
322
321
|
}
|
|
@@ -72,4 +72,5 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
72
72
|
getDefaultAggFunc(columnId: string): string;
|
|
73
73
|
getMinValueForNumericColumn(column: AdaptableColumn): number | undefined;
|
|
74
74
|
getMaxValueForNumericColumn(column: AdaptableColumn): number | undefined;
|
|
75
|
+
getTypesForColumn(columnId: string): string | string[] | undefined;
|
|
75
76
|
}
|
|
@@ -434,5 +434,10 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
434
434
|
// can we cache this in some way?
|
|
435
435
|
return Math.max(...this.getDistinctRawValuesForColumn(column.columnId));
|
|
436
436
|
}
|
|
437
|
+
getTypesForColumn(columnId) {
|
|
438
|
+
var _a;
|
|
439
|
+
const agGridColumn = this.getAgGridColumnForAdaptableColumn(columnId);
|
|
440
|
+
return (_a = agGridColumn === null || agGridColumn === void 0 ? void 0 : agGridColumn.getColDef()) === null || _a === void 0 ? void 0 : _a.type;
|
|
441
|
+
}
|
|
437
442
|
}
|
|
438
443
|
exports.ColumnApiImpl = ColumnApiImpl;
|
|
@@ -3,7 +3,7 @@ import { ExportState, Report, ReportData, ReportSchedule, SystemReportNames } fr
|
|
|
3
3
|
import { ApiBase } from './ApiBase';
|
|
4
4
|
import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
5
5
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
6
|
-
import { CustomDestination, ExportFormContext } from '../../AdaptableOptions/ExportOptions';
|
|
6
|
+
import { CustomDestination, CustomReport, ExportFormContext } from '../../AdaptableOptions/ExportOptions';
|
|
7
7
|
import { ExportDestination } from '../../PredefinedConfig/Common/Enums';
|
|
8
8
|
export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
9
9
|
getExportState(): ExportState;
|
|
@@ -30,6 +30,8 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
30
30
|
editReports(reports: Report[]): Report[];
|
|
31
31
|
isDataChangeInReport(cellDataChangedInfo: CellDataChangedInfo, report: Report): boolean;
|
|
32
32
|
exportVisualDataToExcel(): void;
|
|
33
|
+
getAllCustomReports(): CustomReport[] | undefined;
|
|
34
|
+
isCustomReport(report: Report): boolean;
|
|
33
35
|
runCustomReport(customReportName: string): ReportData | undefined;
|
|
34
36
|
getReportDataForReport(reportName: string): ReportData | undefined;
|
|
35
37
|
}
|
|
@@ -7,6 +7,8 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
9
9
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
11
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
10
12
|
class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
11
13
|
getExportState() {
|
|
12
14
|
return this.getAdaptableState().Export;
|
|
@@ -56,9 +58,16 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
56
58
|
return systemDestinations;
|
|
57
59
|
}
|
|
58
60
|
getAllReports() {
|
|
59
|
-
|
|
61
|
+
const reports = this.getAvailableSystemReports()
|
|
60
62
|
.map((s) => this.getReportByName(s))
|
|
61
63
|
.concat(this.getExportState().Reports);
|
|
64
|
+
const customReports = this.getAllCustomReports();
|
|
65
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(customReports)) {
|
|
66
|
+
reports.push(...customReports.map((c) => {
|
|
67
|
+
return ObjectFactory_1.default.CreateCustomReport(c.name);
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
return reports;
|
|
62
71
|
}
|
|
63
72
|
getReportSchedules() {
|
|
64
73
|
return this.getAdaptableState().Schedule.ReportSchedules;
|
|
@@ -111,7 +120,7 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
111
120
|
return true;
|
|
112
121
|
}
|
|
113
122
|
// if its a Custom Report then the User has to run it so we just ignore completely
|
|
114
|
-
if (
|
|
123
|
+
if (this.isCustomReport(report)) {
|
|
115
124
|
return false;
|
|
116
125
|
}
|
|
117
126
|
// Start with the DataChanged Column and go through all possibilities
|
|
@@ -169,9 +178,16 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
169
178
|
exportVisualDataToExcel() {
|
|
170
179
|
this.adaptable.exportVisualDataToExcel();
|
|
171
180
|
}
|
|
181
|
+
getAllCustomReports() {
|
|
182
|
+
return this.getExportOptions().customReports;
|
|
183
|
+
}
|
|
184
|
+
isCustomReport(report) {
|
|
185
|
+
var _a;
|
|
186
|
+
return ((_a = this.getAllCustomReports()) === null || _a === void 0 ? void 0 : _a.find((cr) => cr.name == report.Name)) != null;
|
|
187
|
+
}
|
|
172
188
|
runCustomReport(customReportName) {
|
|
173
189
|
var _a;
|
|
174
|
-
const customReport = (_a = this.
|
|
190
|
+
const customReport = (_a = this.getAllCustomReports()) === null || _a === void 0 ? void 0 : _a.find((cr) => cr.name == customReportName);
|
|
175
191
|
if (!customReport) {
|
|
176
192
|
LoggingHelper_1.LogAdaptableWarning(`Custom Report '${customReportName}' not found!`);
|
|
177
193
|
return undefined;
|
|
@@ -17,6 +17,7 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
|
|
|
17
17
|
isQuickFilterAvailable(): boolean;
|
|
18
18
|
isQuickFilterVisible(): boolean;
|
|
19
19
|
getColumnFilters(): ColumnFilter[];
|
|
20
|
+
getActiveColumnFilters(): ColumnFilter[];
|
|
20
21
|
getColumnFilter(columnId: string): ColumnFilter | undefined;
|
|
21
22
|
getColumnFilterDefs(): ColumnFilterDef[];
|
|
22
23
|
getColumnFiltersForLayout(layoutName: string): ColumnFilter[];
|
|
@@ -44,4 +45,8 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
|
|
|
44
45
|
shouldNewColumnFilterTriggerGridFiltering(action: LayoutRedux.LayoutColumnFilterAction | Redux.Action): boolean;
|
|
45
46
|
areColumnFiltersDifferent(oldFilters: ColumnFilter[], newFilters: ColumnFilter[]): boolean;
|
|
46
47
|
fireFilterAppliedEvent(): void;
|
|
48
|
+
suspendColumnFilter(columnFilter: ColumnFilter): void;
|
|
49
|
+
unSuspendColumnFilter(columnFilter: ColumnFilter): void;
|
|
50
|
+
suspendAllColumnFilters(): void;
|
|
51
|
+
unSuspendAllColumnFilters(): void;
|
|
47
52
|
}
|
|
@@ -47,6 +47,9 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
const currentLayout = this.adaptable.api.layoutApi.getCurrentLayout();
|
|
48
48
|
return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
49
49
|
}
|
|
50
|
+
getActiveColumnFilters() {
|
|
51
|
+
return this.getColumnFilters().filter((columnFilter) => !columnFilter.IsSuspended);
|
|
52
|
+
}
|
|
50
53
|
getColumnFilter(columnId) {
|
|
51
54
|
return this.getColumnFilters().find((columnFilter) => columnFilter.ColumnId == columnId);
|
|
52
55
|
}
|
|
@@ -237,7 +240,6 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
237
240
|
return allInputsHaveValues;
|
|
238
241
|
}
|
|
239
242
|
shouldNewColumnFilterTriggerGridFiltering(action) {
|
|
240
|
-
var _a, _b;
|
|
241
243
|
// trigger filter change only:
|
|
242
244
|
// - new -> new filter is active
|
|
243
245
|
// - clear -> previous filters was active
|
|
@@ -246,6 +248,8 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
246
248
|
// - edit -> different & new is active
|
|
247
249
|
// - edit -> different & old was active
|
|
248
250
|
// - set -> new filter is active
|
|
251
|
+
// filter -> suspend changes
|
|
252
|
+
var _a, _b;
|
|
249
253
|
const isNewAndActive = action.type === LayoutRedux.LAYOUT_COLUMN_FILTER_ADD &&
|
|
250
254
|
this.adaptable.api.filterApi.isFilterActive(action.columnFilter);
|
|
251
255
|
const isClearAndPreviousWasActive = action.type === LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR &&
|
|
@@ -273,11 +277,18 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
273
277
|
}
|
|
274
278
|
const isSetAndActive = action.type === LayoutRedux.LAYOUT_COLUMN_FILTER_SET &&
|
|
275
279
|
this.adaptable.api.filterApi.isFilterActive(action.columnFilter);
|
|
280
|
+
const isSuspendChanged = [
|
|
281
|
+
LayoutRedux.LAYOUT_COLUMN_FILTER_SUSPEND,
|
|
282
|
+
LayoutRedux.LAYOUT_COLUMN_FILTER_SUSPEND_ALL,
|
|
283
|
+
LayoutRedux.LAYOUT_COLUMN_FILTER_UNSUSPEND,
|
|
284
|
+
LayoutRedux.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL,
|
|
285
|
+
].includes(action.type);
|
|
276
286
|
return (isNewAndActive ||
|
|
277
287
|
isClearAndPreviousWasActive ||
|
|
278
288
|
isClearAllAtLeastOneActiveFilter ||
|
|
279
289
|
isEditTrigger ||
|
|
280
|
-
isSetAndActive
|
|
290
|
+
isSetAndActive ||
|
|
291
|
+
isSuspendChanged);
|
|
281
292
|
}
|
|
282
293
|
areColumnFiltersDifferent(oldFilters, newFilters) {
|
|
283
294
|
if (ArrayExtensions_1.default.IsNullOrEmpty(oldFilters) && ArrayExtensions_1.default.IsNullOrEmpty(newFilters)) {
|
|
@@ -294,5 +305,17 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
294
305
|
this.adaptable.api.eventApi.emit('FilterApplied', filterAppliedInfo);
|
|
295
306
|
}
|
|
296
307
|
}
|
|
308
|
+
suspendColumnFilter(columnFilter) {
|
|
309
|
+
this.adaptable.api.internalApi.dispatchReduxAction(LayoutRedux.LayoutColumnFilterSuspend(columnFilter));
|
|
310
|
+
}
|
|
311
|
+
unSuspendColumnFilter(columnFilter) {
|
|
312
|
+
this.adaptable.api.internalApi.dispatchReduxAction(LayoutRedux.LayoutColumnFilterUnSuspend(columnFilter));
|
|
313
|
+
}
|
|
314
|
+
suspendAllColumnFilters() {
|
|
315
|
+
this.adaptable.api.internalApi.dispatchReduxAction(LayoutRedux.LayoutColumnFilterSuspendAll());
|
|
316
|
+
}
|
|
317
|
+
unSuspendAllColumnFilters() {
|
|
318
|
+
this.adaptable.api.internalApi.dispatchReduxAction(LayoutRedux.LayoutColumnFilterUnSuspendAll());
|
|
319
|
+
}
|
|
297
320
|
}
|
|
298
321
|
exports.FilterApiImpl = FilterApiImpl;
|
|
@@ -61,6 +61,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
61
61
|
getVisibleRowNodes(): RowNode[];
|
|
62
62
|
getAllRowNodes(config: {
|
|
63
63
|
includeGroupRows?: boolean;
|
|
64
|
+
filterFn?: (rowNode: RowNode) => boolean;
|
|
64
65
|
}): RowNode[];
|
|
65
66
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
66
67
|
getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
@@ -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, AlertFormContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo, SharedEntity, AdaptableIcon } from '../../types';
|
|
14
|
+
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertFormContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo, SharedEntity, AdaptableIcon, AdaptableQuery } 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';
|
|
@@ -61,7 +61,6 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
61
61
|
[key: string]: any;
|
|
62
62
|
}): void;
|
|
63
63
|
hidePopupScreen(): void;
|
|
64
|
-
hidePopupAlert(): void;
|
|
65
64
|
setColumns(columns: AdaptableColumn[]): void;
|
|
66
65
|
setSettingPanelModuleMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
67
66
|
setModuleButtonMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
@@ -103,6 +102,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
103
102
|
getModules(): IModuleCollection;
|
|
104
103
|
getModuleFriendlyName(adaptableModule: AdaptableModule): string;
|
|
105
104
|
runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
|
|
105
|
+
evaluateExpressionInAdaptableQL(module: AdaptableQLModule, expression?: string): boolean;
|
|
106
106
|
forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
|
|
107
107
|
forAllVisibleRowNodesDo(func: (rowNode: RowNode) => void): void;
|
|
108
108
|
buildStandaloneColumnHeader(column: AdaptableColumn): AdaptableMenuItem[];
|
|
@@ -141,4 +141,5 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
141
141
|
getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
|
|
142
142
|
getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
|
|
143
143
|
getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
|
|
144
|
+
getAdaptableQueryExpressionText(query: Partial<AdaptableQuery>): string;
|
|
144
145
|
}
|
|
@@ -149,9 +149,6 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
149
149
|
hidePopupScreen() {
|
|
150
150
|
this.dispatchAction(PopupRedux.PopupHideScreen());
|
|
151
151
|
}
|
|
152
|
-
hidePopupAlert() {
|
|
153
|
-
this.dispatchAction(PopupRedux.PopupHideAlert());
|
|
154
|
-
}
|
|
155
152
|
setColumns(columns) {
|
|
156
153
|
this.dispatchAction(GridRedux.GridSetColumns(columns));
|
|
157
154
|
}
|
|
@@ -302,6 +299,30 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
302
299
|
const adaptableQLModules = this.getAdaptableQLOptions().externallyEvaluatedModules;
|
|
303
300
|
return !adaptableQLModules.includes(adaptableQLModule);
|
|
304
301
|
}
|
|
302
|
+
evaluateExpressionInAdaptableQL(module, expression) {
|
|
303
|
+
var _a;
|
|
304
|
+
// temporary, until `externallyEvaluatedModules` is removed completely
|
|
305
|
+
const externallyEvaluatedModules = this.getAdaptableQLOptions().externallyEvaluatedModules;
|
|
306
|
+
if (externallyEvaluatedModules === null || externallyEvaluatedModules === void 0 ? void 0 : externallyEvaluatedModules.length) {
|
|
307
|
+
// fallback to deprecated property
|
|
308
|
+
return this.runModuleInAdaptableQL(module);
|
|
309
|
+
}
|
|
310
|
+
const evaluateExpressionExternallyFn = (_a = this.getAdaptableQLOptions()) === null || _a === void 0 ? void 0 : _a.evaluateExpressionExternally;
|
|
311
|
+
if (typeof evaluateExpressionExternallyFn !== 'function') {
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
314
|
+
const context = {
|
|
315
|
+
adaptableApi: this.getAdaptableApi(),
|
|
316
|
+
module,
|
|
317
|
+
};
|
|
318
|
+
if (expression) {
|
|
319
|
+
context.expression = expression;
|
|
320
|
+
context.referencedColumns = this.getAdaptableApi()
|
|
321
|
+
.queryLanguageApi.getColumnsFromExpression(expression)
|
|
322
|
+
.map((columnId) => this.getAdaptableApi().columnApi.getColumnFromId(columnId));
|
|
323
|
+
}
|
|
324
|
+
return evaluateExpressionExternallyFn(context);
|
|
325
|
+
}
|
|
305
326
|
forAllRowNodesDo(func) {
|
|
306
327
|
this.adaptable.forAllRowNodesDo(func);
|
|
307
328
|
}
|
|
@@ -619,5 +640,15 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
619
640
|
// this will use the columnApi method that first looks for permitted values and then distinct values
|
|
620
641
|
return this.adaptable.api.columnApi.getDistinctDisplayValuesForColumn(column.columnId);
|
|
621
642
|
}
|
|
643
|
+
getAdaptableQueryExpressionText(query) {
|
|
644
|
+
var _a;
|
|
645
|
+
if (!query) {
|
|
646
|
+
return '';
|
|
647
|
+
}
|
|
648
|
+
const displayColumnFriendlyNames = (_a = this.adaptable.adaptableOptions.adaptableQLOptions) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
|
|
649
|
+
return displayColumnFriendlyNames
|
|
650
|
+
? this.adaptable.api.queryLanguageApi.getAdaptableQueryExpressionWithColumnFriendlyNames(query)
|
|
651
|
+
: this.adaptable.api.queryLanguageApi.getAdaptableQueryExpression(query);
|
|
652
|
+
}
|
|
622
653
|
}
|
|
623
654
|
exports.InternalApiImpl = InternalApiImpl;
|
|
@@ -56,6 +56,10 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
if (['Values', 'ExcludeValues'].includes(predicate.PredicateId) &&
|
|
60
|
+
ArrayExtensions_1.default.IsNullOrEmpty(predicate.Inputs)) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
59
63
|
return true;
|
|
60
64
|
}
|
|
61
65
|
handlePredicate(predicate, params, defaultReturn) {
|
|
@@ -13,4 +13,5 @@ export declare class QueryLanguageApiImpl extends ApiBase implements QueryLangua
|
|
|
13
13
|
getQueryableColumnIds(): string[] | undefined;
|
|
14
14
|
getModuleExpressionFunctionMap(): ExpressionFunctionMap;
|
|
15
15
|
getAdaptableQueryExpression(query: Partial<AdaptableQuery>): string | undefined;
|
|
16
|
+
getAdaptableQueryExpressionWithColumnFriendlyNames(query: Partial<AdaptableQuery>): string | undefined;
|
|
16
17
|
}
|
|
@@ -48,9 +48,17 @@ class QueryLanguageApiImpl extends ApiBase_1.ApiBase {
|
|
|
48
48
|
}
|
|
49
49
|
getColumnsFromExpression(expression) {
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
const columnIds = this.adaptable.api.internalApi
|
|
52
52
|
.getQueryLanguageService()
|
|
53
53
|
.getColumnsFromExpression(expression);
|
|
54
|
+
columnIds.forEach((columnId) => {
|
|
55
|
+
const calculatedColumn = this.adaptable.api.calculatedColumnApi.getCalculatedColumnForColumnId(columnId);
|
|
56
|
+
if (calculatedColumn) {
|
|
57
|
+
const transitiveColumnIds = this.getColumnsFromExpression(this.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
58
|
+
columnIds.push(...transitiveColumnIds);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return Array.from(new Set(columnIds));
|
|
54
62
|
}
|
|
55
63
|
catch (error) {
|
|
56
64
|
// defensive programing, this should happen only if someone botched the predefined configs
|
|
@@ -82,5 +90,10 @@ class QueryLanguageApiImpl extends ApiBase_1.ApiBase {
|
|
|
82
90
|
var _a, _b, _c, _d;
|
|
83
91
|
return ((_d = (_c = (_b = (_a = query.BooleanExpression) !== null && _a !== void 0 ? _a : query.ScalarExpression) !== null && _b !== void 0 ? _b : query.ObservableExpression) !== null && _c !== void 0 ? _c : query.AggregatedBooleanExpression) !== null && _d !== void 0 ? _d : query.AggregatedScalarExpression);
|
|
84
92
|
}
|
|
93
|
+
getAdaptableQueryExpressionWithColumnFriendlyNames(query) {
|
|
94
|
+
return this.adaptable.api.internalApi
|
|
95
|
+
.getQueryLanguageService()
|
|
96
|
+
.getExpressionWithColumnFriendlyNames(this.getAdaptableQueryExpression(query));
|
|
97
|
+
}
|
|
85
98
|
}
|
|
86
99
|
exports.QueryLanguageApiImpl = QueryLanguageApiImpl;
|
package/src/Api/InternalApi.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
|
17
17
|
import { Layout } from '../PredefinedConfig/LayoutState';
|
|
18
18
|
import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
19
19
|
import { IDataService } from '../Utilities/Services/Interface/IDataService';
|
|
20
|
-
import { AdaptableIcon, AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SharedEntity, SystemStatusMessageInfo } from '../types';
|
|
20
|
+
import { AdaptableIcon, AdaptableMessageType, AdaptableQuery, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SharedEntity, SystemStatusMessageInfo } from '../types';
|
|
21
21
|
import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
|
|
22
22
|
import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
|
|
23
23
|
import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
|
|
@@ -65,7 +65,6 @@ export interface InternalApi {
|
|
|
65
65
|
}): void;
|
|
66
66
|
isDocumentationLinksDisplayed(): boolean;
|
|
67
67
|
hidePopupScreen(): void;
|
|
68
|
-
hidePopupAlert(): void;
|
|
69
68
|
setColumns(columns: AdaptableColumn[]): void;
|
|
70
69
|
setSettingPanelModuleMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
71
70
|
setModuleButtonMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
@@ -105,7 +104,11 @@ export interface InternalApi {
|
|
|
105
104
|
getRowEditService(): IRowEditService;
|
|
106
105
|
getModules(): IModuleCollection;
|
|
107
106
|
getModuleFriendlyName(adaptableModule: AdaptableModule): string;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated use `evaluateExpressionInAdaptableQL()` instead
|
|
109
|
+
*/
|
|
108
110
|
runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
|
|
111
|
+
evaluateExpressionInAdaptableQL(adaptableQLModule: AdaptableQLModule, expression?: string): boolean;
|
|
109
112
|
forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
|
|
110
113
|
forAllVisibleRowNodesDo(func: (rowNode: RowNode) => void): void;
|
|
111
114
|
buildStandaloneColumnHeader(column: AdaptableColumn): AdaptableMenuItem[];
|
|
@@ -140,4 +143,5 @@ export interface InternalApi {
|
|
|
140
143
|
getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
|
|
141
144
|
getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
|
|
142
145
|
getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
|
|
146
|
+
getAdaptableQueryExpressionText(query: Partial<AdaptableQuery>): string;
|
|
143
147
|
}
|
|
@@ -56,4 +56,9 @@ export interface QueryLanguageApi {
|
|
|
56
56
|
* @param query - the AdaptableQuery
|
|
57
57
|
*/
|
|
58
58
|
getAdaptableQueryExpression(query: Partial<AdaptableQuery>): string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the Expression string of the given AdaptableQuery with the column friendly names (instead of their technical IDs)
|
|
61
|
+
* @param query - the AdaptableQuery
|
|
62
|
+
*/
|
|
63
|
+
getAdaptableQueryExpressionWithColumnFriendlyNames(query: Partial<AdaptableQuery>): string | undefined;
|
|
59
64
|
}
|
|
@@ -31,7 +31,7 @@ export interface CalculatedColumn extends AdaptableObject {
|
|
|
31
31
|
/**
|
|
32
32
|
* Scalar/AggregatedScalar Query used by AdapTableQL to evaluate Column's value
|
|
33
33
|
*/
|
|
34
|
-
Query
|
|
34
|
+
Query: AdaptableCalculatedColumnQuery;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Set of optional properties that define a Calculated Column's behaviour
|
|
@@ -40,7 +40,7 @@ export interface CalculatedColumnSettings extends SpecialColumnSettings {
|
|
|
40
40
|
/**
|
|
41
41
|
* Expression's return value DataType; inferred by AdapTable but settable by User
|
|
42
42
|
*/
|
|
43
|
-
DataType
|
|
43
|
+
DataType: 'String' | 'Number' | 'Boolean' | 'Date';
|
|
44
44
|
/**
|
|
45
45
|
* Show underlying Expression as ToolTip when hovering over a cell
|
|
46
46
|
* @defaultValue false
|
|
@@ -27,7 +27,7 @@ exports.SystemPredicateDefs = [
|
|
|
27
27
|
label: 'Values',
|
|
28
28
|
icon: { text: 'IN' },
|
|
29
29
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
30
|
-
moduleScope: ['filter'],
|
|
30
|
+
moduleScope: ['filter', 'conditionalstyle', 'alert'],
|
|
31
31
|
handler: ({ inputs, column, value }) => {
|
|
32
32
|
if (inputs.length === 0) {
|
|
33
33
|
return true;
|
|
@@ -53,7 +53,7 @@ exports.SystemPredicateDefs = [
|
|
|
53
53
|
label: 'Exclude Values',
|
|
54
54
|
icon: { text: '!IN' },
|
|
55
55
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
56
|
-
moduleScope: ['filter'],
|
|
56
|
+
moduleScope: ['filter', 'conditionalstyle', 'alert'],
|
|
57
57
|
handler: ({ inputs, column, value }) => {
|
|
58
58
|
// basically negation of IN
|
|
59
59
|
if (inputs.length === 0) {
|
|
@@ -135,7 +135,12 @@ exports.SystemPredicateDefs = [
|
|
|
135
135
|
icon: { text: '=0' },
|
|
136
136
|
columnScope: { DataTypes: ['Number'] },
|
|
137
137
|
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
138
|
-
handler: ({ value }) =>
|
|
138
|
+
handler: ({ value }) => {
|
|
139
|
+
if (typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
return Number(value) === 0;
|
|
143
|
+
},
|
|
139
144
|
},
|
|
140
145
|
{
|
|
141
146
|
id: 'Equals',
|
|
@@ -162,7 +167,14 @@ exports.SystemPredicateDefs = [
|
|
|
162
167
|
columnScope: { DataTypes: ['Number'] },
|
|
163
168
|
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
164
169
|
inputs: [{ type: 'number' }],
|
|
165
|
-
handler: ({ value, inputs }) =>
|
|
170
|
+
handler: ({ value, inputs }) => {
|
|
171
|
+
const input = inputs[0];
|
|
172
|
+
if ((typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) ||
|
|
173
|
+
(typeof input === 'string' && !StringExtensions_1.default.IsNumeric(input))) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
return Number(value) !== Number(inputs[0]);
|
|
177
|
+
},
|
|
166
178
|
toString: ({ inputs }) => `!= ${inputs[0]}`,
|
|
167
179
|
shortcuts: ['!='],
|
|
168
180
|
},
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isReactiveQuery = void 0;
|
|
4
4
|
const isReactiveQuery = (query) => {
|
|
5
|
-
return !!query.ObservableExpression
|
|
5
|
+
return !!query.ObservableExpression;
|
|
6
6
|
};
|
|
7
7
|
exports.isReactiveQuery = isReactiveQuery;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const WEIGHTED_AVERAGE_AGG_FN_NAME = "weightedAvg";
|
|
2
|
+
export interface WeightedAverageAggregation {
|
|
3
|
+
type: 'weightedAverage';
|
|
4
|
+
weightedColumnId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type AggregationColumns = Record<string, string | true | WeightedAverageAggregation>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuspendableObject, AdaptablePredicate } from '../../types';
|
|
2
2
|
import { TypeHint } from './Types';
|
|
3
3
|
/**
|
|
4
4
|
* Defines a Filter applied on a Column using a Predicate
|
|
5
5
|
*/
|
|
6
|
-
export interface ColumnFilter extends
|
|
6
|
+
export interface ColumnFilter extends SuspendableObject {
|
|
7
7
|
/**
|
|
8
8
|
* Column where Filter should be applied
|
|
9
9
|
*/
|
|
@@ -13,21 +13,6 @@ export declare enum MathOperation {
|
|
|
13
13
|
Multiply = "Multiply",
|
|
14
14
|
Divide = "Divide"
|
|
15
15
|
}
|
|
16
|
-
export declare enum ReportColumnScope {
|
|
17
|
-
AllColumns = "AllColumns",
|
|
18
|
-
VisibleColumns = "VisibleColumns",
|
|
19
|
-
SelectedColumns = "SelectedColumns",
|
|
20
|
-
ScopeColumns = "ScopeColumns",
|
|
21
|
-
CustomColumns = "CustomColumns"
|
|
22
|
-
}
|
|
23
|
-
export declare enum ReportRowScope {
|
|
24
|
-
AllRows = "AllRows",
|
|
25
|
-
VisibleRows = "VisibleRows",
|
|
26
|
-
SelectedCellRows = "SelectedCellRows",
|
|
27
|
-
SelectedRows = "SelectedRows",
|
|
28
|
-
ExpressionRows = "ExpressionRows",
|
|
29
|
-
CustomRows = "CustomRows"
|
|
30
|
-
}
|
|
31
16
|
export declare enum ExportDestination {
|
|
32
17
|
Excel = "Excel",
|
|
33
18
|
CSV = "CSV",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// General Enums
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ChangeDirection = exports.FilterOnDataChangeOptions = exports.SummaryOperation = exports.StatusColour = exports.ColumnMenuTab = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.ExportDestination = exports.
|
|
4
|
+
exports.ChangeDirection = exports.FilterOnDataChangeOptions = exports.SummaryOperation = exports.StatusColour = exports.ColumnMenuTab = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.ExportDestination = exports.MathOperation = exports.DataType = void 0;
|
|
5
5
|
var DataType;
|
|
6
6
|
(function (DataType) {
|
|
7
7
|
DataType["String"] = "String";
|
|
@@ -20,23 +20,6 @@ var MathOperation;
|
|
|
20
20
|
MathOperation["Divide"] = "Divide";
|
|
21
21
|
})(MathOperation = exports.MathOperation || (exports.MathOperation = {}));
|
|
22
22
|
// Enums used in Strategies
|
|
23
|
-
var ReportColumnScope;
|
|
24
|
-
(function (ReportColumnScope) {
|
|
25
|
-
ReportColumnScope["AllColumns"] = "AllColumns";
|
|
26
|
-
ReportColumnScope["VisibleColumns"] = "VisibleColumns";
|
|
27
|
-
ReportColumnScope["SelectedColumns"] = "SelectedColumns";
|
|
28
|
-
ReportColumnScope["ScopeColumns"] = "ScopeColumns";
|
|
29
|
-
ReportColumnScope["CustomColumns"] = "CustomColumns";
|
|
30
|
-
})(ReportColumnScope = exports.ReportColumnScope || (exports.ReportColumnScope = {}));
|
|
31
|
-
var ReportRowScope;
|
|
32
|
-
(function (ReportRowScope) {
|
|
33
|
-
ReportRowScope["AllRows"] = "AllRows";
|
|
34
|
-
ReportRowScope["VisibleRows"] = "VisibleRows";
|
|
35
|
-
ReportRowScope["SelectedCellRows"] = "SelectedCellRows";
|
|
36
|
-
ReportRowScope["SelectedRows"] = "SelectedRows";
|
|
37
|
-
ReportRowScope["ExpressionRows"] = "ExpressionRows";
|
|
38
|
-
ReportRowScope["CustomRows"] = "CustomRows";
|
|
39
|
-
})(ReportRowScope = exports.ReportRowScope || (exports.ReportRowScope = {}));
|
|
40
23
|
var ExportDestination;
|
|
41
24
|
(function (ExportDestination) {
|
|
42
25
|
ExportDestination["Excel"] = "Excel";
|
|
@@ -29,13 +29,13 @@ export interface Report extends AdaptableObject {
|
|
|
29
29
|
*/
|
|
30
30
|
Name: SystemReportName | string;
|
|
31
31
|
/**
|
|
32
|
-
* Columns to display: options are 'AllColumns', 'VisibleColumns', 'SelectedColumns', 'ScopeColumns'
|
|
32
|
+
* Columns to display: options are 'AllColumns', 'VisibleColumns', 'SelectedColumns', 'ScopeColumns'
|
|
33
33
|
*/
|
|
34
|
-
ReportColumnScope:
|
|
34
|
+
ReportColumnScope: ReportColumnScope;
|
|
35
35
|
/**
|
|
36
|
-
* Rows to export: options are 'AllRows', 'VisibleRows', 'SelectedCellRows', 'SelectedRows', 'ExpressionRows'
|
|
36
|
+
* Rows to export: options are 'AllRows', 'VisibleRows', 'SelectedCellRows', 'SelectedRows', 'ExpressionRows'
|
|
37
37
|
*/
|
|
38
|
-
ReportRowScope:
|
|
38
|
+
ReportRowScope: ReportRowScope;
|
|
39
39
|
/**
|
|
40
40
|
* Columns Scope; only required if `ReportColumnScope` is 'ScopeColumns'
|
|
41
41
|
*/
|
|
@@ -79,6 +79,14 @@ export interface ReportData {
|
|
|
79
79
|
* Names of Reports provided by AdapTable
|
|
80
80
|
*/
|
|
81
81
|
export declare type SystemReportName = 'Visual Data' | 'All Data' | 'Current Data' | 'Selected Cells' | 'Selected Rows';
|
|
82
|
+
/**
|
|
83
|
+
* Columns to be included in a Report
|
|
84
|
+
*/
|
|
85
|
+
export declare type ReportColumnScope = 'AllColumns' | 'VisibleColumns' | 'SelectedColumns' | 'ScopeColumns';
|
|
86
|
+
/**
|
|
87
|
+
* AG Grid Row Data to be included in a Report
|
|
88
|
+
*/
|
|
89
|
+
export declare type ReportRowScope = 'AllRows' | 'VisibleRows' | 'SelectedCellRows' | 'SelectedRows' | 'ExpressionRows';
|
|
82
90
|
/**
|
|
83
91
|
* Array containing all System Report names
|
|
84
92
|
*/
|
|
@@ -2,6 +2,7 @@ import { ConfigState } from './ConfigState';
|
|
|
2
2
|
import { AdaptableObject } from './Common/AdaptableObject';
|
|
3
3
|
import { ColumnSort } from './Common/ColumnSort';
|
|
4
4
|
import { ColumnFilter } from '../types';
|
|
5
|
+
import { AggregationColumns } from './Common/AggregationColumns';
|
|
5
6
|
/**
|
|
6
7
|
* Predefined Configuration for the Layout Module
|
|
7
8
|
*/
|
|
@@ -52,7 +53,7 @@ export interface Layout extends AdaptableObject {
|
|
|
52
53
|
/**
|
|
53
54
|
* Columns showing aggregated values in grouped rows; first value in record is Column name and second is either the agg func (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
|
|
54
55
|
*/
|
|
55
|
-
AggregationColumns?:
|
|
56
|
+
AggregationColumns?: AggregationColumns;
|
|
56
57
|
/**
|
|
57
58
|
* Whether pivoting should be enabled in the Grid when this Layout loads
|
|
58
59
|
*/
|