@adaptabletools/adaptable 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.
Files changed (67) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/CommentOptions.d.ts +1 -1
  3. package/src/{agGrid/defaultAdaptableOptions.d.ts → AdaptableOptions/DefaultAdaptableOptions.d.ts} +1 -1
  4. package/src/{agGrid/defaultAdaptableOptions.js → AdaptableOptions/DefaultAdaptableOptions.js} +4 -3
  5. package/src/AdaptableOptions/EditOptions.d.ts +6 -2
  6. package/src/AdaptableOptions/NoteOptions.d.ts +1 -1
  7. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +2 -1
  8. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  9. package/src/Api/GridApi.d.ts +3 -3
  10. package/src/Api/Implementation/ActionRowApiImpl.js +2 -2
  11. package/src/Api/Implementation/AlertApiImpl.js +6 -6
  12. package/src/Api/Implementation/ChartingApiImpl.js +4 -4
  13. package/src/Api/Implementation/ColumnApiImpl.js +5 -5
  14. package/src/Api/Implementation/ColumnFilterApiImpl.js +9 -9
  15. package/src/Api/Implementation/ColumnScopeApiImpl.js +8 -8
  16. package/src/Api/Implementation/ConfigApiImpl.js +2 -2
  17. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +1 -1
  18. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -2
  19. package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
  20. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
  21. package/src/Api/Implementation/GridApiImpl.js +16 -19
  22. package/src/Api/Implementation/LayoutApiImpl.js +4 -4
  23. package/src/Api/Implementation/PredicateApiImpl.js +2 -2
  24. package/src/Api/Implementation/ScheduleApiImpl.js +2 -2
  25. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
  26. package/src/Api/Implementation/ThemeApiImpl.js +2 -2
  27. package/src/Api/Implementation/UserInterfaceApiImpl.js +6 -6
  28. package/src/Api/Internal/ActionRowInternalApi.js +9 -10
  29. package/src/Api/Internal/AdaptableInternalApi.js +2 -2
  30. package/src/Api/Internal/AlertInternalApi.js +3 -3
  31. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  32. package/src/Api/Internal/ChartingInternalApi.js +7 -7
  33. package/src/Api/Internal/ColumnFilterInternalApi.js +8 -8
  34. package/src/Api/Internal/CustomSortInternalApi.js +1 -1
  35. package/src/Api/Internal/DashboardInternalApi.js +1 -1
  36. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  37. package/src/Api/Internal/ExportInternalApi.js +37 -37
  38. package/src/Api/Internal/ExpressionInternalApi.js +1 -1
  39. package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
  40. package/src/Api/Internal/FormatColumnInternalApi.js +8 -8
  41. package/src/Api/Internal/GridInternalApi.d.ts +7 -0
  42. package/src/Api/Internal/GridInternalApi.js +21 -3
  43. package/src/Api/Internal/LayoutInternalApi.js +3 -3
  44. package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
  45. package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
  46. package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
  47. package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
  48. package/src/Api/StatusBarApi.d.ts +2 -2
  49. package/src/PredefinedConfig/Common/AdaptableSearchState.d.ts +22 -0
  50. package/src/PredefinedConfig/Common/AdaptableSearchState.js +1 -0
  51. package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
  52. package/src/Strategy/BulkUpdateModule.js +0 -12
  53. package/src/Strategy/PlusMinusModule.js +24 -24
  54. package/src/Strategy/SmartEditModule.js +0 -11
  55. package/src/Utilities/Services/MetamodelService.js +1 -1
  56. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +1 -1
  57. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
  58. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -1
  59. package/src/agGrid/Adaptable.js +1 -1
  60. package/src/agGrid/AdaptableAgGrid.js +21 -20
  61. package/src/agGrid/AgGridAdapter.js +4 -1
  62. package/src/agGrid/AgGridColumnAdapter.js +18 -12
  63. package/src/env.js +2 -2
  64. package/src/metamodel/adaptable.metamodel.d.ts +10 -0
  65. package/src/metamodel/adaptable.metamodel.js +1 -1
  66. package/src/types.d.ts +1 -1
  67. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -42,7 +42,7 @@ export class FlashingCellInternalApi extends ApiBase {
42
42
  ? toFlashingAlert(forPrimaryKey[columnId])
43
43
  : toFlashingAlert(forPrimaryKey[FLASHING_CELL_ROW_KEY]);
44
44
  if ((adaptableFlashingCell === null || adaptableFlashingCell === void 0 ? void 0 : adaptableFlashingCell.flashingCellDefinition) &&
45
- !this.getAdaptableApi().layoutApi.internalApi.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getAdaptableApi().layoutApi.getCurrentLayout())) {
45
+ !this.getLayoutApi().internalApi.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getLayoutApi().getCurrentLayout())) {
46
46
  return;
47
47
  }
