@adaptabletools/adaptable-cjs 19.1.2 → 19.2.1-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/package.json +1 -1
- package/src/AdaptableOptions/CommentOptions.d.ts +1 -1
- package/src/{agGrid/defaultAdaptableOptions.d.ts → AdaptableOptions/DefaultAdaptableOptions.d.ts} +1 -1
- package/src/{agGrid/defaultAdaptableOptions.js → AdaptableOptions/DefaultAdaptableOptions.js} +3 -2
- package/src/AdaptableOptions/EditOptions.d.ts +6 -2
- package/src/AdaptableOptions/NoteOptions.d.ts +1 -1
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +2 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/ActionRowApiImpl.js +2 -2
- package/src/Api/Implementation/AlertApiImpl.js +6 -6
- package/src/Api/Implementation/ChartingApiImpl.js +4 -4
- package/src/Api/Implementation/ColumnApiImpl.js +5 -5
- package/src/Api/Implementation/ColumnFilterApiImpl.js +9 -9
- package/src/Api/Implementation/ColumnScopeApiImpl.js +8 -8
- package/src/Api/Implementation/ConfigApiImpl.js +2 -2
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -2
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.js +16 -19
- package/src/Api/Implementation/LayoutApiImpl.js +4 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +2 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.js +6 -6
- package/src/Api/Internal/ActionRowInternalApi.js +9 -10
- package/src/Api/Internal/AdaptableInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +3 -3
- package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +7 -7
- package/src/Api/Internal/ColumnFilterInternalApi.js +8 -8
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +1 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +37 -37
- package/src/Api/Internal/ExpressionInternalApi.js +1 -1
- package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +8 -8
- package/src/Api/Internal/GridInternalApi.d.ts +7 -0
- package/src/Api/Internal/GridInternalApi.js +21 -3
- package/src/Api/Internal/LayoutInternalApi.js +3 -3
- package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/StatusBarApi.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableSearchState.d.ts +22 -0
- package/src/PredefinedConfig/Common/AdaptableSearchState.js +2 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
- package/src/Strategy/BulkUpdateModule.js +0 -12
- package/src/Strategy/PlusMinusModule.js +24 -24
- package/src/Strategy/SmartEditModule.js +0 -11
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -1
- package/src/agGrid/Adaptable.js +2 -2
- package/src/agGrid/AdaptableAgGrid.js +22 -21
- package/src/agGrid/AgGridAdapter.js +4 -1
- package/src/agGrid/AgGridColumnAdapter.js +18 -12
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +10 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -28,7 +28,7 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
|
|
|
28
28
|
context.expression = expression;
|
|
29
29
|
context.referencedColumns = this.getAdaptableApi()
|
|
30
30
|
.expressionApi.getColumnsFromExpression(expression)
|
|
31
|
-
.map((columnId) => this.
|
|
31
|
+
.map((columnId) => this.getColumnApi().getColumnWithColumnId(columnId));
|
|
32
32
|
}
|
|
33
33
|
return !evaluateExpressionExternallyFn(context);
|
|
34
34
|
}
|
|
@@ -46,7 +46,7 @@ class FlashingCellInternalApi extends ApiBase_1.ApiBase {
|
|
|
46
46
|
? toFlashingAlert(forPrimaryKey[columnId])
|
|
47
47
|
: toFlashingAlert(forPrimaryKey[FlashingCellService_1.FLASHING_CELL_ROW_KEY]);
|
|
48
48
|
if ((adaptableFlashingCell === null || adaptableFlashingCell === void 0 ? void 0 : adaptableFlashingCell.flashingCellDefinition) &&
|
|
49
|
-
!this.
|
|
49
|
+
!this.getLayoutApi().internalApi.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getLayoutApi().getCurrentLayout())) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
return adaptableFlashingCell;
|
|
@@ -63,7 +63,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
63
63
|
return this.getFormatColumnsWithStyleForColumn(column, config).filter((formatColumn) => { var _a; return StringExtensions_1.default.IsNotNullOrEmpty((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName); });
|
|
64
64
|
}
|
|
65
65
|
getFormatColumnWithColumnInScope(formatColumns, column) {
|
|
66
|
-
return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.
|
|
66
|
+
return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.getColumnScopeApi().isColumnInScope(column, scopedFormatColumn.Scope));
|
|
67
67
|
}
|
|
68
68
|
// TODO is this really needed, I don't think it achieves anything
|
|
69
69
|
getFormatColumnInColumnScope(formatColumns) {
|
|
@@ -71,11 +71,11 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
71
71
|
return formatColumns.filter((fc) => {
|
|
72
72
|
return (
|
|
73
73
|
// this.getFormatColumnsWithColumnScope(formatColumns)
|
|
74
|
-
(this.
|
|
74
|
+
(this.getColumnScopeApi().scopeHasColumns(fc.Scope) ||
|
|
75
75
|
// this.getFormatColumnsWithDataTypeScope(formatColumns)
|
|
76
|
-
this.
|
|
76
|
+
this.getColumnScopeApi().scopeHasDataType(fc.Scope) ||
|
|
77
77
|
// this.getFormatColumnsWithAllScope(formatColumns)
|
|
78
|
-
this.
|
|
78
|
+
this.getColumnScopeApi().scopeIsAll(fc.Scope) || this.getColumnScopeApi().scopeHasColumnType(fc.Scope))
|
|
79
79
|
);
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -147,7 +147,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
147
147
|
getFormatColumnDefsForScope(scope) {
|
|
148
148
|
return this.getAdaptableApi()
|
|
149
149
|
.predicateApi.internalApi.getFormatColumnPredicateDefs(scope)
|
|
150
|
-
.filter((predicateDef) => this.
|
|
150
|
+
.filter((predicateDef) => this.getColumnScopeApi().isScopeInScope(scope, predicateDef.columnScope));
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
153
|
* Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
@@ -162,8 +162,8 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
162
162
|
if (formatColumn.IsSuspended) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
|
-
const isSummaryNode = this.
|
|
166
|
-
const isGroupedRowNode = this.
|
|
165
|
+
const isSummaryNode = this.getGridApi().isSummaryNode(rowNode);
|
|
166
|
+
const isGroupedRowNode = this.getGridApi().isGroupRowNode(rowNode);
|
|
167
167
|
// For Summary Rows cannot be excluded
|
|
168
168
|
if (isSummaryNode) {
|
|
169
169
|
if ((_a = formatColumn.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeSummaryRows) {
|
|
@@ -196,7 +196,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
196
196
|
}
|
|
197
197
|
evaluatePredicate(formatColumn, predicateDefHandlerContext) {
|
|
198
198
|
var _a;
|
|
199
|
-
return this.
|
|
199
|
+
return this.getPredicateApi().handleColumnPredicates((_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, false);
|
|
200
200
|
}
|
|
201
201
|
evaluateExpression(formatColumn, node) {
|
|
202
202
|
const isValidExpression = this.getAdaptableApi().expressionApi.isValidBooleanExpression(formatColumn.Rule.BooleanExpression, ModuleConstants.FormatColumnModuleId, `Invalid format column rule '${formatColumn.Rule.BooleanExpression}'`);
|
|
@@ -114,4 +114,11 @@ export declare class GridInternalApi extends ApiBase {
|
|
|
114
114
|
getAlertRowClass(params: RowClassParams): string | null;
|
|
115
115
|
getRowHighlightClass(params: RowClassParams): string | null;
|
|
116
116
|
deriveSpecialColumnSettingsFromAgGridDefaultColDef(): Partial<SpecialColumnSettings>;
|
|
117
|
+
hasCellEditableAccordingToEditOptions(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Returns UNDEFINED if no EditOptions.isCellEditable is provided, otherwise returns the result of the function
|
|
120
|
+
*
|
|
121
|
+
* DO NOT USE THIS METHOD DIRECTLY - use `GridApi.isCellEditable` instead
|
|
122
|
+
*/
|
|
123
|
+
isCellEditableAccordingToEditOptions(gridCell: GridCell, defaultColDefinitionEditableValue: boolean): boolean | undefined;
|
|
117
124
|
}
|
|
@@ -28,7 +28,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
28
28
|
fireCellChangedEvent(cellDataChangedInfo) {
|
|
29
29
|
if (this.isAdapTableReady()) {
|
|
30
30
|
const cellChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { cellChange: cellDataChangedInfo });
|
|
31
|
-
this.
|
|
31
|
+
this.getEventApi().emit('CellChanged', cellChangedInfo);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
@@ -39,7 +39,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
39
39
|
const gridDataChangedInfo = Object.assign({ changedAt: Date.now(), rowTrigger,
|
|
40
40
|
dataRows,
|
|
41
41
|
rowNodes }, this.getAdaptableInternalApi().buildBaseContext());
|
|
42
|
-
this.
|
|
42
|
+
this.getEventApi().emit('GridDataChanged', gridDataChangedInfo);
|
|
43
43
|
this.getAdaptableInternalApi().getDataService().CreateGridChangedEvent(gridDataChangedInfo);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -369,7 +369,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
369
369
|
// this does NOT into account Custom Sort - far too hard for now...
|
|
370
370
|
let sortOrder = Enums_1.SortOrder.Asc;
|
|
371
371
|
if (this.getColumnFilterOptions().valuesFilterOptions.sortValuesFilter) {
|
|
372
|
-
let columnSort = this.
|
|
372
|
+
let columnSort = this.getGridApi().getColumnSortForColumn(column.columnId);
|
|
373
373
|
if (columnSort && columnSort.SortOrder == 'Desc') {
|
|
374
374
|
sortOrder = Enums_1.SortOrder.Desc;
|
|
375
375
|
}
|
|
@@ -502,5 +502,23 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
502
502
|
Width: defaultColumnDefinition.width,
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
|
+
hasCellEditableAccordingToEditOptions() {
|
|
506
|
+
var _a;
|
|
507
|
+
return typeof ((_a = this.getEditOptions()) === null || _a === void 0 ? void 0 : _a.isCellEditable) === 'function';
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Returns UNDEFINED if no EditOptions.isCellEditable is provided, otherwise returns the result of the function
|
|
511
|
+
*
|
|
512
|
+
* DO NOT USE THIS METHOD DIRECTLY - use `GridApi.isCellEditable` instead
|
|
513
|
+
*/
|
|
514
|
+
isCellEditableAccordingToEditOptions(gridCell, defaultColDefinitionEditableValue) {
|
|
515
|
+
var _a;
|
|
516
|
+
const cellEditable = (_a = this.getEditOptions()) === null || _a === void 0 ? void 0 : _a.isCellEditable;
|
|
517
|
+
if (cellEditable) {
|
|
518
|
+
const cellEditableContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { gridCell, defaultColDefEditableValue: defaultColDefinitionEditableValue });
|
|
519
|
+
return cellEditable(cellEditableContext);
|
|
520
|
+
}
|
|
521
|
+
return undefined;
|
|
522
|
+
}
|
|
505
523
|
}
|
|
506
524
|
exports.GridInternalApi = GridInternalApi;
|
|
@@ -21,7 +21,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
21
21
|
if (!skipEqualityCheck && (0, isEqual_1.default)(oldSate, newState)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
this.
|
|
24
|
+
this.getEventApi().emit('LayoutChanged', layoutChangedInfo);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Compares 2 Layouts for equality
|
|
@@ -50,7 +50,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
50
50
|
* @returns layout
|
|
51
51
|
*/
|
|
52
52
|
createDefaultLayoutIfNeeded() {
|
|
53
|
-
let gridState = this.
|
|
53
|
+
let gridState = this.getGridApi().getGridState();
|
|
54
54
|
let layoutState = this.getLayoutApi().getLayoutState();
|
|
55
55
|
const isLayoutDefined = (layoutName) => !!layoutState.Layouts.filter((layout) => layout.Name === layoutName)[0];
|
|
56
56
|
let defaultLayoutColumns = gridState.Columns.filter((column) => column.visible);
|
|
@@ -62,7 +62,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
62
62
|
if (!layoutState.Layouts || !isLayoutDefined(GeneralConstants_1.DEFAULT_LAYOUT)) {
|
|
63
63
|
// augogroup columns are not in columns list
|
|
64
64
|
// the code that adds column ok grid state explicitly ignores autoColumns
|
|
65
|
-
const allGridColumns = this.
|
|
65
|
+
const allGridColumns = this.getGridApi().getAllAgGridColumns();
|
|
66
66
|
let defaultLayout = ObjectFactory_1.default.CreateEmptyLayout({
|
|
67
67
|
Name: GeneralConstants_1.DEFAULT_LAYOUT,
|
|
68
68
|
Columns: defaultLayoutColumns.map((c) => c.columnId),
|
|
@@ -34,11 +34,11 @@ class StyledColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
36
|
let columnId = columnComparison.MinValue;
|
|
37
|
-
if (!this.
|
|
37
|
+
if (!this.getColumnApi().isColumnInGrid(columnId)) {
|
|
38
38
|
return 0;
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
return this.
|
|
41
|
+
return this.getGridApi().getRawValueFromRowNode(rowNode, columnId);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -97,11 +97,11 @@ class StyledColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
99
|
let columnId = columnComparison.MaxValue;
|
|
100
|
-
if (!this.
|
|
100
|
+
if (!this.getColumnApi().isColumnInGrid(columnId)) {
|
|
101
101
|
return 0;
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
|
-
return this.
|
|
104
|
+
return this.getGridApi().getRawValueFromRowNode(rowNode, columnId);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -269,7 +269,7 @@ class StyledColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
269
269
|
return firstBadgeWithAll !== null && firstBadgeWithAll !== void 0 ? firstBadgeWithAll : null;
|
|
270
270
|
}
|
|
271
271
|
getBadgePredicateDefsForColumn(columnId) {
|
|
272
|
-
const column = this.
|
|
272
|
+
const column = this.getColumnApi().getColumnWithColumnId(columnId);
|
|
273
273
|
if (!column) {
|
|
274
274
|
return undefined;
|
|
275
275
|
}
|
|
@@ -278,7 +278,7 @@ class StyledColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
278
278
|
};
|
|
279
279
|
return this.getAdaptableApi()
|
|
280
280
|
.predicateApi.internalApi.getBadgeStylePredicateDefs(scope)
|
|
281
|
-
.filter((predicate) => this.
|
|
281
|
+
.filter((predicate) => this.getColumnScopeApi().isColumnInScope(column, predicate.columnScope));
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
exports.StyledColumnInternalApi = StyledColumnInternalApi;
|
|
@@ -11,7 +11,7 @@ class SystemStatusInternalApi extends ApiBase_1.ApiBase {
|
|
|
11
11
|
*/
|
|
12
12
|
fireSystemStatusMessageDisplayedEvent(systemStatusMessageInfo) {
|
|
13
13
|
const systemStatusMessageDisplayedInfo = Object.assign({ systemStatusMessageInfo: systemStatusMessageInfo }, this.getAdaptableInternalApi().buildBaseContext());
|
|
14
|
-
this.
|
|
14
|
+
this.getEventApi().emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
|
|
15
15
|
}
|
|
16
16
|
addSystemStatusMessageInfo(systemStatusMessageInfo) {
|
|
17
17
|
const maxMessagesInStore = this.getNotificationsOptions().maxSystemMessagesInStore;
|
|
@@ -10,7 +10,7 @@ class TeamSharingInternalApi extends ApiBase_1.ApiBase {
|
|
|
10
10
|
fireTeamSharingEntityChangedEvent(sharedEntity) {
|
|
11
11
|
if (this.isAdapTableReady()) {
|
|
12
12
|
const teamSharingEntityChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { sharedEntity: sharedEntity });
|
|
13
|
-
this.
|
|
13
|
+
this.getEventApi().emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -36,7 +36,7 @@ class TeamSharingInternalApi extends ApiBase_1.ApiBase {
|
|
|
36
36
|
reject(false);
|
|
37
37
|
}, waitThreshold);
|
|
38
38
|
// poll state for changes:
|
|
39
|
-
const unsubscribe = this.
|
|
39
|
+
const unsubscribe = this.getEventApi().on('AdaptableStateChanged', () => {
|
|
40
40
|
clearTimeout(pollTimer);
|
|
41
41
|
pollTimer = setTimeout(() => {
|
|
42
42
|
// state is stable, cleanup all subscriptions before returning
|
|
@@ -6,7 +6,7 @@ class UserInterfaceInternalApi extends ApiBase_1.ApiBase {
|
|
|
6
6
|
prepareAdaptableIconDef(icon) {
|
|
7
7
|
if (icon && 'name' in icon) {
|
|
8
8
|
let customIcon = icon && 'name' in icon
|
|
9
|
-
? this.
|
|
9
|
+
? this.getUserInterfaceApi().getCustomIconDefinition(icon.name)
|
|
10
10
|
: null;
|
|
11
11
|
if (customIcon) {
|
|
12
12
|
icon = customIcon;
|
|
@@ -11,10 +11,10 @@ export interface StatusBarApi {
|
|
|
11
11
|
/**
|
|
12
12
|
* Retrieves current AdapTable Status Bar Panels
|
|
13
13
|
*/
|
|
14
|
-
getAdaptableStatusBars
|
|
14
|
+
getAdaptableStatusBars(): AdaptableStatusBar[];
|
|
15
15
|
/**
|
|
16
16
|
* Sets Adaptable Status Bar Panels
|
|
17
17
|
* @param statusPanels Adaptable Status Bar Panels
|
|
18
18
|
*/
|
|
19
|
-
setStatusBarPanels
|
|
19
|
+
setStatusBarPanels(statusPanels: AdaptableStatusBar[]): void;
|
|
20
20
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ColumnFilter, DataSet } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Current Searches and Filter in AdapTable
|
|
4
|
+
*/
|
|
5
|
+
export interface AdaptableSearchState {
|
|
6
|
+
/**
|
|
7
|
+
* Current DataSet (if one selected)
|
|
8
|
+
*/
|
|
9
|
+
dataSet: DataSet | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Current Grid Filter
|
|
12
|
+
*/
|
|
13
|
+
gridFilter: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* AST for Grid Filter
|
|
16
|
+
*/
|
|
17
|
+
gridFilterAST: any;
|
|
18
|
+
/**
|
|
19
|
+
* Currently applied Column Filters
|
|
20
|
+
*/
|
|
21
|
+
columnFilters: ColumnFilter[] | undefined;
|
|
22
|
+
}
|
|
@@ -91,14 +91,14 @@ export interface PredefinedConfig {
|
|
|
91
91
|
* Supplies a collection of *Shortcut* objects to aid data entry and prevent 'fat finger' issues
|
|
92
92
|
*/
|
|
93
93
|
Shortcut?: ShortcutState;
|
|
94
|
-
/**
|
|
95
|
-
* Supplies a collection of Special Column Styles
|
|
96
|
-
*/
|
|
97
|
-
StyledColumn?: StyledColumnState;
|
|
98
94
|
/**
|
|
99
95
|
* Configures the Adaptable Status Bar
|
|
100
96
|
*/
|
|
101
97
|
StatusBar?: StatusBarState;
|
|
98
|
+
/**
|
|
99
|
+
* Supplies a collection of Special Column Styles
|
|
100
|
+
*/
|
|
101
|
+
StyledColumn?: StyledColumnState;
|
|
102
102
|
/**
|
|
103
103
|
* Specifies the current Theme and lists the User and System themes available for selection.
|
|
104
104
|
*/
|
|
@@ -19,7 +19,6 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
19
19
|
let menuItemShowPopup = undefined;
|
|
20
20
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
21
21
|
if (menuContext.adaptableColumn &&
|
|
22
|
-
!menuContext.adaptableColumn.readOnly &&
|
|
23
22
|
menuContext.isSelectedCell &&
|
|
24
23
|
menuContext.isSingleSelectedColumn &&
|
|
25
24
|
this.api.gridApi.isEveryCellEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -73,17 +72,6 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
72
|
};
|
|
74
73
|
}
|
|
75
74
|
let selectedColumn = selectedCellInfo.columns[0];
|
|
76
|
-
if (selectedColumn && selectedColumn.readOnly) {
|
|
77
|
-
return {
|
|
78
|
-
IsValid: false,
|
|
79
|
-
Alert: {
|
|
80
|
-
alertType: 'generic',
|
|
81
|
-
header: 'Bulk Update Error',
|
|
82
|
-
message: 'Bulk Update is not permitted on readonly columns.\nPlease adjust the cell selection.',
|
|
83
|
-
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
75
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(selectedCellInfo.gridCells) &&
|
|
88
76
|
!this.api.gridApi.isEveryCellEditable(selectedCellInfo.gridCells)) {
|
|
89
77
|
return {
|
|
@@ -91,35 +91,35 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
91
91
|
let failedPreventEdits = [];
|
|
92
92
|
let side = direction == 'up' ? 1 : -1;
|
|
93
93
|
cellsToUpdate.forEach((gridCell) => {
|
|
94
|
-
if (gridCell.column &&
|
|
94
|
+
if (gridCell.column &&
|
|
95
|
+
gridCell.column.dataType == 'Number' &&
|
|
96
|
+
this.api.gridApi.isCellEditable(gridCell)) {
|
|
95
97
|
let foundRule;
|
|
96
98
|
let replacementGridCell;
|
|
97
99
|
plusMinusNudges.forEach((pmr) => {
|
|
98
100
|
if (!foundRule) {
|
|
99
101
|
if (this.api.columnScopeApi.isColumnInScope(gridCell.column, pmr.Scope)) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
};
|
|
122
|
-
}
|
|
102
|
+
//for aggrid as we are getting strings sometimes
|
|
103
|
+
if (typeof gridCell.rawValue != 'number') {
|
|
104
|
+
gridCell.rawValue = parseFloat(gridCell.rawValue);
|
|
105
|
+
}
|
|
106
|
+
const isSatisfiedExpression = this.isPlusMinusNudgeApplied(pmr, gridCell);
|
|
107
|
+
if (isSatisfiedExpression) {
|
|
108
|
+
foundRule = pmr;
|
|
109
|
+
shouldApplyPlusMinus = true;
|
|
110
|
+
let computedValue = gridCell.rawValue + pmr.NudgeValue * side;
|
|
111
|
+
//avoid the 0.0000000000x??
|
|
112
|
+
// computedValue= parseFloat(computedValue.toFixed(12));
|
|
113
|
+
replacementGridCell = {
|
|
114
|
+
primaryKeyValue: gridCell.primaryKeyValue,
|
|
115
|
+
column: gridCell.column,
|
|
116
|
+
rawValue: computedValue,
|
|
117
|
+
displayValue: computedValue,
|
|
118
|
+
normalisedValue: computedValue,
|
|
119
|
+
rowNode: gridCell.rowNode,
|
|
120
|
+
isPivotCell: false,
|
|
121
|
+
isRowGroupCell: false,
|
|
122
|
+
};
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -24,7 +24,6 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
24
24
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
25
25
|
if (menuContext.adaptableColumn &&
|
|
26
26
|
menuContext.adaptableColumn.dataType == 'Number' &&
|
|
27
|
-
!menuContext.adaptableColumn.readOnly &&
|
|
28
27
|
menuContext.isSelectedCell &&
|
|
29
28
|
menuContext.isSingleSelectedColumn &&
|
|
30
29
|
this.api.gridApi.isEveryCellEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -86,16 +85,6 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
86
85
|
},
|
|
87
86
|
};
|
|
88
87
|
}
|
|
89
|
-
if (column.readOnly) {
|
|
90
|
-
return {
|
|
91
|
-
Alert: {
|
|
92
|
-
alertType: 'generic',
|
|
93
|
-
header: 'Smart Edit Error',
|
|
94
|
-
message: 'Smart Edit is not permitted on readonly columns.\nPlease adjust the cell selection.',
|
|
95
|
-
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
88
|
}
|
|
100
89
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(selectedCellInfo.gridCells) &&
|
|
101
90
|
!this.api.gridApi.isEveryCellEditable(selectedCellInfo.gridCells)) {
|
|
@@ -6,7 +6,7 @@ const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
|
6
6
|
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
7
7
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
8
8
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
9
|
-
const
|
|
9
|
+
const DefaultAdaptableOptions_1 = require("../../AdaptableOptions/DefaultAdaptableOptions");
|
|
10
10
|
const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
|
|
11
11
|
class MetamodelService {
|
|
12
12
|
constructor(getAdaptableOptions, validateOptions) {
|
|
@@ -147,7 +147,7 @@ class MetamodelService {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
getAdaptableOptionsDefaultValues() {
|
|
150
|
-
return (0,
|
|
150
|
+
return (0, DefaultAdaptableOptions_1.getDefaultAdaptableOptions)();
|
|
151
151
|
}
|
|
152
152
|
getAdaptableMetamodel() {
|
|
153
153
|
return adaptable_metamodel_1.ADAPTABLE_METAMODEL;
|
|
@@ -11,7 +11,7 @@ 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 AdaptableOptionsForm_1 = require("./AdaptableOptionsForm");
|
|
14
|
-
const
|
|
14
|
+
const DefaultAdaptableOptions_1 = require("../../../AdaptableOptions/DefaultAdaptableOptions");
|
|
15
15
|
const ConfigurationWizard = (props) => {
|
|
16
16
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
17
17
|
const [adaptableConfig, setAdaptableConfig] = (0, react_1.useState)(() => {
|
|
@@ -21,7 +21,7 @@ const ConfigurationWizard = (props) => {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
const gridOptions = Object.assign(Object.assign({}, gridOptionDefaults), props.adaptableConfig.gridOptions);
|
|
24
|
-
const adaptableOptions = (0,
|
|
24
|
+
const adaptableOptions = (0, DefaultAdaptableOptions_1.applyDefaultAdaptableOptions)(props.adaptableConfig.adaptableOptions);
|
|
25
25
|
return { gridOptions, adaptableOptions };
|
|
26
26
|
});
|
|
27
27
|
const [selectedColumns, setSelectedColumns] = (0, react_1.useState)(() => {
|
|
@@ -50,7 +50,7 @@ const Navigation = (props) => {
|
|
|
50
50
|
React.createElement("button", { type: "button", className: `${baseClassName}__Button`, onClick: () => {
|
|
51
51
|
dispatch(menuItem.reduxAction);
|
|
52
52
|
}, "data-name": dataName },
|
|
53
|
-
menuItem.icon && (React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: menuItem.icon, iconClassName: `${baseClassName}__Icon` })),
|
|
53
|
+
props.api.optionsApi.getSettingsPanelOptions().showModuleIcons && menuItem.icon && (React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: menuItem.icon, iconClassName: `${baseClassName}__Icon` })),
|
|
54
54
|
customIcon && React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: customIcon }),
|
|
55
55
|
menuItem.label)));
|
|
56
56
|
}))));
|
|
@@ -76,7 +76,7 @@ const GridInfoPopup = (props) => {
|
|
|
76
76
|
React.createElement(Panel_1.default, { flex: 1 },
|
|
77
77
|
React.createElement(Tabs_1.Tabs, null,
|
|
78
78
|
React.createElement(Tabs_1.Tabs.Tab, null, "Grid Summary"),
|
|
79
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "Config"),
|
|
79
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Grid Config"),
|
|
80
80
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
81
81
|
React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { margin: 2, colItems: propValueColItems, items: gridSummaries })),
|
|
82
82
|
React.createElement(Tabs_1.Tabs.Content, null,
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -7,7 +7,7 @@ const DocumentationLinkConstants_1 = require("../Utilities/Constants/Documentati
|
|
|
7
7
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
8
8
|
const AdaptableAgGrid_1 = require("./AdaptableAgGrid");
|
|
9
9
|
const core_1 = require("ag-grid-community");
|
|
10
|
-
const
|
|
10
|
+
const DefaultAdaptableOptions_1 = require("../AdaptableOptions/DefaultAdaptableOptions");
|
|
11
11
|
const renderReactRoot_1 = require("../renderReactRoot");
|
|
12
12
|
const AdaptableWizardView_1 = tslib_1.__importDefault(require("../View/AdaptableWizardView"));
|
|
13
13
|
class Adaptable {
|
|
@@ -43,7 +43,7 @@ class AdaptableNoCodeWizard {
|
|
|
43
43
|
}
|
|
44
44
|
render(container) {
|
|
45
45
|
var _a;
|
|
46
|
-
let id = (0,
|
|
46
|
+
let id = (0, DefaultAdaptableOptions_1.getDefaultAdaptableOptions)().containerOptions.adaptableContainer || 'adaptable';
|
|
47
47
|
if (!container) {
|
|
48
48
|
let containerOptionsContainer = (_a = this.adaptableOptions.containerOptions) === null || _a === void 0 ? void 0 : _a.adaptableContainer;
|
|
49
49
|
if (containerOptionsContainer) {
|
|
@@ -9,7 +9,7 @@ const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
|
9
9
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
10
10
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
11
11
|
const Emitter_1 = tslib_1.__importDefault(require("../Utilities/Emitter"));
|
|
12
|
-
const
|
|
12
|
+
const DefaultAdaptableOptions_1 = require("../AdaptableOptions/DefaultAdaptableOptions");
|
|
13
13
|
const AgGridAdapter_1 = require("./AgGridAdapter");
|
|
14
14
|
const GeneralConstants = tslib_1.__importStar(require("../Utilities/Constants/GeneralConstants"));
|
|
15
15
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
@@ -287,7 +287,7 @@ class AdaptableAgGrid {
|
|
|
287
287
|
this.initWithLazyData =
|
|
288
288
|
config.gridOptions.rowData == undefined || config.gridOptions.rowData.length === 0;
|
|
289
289
|
this.hasAutogeneratedPrimaryKey = !!this._rawAdaptableOptions.autogeneratePrimaryKey;
|
|
290
|
-
this.adaptableOptions = (0,
|
|
290
|
+
this.adaptableOptions = (0, DefaultAdaptableOptions_1.applyDefaultAdaptableOptions)(this._rawAdaptableOptions);
|
|
291
291
|
this.adaptableOptions = this.normalizeAdaptableOptions(this.adaptableOptions);
|
|
292
292
|
const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions;
|
|
293
293
|
if (showLoadingScreen) {
|
|
@@ -1789,8 +1789,7 @@ class AdaptableAgGrid {
|
|
|
1789
1789
|
return acc;
|
|
1790
1790
|
}
|
|
1791
1791
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
1792
|
-
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1793
|
-
.marryChildren;
|
|
1792
|
+
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef().marryChildren;
|
|
1794
1793
|
const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
1795
1794
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
1796
1795
|
columnsInGroup.forEach((col) => {
|
|
@@ -2978,7 +2977,7 @@ class AdaptableAgGrid {
|
|
|
2978
2977
|
return this.agGridAdapter.getRegisteredModules();
|
|
2979
2978
|
}
|
|
2980
2979
|
destroy(config) {
|
|
2981
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
|
|
2980
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
|
2982
2981
|
if (!config) {
|
|
2983
2982
|
config = {
|
|
2984
2983
|
unmount: true,
|
|
@@ -3112,42 +3111,44 @@ class AdaptableAgGrid {
|
|
|
3112
3111
|
this.DANGER_USE_GETTER_agGridContainerElement = null;
|
|
3113
3112
|
(_g = this.adaptableStore) === null || _g === void 0 ? void 0 : _g.destroy();
|
|
3114
3113
|
this.adaptableStore = null;
|
|
3114
|
+
(_h = this.adaptableModules) === null || _h === void 0 ? void 0 : _h.clear();
|
|
3115
|
+
this.adaptableModules = null;
|
|
3115
3116
|
this.adaptableOptions = null;
|
|
3116
3117
|
this.adaptableStatusPanelKeys = null;
|
|
3117
|
-
(
|
|
3118
|
+
(_k = (_j = this.CalculatedColumnExpressionService) === null || _j === void 0 ? void 0 : _j.destroy) === null || _k === void 0 ? void 0 : _k.call(_j);
|
|
3118
3119
|
this.CalculatedColumnExpressionService = null;
|
|
3119
|
-
(
|
|
3120
|
+
(_m = (_l = this.DataService) === null || _l === void 0 ? void 0 : _l.destroy) === null || _m === void 0 ? void 0 : _m.call(_l);
|
|
3120
3121
|
this.DataService = null;
|
|
3121
|
-
(
|
|
3122
|
+
(_p = (_o = this.Fdc3Service) === null || _o === void 0 ? void 0 : _o.destroy) === null || _p === void 0 ? void 0 : _p.call(_o);
|
|
3122
3123
|
this.Fdc3Service = null;
|
|
3123
|
-
(
|
|
3124
|
+
(_r = (_q = this.ModuleService) === null || _q === void 0 ? void 0 : _q.destroy) === null || _r === void 0 ? void 0 : _r.call(_q);
|
|
3124
3125
|
this.ModuleService = null;
|
|
3125
|
-
(
|
|
3126
|
+
(_t = (_s = this.ValidationService) === null || _s === void 0 ? void 0 : _s.destroy) === null || _t === void 0 ? void 0 : _t.call(_s);
|
|
3126
3127
|
this.ValidationService = null;
|
|
3127
|
-
(
|
|
3128
|
+
(_v = (_u = this.QueryLanguageService) === null || _u === void 0 ? void 0 : _u.destroy) === null || _v === void 0 ? void 0 : _v.call(_u);
|
|
3128
3129
|
this.QueryLanguageService = null;
|
|
3129
|
-
(
|
|
3130
|
+
(_x = (_w = this.AlertService) === null || _w === void 0 ? void 0 : _w.destroy) === null || _x === void 0 ? void 0 : _x.call(_w);
|
|
3130
3131
|
this.AlertService = null;
|
|
3131
|
-
(
|
|
3132
|
+
(_z = (_y = this.TeamSharingService) === null || _y === void 0 ? void 0 : _y.destroy) === null || _z === void 0 ? void 0 : _z.call(_y);
|
|
3132
3133
|
this.TeamSharingService = null;
|
|
3133
|
-
(
|
|
3134
|
+
(_1 = (_0 = this.RowEditService) === null || _0 === void 0 ? void 0 : _0.destroy) === null || _1 === void 0 ? void 0 : _1.call(_0);
|
|
3134
3135
|
this.RowEditService = null;
|
|
3135
|
-
(
|
|
3136
|
+
(_3 = (_2 = this.MetamodelService) === null || _2 === void 0 ? void 0 : _2.destroy) === null || _3 === void 0 ? void 0 : _3.call(_2);
|
|
3136
3137
|
this.MetamodelService = null;
|
|
3137
|
-
(
|
|
3138
|
+
(_5 = (_4 = this.LicenseService) === null || _4 === void 0 ? void 0 : _4.destroy) === null || _5 === void 0 ? void 0 : _5.call(_4);
|
|
3138
3139
|
this.LicenseService = null;
|
|
3139
|
-
(
|
|
3140
|
+
(_7 = (_6 = this.FlashingCellService) === null || _6 === void 0 ? void 0 : _6.destroy) === null || _7 === void 0 ? void 0 : _7.call(_6);
|
|
3140
3141
|
this.FlashingCellService = null;
|
|
3141
|
-
(
|
|
3142
|
+
(_9 = (_8 = this.ThemeService) === null || _8 === void 0 ? void 0 : _8.destroy) === null || _9 === void 0 ? void 0 : _9.call(_8);
|
|
3142
3143
|
this.ThemeService = null;
|
|
3143
|
-
(
|
|
3144
|
+
(_11 = (_10 = this.ChartingService) === null || _10 === void 0 ? void 0 : _10.destroy) === null || _11 === void 0 ? void 0 : _11.call(_10);
|
|
3144
3145
|
this.ChartingService = null;
|
|
3145
|
-
(
|
|
3146
|
+
(_12 = this.unmountLoadingScreen) === null || _12 === void 0 ? void 0 : _12.call(this);
|
|
3146
3147
|
this.unmountLoadingScreen = null;
|
|
3147
3148
|
if (config === null || config === void 0 ? void 0 : config.unmount) {
|
|
3148
3149
|
const abContainerElement = this.getAdaptableContainerElement();
|
|
3149
3150
|
if (abContainerElement != null) {
|
|
3150
|
-
(
|
|
3151
|
+
(_13 = this.unmountReactRoot) === null || _13 === void 0 ? void 0 : _13.call(this);
|
|
3151
3152
|
}
|
|
3152
3153
|
this.unmountReactRoot = null;
|
|
3153
3154
|
}
|
|
@@ -403,8 +403,11 @@ class AgGridAdapter {
|
|
|
403
403
|
return 'Unknown';
|
|
404
404
|
}
|
|
405
405
|
isColumnReadonly(colDef) {
|
|
406
|
+
if (!colDef) {
|
|
407
|
+
return true;
|
|
408
|
+
}
|
|
406
409
|
// if the column has conditional/dynamic editability, we assume some rows may be editable
|
|
407
|
-
if (
|
|
410
|
+
if (typeof colDef.editable === 'function') {
|
|
408
411
|
return false;
|
|
409
412
|
}
|
|
410
413
|
// otherwise we evaluate the colDef.editable property (columns are NOT editable by default)
|