@adaptabletools/adaptable 19.1.2-canary.0 → 19.2.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 -3
- package/src/AdaptableOptions/EditOptions.d.ts +4 -0
- package/src/AdaptableOptions/NoteOptions.d.ts +1 -1
- 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 +20 -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 +1 -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 +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +1 -1
- package/src/agGrid/Adaptable.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +1 -1
- package/src/agGrid/AgGridAdapter.js +4 -1
- package/src/agGrid/AgGridColumnAdapter.js +15 -12
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +18 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -59,7 +59,7 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
59
59
|
return this.getFormatColumnsWithStyleForColumn(column, config).filter((formatColumn) => { var _a; return StringExtensions.IsNotNullOrEmpty((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName); });
|
|
60
60
|
}
|
|
61
61
|
getFormatColumnWithColumnInScope(formatColumns, column) {
|
|
62
|
-
return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.
|
|
62
|
+
return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.getColumnScopeApi().isColumnInScope(column, scopedFormatColumn.Scope));
|
|
63
63
|
}
|
|
64
64
|
// TODO is this really needed, I don't think it achieves anything
|
|
65
65
|
getFormatColumnInColumnScope(formatColumns) {
|
|
@@ -67,11 +67,11 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
67
67
|
return formatColumns.filter((fc) => {
|
|
68
68
|
return (
|
|
69
69
|
// this.getFormatColumnsWithColumnScope(formatColumns)
|
|
70
|
-
(this.
|
|
70
|
+
(this.getColumnScopeApi().scopeHasColumns(fc.Scope) ||
|
|
71
71
|
// this.getFormatColumnsWithDataTypeScope(formatColumns)
|
|
72
|
-
this.
|
|
72
|
+
this.getColumnScopeApi().scopeHasDataType(fc.Scope) ||
|
|
73
73
|
// this.getFormatColumnsWithAllScope(formatColumns)
|
|
74
|
-
this.
|
|
74
|
+
this.getColumnScopeApi().scopeIsAll(fc.Scope) || this.getColumnScopeApi().scopeHasColumnType(fc.Scope))
|
|
75
75
|
);
|
|
76
76
|
});
|
|
77
77
|
}
|
|
@@ -143,7 +143,7 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
143
143
|
getFormatColumnDefsForScope(scope) {
|
|
144
144
|
return this.getAdaptableApi()
|
|
145
145
|
.predicateApi.internalApi.getFormatColumnPredicateDefs(scope)
|
|
146
|
-
.filter((predicateDef) => this.
|
|
146
|
+
.filter((predicateDef) => this.getColumnScopeApi().isScopeInScope(scope, predicateDef.columnScope));
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
@@ -158,8 +158,8 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
158
158
|
if (formatColumn.IsSuspended) {
|
|
159
159
|
return false;
|
|
160
160
|
}
|
|
161
|
-
const isSummaryNode = this.
|
|
162
|
-
const isGroupedRowNode = this.
|
|
161
|
+
const isSummaryNode = this.getGridApi().isSummaryNode(rowNode);
|
|
162
|
+
const isGroupedRowNode = this.getGridApi().isGroupRowNode(rowNode);
|
|
163
163
|
// For Summary Rows cannot be excluded
|
|
164
164
|
if (isSummaryNode) {
|
|
165
165
|
if ((_a = formatColumn.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeSummaryRows) {
|
|
@@ -192,7 +192,7 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
192
192
|
}
|
|
193
193
|
evaluatePredicate(formatColumn, predicateDefHandlerContext) {
|
|
194
194
|
var _a;
|
|
195
|
-
return this.
|
|
195
|
+
return this.getPredicateApi().handleColumnPredicates((_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, false);
|
|
196
196
|
}
|
|
197
197
|
evaluateExpression(formatColumn, node) {
|
|
198
198
|
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
|
}
|
|
@@ -24,7 +24,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
24
24
|
fireCellChangedEvent(cellDataChangedInfo) {
|
|
25
25
|
if (this.isAdapTableReady()) {
|
|
26
26
|
const cellChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { cellChange: cellDataChangedInfo });
|
|
27
|
-
this.
|
|
27
|
+
this.getEventApi().emit('CellChanged', cellChangedInfo);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -35,7 +35,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
35
35
|
const gridDataChangedInfo = Object.assign({ changedAt: Date.now(), rowTrigger,
|
|
36
36
|
dataRows,
|
|
37
37
|
rowNodes }, this.getAdaptableInternalApi().buildBaseContext());
|
|
38
|
-
this.
|
|
38
|
+
this.getEventApi().emit('GridDataChanged', gridDataChangedInfo);
|
|
39
39
|
this.getAdaptableInternalApi().getDataService().CreateGridChangedEvent(gridDataChangedInfo);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -365,7 +365,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
365
365
|
// this does NOT into account Custom Sort - far too hard for now...
|
|
366
366
|
let sortOrder = SortOrder.Asc;
|
|
367
367
|
if (this.getColumnFilterOptions().valuesFilterOptions.sortValuesFilter) {
|
|
368
|
-
let columnSort = this.
|
|
368
|
+
let columnSort = this.getGridApi().getColumnSortForColumn(column.columnId);
|
|
369
369
|
if (columnSort && columnSort.SortOrder == 'Desc') {
|
|
370
370
|
sortOrder = SortOrder.Desc;
|
|
371
371
|
}
|
|
@@ -498,4 +498,21 @@ export class GridInternalApi extends ApiBase {
|
|
|
498
498
|
Width: defaultColumnDefinition.width,
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
+
hasCellEditableAccordingToEditOptions() {
|
|
502
|
+
var _a;
|
|
503
|
+
return typeof ((_a = this.getEditOptions()) === null || _a === void 0 ? void 0 : _a.isCellEditable) === 'function';
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Returns UNDEFINED if no EditOptions.isCellEditable is provided, otherwise returns the result of the function
|
|
507
|
+
*
|
|
508
|
+
* DO NOT USE THIS METHOD DIRECTLY - use `GridApi.isCellEditable` instead
|
|
509
|
+
*/
|
|
510
|
+
isCellEditableAccordingToEditOptions(gridCell, defaultColDefinitionEditableValue) {
|
|
511
|
+
var _a;
|
|
512
|
+
const cellEditable = (_a = this.getEditOptions()) === null || _a === void 0 ? void 0 : _a.isCellEditable;
|
|
513
|
+
if (typeof cellEditable === 'function') {
|
|
514
|
+
const cellEditableContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { gridCell, defaultColDefEditableValue: defaultColDefinitionEditableValue });
|
|
515
|
+
return cellEditable(cellEditableContext);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
501
518
|
}
|
|
@@ -17,7 +17,7 @@ export class LayoutInternalApi extends ApiBase {
|
|
|
17
17
|
if (!skipEqualityCheck && isEqual(oldSate, newState)) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
this.
|
|
20
|
+
this.getEventApi().emit('LayoutChanged', layoutChangedInfo);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Compares 2 Layouts for equality
|
|
@@ -46,7 +46,7 @@ export class LayoutInternalApi extends ApiBase {
|
|
|
46
46
|
* @returns layout
|
|
47
47
|
*/
|
|
48
48
|
createDefaultLayoutIfNeeded() {
|
|
49
|
-
let gridState = this.
|
|
49
|
+
let gridState = this.getGridApi().getGridState();
|
|
50
50
|
let layoutState = this.getLayoutApi().getLayoutState();
|
|
51
51
|
const isLayoutDefined = (layoutName) => !!layoutState.Layouts.filter((layout) => layout.Name === layoutName)[0];
|
|
52
52
|
let defaultLayoutColumns = gridState.Columns.filter((column) => column.visible);
|
|
@@ -58,7 +58,7 @@ export class LayoutInternalApi extends ApiBase {
|
|
|
58
58
|
if (!layoutState.Layouts || !isLayoutDefined(DEFAULT_LAYOUT)) {
|
|
59
59
|
// augogroup columns are not in columns list
|
|
60
60
|
// the code that adds column ok grid state explicitly ignores autoColumns
|
|
61
|
-
const allGridColumns = this.
|
|
61
|
+
const allGridColumns = this.getGridApi().getAllAgGridColumns();
|
|
62
62
|
let defaultLayout = ObjectFactory.CreateEmptyLayout({
|
|
63
63
|
Name: DEFAULT_LAYOUT,
|
|
64
64
|
Columns: defaultLayoutColumns.map((c) => c.columnId),
|
|
@@ -30,11 +30,11 @@ export class StyledColumnInternalApi extends ApiBase {
|
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
let columnId = columnComparison.MinValue;
|
|
33
|
-
if (!this.
|
|
33
|
+
if (!this.getColumnApi().isColumnInGrid(columnId)) {
|
|
34
34
|
return 0;
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
return this.
|
|
37
|
+
return this.getGridApi().getRawValueFromRowNode(rowNode, columnId);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -93,11 +93,11 @@ export class StyledColumnInternalApi extends ApiBase {
|
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
95
|
let columnId = columnComparison.MaxValue;
|
|
96
|
-
if (!this.
|
|
96
|
+
if (!this.getColumnApi().isColumnInGrid(columnId)) {
|
|
97
97
|
return 0;
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
|
-
return this.
|
|
100
|
+
return this.getGridApi().getRawValueFromRowNode(rowNode, columnId);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -265,7 +265,7 @@ export class StyledColumnInternalApi extends ApiBase {
|
|
|
265
265
|
return firstBadgeWithAll !== null && firstBadgeWithAll !== void 0 ? firstBadgeWithAll : null;
|
|
266
266
|
}
|
|
267
267
|
getBadgePredicateDefsForColumn(columnId) {
|
|
268
|
-
const column = this.
|
|
268
|
+
const column = this.getColumnApi().getColumnWithColumnId(columnId);
|
|
269
269
|
if (!column) {
|
|
270
270
|
return undefined;
|
|
271
271
|
}
|
|
@@ -274,6 +274,6 @@ export class StyledColumnInternalApi extends ApiBase {
|
|
|
274
274
|
};
|
|
275
275
|
return this.getAdaptableApi()
|
|
276
276
|
.predicateApi.internalApi.getBadgeStylePredicateDefs(scope)
|
|
277
|
-
.filter((predicate) => this.
|
|
277
|
+
.filter((predicate) => this.getColumnScopeApi().isColumnInScope(column, predicate.columnScope));
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -7,7 +7,7 @@ export class SystemStatusInternalApi extends ApiBase {
|
|
|
7
7
|
*/
|
|
8
8
|
fireSystemStatusMessageDisplayedEvent(systemStatusMessageInfo) {
|
|
9
9
|
const systemStatusMessageDisplayedInfo = Object.assign({ systemStatusMessageInfo: systemStatusMessageInfo }, this.getAdaptableInternalApi().buildBaseContext());
|
|
10
|
-
this.
|
|
10
|
+
this.getEventApi().emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
|
|
11
11
|
}
|
|
12
12
|
addSystemStatusMessageInfo(systemStatusMessageInfo) {
|
|
13
13
|
const maxMessagesInStore = this.getNotificationsOptions().maxSystemMessagesInStore;
|
|
@@ -7,7 +7,7 @@ export class TeamSharingInternalApi extends ApiBase {
|
|
|
7
7
|
fireTeamSharingEntityChangedEvent(sharedEntity) {
|
|
8
8
|
if (this.isAdapTableReady()) {
|
|
9
9
|
const teamSharingEntityChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { sharedEntity: sharedEntity });
|
|
10
|
-
this.
|
|
10
|
+
this.getEventApi().emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
@@ -33,7 +33,7 @@ export class TeamSharingInternalApi extends ApiBase {
|
|
|
33
33
|
reject(false);
|
|
34
34
|
}, waitThreshold);
|
|
35
35
|
// poll state for changes:
|
|
36
|
-
const unsubscribe = this.
|
|
36
|
+
const unsubscribe = this.getEventApi().on('AdaptableStateChanged', () => {
|
|
37
37
|
clearTimeout(pollTimer);
|
|
38
38
|
pollTimer = setTimeout(() => {
|
|
39
39
|
// state is stable, cleanup all subscriptions before returning
|
|
@@ -3,7 +3,7 @@ export class UserInterfaceInternalApi extends ApiBase {
|
|
|
3
3
|
prepareAdaptableIconDef(icon) {
|
|
4
4
|
if (icon && 'name' in icon) {
|
|
5
5
|
let customIcon = icon && 'name' in icon
|
|
6
|
-
? this.
|
|
6
|
+
? this.getUserInterfaceApi().getCustomIconDefinition(icon.name)
|
|
7
7
|
: null;
|
|
8
8
|
if (customIcon) {
|
|
9
9
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
*/
|
|
@@ -15,7 +15,6 @@ export class BulkUpdateModule extends AdaptableModuleBase {
|
|
|
15
15
|
let menuItemShowPopup = undefined;
|
|
16
16
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
17
17
|
if (menuContext.adaptableColumn &&
|
|
18
|
-
!menuContext.adaptableColumn.readOnly &&
|
|
19
18
|
menuContext.isSelectedCell &&
|
|
20
19
|
menuContext.isSingleSelectedColumn &&
|
|
21
20
|
this.api.gridApi.isEveryCellEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -69,17 +68,6 @@ export class BulkUpdateModule extends AdaptableModuleBase {
|
|
|
69
68
|
};
|
|
70
69
|
}
|
|
71
70
|
let selectedColumn = selectedCellInfo.columns[0];
|
|
72
|
-
if (selectedColumn && selectedColumn.readOnly) {
|
|
73
|
-
return {
|
|
74
|
-
IsValid: false,
|
|
75
|
-
Alert: {
|
|
76
|
-
alertType: 'generic',
|
|
77
|
-
header: 'Bulk Update Error',
|
|
78
|
-
message: 'Bulk Update is not permitted on readonly columns.\nPlease adjust the cell selection.',
|
|
79
|
-
alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
71
|
if (ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.gridCells) &&
|
|
84
72
|
!this.api.gridApi.isEveryCellEditable(selectedCellInfo.gridCells)) {
|
|
85
73
|
return {
|
|
@@ -87,35 +87,35 @@ export class PlusMinusModule extends AdaptableModuleBase {
|
|
|
87
87
|
let failedPreventEdits = [];
|
|
88
88
|
let side = direction == 'up' ? 1 : -1;
|
|
89
89
|
cellsToUpdate.forEach((gridCell) => {
|
|
90
|
-
if (gridCell.column &&
|
|
90
|
+
if (gridCell.column &&
|
|
91
|
+
gridCell.column.dataType == 'Number' &&
|
|
92
|
+
this.api.gridApi.isCellEditable(gridCell)) {
|
|
91
93
|
let foundRule;
|
|
92
94
|
let replacementGridCell;
|
|
93
95
|
plusMinusNudges.forEach((pmr) => {
|
|
94
96
|
if (!foundRule) {
|
|
95
97
|
if (this.api.columnScopeApi.isColumnInScope(gridCell.column, pmr.Scope)) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
}
|
|
98
|
+
//for aggrid as we are getting strings sometimes
|
|
99
|
+
if (typeof gridCell.rawValue != 'number') {
|
|
100
|
+
gridCell.rawValue = parseFloat(gridCell.rawValue);
|
|
101
|
+
}
|
|
102
|
+
const isSatisfiedExpression = this.isPlusMinusNudgeApplied(pmr, gridCell);
|
|
103
|
+
if (isSatisfiedExpression) {
|
|
104
|
+
foundRule = pmr;
|
|
105
|
+
shouldApplyPlusMinus = true;
|
|
106
|
+
let computedValue = gridCell.rawValue + pmr.NudgeValue * side;
|
|
107
|
+
//avoid the 0.0000000000x??
|
|
108
|
+
// computedValue= parseFloat(computedValue.toFixed(12));
|
|
109
|
+
replacementGridCell = {
|
|
110
|
+
primaryKeyValue: gridCell.primaryKeyValue,
|
|
111
|
+
column: gridCell.column,
|
|
112
|
+
rawValue: computedValue,
|
|
113
|
+
displayValue: computedValue,
|
|
114
|
+
normalisedValue: computedValue,
|
|
115
|
+
rowNode: gridCell.rowNode,
|
|
116
|
+
isPivotCell: false,
|
|
117
|
+
isRowGroupCell: false,
|
|
118
|
+
};
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -20,7 +20,6 @@ export class SmartEditModule extends AdaptableModuleBase {
|
|
|
20
20
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
21
21
|
if (menuContext.adaptableColumn &&
|
|
22
22
|
menuContext.adaptableColumn.dataType == 'Number' &&
|
|
23
|
-
!menuContext.adaptableColumn.readOnly &&
|
|
24
23
|
menuContext.isSelectedCell &&
|
|
25
24
|
menuContext.isSingleSelectedColumn &&
|
|
26
25
|
this.api.gridApi.isEveryCellEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -82,16 +81,6 @@ export class SmartEditModule extends AdaptableModuleBase {
|
|
|
82
81
|
},
|
|
83
82
|
};
|
|
84
83
|
}
|
|
85
|
-
if (column.readOnly) {
|
|
86
|
-
return {
|
|
87
|
-
Alert: {
|
|
88
|
-
alertType: 'generic',
|
|
89
|
-
header: 'Smart Edit Error',
|
|
90
|
-
message: 'Smart Edit is not permitted on readonly columns.\nPlease adjust the cell selection.',
|
|
91
|
-
alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
84
|
}
|
|
96
85
|
if (ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.gridCells) &&
|
|
97
86
|
!this.api.gridApi.isEveryCellEditable(selectedCellInfo.gridCells)) {
|
|
@@ -2,7 +2,7 @@ import { ADAPTABLE_METAMODEL } from '../../metamodel/adaptable.metamodel';
|
|
|
2
2
|
import { AdaptableOptionsDocsLink } from '../Constants/DocumentationLinkConstants';
|
|
3
3
|
import StringExtensions from '../Extensions/StringExtensions';
|
|
4
4
|
import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
|
|
5
|
-
import { getDefaultAdaptableOptions } from '../../
|
|
5
|
+
import { getDefaultAdaptableOptions } from '../../AdaptableOptions/DefaultAdaptableOptions';
|
|
6
6
|
const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
|
|
7
7
|
export class MetamodelService {
|
|
8
8
|
constructor(getAdaptableOptions, validateOptions) {
|
|
@@ -7,7 +7,7 @@ import GridOptionsForm from './GridOptionsForm';
|
|
|
7
7
|
import EntitlementsForm from './EntitlementsForm';
|
|
8
8
|
import { UIElementsForm } from './UIOptions/UiOptionsForm';
|
|
9
9
|
import { AdaptableOptionsForm } from './AdaptableOptionsForm';
|
|
10
|
-
import { applyDefaultAdaptableOptions } from '../../../
|
|
10
|
+
import { applyDefaultAdaptableOptions } from '../../../AdaptableOptions/DefaultAdaptableOptions';
|
|
11
11
|
export const ConfigurationWizard = (props) => {
|
|
12
12
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
13
13
|
const [adaptableConfig, setAdaptableConfig] = useState(() => {
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -3,7 +3,7 @@ import { AgGridModulesDocsLink } from '../Utilities/Constants/DocumentationLinkC
|
|
|
3
3
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
4
4
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
5
5
|
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
6
|
-
import { getDefaultAdaptableOptions } from '
|
|
6
|
+
import { getDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
7
7
|
import { renderReactRoot as defaultRenderReactRoot } from '../renderReactRoot';
|
|
8
8
|
import AdaptableWizardView from '../View/AdaptableWizardView';
|
|
9
9
|
export class Adaptable {
|
|
@@ -5,7 +5,7 @@ import { AdaptableLogger } from './AdaptableLogger';
|
|
|
5
5
|
import { PrimaryKeyDocsLink } from '../Utilities/Constants/DocumentationLinkConstants';
|
|
6
6
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
7
7
|
import Emitter from '../Utilities/Emitter';
|
|
8
|
-
import { applyDefaultAdaptableOptions } from '
|
|
8
|
+
import { applyDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
9
9
|
import { AgGridAdapter } from './AgGridAdapter';
|
|
10
10
|
import * as GeneralConstants from '../Utilities/Constants/GeneralConstants';
|
|
11
11
|
import { AB_FDC3_COLUMN, AB_SPECIAL_COLUMN, ADAPTABLE_ROW_ACTION_BUTTONS, AG_GRID_GROUPED_COLUMN, AUTOGENERATED_PK_COLUMN, DARK_THEME, DEFAULT_LAYOUT, GROUP_PATH_SEPARATOR, HALF_SECOND, LIGHT_THEME, } from '../Utilities/Constants/GeneralConstants';
|
|
@@ -399,8 +399,11 @@ export class AgGridAdapter {
|
|
|
399
399
|
return 'Unknown';
|
|
400
400
|
}
|
|
401
401
|
isColumnReadonly(colDef) {
|
|
402
|
+
if (!colDef) {
|
|
403
|
+
return true;
|
|
404
|
+
}
|
|
402
405
|
// if the column has conditional/dynamic editability, we assume some rows may be editable
|
|
403
|
-
if (
|
|
406
|
+
if (typeof colDef.editable === 'function') {
|
|
404
407
|
return false;
|
|
405
408
|
}
|
|
406
409
|
// otherwise we evaluate the colDef.editable property (columns are NOT editable by default)
|
|
@@ -421,21 +421,24 @@ export class AgGridColumnAdapter {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
setupColumnEditable({ col }) {
|
|
424
|
-
this.setColDefProperty(col, 'editable', (
|
|
425
|
-
//
|
|
426
|
-
if (typeof userValue === 'boolean' && userValue === false) {
|
|
427
|
-
return userValue;
|
|
428
|
-
}
|
|
424
|
+
this.setColDefProperty(col, 'editable', (original_editable) => {
|
|
425
|
+
// cell is NOT editable by default
|
|
429
426
|
const editableCallback = (params) => {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
427
|
+
const getOriginalColDefEditable = () => {
|
|
428
|
+
if (typeof original_editable === 'function') {
|
|
429
|
+
return original_editable(params);
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
return original_editable;
|
|
434
433
|
}
|
|
434
|
+
};
|
|
435
|
+
// 1. evaluate EditOptions.isCellEditable if provided
|
|
436
|
+
if (this.adaptableApi.gridApi.internalApi.hasCellEditableAccordingToEditOptions()) {
|
|
437
|
+
const gridCell = this.adaptableInstance.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
438
|
+
return this.adaptableApi.gridApi.internalApi.isCellEditableAccordingToEditOptions(gridCell, getOriginalColDefEditable());
|
|
435
439
|
}
|
|
436
|
-
//
|
|
437
|
-
|
|
438
|
-
return this.adaptableApi.gridApi.isCellEditable(gridCell);
|
|
440
|
+
// 2. otherwise, fallback to colDef.editable
|
|
441
|
+
return getOriginalColDefEditable();
|
|
439
442
|
};
|
|
440
443
|
return editableCallback;
|
|
441
444
|
});
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "19.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1732529750757 || Date.now(),
|
|
4
|
+
VERSION: "19.2.0" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -961,6 +961,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
961
961
|
desc: string;
|
|
962
962
|
}[];
|
|
963
963
|
};
|
|
964
|
+
AdaptableSearchState: {
|
|
965
|
+
name: string;
|
|
966
|
+
kind: string;
|
|
967
|
+
desc: string;
|
|
968
|
+
props: {
|
|
969
|
+
name: string;
|
|
970
|
+
kind: string;
|
|
971
|
+
desc: string;
|
|
972
|
+
}[];
|
|
973
|
+
};
|
|
964
974
|
AdaptableSettingsPanel: {
|
|
965
975
|
name: string;
|
|
966
976
|
kind: string;
|
|
@@ -1751,11 +1761,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1751
1761
|
name: string;
|
|
1752
1762
|
kind: string;
|
|
1753
1763
|
desc: string;
|
|
1754
|
-
props: {
|
|
1764
|
+
props: ({
|
|
1755
1765
|
name: string;
|
|
1756
1766
|
kind: string;
|
|
1757
1767
|
desc: string;
|
|
1758
|
-
|
|
1768
|
+
isOpt: boolean;
|
|
1769
|
+
} | {
|
|
1770
|
+
name: string;
|
|
1771
|
+
kind: string;
|
|
1772
|
+
desc: string;
|
|
1773
|
+
isOpt?: undefined;
|
|
1774
|
+
})[];
|
|
1759
1775
|
};
|
|
1760
1776
|
CellHighlightInfo: {
|
|
1761
1777
|
name: string;
|