48
48
  return adaptableFlashingCell;
@@ -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.getAdaptableApi().columnScopeApi.isColumnInScope(column, scopedFormatColumn.Scope));
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.getAdaptableApi().columnScopeApi.scopeHasColumns(fc.Scope) ||
70
+ (this.getColumnScopeApi().scopeHasColumns(fc.Scope) ||
71
71
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
72
- this.getAdaptableApi().columnScopeApi.scopeHasDataType(fc.Scope) ||
72
+ this.getColumnScopeApi().scopeHasDataType(fc.Scope) ||
73
73
  // this.getFormatColumnsWithAllScope(formatColumns)
74
- this.getAdaptableApi().columnScopeApi.scopeIsAll(fc.Scope) || this.getAdaptableApi().columnScopeApi.scopeHasColumnType(fc.Scope))
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.getAdaptableApi().columnScopeApi.isScopeInScope(scope, predicateDef.columnScope));
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.getAdaptableApi().gridApi.isSummaryNode(rowNode);
162
- const isGroupedRowNode = this.getAdaptableApi().gridApi.isGroupRowNode(rowNode);
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.getAdaptableApi().predicateApi.handleColumnPredicates((_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, false);
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.getAdaptableApi().eventApi.emit('CellChanged', cellChangedInfo);
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.getAdaptableApi().eventApi.emit('GridDataChanged', gridDataChangedInfo);
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.getAdaptableApi().gridApi.getColumnSortForColumn(column.columnId);
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,22 @@ 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 (cellEditable) {
514
+ const cellEditableContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { gridCell, defaultColDefEditableValue: defaultColDefinitionEditableValue });
515
+ return cellEditable(cellEditableContext);
516
+ }
517
+ return undefined;
518
+ }
501
519
  }
