@adaptabletools/adaptable 10.0.0 → 10.0.4-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 +77 -29
- package/index.css +89 -31
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +14 -7
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +88 -4
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +39 -0
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/GridApi.d.ts +34 -8
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -9
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnApiImpl.js +69 -36
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -17
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
- package/src/Api/Implementation/GridApiImpl.js +25 -10
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -1
- package/src/Api/Implementation/InternalApiImpl.js +20 -4
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +3 -0
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +12 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +59 -86
- package/src/Api/InternalApi.d.ts +3 -1
- package/src/Api/QueryLanguageApi.d.ts +5 -0
- package/src/Api/UserInterfaceApi.d.ts +16 -6
- package/src/PredefinedConfig/AlertState.d.ts +10 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +4 -37
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +33 -33
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +3 -2
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → PredefinedConfig/Common/SpecialColumnSettings.js} +0 -0
- package/src/PredefinedConfig/FilterState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +10 -0
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +7 -1
- package/src/Redux/Store/AdaptableStore.js +7 -3
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.js +12 -11
- package/src/Strategy/BulkUpdateModule.js +5 -5
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +0 -2
- package/src/Strategy/ExportModule.js +59 -62
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +5 -5
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/LayoutModule.js +3 -3
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.js +6 -6
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/DateHelper.d.ts +8 -2
- package/src/Utilities/Helpers/DateHelper.js +42 -20
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +14 -2
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/MetamodelService.js +1 -0
- package/src/Utilities/Services/ModuleService.js +31 -24
- package/src/Utilities/Services/ReportService.js +12 -12
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +53 -32
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +3 -0
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +14 -5
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +72 -31
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -6
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +2 -2
- package/src/View/CustomSort/CustomSortPopup.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -3
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +6 -8
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +20 -3
- package/src/agGrid/Adaptable.d.ts +20 -4
- package/src/agGrid/Adaptable.js +234 -102
- package/src/agGrid/agGridHelper.js +32 -32
- package/src/agGrid/agGridMenuHelper.js +2 -2
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/ExpressionEditor/index.js +8 -7
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/metamodel/adaptable.metamodel.d.ts +125 -7
- package/src/metamodel/adaptable.metamodel.js +416 -101
- package/src/types.d.ts +4 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
|
@@ -25,19 +25,27 @@ export interface GridRow {
|
|
|
25
25
|
*/
|
|
26
26
|
export interface RowInfo {
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Is Row a Master Row (in a Master-Detail grid)
|
|
29
29
|
*/
|
|
30
30
|
isMaster?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Is Row expanded (if a group row)
|
|
33
33
|
*/
|
|
34
34
|
isExpanded?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Is Row grouped
|
|
37
37
|
*/
|
|
38
38
|
isGroup?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Is Row selected
|
|
41
|
+
*/
|
|
42
|
+
isSelected?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Is Row displayed (ie. filtered, not necessarily in viewport)
|
|
45
|
+
*/
|
|
46
|
+
isDisplayed?: boolean;
|
|
39
47
|
/**
|
|
40
48
|
* What level the Row is (if Row Grouping is active)
|
|
41
49
|
*/
|
|
42
|
-
|
|
50
|
+
rowGroupLevel?: number;
|
|
43
51
|
}
|
|
@@ -14,7 +14,6 @@ import { CachedQuery } from './QueryState';
|
|
|
14
14
|
import { AdaptableFlashingAlert } from './Common/AdaptableFlashingAlert';
|
|
15
15
|
import { TypeUuid } from './Uuid';
|
|
16
16
|
import { SummaryOperation } from './Common/Enums';
|
|
17
|
-
import { ProgressIndicator } from '../Utilities/Interface/ProgressIndicator';
|
|
18
17
|
import { ExportCustomDestinationPopup } from './ExportState';
|
|
19
18
|
export type { IPushPullReport, IPushPullDomain };
|
|
20
19
|
export type { Glue42Report };
|
|
@@ -63,3 +62,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
63
62
|
suspendTime: Date;
|
|
64
63
|
};
|
|
65
64
|
}
|
|
65
|
+
export interface ProgressIndicator {
|
|
66
|
+
active: boolean;
|
|
67
|
+
label: string;
|
|
68
|
+
}
|
|
@@ -497,6 +497,6 @@ exports.SystemReducer = (state = initialState, action) => {
|
|
|
497
497
|
return state;
|
|
498
498
|
}
|
|
499
499
|
};
|
|
500
|
-
const getDataChangeHistoryKey = ({ columnId, primaryKeyValue }) => {
|
|
500
|
+
const getDataChangeHistoryKey = ({ column: columnId, primaryKeyValue, }) => {
|
|
501
501
|
return JSON.stringify({ columnId, primaryKeyValue });
|
|
502
502
|
};
|
|
@@ -8,6 +8,7 @@ const isArray_1 = tslib_1.__importDefault(require("lodash-es/isArray"));
|
|
|
8
8
|
const extend_1 = tslib_1.__importDefault(require("lodash-es/extend"));
|
|
9
9
|
const isObject_1 = tslib_1.__importDefault(require("lodash-es/isObject"));
|
|
10
10
|
const isAdaptableObject_1 = require("../../Utilities/isAdaptableObject");
|
|
11
|
+
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
11
12
|
function customizer(objValue, srcValue) {
|
|
12
13
|
if (isArray_1.default(objValue)) {
|
|
13
14
|
if (!Array.isArray(srcValue)) {
|
|
@@ -55,7 +56,12 @@ function MergeStateFunction(oldState, newState) {
|
|
|
55
56
|
// add source 'Config' only to predefined objects
|
|
56
57
|
const config = AddStateSource(oldState, 'Config');
|
|
57
58
|
// source 'User' will be added to all other objects, after the merge (see bottom of this function)
|
|
58
|
-
|
|
59
|
+
let state = newState;
|
|
60
|
+
if (!state || typeof state !== 'object') {
|
|
61
|
+
// in case loadState returns something different than an empty object
|
|
62
|
+
LoggingHelper_1.LogAdaptableWarning('State is something different that expected, expected object, received: ', state);
|
|
63
|
+
state = {};
|
|
64
|
+
}
|
|
59
65
|
// any Module in config that doesn't exist in state will be added
|
|
60
66
|
for (const configModuleName in config) {
|
|
61
67
|
(_a = state[configModuleName]) !== null && _a !== void 0 ? _a : (state[configModuleName] = config[configModuleName]);
|
|
@@ -43,6 +43,7 @@ const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
|
|
|
43
43
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
44
44
|
const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
|
|
45
45
|
const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
|
|
46
|
+
const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
|
|
46
47
|
exports.INIT_STATE = 'INIT_STATE';
|
|
47
48
|
exports.LOAD_STATE = 'LOAD_STATE';
|
|
48
49
|
const NON_PERSIST_ACTIONS = {
|
|
@@ -50,6 +51,9 @@ const NON_PERSIST_ACTIONS = {
|
|
|
50
51
|
'@@INIT': true,
|
|
51
52
|
'@@redux/init': true,
|
|
52
53
|
[exports.INIT_STATE]: true,
|
|
54
|
+
// progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
|
|
55
|
+
[SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_SHOW]: true,
|
|
56
|
+
[SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_HIDE]: true,
|
|
53
57
|
};
|
|
54
58
|
exports.InitState = () => ({
|
|
55
59
|
type: exports.INIT_STATE,
|
|
@@ -382,7 +386,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
382
386
|
if (((_c = actionTyped.alert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
|
|
383
387
|
actionTyped.alert.dataChangedInfo) {
|
|
384
388
|
let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
|
|
385
|
-
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
|
|
389
|
+
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
|
|
386
390
|
}
|
|
387
391
|
return ret;
|
|
388
392
|
}
|
|
@@ -398,7 +402,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
398
402
|
var _a;
|
|
399
403
|
if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) && alert.dataChangedInfo) {
|
|
400
404
|
let rowNode = alert.dataChangedInfo.rowNode;
|
|
401
|
-
adaptable.refreshCells([rowNode], [alert.dataChangedInfo.columnId], true);
|
|
405
|
+
adaptable.refreshCells([rowNode], [alert.dataChangedInfo.column.columnId], true);
|
|
402
406
|
}
|
|
403
407
|
});
|
|
404
408
|
return ret;
|
|
@@ -412,7 +416,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
412
416
|
let ret = next(action);
|
|
413
417
|
if (actionTyped.alert.dataChangedInfo) {
|
|
414
418
|
let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
|
|
415
|
-
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
|
|
419
|
+
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
|
|
416
420
|
}
|
|
417
421
|
return ret;
|
|
418
422
|
}
|
|
@@ -118,26 +118,26 @@ class AdaptableModuleBase {
|
|
|
118
118
|
return false;
|
|
119
119
|
}
|
|
120
120
|
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(functionType)) {
|
|
121
|
-
if (functionType == 'sort' && !column.
|
|
122
|
-
return column.
|
|
121
|
+
if (functionType == 'sort' && !column.isSparkline) {
|
|
122
|
+
return column.sortable;
|
|
123
123
|
}
|
|
124
124
|
else if (functionType == 'editable') {
|
|
125
|
-
return !column.
|
|
125
|
+
return !column.readOnly;
|
|
126
126
|
}
|
|
127
127
|
else if (functionType == 'style') {
|
|
128
|
-
return !column.
|
|
128
|
+
return !column.isSparkline;
|
|
129
129
|
}
|
|
130
130
|
else if (functionType == 'sparkline') {
|
|
131
|
-
return column.
|
|
131
|
+
return column.isSparkline;
|
|
132
132
|
}
|
|
133
133
|
else if (functionType == 'numeric') {
|
|
134
|
-
return column.
|
|
134
|
+
return column.dataType == Enums_1.DataType.Number;
|
|
135
135
|
}
|
|
136
136
|
else if (functionType == 'filter') {
|
|
137
|
-
return column.
|
|
137
|
+
return column.filterable;
|
|
138
138
|
}
|
|
139
139
|
else if (functionType == 'quickfilter') {
|
|
140
|
-
return this.api.columnApi.usesAdaptableQuickFilter(column.
|
|
140
|
+
return this.api.columnApi.usesAdaptableQuickFilter(column.columnId);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
return true;
|
|
@@ -22,7 +22,8 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
}
|
|
23
23
|
if (this.api.internalApi.getAdaptableOptions().notificationsOptions
|
|
24
24
|
.dataChangeDetectionPolicy === 'formattedValue') {
|
|
25
|
-
const { oldValue, newValue
|
|
25
|
+
const { oldValue, newValue } = dataChangedInfo;
|
|
26
|
+
const columnId = dataChangedInfo.column.columnId;
|
|
26
27
|
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
|
|
27
28
|
const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
|
|
28
29
|
if (oldFormattedValue === newFormattedValue) {
|
|
@@ -50,7 +51,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
50
51
|
else if (this.api.scopeApi.scopeHasColumns(alertDefinition.Scope)) {
|
|
51
52
|
return this.api.scopeApi
|
|
52
53
|
.getColumnsForScope(alertDefinition.Scope)
|
|
53
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
54
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
54
55
|
}
|
|
55
56
|
return [];
|
|
56
57
|
}
|
|
@@ -192,7 +193,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
192
193
|
}
|
|
193
194
|
addColumnMenuItems(column) {
|
|
194
195
|
if (column && this.isModuleEditable()) {
|
|
195
|
-
if (!this.api.columnApi.isCalculatedColumn(column.
|
|
196
|
+
if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
|
|
196
197
|
const flashingAlertDefinitions = this.api.alertApi.getFlashingAlertDefinitions();
|
|
197
198
|
const flashingAlertForCurrentColumn = flashingAlertDefinitions.find((flashingAlertDefinition) => {
|
|
198
199
|
return this.api.scopeApi.isColumnInScope(column, flashingAlertDefinition.Scope);
|
|
@@ -205,7 +206,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
205
206
|
return [
|
|
206
207
|
this.createColumnMenuItemReduxAction('Add Flashing Alert', this.moduleInfo.Glyph, AlertRedux.FlashingAlertDefinitionAdd({
|
|
207
208
|
Scope: {
|
|
208
|
-
ColumnIds: [column.
|
|
209
|
+
ColumnIds: [column.columnId],
|
|
209
210
|
},
|
|
210
211
|
Rule: {
|
|
211
212
|
Predicate: { PredicateId: 'Any' },
|
|
@@ -229,7 +230,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
232
|
const flashingAlertForRow = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue);
|
|
232
|
-
const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.
|
|
233
|
+
const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
233
234
|
if (flashingAlertForRow && flashingAlertForRow.flashTarget === 'row') {
|
|
234
235
|
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Alert for Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingAlertDelete(flashingAlertForRow)));
|
|
235
236
|
}
|
|
@@ -272,12 +273,12 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
272
273
|
showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
|
|
273
274
|
alertDefinitions.forEach((alertDefinition) => {
|
|
274
275
|
// might be better to do a single alert with all the messages?
|
|
275
|
-
this.api.alertApi.showAlert(
|
|
276
|
+
this.api.alertApi.showAlert(dataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
|
|
276
277
|
});
|
|
277
278
|
}
|
|
278
279
|
showFlashingAlertsForDefinitions(dataChangedInfo, flashingAlertDefinitions = []) {
|
|
279
|
-
const allColumnIds = this.api.columnApi.getColumns().map((c) => c.
|
|
280
|
-
const columnDataType =
|
|
280
|
+
const allColumnIds = this.api.columnApi.getColumns().map((c) => c.columnId);
|
|
281
|
+
const columnDataType = dataChangedInfo.column.dataType;
|
|
281
282
|
const numeric = columnDataType === 'Number';
|
|
282
283
|
const isComparableType = numeric || columnDataType === 'Date';
|
|
283
284
|
let up = false;
|
|
@@ -292,7 +293,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
292
293
|
}
|
|
293
294
|
flashingAlertDefinitions.forEach((flashingAlertDefinition) => {
|
|
294
295
|
const flashTarget = this.api.alertApi.getFlashingAlertFlashTarget(flashingAlertDefinition);
|
|
295
|
-
const flashColumnIds = { [dataChangedInfo.columnId]: true };
|
|
296
|
+
const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
|
|
296
297
|
if (flashTarget === 'row') {
|
|
297
298
|
allColumnIds.forEach((colId) => {
|
|
298
299
|
flashColumnIds[colId] = true;
|
|
@@ -319,7 +320,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
319
320
|
}
|
|
320
321
|
getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
|
|
321
322
|
let relatedAlertDefinitions = definitions
|
|
322
|
-
.filter((v) => this.api.scopeApi.isColumnInScope(
|
|
323
|
+
.filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
|
|
323
324
|
.filter((alertDefinition) => !AdaptableQuery_1.isReactiveQuery(alertDefinition.Rule));
|
|
324
325
|
let triggeredAlerts = [];
|
|
325
326
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
|
|
@@ -353,7 +354,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
353
354
|
// TODO send real display value
|
|
354
355
|
displayValue: null,
|
|
355
356
|
node: dataChangedEvent.rowNode,
|
|
356
|
-
column:
|
|
357
|
+
column: dataChangedEvent.column,
|
|
357
358
|
}, defaultNoPredicateReturn);
|
|
358
359
|
}
|
|
359
360
|
getTeamSharingAction() {
|
|
@@ -20,7 +20,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
20
20
|
let menuItemShowPopup = undefined;
|
|
21
21
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
22
22
|
if (menuContext.adaptableColumn &&
|
|
23
|
-
!menuContext.adaptableColumn.
|
|
23
|
+
!menuContext.adaptableColumn.readOnly &&
|
|
24
24
|
menuContext.isSelectedCell &&
|
|
25
25
|
menuContext.isSingleSelectedColumn &&
|
|
26
26
|
this.api.gridApi.areCellsEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -70,7 +70,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
let selectedColumn = selectedCellInfo.columns[0];
|
|
73
|
-
if (selectedColumn && selectedColumn.
|
|
73
|
+
if (selectedColumn && selectedColumn.readOnly) {
|
|
74
74
|
return {
|
|
75
75
|
IsValid: false,
|
|
76
76
|
Alert: {
|
|
@@ -102,9 +102,9 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
102
102
|
let columnId = '';
|
|
103
103
|
if (!this.api.internalApi.isGridInPivotMode()) {
|
|
104
104
|
if (selectedCellInfo != null && selectedCellInfo.columns.length > 0) {
|
|
105
|
-
columnId = selectedCellInfo.columns[0].
|
|
105
|
+
columnId = selectedCellInfo.columns[0].columnId;
|
|
106
106
|
let typedBulkUpdateValue;
|
|
107
|
-
switch (selectedCellInfo.columns[0].
|
|
107
|
+
switch (selectedCellInfo.columns[0].dataType) {
|
|
108
108
|
case Enums_1.DataType.Number:
|
|
109
109
|
typedBulkUpdateValue = Number(bulkUpdateValue);
|
|
110
110
|
break;
|
|
@@ -119,7 +119,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
119
119
|
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
120
120
|
oldValue: selectedCell.rawValue,
|
|
121
121
|
newValue: typedBulkUpdateValue,
|
|
122
|
-
|
|
122
|
+
column: selectedCell.column,
|
|
123
123
|
primaryKeyValue: selectedCell.primaryKeyValue,
|
|
124
124
|
rowNode: selectedCell.rowNode,
|
|
125
125
|
trigger: 'edit',
|
|
@@ -40,7 +40,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
40
40
|
if (column && this.isModuleEditable()) {
|
|
41
41
|
if (this.api.calculatedColumnApi
|
|
42
42
|
.getAllCalculatedColumn()
|
|
43
|
-
.find((cc) => cc.ColumnId == column.
|
|
43
|
+
.find((cc) => cc.ColumnId == column.columnId)) {
|
|
44
44
|
let popupParam = {
|
|
45
45
|
column: column,
|
|
46
46
|
action: 'Edit',
|
|
@@ -38,14 +38,14 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
38
38
|
let allValues = [];
|
|
39
39
|
let numericColumns = [];
|
|
40
40
|
selectedCellInfo.columns.map((c) => {
|
|
41
|
-
if (c && c.
|
|
42
|
-
numericColumns.push(c.
|
|
41
|
+
if (c && c.dataType == Enums_1.DataType.Number) {
|
|
42
|
+
numericColumns.push(c.columnId);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
selectedCellInfo.gridCells.forEach((selectedCell) => {
|
|
46
46
|
let value = selectedCell.rawValue;
|
|
47
47
|
allValues.push(value);
|
|
48
|
-
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.columnId)) {
|
|
48
|
+
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.column.columnId)) {
|
|
49
49
|
let valueAsNumber = Number(value);
|
|
50
50
|
// possible that its not a number despite it being a numeric column
|
|
51
51
|
if (!isNaN(Number(valueAsNumber))) {
|
|
@@ -22,7 +22,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
else if (this.api.scopeApi.scopeHasColumns(conditionalStyle.Scope)) {
|
|
23
23
|
return this.api.scopeApi
|
|
24
24
|
.getColumnsForScope(conditionalStyle.Scope)
|
|
25
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
25
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
26
26
|
}
|
|
27
27
|
return [];
|
|
28
28
|
}
|
|
@@ -73,7 +73,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
73
|
this.api.conditionalStyleApi.editConditionalStyles(oldConditionalStyles);
|
|
74
74
|
}
|
|
75
75
|
addColumnMenuItems(column) {
|
|
76
|
-
if (column && this.isModuleEditable() && !column.
|
|
76
|
+
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
77
77
|
let conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(column);
|
|
78
78
|
let firstConditionalStyle = ArrayExtensions_1.default.IsNotNullOrEmpty(conditionalStyles)
|
|
79
79
|
? conditionalStyles.find((cs) => this.api.scopeApi.isColumnInScopeColumns(column, cs.Scope))
|
|
@@ -160,7 +160,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
160
160
|
value: value,
|
|
161
161
|
oldValue: null,
|
|
162
162
|
displayValue: column
|
|
163
|
-
? this.api.gridApi.getDisplayValueFromRowNode(node, column.
|
|
163
|
+
? this.api.gridApi.getDisplayValueFromRowNode(node, column.columnId)
|
|
164
164
|
: value,
|
|
165
165
|
node: node,
|
|
166
166
|
column: column,
|
|
@@ -19,10 +19,10 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
addColumnMenuItems(column) {
|
|
22
|
-
if (column && this.isModuleEditable() && column.
|
|
22
|
+
if (column && this.isModuleEditable() && column.sortable) {
|
|
23
23
|
let customSort = this.api.customSortApi
|
|
24
24
|
.getAllCustomSort()
|
|
25
|
-
.find((x) => x.ColumnId == column.
|
|
25
|
+
.find((x) => x.ColumnId == column.columnId);
|
|
26
26
|
let label = customSort ? 'Edit ' : 'Create ';
|
|
27
27
|
// dont show a menu item if there is a custom sort that uses a comparer function
|
|
28
28
|
const columnSortComparer = this.api.internalApi.getCustomSortComparer(column);
|
|
@@ -24,6 +24,4 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
24
24
|
getTeamSharingAction(): TeamSharingImportInfo<Report>;
|
|
25
25
|
private isEmptyReportData;
|
|
26
26
|
private showEmptyExportWarning;
|
|
27
|
-
private showExportIndicator;
|
|
28
|
-
private hideExportIndicator;
|
|
29
27
|
}
|
|
@@ -14,7 +14,6 @@ const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
|
14
14
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
15
15
|
const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
|
|
16
16
|
const ObjectFactory_1 = require("../Utilities/ObjectFactory");
|
|
17
|
-
const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
|
|
18
17
|
class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
18
|
constructor(api) {
|
|
20
19
|
super(ModuleConstants.ExportModuleId, 'Export', 'export-data', 'ExportPopup', 'Export data from the Grid to numerous locations in numerous formatso', api);
|
|
@@ -27,7 +26,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
27
26
|
this.api.scopeApi.scopeHasColumns(report.Scope)) {
|
|
28
27
|
return this.api.scopeApi
|
|
29
28
|
.getColumnsForScope(report.Scope)
|
|
30
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
29
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
31
30
|
}
|
|
32
31
|
return [];
|
|
33
32
|
}
|
|
@@ -53,68 +52,72 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
52
|
this.api.exportApi.editReports(reportsToEdit);
|
|
54
53
|
}
|
|
55
54
|
addContextMenuItems(menuContext) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
const canExport = !menuContext.isRowGroupColumn &&
|
|
56
|
+
this.isModuleAvailable() &&
|
|
57
|
+
menuContext.selectedCellInfo &&
|
|
58
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
|
|
59
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
|
|
60
|
+
if (!canExport) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const selectedCellReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_CELLS_REPORT);
|
|
64
|
+
const menuItems = [];
|
|
65
|
+
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
66
|
+
menuItems.push(this.createColumnMenuItemClickFunction(destination, this.moduleInfo.Glyph, () => this.export(selectedCellReport, destination)));
|
|
67
|
+
}
|
|
68
|
+
for (const customDestination of this.api.exportApi.getAllCustomDestination()) {
|
|
69
|
+
menuItems.push(this.createColumnMenuItemClickFunction(customDestination.name, this.moduleInfo.Glyph, () => this.export(selectedCellReport, customDestination.name)));
|
|
66
70
|
}
|
|
67
|
-
return [
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
label: 'Export Selected Cells',
|
|
74
|
+
isVisible: true,
|
|
75
|
+
icon: this.moduleInfo.Glyph,
|
|
76
|
+
subItems: menuItems,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
68
79
|
}
|
|
69
80
|
export(report, exportDestination) {
|
|
70
|
-
this.
|
|
71
|
-
// setTimeout required to give the export indicator a head-start to render
|
|
72
|
-
setTimeout(() => {
|
|
81
|
+
this.api.internalApi.executeWithProgressIndicator(`${report.Name} Export in progress...`, () => {
|
|
73
82
|
var _a;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
else if (customDestination) {
|
|
86
|
-
customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
|
|
87
|
-
}
|
|
83
|
+
if (this.isCustomDestination(exportDestination)) {
|
|
84
|
+
const customDestination = (_a = this.api.internalApi
|
|
85
|
+
.getAdaptableOptions()
|
|
86
|
+
.exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
|
|
87
|
+
if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
|
|
88
|
+
this.api.internalApi.dispatchReduxAction(SystemRedux.SystemExportCustomDestinationPopupShow({
|
|
89
|
+
ReportName: report.Name,
|
|
90
|
+
ExportDestination: customDestination,
|
|
91
|
+
}));
|
|
88
92
|
}
|
|
89
|
-
else {
|
|
90
|
-
|
|
91
|
-
case Enums_1.ExportDestination.Excel:
|
|
92
|
-
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
93
|
-
// WYSIWYG is fully delegated to the ag-grid excel export
|
|
94
|
-
this.api.exportApi.exportVisualDataToExcel();
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
this.convertReportToExcel(report);
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
case Enums_1.ExportDestination.Clipboard:
|
|
101
|
-
this.copyToClipboard(report);
|
|
102
|
-
break;
|
|
103
|
-
case Enums_1.ExportDestination.CSV:
|
|
104
|
-
this.convertReportToCsv(report);
|
|
105
|
-
break;
|
|
106
|
-
case Enums_1.ExportDestination.JSON:
|
|
107
|
-
this.convertReportToJSON(report);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
93
|
+
else if (customDestination) {
|
|
94
|
+
customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
|
|
110
95
|
}
|
|
111
|
-
this.hideExportIndicator();
|
|
112
96
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
else {
|
|
98
|
+
switch (exportDestination) {
|
|
99
|
+
case Enums_1.ExportDestination.Excel:
|
|
100
|
+
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
101
|
+
// WYSIWYG is fully delegated to the ag-grid excel export
|
|
102
|
+
this.api.exportApi.exportVisualDataToExcel();
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
this.convertReportToExcel(report);
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case Enums_1.ExportDestination.Clipboard:
|
|
109
|
+
this.copyToClipboard(report);
|
|
110
|
+
break;
|
|
111
|
+
case Enums_1.ExportDestination.CSV:
|
|
112
|
+
this.convertReportToCsv(report);
|
|
113
|
+
break;
|
|
114
|
+
case Enums_1.ExportDestination.JSON:
|
|
115
|
+
this.convertReportToJSON(report);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
116
118
|
}
|
|
117
|
-
|
|
119
|
+
this.api.internalApi.hideProgressIndicator();
|
|
120
|
+
});
|
|
118
121
|
}
|
|
119
122
|
isCustomDestination(exportDestination) {
|
|
120
123
|
if (Object.values(Enums_1.ExportDestination).some((val) => val === exportDestination)) {
|
|
@@ -183,11 +186,5 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
183
186
|
alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
184
187
|
}));
|
|
185
188
|
}
|
|
186
|
-
showExportIndicator(label) {
|
|
187
|
-
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorShow(label));
|
|
188
|
-
}
|
|
189
|
-
hideExportIndicator() {
|
|
190
|
-
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorHide());
|
|
191
|
-
}
|
|
192
189
|
}
|
|
193
190
|
exports.ExportModule = ExportModule;
|
|
@@ -32,7 +32,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
32
32
|
let menuItemClickFunction = undefined;
|
|
33
33
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
34
34
|
if (menuContext.adaptableColumn &&
|
|
35
|
-
menuContext.adaptableColumn.
|
|
35
|
+
menuContext.adaptableColumn.filterable &&
|
|
36
36
|
menuContext.isSingleSelectedColumn &&
|
|
37
37
|
menuContext.gridCell != null) {
|
|
38
38
|
let isMultiple = menuContext.selectedCellInfo.gridCells.length > 1;
|
|
@@ -42,7 +42,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
42
42
|
})
|
|
43
43
|
: [menuContext.gridCell.primaryKeyValue];
|
|
44
44
|
let clickFunction = () => {
|
|
45
|
-
this.api.filterApi.createColumnFilterForCell(menuContext.adaptableColumn.
|
|
45
|
+
this.api.filterApi.createColumnFilterForCell(menuContext.adaptableColumn.columnId, pkValues);
|
|
46
46
|
};
|
|
47
47
|
menuItemClickFunction = this.createColumnMenuItemClickFunction(isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction);
|
|
48
48
|
}
|
|
@@ -53,14 +53,14 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
53
|
let baseMenuItems = [];
|
|
54
54
|
if (column && this.api.gridApi.isQuickFilterAvailable()) {
|
|
55
55
|
const isFilterVisible = this.api.filterApi.isQuickFilterVisible();
|
|
56
|
-
if (this.isModuleEditable() && this.api.columnApi.usesAdaptableQuickFilter(column.
|
|
56
|
+
if (this.isModuleEditable() && this.api.columnApi.usesAdaptableQuickFilter(column.columnId)) {
|
|
57
57
|
baseMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide Quick Filter Bar' : 'Show Quick Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible ? FilterRedux.QuickFilterBarHide() : FilterRedux.QuickFilterBarShow()));
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
if (column && this.canCreateColumnMenuItem(column, 'ReadOnly', 'filter')) {
|
|
61
61
|
let existingColumnFilter = this.api.filterApi
|
|
62
62
|
.getAllColumnFilter()
|
|
63
|
-
.find((x) => x.ColumnId == column.
|
|
63
|
+
.find((x) => x.ColumnId == column.columnId);
|
|
64
64
|
if (existingColumnFilter) {
|
|
65
65
|
baseMenuItems.push(this.createColumnMenuItemReduxAction('Clear Filter', this.moduleInfo.Glyph, FilterRedux.ColumnFilterClear(existingColumnFilter)));
|
|
66
66
|
}
|
|
@@ -18,7 +18,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
18
18
|
if (this.api.scopeApi.scopeHasColumns(formatColumn.Scope)) {
|
|
19
19
|
return this.api.scopeApi
|
|
20
20
|
.getColumnsForScope(formatColumn.Scope)
|
|
21
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
21
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
22
22
|
}
|
|
23
23
|
return [];
|
|
24
24
|
}
|
|
@@ -148,7 +148,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
148
148
|
addColumnMenuItems(column) {
|
|
149
149
|
var _a;
|
|
150
150
|
let returnColumnMenuItems = [];
|
|
151
|
-
if (column && this.isModuleEditable() && !column.
|
|
151
|
+
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
152
152
|
// not fullproof as might be an All but its generally pretty good
|
|
153
153
|
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(column);
|
|
154
154
|
let formatExists = formatColumn
|
|
@@ -165,8 +165,8 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
165
165
|
value: formatColumn,
|
|
166
166
|
};
|
|
167
167
|
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
168
|
-
if (column.
|
|
169
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.
|
|
168
|
+
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
169
|
+
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.columnId);
|
|
170
170
|
let hasCheckBox = formatColumn && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle);
|
|
171
171
|
if (hasCheckBox) {
|
|
172
172
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'check-box-outline', () => {
|
|
@@ -188,7 +188,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
188
188
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'check-box', () => {
|
|
189
189
|
let newFormatColumn = {
|
|
190
190
|
Scope: {
|
|
191
|
-
ColumnIds: [column.
|
|
191
|
+
ColumnIds: [column.columnId],
|
|
192
192
|
},
|
|
193
193
|
ColumnStyle: {
|
|
194
194
|
CheckBoxStyle: true,
|
|
@@ -24,7 +24,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
24
24
|
if (column && this.isModuleEditable()) {
|
|
25
25
|
if (this.api.freeTextColumnApi
|
|
26
26
|
.getAllFreeTextColumn()
|
|
27
|
-
.find((ftc) => ftc.ColumnId == column.
|
|
27
|
+
.find((ftc) => ftc.ColumnId == column.columnId)) {
|
|
28
28
|
let popupParam = {
|
|
29
29
|
column: column,
|
|
30
30
|
action: 'Edit',
|
|
@@ -42,15 +42,15 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
42
42
|
action: 'Edit',
|
|
43
43
|
source: 'ColumnMenu',
|
|
44
44
|
}));
|
|
45
|
-
if (column && column.
|
|
45
|
+
if (column && column.hideable) {
|
|
46
46
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Hide Column', 'hide-column', () => {
|
|
47
|
-
this.api.columnApi.hideColumn(column.
|
|
47
|
+
this.api.columnApi.hideColumn(column.columnId);
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
50
50
|
let selectMenuItems = [];
|
|
51
51
|
if (column) {
|
|
52
52
|
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column', 'column-chooser', () => {
|
|
53
|
-
this.api.columnApi.selectColumn(column.
|
|
53
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
54
54
|
}));
|
|
55
55
|
}
|
|
56
56
|
selectMenuItems.push(this.createColumnMenuItemClickFunction('Whole Grid', this.moduleInfo.Glyph, () => {
|