@adaptabletools/adaptable 14.0.3 → 14.0.4
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/ChartStateChangeInfo.d.ts +5 -0
- package/src/Api/Events/ChartStateChangeInfo.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 +15 -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 +124 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -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
|
@@ -16,6 +16,7 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
16
16
|
export(report: Report, exportDestination: ExportDestination | string): void;
|
|
17
17
|
private isCustomDestination;
|
|
18
18
|
private convertReportToJSON;
|
|
19
|
+
private openReportInTablePopup;
|
|
19
20
|
private convertReportToCsv;
|
|
20
21
|
private convertReportToExcel;
|
|
21
22
|
private copyToClipboard;
|
|
@@ -19,6 +19,8 @@ const ReportExportDropdown_1 = require("../View/Export/ReportExportDropdown");
|
|
|
19
19
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
20
20
|
const ExportSelector_1 = require("../View/Export/ExportSelector");
|
|
21
21
|
const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
|
|
22
|
+
const windowFactory_1 = require("../View/Components/Popups/WindowPopups/windowFactory");
|
|
23
|
+
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
22
24
|
class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
23
25
|
constructor(api) {
|
|
24
26
|
super(ModuleConstants.ExportModuleId, ModuleConstants.ExportFriendlyName, 'export-data', 'ExportPopup', 'Export data from the Grid to numerous locations in numerous formatso', api);
|
|
@@ -124,6 +126,9 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
124
126
|
case Enums_1.ExportDestination.JSON:
|
|
125
127
|
this.convertReportToJSON(report);
|
|
126
128
|
break;
|
|
129
|
+
case Enums_1.ExportDestination.Table:
|
|
130
|
+
this.openReportInTablePopup(report);
|
|
131
|
+
break;
|
|
127
132
|
}
|
|
128
133
|
}
|
|
129
134
|
this.api.internalApi.dispatchReduxAction((0, SystemRedux_1.SystemVisualExportEnd)());
|
|
@@ -148,6 +153,44 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
148
153
|
const jsonFileName = this.api.internalApi.getReportService().getReportFileName(report.Name) + '.json';
|
|
149
154
|
Helper_1.Helper.createDownloadedFile(jsonContent, jsonFileName, 'application/json');
|
|
150
155
|
}
|
|
156
|
+
openReportInTablePopup(report) {
|
|
157
|
+
const reportData = this.api.internalApi.getReportService().getReportData(report, true);
|
|
158
|
+
if (this.isEmptyReportData(reportData)) {
|
|
159
|
+
this.showEmptyExportWarning();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const popupProps = {
|
|
163
|
+
reportData,
|
|
164
|
+
};
|
|
165
|
+
let title = 'Export Table';
|
|
166
|
+
if (report.Name) {
|
|
167
|
+
title = `${title} [${report.Name}]`;
|
|
168
|
+
}
|
|
169
|
+
if (report.Scope) {
|
|
170
|
+
const scopeText = this.api.internalApi
|
|
171
|
+
.getReportService()
|
|
172
|
+
.GetReportColumnScopeShortDescription(report);
|
|
173
|
+
if (scopeText === null || scopeText === void 0 ? void 0 : scopeText.length) {
|
|
174
|
+
title = `${title} ${scopeText.join(',')}`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (report.Query) {
|
|
178
|
+
const queryText = this.api.internalApi
|
|
179
|
+
.getReportService()
|
|
180
|
+
.GetReportExpressionDescription(report, this.api.columnApi.getColumns());
|
|
181
|
+
if (queryText === null || queryText === void 0 ? void 0 : queryText.length) {
|
|
182
|
+
title = `${title} ${queryText}`;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
this.api.internalApi.showPopupWindow({
|
|
186
|
+
// allow to open multiple tables
|
|
187
|
+
id: 'report-table-' + (0, Uuid_1.createUuid)(),
|
|
188
|
+
title: title,
|
|
189
|
+
icon: 'export-data',
|
|
190
|
+
factoryId: windowFactory_1.SHOW_EXPORT_TABLE,
|
|
191
|
+
popupProps,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
151
194
|
convertReportToCsv(report) {
|
|
152
195
|
const csvContent = this.createCSVContent(report);
|
|
153
196
|
if (StringExtensions_1.default.IsNullOrEmpty(csvContent)) {
|
|
@@ -216,7 +216,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
216
216
|
}
|
|
217
217
|
isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
|
|
218
218
|
var _a;
|
|
219
|
-
return this.api.predicateApi.
|
|
219
|
+
return this.api.predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, {
|
|
220
220
|
value: dataChangedEvent.newValue,
|
|
221
221
|
oldValue: dataChangedEvent.oldValue,
|
|
222
222
|
// TODO send real display value
|
|
@@ -64,13 +64,18 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
64
64
|
const dashboardModuleButtons = this.api.internalApi.getState().Dashboard.ModuleButtons;
|
|
65
65
|
if (dashboardModuleButtons.includes('ConditionalStyle')) {
|
|
66
66
|
dashboardModuleButtons[dashboardModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
67
|
-
|
|
67
|
+
const test2 = dashboardModuleButtons;
|
|
68
|
+
this.api.dashboardApi.setModuleButtons([
|
|
69
|
+
...new Set(dashboardModuleButtons),
|
|
70
|
+
]);
|
|
68
71
|
}
|
|
69
72
|
// update ConditionalStyle toolPanel buttons
|
|
70
73
|
const toolPanelModuleButtons = this.api.internalApi.getState().ToolPanel.ModuleButtons;
|
|
71
74
|
if (toolPanelModuleButtons.includes('ConditionalStyle')) {
|
|
72
75
|
toolPanelModuleButtons[toolPanelModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
73
|
-
this.api.toolPanelApi.setModuleButtons([
|
|
76
|
+
this.api.toolPanelApi.setModuleButtons([
|
|
77
|
+
...new Set(dashboardModuleButtons),
|
|
78
|
+
]);
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
updateFormatColumnSingleToMultiplePredicates() {
|
|
@@ -22,7 +22,7 @@ export interface ModuleInfo {
|
|
|
22
22
|
}
|
|
23
23
|
export declare type TeamSharingReferences = TeamSharingReference[];
|
|
24
24
|
export declare type TeamSharingReference = {
|
|
25
|
-
Module: StrictExtract<AdaptableModule, 'CalculatedColumn' | 'FreeTextColumn' | 'Query' | 'Alert' | '
|
|
25
|
+
Module: StrictExtract<AdaptableModule, 'CalculatedColumn' | 'FreeTextColumn' | 'Query' | 'Alert' | 'CustomSort' | 'FlashingCell' | 'FormatColumn' | 'PlusMinus' | 'Shortcut' | 'Schedule'>;
|
|
26
26
|
Reference: AdaptableObject;
|
|
27
27
|
};
|
|
28
28
|
export interface AdaptableObjectItemView {
|
|
@@ -293,7 +293,14 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
293
293
|
isVisible: true,
|
|
294
294
|
label: 'Expand Aggregated Value',
|
|
295
295
|
onClick: () => {
|
|
296
|
-
this.api.internalApi.showPopupWindow(
|
|
296
|
+
this.api.internalApi.showPopupWindow({
|
|
297
|
+
// force only one window instance opened
|
|
298
|
+
id: windowFactory_1.SHOW_PIVOT_COLUMN_DETAILS,
|
|
299
|
+
factoryId: windowFactory_1.SHOW_PIVOT_COLUMN_DETAILS,
|
|
300
|
+
title: `Rows for Aggregated Value: ${cellValue}`,
|
|
301
|
+
icon: undefined,
|
|
302
|
+
popupProps,
|
|
303
|
+
});
|
|
297
304
|
},
|
|
298
305
|
icon: {
|
|
299
306
|
name: 'arrowexpand',
|
|
@@ -73,6 +73,9 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
73
|
}
|
|
74
74
|
addColumnMenuItems(column) {
|
|
75
75
|
let returnColumnMenuItems = [];
|
|
76
|
+
const config = {
|
|
77
|
+
defaultCurrentSectionName: 'Style',
|
|
78
|
+
};
|
|
76
79
|
// Need a Column and an editable Module
|
|
77
80
|
if (column && this.isModuleEditable()) {
|
|
78
81
|
// First look at Sparkline Columns - needs to be editable array type
|
|
@@ -99,6 +102,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
99
102
|
action: sparklineColumnExists ? 'Edit' : 'New',
|
|
100
103
|
source: 'ColumnMenu',
|
|
101
104
|
value: styledColumn,
|
|
105
|
+
config,
|
|
102
106
|
};
|
|
103
107
|
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Sparkline Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
104
108
|
}
|
|
@@ -127,6 +131,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
127
131
|
action: styledColumnExists ? 'Edit' : 'New',
|
|
128
132
|
source: 'ColumnMenu',
|
|
129
133
|
value: styledColumn,
|
|
134
|
+
config,
|
|
130
135
|
};
|
|
131
136
|
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Styled Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
132
137
|
}
|
|
@@ -18,10 +18,16 @@ class ThemeModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
18
18
|
getViewProperties() {
|
|
19
19
|
return {
|
|
20
20
|
getStatusBarPanelProps: () => {
|
|
21
|
-
|
|
21
|
+
var _a;
|
|
22
|
+
const currentThemeName = this.api.themeApi.getCurrentTheme();
|
|
23
|
+
const currentTheme = this.api.themeApi
|
|
24
|
+
.getThemes()
|
|
25
|
+
.find((theme) => theme.Name === currentThemeName);
|
|
26
|
+
const text = (_a = currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.Description) !== null && _a !== void 0 ? _a : currentThemeName;
|
|
22
27
|
return {
|
|
23
|
-
content:
|
|
28
|
+
content: text,
|
|
24
29
|
popover: ThemeStatusPanelPopover_1.ThemeStatusPanelPopover,
|
|
30
|
+
popoverMinWidth: 120,
|
|
25
31
|
};
|
|
26
32
|
},
|
|
27
33
|
};
|
|
@@ -4,7 +4,7 @@ exports.getAlertPreviewViewItems = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Tag_1 = require("../../../components/Tag");
|
|
7
|
-
const
|
|
7
|
+
const AlertNotificationWizardSection_1 = require("../../../View/Alert/Wizard/AlertNotificationWizardSection");
|
|
8
8
|
const getAlertPreviewViewItems = (alert, api) => {
|
|
9
9
|
return {
|
|
10
10
|
name: 'Type and Display',
|
|
@@ -13,7 +13,7 @@ const getAlertPreviewViewItems = (alert, api) => {
|
|
|
13
13
|
if (!((_a = alert === null || alert === void 0 ? void 0 : alert.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification)) {
|
|
14
14
|
return React.createElement(Tag_1.Tag, null, alert.MessageType);
|
|
15
15
|
}
|
|
16
|
-
return (React.createElement(
|
|
16
|
+
return (React.createElement(AlertNotificationWizardSection_1.AlertPreview, { focusFirstButton: false, style: { maxWidth: 400 }, mt: 2, api: api, alertDefinition: alert }));
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAlertTypeViewItems = void 0;
|
|
4
|
+
const getAlertType_1 = require("./../../../View/Alert/Utilities/getAlertType");
|
|
5
|
+
const getAlertTypeViewItems = (alert) => {
|
|
6
|
+
const alertType = (0, getAlertType_1.getAlertType)(alert);
|
|
7
|
+
const text = (0, getAlertType_1.getAlertTypeText)(alertType);
|
|
8
|
+
return {
|
|
9
|
+
name: 'Type',
|
|
10
|
+
values: [text],
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
exports.getAlertTypeViewItems = getAlertTypeViewItems;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getObjectTagsViewItems = void 0;
|
|
4
4
|
const getObjectTagsViewItems = (object, api) => {
|
|
5
|
-
var _a;
|
|
6
|
-
if (!api.internalApi.shouldDisplayTagSections()) {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
if (!api.internalApi.shouldDisplayTagSections() || !((_a = object === null || object === void 0 ? void 0 : object.Tags) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
9
|
return {
|
|
10
10
|
name: 'Tags',
|
|
11
|
-
values: (
|
|
11
|
+
values: (_b = object === null || object === void 0 ? void 0 : object.Tags) === null || _b === void 0 ? void 0 : _b.map((tag) => api.internalApi.getLabelForTag(tag)),
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
exports.getObjectTagsViewItems = getObjectTagsViewItems;
|
|
@@ -11,8 +11,6 @@ export declare const CellSummaryModuleId: ModuleConstants;
|
|
|
11
11
|
export declare const CellSummaryFriendlyName = "Cell Summary";
|
|
12
12
|
export declare const ChartingModuleId: ModuleConstants;
|
|
13
13
|
export declare const ChartingFriendlyName = "Charts";
|
|
14
|
-
export declare const ConditionalStyleModuleId: ModuleConstants;
|
|
15
|
-
export declare const ConditionalStyleFriendlyName = "Conditional Style";
|
|
16
14
|
export declare const CustomSortModuleId: ModuleConstants;
|
|
17
15
|
export declare const CustomSortFriendlyName = "Custom Sort";
|
|
18
16
|
export declare const DashboardModuleId: ModuleConstants;
|
|
@@ -74,7 +72,6 @@ export declare const ADAPTABLE_MODULE_MAP: {
|
|
|
74
72
|
CalculatedColumn: string;
|
|
75
73
|
CellSummary: string;
|
|
76
74
|
Charting: string;
|
|
77
|
-
ConditionalStyle: string;
|
|
78
75
|
CustomSort: string;
|
|
79
76
|
Dashboard: string;
|
|
80
77
|
DataChangeHistory: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.
|
|
4
|
-
exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId =
|
|
3
|
+
exports.SmartEditFriendlyName = exports.SmartEditModuleId = exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.ChartingFriendlyName = exports.ChartingModuleId = exports.CellSummaryFriendlyName = exports.CellSummaryModuleId = exports.CalculatedColumnFriendlyName = exports.CalculatedColumnModuleId = exports.BulkUpdateFriendlyName = exports.BulkUpdateModuleId = exports.FlashingCellFriendlyName = exports.FlashingCellModuleId = exports.AlertModuleFriendlyName = exports.AlertModuleId = void 0;
|
|
4
|
+
exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId = void 0;
|
|
5
5
|
exports.AlertModuleId = 'Alert';
|
|
6
6
|
exports.AlertModuleFriendlyName = 'Alert';
|
|
7
7
|
exports.FlashingCellModuleId = 'FlashingCell';
|
|
@@ -14,8 +14,6 @@ exports.CellSummaryModuleId = 'CellSummary';
|
|
|
14
14
|
exports.CellSummaryFriendlyName = 'Cell Summary';
|
|
15
15
|
exports.ChartingModuleId = 'Charting';
|
|
16
16
|
exports.ChartingFriendlyName = 'Charts';
|
|
17
|
-
exports.ConditionalStyleModuleId = 'ConditionalStyle';
|
|
18
|
-
exports.ConditionalStyleFriendlyName = 'Conditional Style';
|
|
19
17
|
exports.CustomSortModuleId = 'CustomSort';
|
|
20
18
|
exports.CustomSortFriendlyName = 'Custom Sort';
|
|
21
19
|
exports.DashboardModuleId = 'Dashboard';
|
|
@@ -77,7 +75,6 @@ exports.ADAPTABLE_MODULE_MAP = {
|
|
|
77
75
|
[exports.CalculatedColumnModuleId]: exports.CalculatedColumnFriendlyName,
|
|
78
76
|
[exports.CellSummaryModuleId]: exports.CellSummaryFriendlyName,
|
|
79
77
|
[exports.ChartingModuleId]: exports.ChartingFriendlyName,
|
|
80
|
-
[exports.ConditionalStyleModuleId]: exports.ConditionalStyleFriendlyName,
|
|
81
78
|
[exports.CustomSortModuleId]: exports.CustomSortFriendlyName,
|
|
82
79
|
[exports.DashboardModuleId]: exports.DashboardFriendlyName,
|
|
83
80
|
[exports.DataChangeHistoryModuleId]: exports.DataChangeHistoryFriendlyName,
|
|
@@ -135,6 +135,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
135
135
|
Enums_1.ExportDestination.CSV,
|
|
136
136
|
Enums_1.ExportDestination.Clipboard,
|
|
137
137
|
Enums_1.ExportDestination.JSON,
|
|
138
|
+
Enums_1.ExportDestination.Table,
|
|
138
139
|
],
|
|
139
140
|
systemReportNames: [
|
|
140
141
|
GeneralConstants.ALL_DATA_REPORT,
|
|
@@ -5,7 +5,7 @@ import { AggregatedScalarExpressionEvaluation } from './aggregatedScalarExpressi
|
|
|
5
5
|
* List of all the Aggregation Functions available in AdaptableQL
|
|
6
6
|
*/
|
|
7
7
|
export declare type AggregatedBooleanFunctionName = 'WHERE' | 'COL' | 'GROUP_BY' | 'WEIGHT' | AggregationFunction | ComparisonFunction;
|
|
8
|
-
declare type AggregationFunction = 'SUM' | 'MIN' | 'MAX' | 'AVG';
|
|
8
|
+
declare type AggregationFunction = 'SUM' | 'MIN' | 'MAX' | 'AVG' | 'COUNT';
|
|
9
9
|
declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
|
|
10
10
|
export interface BooleanAggregationParameter extends BaseParameter<'aggregationBoolean', AggregationFunction> {
|
|
11
11
|
scalarAggregation: ScalarAggregationOperand;
|
|
@@ -7,12 +7,13 @@ const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluati
|
|
|
7
7
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
8
8
|
const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
|
|
9
9
|
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
10
|
-
const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG'];
|
|
10
|
+
const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG', 'COUNT'];
|
|
11
11
|
const aggregationScalarOperandMap = {
|
|
12
12
|
SUM: ['string', 'number'],
|
|
13
13
|
MIN: ['string', 'number'],
|
|
14
14
|
MAX: ['string', 'number'],
|
|
15
15
|
AVG: ['string', 'number'],
|
|
16
|
+
COUNT: ['string', 'number'],
|
|
16
17
|
};
|
|
17
18
|
// 0. optional non-capturing block of empty spaces
|
|
18
19
|
// 1. block containing a numeric value (any digits) (required)
|
|
@@ -35,6 +36,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
35
36
|
MAX: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['MAX'],
|
|
36
37
|
AVG: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['AVG'],
|
|
37
38
|
WEIGHT: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['WEIGHT'],
|
|
39
|
+
COUNT: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['COUNT'],
|
|
38
40
|
GROUP_BY: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['GROUP_BY'],
|
|
39
41
|
EQ: {
|
|
40
42
|
handler(args, context) {
|
|
@@ -6,7 +6,7 @@ import { AggregateParams } from './scalarAggregationHelper';
|
|
|
6
6
|
* List of all the AggregatedScalar Functions available in AdaptableQL
|
|
7
7
|
*/
|
|
8
8
|
export declare type AggregatedScalarFunctionName = ScalarAggregationFunction | OperandFunction;
|
|
9
|
-
export declare type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'AVG' | 'MIN' | 'MAX' | 'CUMUL';
|
|
9
|
+
export declare type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL';
|
|
10
10
|
declare type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY' | 'WEIGHT';
|
|
11
11
|
export interface ScalarAggregationParameter extends BaseParameter<'aggregationScalar', ScalarAggregationFunction> {
|
|
12
12
|
value: AggregatedScalarExpressionEvaluation;
|
|
@@ -12,6 +12,7 @@ exports.cumulativeAggregatedExpressionFunctions = [
|
|
|
12
12
|
'MIN',
|
|
13
13
|
'MAX',
|
|
14
14
|
'AVG',
|
|
15
|
+
'COUNT',
|
|
15
16
|
'WEIGHT',
|
|
16
17
|
'COL',
|
|
17
18
|
'GROUP_BY',
|
|
@@ -23,6 +24,7 @@ exports.aggregatedExpressionFunctions = [
|
|
|
23
24
|
'MAX',
|
|
24
25
|
'QUANT',
|
|
25
26
|
'AVG',
|
|
27
|
+
'COUNT',
|
|
26
28
|
'WEIGHT',
|
|
27
29
|
'COL',
|
|
28
30
|
'GROUP_BY',
|
|
@@ -30,7 +32,7 @@ exports.aggregatedExpressionFunctions = [
|
|
|
30
32
|
exports.aggregatedScalarExpressionFunctions = {
|
|
31
33
|
CUMUL: {
|
|
32
34
|
handler(args, context) {
|
|
33
|
-
const aggregationParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'aggregationScalar', ['SUM', 'PERCENTAGE', 'AVG', 'MIN', 'MAX'], args);
|
|
35
|
+
const aggregationParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'aggregationScalar', ['SUM', 'PERCENTAGE', 'AVG', 'MIN', 'MAX', 'COUNT'], args);
|
|
34
36
|
const overColumnParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'operand', ['OVER'], args);
|
|
35
37
|
const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('MAX', 'operand', ['GROUP_BY'], args, {
|
|
36
38
|
isOptional: true,
|
|
@@ -474,6 +476,49 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
474
476
|
],
|
|
475
477
|
category: 'aggregation',
|
|
476
478
|
},
|
|
479
|
+
COUNT: {
|
|
480
|
+
handler(args, context) {
|
|
481
|
+
const countColumnParameter = (0, expressionFunctionUtils_1.extractColumnParameter)('COUNT', args);
|
|
482
|
+
const countColumnName = countColumnParameter.value;
|
|
483
|
+
const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('COUNT', 'operand', ['GROUP_BY'], args, {
|
|
484
|
+
isOptional: true,
|
|
485
|
+
});
|
|
486
|
+
const aggregationExpressionEvaluation = {
|
|
487
|
+
aggregationParams: {
|
|
488
|
+
reducers: {
|
|
489
|
+
COUNT: {
|
|
490
|
+
name: 'COUNT',
|
|
491
|
+
field: countColumnName,
|
|
492
|
+
initialValue: 0,
|
|
493
|
+
reducer: (totalSum, rowValue) => {
|
|
494
|
+
if (isUndefinedValue(rowValue)) {
|
|
495
|
+
return totalSum;
|
|
496
|
+
}
|
|
497
|
+
return totalSum + 1;
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
rowFilterFn: context.filterFn,
|
|
503
|
+
};
|
|
504
|
+
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
505
|
+
const result = {
|
|
506
|
+
name: 'COUNT',
|
|
507
|
+
type: 'aggregationScalar',
|
|
508
|
+
value: aggregationExpressionEvaluation,
|
|
509
|
+
};
|
|
510
|
+
return result;
|
|
511
|
+
},
|
|
512
|
+
description: 'Counts the number of non-null (i.e. not empty) values in a given column.\nOptionally the aggregation may be computed within provided individual groups',
|
|
513
|
+
signatures: [
|
|
514
|
+
'COUNT( [colName] )',
|
|
515
|
+
'COUNT( COL(name: string))',
|
|
516
|
+
'COUNT( [colNameA], GROUP_BY( [colNameB] ))',
|
|
517
|
+
'COUNT( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
518
|
+
],
|
|
519
|
+
examples: ['COUNT([colA])', 'COUNT([colA], GROUP_BY([colB]))'],
|
|
520
|
+
category: 'aggregation',
|
|
521
|
+
},
|
|
477
522
|
OVER: {
|
|
478
523
|
handler(args, context) {
|
|
479
524
|
const columnParameter = (0, expressionFunctionUtils_1.extractColumnParameter)('OVER', args);
|
|
@@ -641,7 +686,23 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
|
|
|
641
686
|
return cumulationBag;
|
|
642
687
|
},
|
|
643
688
|
}
|
|
644
|
-
:
|
|
689
|
+
: aggregationParameter.name === 'COUNT'
|
|
690
|
+
? {
|
|
691
|
+
name: 'CUMUL_COUNT',
|
|
692
|
+
field: aggregationReducer.field,
|
|
693
|
+
initialValue: {
|
|
694
|
+
currentValue: aggregationReducer.initialValue,
|
|
695
|
+
cumulatedValues: {},
|
|
696
|
+
},
|
|
697
|
+
reducer: (cumulationBag, rowValue, rowNode) => {
|
|
698
|
+
if (isDefinedValue(rowValue)) {
|
|
699
|
+
cumulationBag.currentValue = cumulationBag.currentValue + 1;
|
|
700
|
+
}
|
|
701
|
+
cumulationBag.cumulatedValues[rowNode.id] = cumulationBag.currentValue;
|
|
702
|
+
return cumulationBag;
|
|
703
|
+
},
|
|
704
|
+
}
|
|
705
|
+
: null;
|
|
645
706
|
const rowValueGetter = aggregationParameter.name === 'PERCENTAGE'
|
|
646
707
|
? (rowNode, cumulationBag) => {
|
|
647
708
|
const cumulatedSum = cumulationBag.cumulatedValues[rowNode.id];
|
|
@@ -674,7 +735,7 @@ const addGroupByParams = (groupByColumnNames, expressionEvaluation) => {
|
|
|
674
735
|
}
|
|
675
736
|
};
|
|
676
737
|
const isUndefinedValue = (input) => {
|
|
677
|
-
return input == undefined || input === '';
|
|
738
|
+
return input == undefined || (typeof input === 'string' && input.trim() === '');
|
|
678
739
|
};
|
|
679
740
|
const isDefinedValue = (input) => {
|
|
680
741
|
return !isUndefinedValue(input);
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AggregatedScalarLiveValue = void 0;
|
|
4
4
|
const scalarAggregationHelper_1 = require("../ExpressionFunctions/scalarAggregationHelper");
|
|
5
|
+
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
6
|
+
const doOnceFlags = {};
|
|
7
|
+
const logOnce = (message) => {
|
|
8
|
+
if (doOnceFlags[message]) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
(0, LoggingHelper_1.LogAdaptableWarning)(message);
|
|
12
|
+
doOnceFlags[message] = true;
|
|
13
|
+
};
|
|
5
14
|
class AggregatedScalarLiveValue {
|
|
6
15
|
constructor(source, requestingModule, adaptableApi) {
|
|
7
16
|
this.source = source;
|
|
@@ -32,6 +41,10 @@ class AggregatedScalarLiveValue {
|
|
|
32
41
|
}
|
|
33
42
|
getAggregatedValueForRow(rowNode) {
|
|
34
43
|
const aggregationValue = this.getAggregationValue(rowNode);
|
|
44
|
+
if (aggregationValue == undefined) {
|
|
45
|
+
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
35
48
|
if (this.expressionEvaluation.rowValueGetter) {
|
|
36
49
|
return this.expressionEvaluation.rowValueGetter(rowNode, aggregationValue);
|
|
37
50
|
}
|
|
@@ -5,6 +5,14 @@ export declare class ChartingService implements IChartingService {
|
|
|
5
5
|
private api;
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
7
|
onChartModelChange(models: ChartModel[], eventType: string, params: any): void;
|
|
8
|
+
/**
|
|
9
|
+
* Emit events only for adaptable charting definition changes
|
|
10
|
+
* - an adaptable chart opens
|
|
11
|
+
* - an adaptable chart closes
|
|
12
|
+
* - an adaptable chart is created
|
|
13
|
+
* - an adaptable chart is deleted
|
|
14
|
+
*/
|
|
15
|
+
emitAdaptableChartDefinitonChange(): void;
|
|
8
16
|
saveNewChart(chartModel: ChartModel): void;
|
|
9
17
|
destroy(): void;
|
|
10
18
|
}
|
|
@@ -35,6 +35,21 @@ class ChartingService {
|
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
this.api.internalApi.dispatchReduxAction(SystemRedux.SystemChartingSetCurrentChartModels(models));
|
|
38
|
+
this.emitAdaptableChartDefinitonChange();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Emit events only for adaptable charting definition changes
|
|
42
|
+
* - an adaptable chart opens
|
|
43
|
+
* - an adaptable chart closes
|
|
44
|
+
* - an adaptable chart is created
|
|
45
|
+
* - an adaptable chart is deleted
|
|
46
|
+
*/
|
|
47
|
+
emitAdaptableChartDefinitonChange() {
|
|
48
|
+
const chartingOpenState = this.api.chartingApi.getChartingOpenState();
|
|
49
|
+
this.api.eventApi.emit('ChartsChanged', {
|
|
50
|
+
chartingOpenState,
|
|
51
|
+
adaptableApi: this.api,
|
|
52
|
+
});
|
|
38
53
|
}
|
|
39
54
|
saveNewChart(chartModel) {
|
|
40
55
|
var _a, _b;
|
|
@@ -188,7 +188,7 @@ class ReportService {
|
|
|
188
188
|
}
|
|
189
189
|
GetReportColumnsForReport(report, includePrimaryKey = false) {
|
|
190
190
|
let reportColumns = [];
|
|
191
|
-
let gridColumns = this.adaptableApi.columnApi.
|
|
191
|
+
let gridColumns = this.adaptableApi.columnApi.getExportableColumns();
|
|
192
192
|
if (this.adaptableApi.exportApi.isServerReport(report)) {
|
|
193
193
|
return reportColumns;
|
|
194
194
|
}
|
|
@@ -30,7 +30,7 @@ const DataChangeHistoryPopup_1 = require("./DataChangeHistory/DataChangeHistoryP
|
|
|
30
30
|
const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHistoryViewPanel");
|
|
31
31
|
const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
|
|
32
32
|
const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
|
|
33
|
-
const ChartingViewPanel_1 = require("./
|
|
33
|
+
const ChartingViewPanel_1 = require("./Charting/ChartingViewPanel");
|
|
34
34
|
exports.AdaptableViewFactory = {
|
|
35
35
|
BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
|
|
36
36
|
DashboardPopup: DashboardPopup_1.DashboardPopup,
|
|
@@ -11,8 +11,8 @@ const GridOptionsForm_1 = tslib_1.__importDefault(require("./GridOptionsForm"));
|
|
|
11
11
|
const EntitlementsForm_1 = tslib_1.__importDefault(require("./EntitlementsForm"));
|
|
12
12
|
const UiOptionsForm_1 = require("./UIOptions/UiOptionsForm");
|
|
13
13
|
const FinanceForm_1 = require("./FinanceForm");
|
|
14
|
-
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
15
14
|
const AdaptableOptionsForm_1 = require("./AdaptableOptionsForm");
|
|
15
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/AdaptableHelper"));
|
|
16
16
|
const ConfigurationWizard = (props) => {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
@@ -23,7 +23,8 @@ const ConfigurationWizard = (props) => {
|
|
|
23
23
|
toolPanels: ['columns', 'filters', 'adaptable'],
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
const preparedAdaptableOptions = Object.assign(Object.assign({}, props.adaptableOptions), { gridOptions: Object.assign(Object.assign({}, gridOptionDefaults), (_a = props === null || props === void 0 ? void 0 : props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) });
|
|
27
|
+
return AdaptableHelper_1.default.assignAdaptableOptions(preparedAdaptableOptions);
|
|
27
28
|
});
|
|
28
29
|
const [selectedColumns, setSelectedColumns] = (0, react_1.useState)(() => {
|
|
29
30
|
return props.adaptableOptions.gridOptions.columnDefs.reduce((acc, col) => {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AlertDefinition } from '../../../types';
|
|
2
|
+
export declare enum AlertType {
|
|
3
|
+
DataChange = "DataChange",
|
|
4
|
+
RowChange = "RowChange",
|
|
5
|
+
Aggregation = "Aggregation",
|
|
6
|
+
Observable = "Observable"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Based on alert shape the type is derived.
|
|
10
|
+
* In the future the alert will get a type property.
|
|
11
|
+
*
|
|
12
|
+
* @param alert
|
|
13
|
+
*/
|
|
14
|
+
export declare const getAlertType: (alert: AlertDefinition) => AlertType | null;
|
|
15
|
+
export declare const getAlertTypeText: (alertType: AlertType) => string;
|