@@ -17,7 +17,7 @@ export class LayoutInternalApi extends ApiBase {
17
17
  if (!skipEqualityCheck && isEqual(oldSate, newState)) {
18
18
  return;
19
19
  }
20
- this.getAdaptableApi().eventApi.emit('LayoutChanged', layoutChangedInfo);
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.getAdaptableApi().gridApi.getGridState();
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.getAdaptableApi().gridApi.getAllAgGridColumns();
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.getAdaptableApi().columnApi.isColumnInGrid(columnId)) {
33
+ if (!this.getColumnApi().isColumnInGrid(columnId)) {
34
34
  return 0;
35
35
  }
36
36
  else {
37
- return this.getAdaptableApi().gridApi.getRawValueFromRowNode(rowNode, columnId);
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.getAdaptableApi().columnApi.isColumnInGrid(columnId)) {
96
+ if (!this.getColumnApi().isColumnInGrid(columnId)) {
97
97
  return 0;
98
98
  }
99
99
  else {
100
- return this.getAdaptableApi().gridApi.getRawValueFromRowNode(rowNode, columnId);
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.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
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.getAdaptableApi().columnScopeApi.isColumnInScope(column, predicate.columnScope));
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.getAdaptableApi().eventApi.emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
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.getAdaptableApi().eventApi.emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
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.getAdaptableApi().eventApi.on('AdaptableStateChanged', () => {
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.getAdaptableApi().userInterfaceApi.getCustomIconDefinition(icon.name)
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: () => AdaptableStatusBar[];
14
+ getAdaptableStatusBars(): AdaptableStatusBar[];
15
15
  /**
16
16
  * Sets Adaptable Status Bar Panels
17
17
  * @param statusPanels Adaptable Status Bar Panels
18
18
  */
19
- setStatusBarPanels: (statusPanels: AdaptableStatusBar[]) => void;
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
  */
@@ -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 && gridCell.column.dataType == 'Number' && !gridCell.column.readOnly) {
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
- if (this.api.gridApi.isCellEditable(gridCell)) {
97
- //for aggrid as we are getting strings sometimes
98
- if (typeof gridCell.rawValue != 'number') {
99
- gridCell.rawValue = parseFloat(gridCell.rawValue);
100
- }
101
- const isSatisfiedExpression = this.isPlusMinusNudgeApplied(pmr, gridCell);
102
- if (isSatisfiedExpression) {
103
- foundRule = pmr;
104
- shouldApplyPlusMinus = true;
105
- let computedValue = gridCell.rawValue + pmr.NudgeValue * side;
106
- //avoid the 0.0000000000x??
107
- // computedValue= parseFloat(computedValue.toFixed(12));
108
- replacementGridCell = {
109
- primaryKeyValue: gridCell.primaryKeyValue,
110
- column: gridCell.column,
111
- rawValue: computedValue,
112
- displayValue: computedValue,
113
- normalisedValue: computedValue,
114
- rowNode: gridCell.rowNode,
115
- isPivotCell: false,
116
- isRowGroupCell: false,
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 '../../agGrid/defaultAdaptableOptions';
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 '../../../agGrid/defaultAdaptableOptions';
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(() => {
@@ -46,7 +46,7 @@ export const Navigation = (props) => {
46
46
  React.createElement("button", { type: "button", className: `${baseClassName}__Button`, onClick: () => {
47
47
  dispatch(menuItem.reduxAction);
48
48
  }, "data-name": dataName },
49
- menuItem.icon && (React.createElement(AdaptableIconComponent, { icon: menuItem.icon, iconClassName: `${baseClassName}__Icon` })),
49
+ props.api.optionsApi.getSettingsPanelOptions().showModuleIcons && menuItem.icon && (React.createElement(AdaptableIconComponent, { icon: menuItem.icon, iconClassName: `${baseClassName}__Icon` })),
50
50
  customIcon && React.createElement(AdaptableIconComponent, { icon: customIcon }),
51
51
  menuItem.label)));
52
52
  }))));
@@ -72,7 +72,7 @@ export const GridInfoPopup = (props) => {
72
72
  React.createElement(Panel, { flex: 1 },
73
73
  React.createElement(Tabs, null,
74
74
  React.createElement(Tabs.Tab, null, "Grid Summary"),
75
- React.createElement(Tabs.Tab, null, "Config"),
75
+ React.createElement(Tabs.Tab, null, "Grid Config"),
76
76
  React.createElement(Tabs.Content, null,
77
77
  React.createElement(AdaptableObjectCollection, { margin: 2, colItems: propValueColItems, items: gridSummaries })),
78
78
  React.createElement(Tabs.Content, null,
@@ -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 './defaultAdaptableOptions';
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 './defaultAdaptableOptions';
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';
@@ -1785,8 +1785,7 @@ export class AdaptableAgGrid {
1785
1785
  return acc;
1786
1786
  }
1787
1787
  const ColumnGroupId = columnGroup.getGroupId();
1788
- const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
1789
- .marryChildren;
1788
+ const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef().marryChildren;
1790
1789
  const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
1791
1790
  const columnsInGroup = columnGroup.getLeafColumns();
1792
1791
  columnsInGroup.forEach((col) => {
@@ -2974,7 +2973,7 @@ export class AdaptableAgGrid {
2974
2973
  return this.agGridAdapter.getRegisteredModules();
2975
2974
  }
2976
2975
  destroy(config) {
2977
- 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;
2976
+ 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;
2978
2977
  if (!config) {
2979
2978
  config = {
2980
2979
  unmount: true,
@@ -3108,42 +3107,44 @@ export class AdaptableAgGrid {
3108
3107
  this.DANGER_USE_GETTER_agGridContainerElement = null;
3109
3108
  (_g = this.adaptableStore) === null || _g === void 0 ? void 0 : _g.destroy();
3110
3109
  this.adaptableStore = null;
3110
+ (_h = this.adaptableModules) === null || _h === void 0 ? void 0 : _h.clear();
3111
+ this.adaptableModules = null;
3111
3112
  this.adaptableOptions = null;
3112
3113
  this.adaptableStatusPanelKeys = null;
3113
- (_j = (_h = this.CalculatedColumnExpressionService) === null || _h === void 0 ? void 0 : _h.destroy) === null || _j === void 0 ? void 0 : _j.call(_h);
3114
+ (_k = (_j = this.CalculatedColumnExpressionService) === null || _j === void 0 ? void 0 : _j.destroy) === null || _k === void 0 ? void 0 : _k.call(_j);
3114
3115
  this.CalculatedColumnExpressionService = null;
3115
- (_l = (_k = this.DataService) === null || _k === void 0 ? void 0 : _k.destroy) === null || _l === void 0 ? void 0 : _l.call(_k);
3116
+ (_m = (_l = this.DataService) === null || _l === void 0 ? void 0 : _l.destroy) === null || _m === void 0 ? void 0 : _m.call(_l);
3116
3117
  this.DataService = null;
3117
- (_o = (_m = this.Fdc3Service) === null || _m === void 0 ? void 0 : _m.destroy) === null || _o === void 0 ? void 0 : _o.call(_m);
3118
+ (_p = (_o = this.Fdc3Service) === null || _o === void 0 ? void 0 : _o.destroy) === null || _p === void 0 ? void 0 : _p.call(_o);
3118
3119
  this.Fdc3Service = null;
3119
- (_q = (_p = this.ModuleService) === null || _p === void 0 ? void 0 : _p.destroy) === null || _q === void 0 ? void 0 : _q.call(_p);
3120
+ (_r = (_q = this.ModuleService) === null || _q === void 0 ? void 0 : _q.destroy) === null || _r === void 0 ? void 0 : _r.call(_q);
3120
3121
  this.ModuleService = null;
3121
- (_s = (_r = this.ValidationService) === null || _r === void 0 ? void 0 : _r.destroy) === null || _s === void 0 ? void 0 : _s.call(_r);
3122
+ (_t = (_s = this.ValidationService) === null || _s === void 0 ? void 0 : _s.destroy) === null || _t === void 0 ? void 0 : _t.call(_s);
3122
3123
  this.ValidationService = null;
3123
- (_u = (_t = this.QueryLanguageService) === null || _t === void 0 ? void 0 : _t.destroy) === null || _u === void 0 ? void 0 : _u.call(_t);
3124
+ (_v = (_u = this.QueryLanguageService) === null || _u === void 0 ? void 0 : _u.destroy) === null || _v === void 0 ? void 0 : _v.call(_u);
3124
3125
  this.QueryLanguageService = null;
3125
- (_w = (_v = this.AlertService) === null || _v === void 0 ? void 0 : _v.destroy) === null || _w === void 0 ? void 0 : _w.call(_v);
3126
+ (_x = (_w = this.AlertService) === null || _w === void 0 ? void 0 : _w.destroy) === null || _x === void 0 ? void 0 : _x.call(_w);
3126
3127
  this.AlertService = null;
3127
- (_y = (_x = this.TeamSharingService) === null || _x === void 0 ? void 0 : _x.destroy) === null || _y === void 0 ? void 0 : _y.call(_x);
3128
+ (_z = (_y = this.TeamSharingService) === null || _y === void 0 ? void 0 : _y.destroy) === null || _z === void 0 ? void 0 : _z.call(_y);
3128
3129
  this.TeamSharingService = null;
3129
- (_0 = (_z = this.RowEditService) === null || _z === void 0 ? void 0 : _z.destroy) === null || _0 === void 0 ? void 0 : _0.call(_z);
3130
+ (_1 = (_0 = this.RowEditService) === null || _0 === void 0 ? void 0 : _0.destroy) === null || _1 === void 0 ? void 0 : _1.call(_0);
3130
3131
  this.RowEditService = null;
3131
- (_2 = (_1 = this.MetamodelService) === null || _1 === void 0 ? void 0 : _1.destroy) === null || _2 === void 0 ? void 0 : _2.call(_1);
3132
+ (_3 = (_2 = this.MetamodelService) === null || _2 === void 0 ? void 0 : _2.destroy) === null || _3 === void 0 ? void 0 : _3.call(_2);
3132
3133
  this.MetamodelService = null;
3133
- (_4 = (_3 = this.LicenseService) === null || _3 === void 0 ? void 0 : _3.destroy) === null || _4 === void 0 ? void 0 : _4.call(_3);
3134
+ (_5 = (_4 = this.LicenseService) === null || _4 === void 0 ? void 0 : _4.destroy) === null || _5 === void 0 ? void 0 : _5.call(_4);
3134
3135
  this.LicenseService = null;
3135
- (_6 = (_5 = this.FlashingCellService) === null || _5 === void 0 ? void 0 : _5.destroy) === null || _6 === void 0 ? void 0 : _6.call(_5);
3136
+ (_7 = (_6 = this.FlashingCellService) === null || _6 === void 0 ? void 0 : _6.destroy) === null || _7 === void 0 ? void 0 : _7.call(_6);
3136
3137
  this.FlashingCellService = null;
3137
- (_8 = (_7 = this.ThemeService) === null || _7 === void 0 ? void 0 : _7.destroy) === null || _8 === void 0 ? void 0 : _8.call(_7);
3138
+ (_9 = (_8 = this.ThemeService) === null || _8 === void 0 ? void 0 : _8.destroy) === null || _9 === void 0 ? void 0 : _9.call(_8);
3138
3139
  this.ThemeService = null;
3139
- (_10 = (_9 = this.ChartingService) === null || _9 === void 0 ? void 0 : _9.destroy) === null || _10 === void 0 ? void 0 : _10.call(_9);
3140
+ (_11 = (_10 = this.ChartingService) === null || _10 === void 0 ? void 0 : _10.destroy) === null || _11 === void 0 ? void 0 : _11.call(_10);
3140
3141
  this.ChartingService = null;
3141
- (_11 = this.unmountLoadingScreen) === null || _11 === void 0 ? void 0 : _11.call(this);
3142
+ (_12 = this.unmountLoadingScreen) === null || _12 === void 0 ? void 0 : _12.call(this);
3142
3143
  this.unmountLoadingScreen = null;
3143
3144
  if (config === null || config === void 0 ? void 0 : config.unmount) {
3144
3145
  const abContainerElement = this.getAdaptableContainerElement();
3145
3146
  if (abContainerElement != null) {
3146
- (_12 = this.unmountReactRoot) === null || _12 === void 0 ? void 0 : _12.call(this);
3147
+ (_13 = this.unmountReactRoot) === null || _13 === void 0 ? void 0 : _13.call(this);
3147
3148
  }
3148
3149
  this.unmountReactRoot = null;
3149
3150
  }
@@ -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 (colDef && typeof colDef.editable === 'function') {
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,27 @@ export class AgGridColumnAdapter {
421
421
  });
422
422
  }
423
423
  setupColumnEditable({ col }) {
424
- this.setColDefProperty(col, 'editable', (userValue) => {
425
- // if AG Grid defines the column as NOT editable, we don't mess with it
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
- if (typeof userValue === 'function') {
431
- const agGridColDefEditable = userValue(params);
432
- if (agGridColDefEditable === false) {
433
- return false;
427
+ const getOriginalColDefEditable = () => {
428
+ if (typeof original_editable === 'function') {
429
+ return original_editable(params);
430
+ }
431
+ else {
432
+ return original_editable;
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
+ const editOptionsEditability = this.adaptableApi.gridApi.internalApi.isCellEditableAccordingToEditOptions(gridCell, getOriginalColDefEditable());
439
+ if (editOptionsEditability) {
440
+ return editOptionsEditability;
434
441
  }
435
442
  }
436
- // if AG Grid editable is still true, we check if Adaptable allows it
437
- const gridCell = this.adaptableInstance.getGridCellFromRowNode(params.node, params.column.getColId());
438
- return this.adaptableApi.gridApi.isCellEditable(gridCell);
443
+ // 2. otherwise, fallback to colDef.editable
444
+ return getOriginalColDefEditable();
439
445
  };
440
446
  return editableCallback;
441
447
  });
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: 1732030718243 || Date.now(),
4
- VERSION: "19.1.2" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1732624906372 || Date.now(),
4
+ VERSION: "19.2.1-canary.0" || '--current-version--',
5
5
  };