@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.
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} +3 -2
  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 +2 -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 +2 -2
  56. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  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 +2 -2
  60. package/src/agGrid/AdaptableAgGrid.js +22 -21
  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.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.getAdaptableApi().columnApi.getColumnWithColumnId(columnId));
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.getAdaptableApi().layoutApi.internalApi.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getAdaptableApi().layoutApi.getCurrentLayout())) {
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.getAdaptableApi().columnScopeApi.isColumnInScope(column, scopedFormatColumn.Scope));
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.getAdaptableApi().columnScopeApi.scopeHasColumns(fc.Scope) ||
74
+ (this.getColumnScopeApi().scopeHasColumns(fc.Scope) ||
75
75
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
76
- this.getAdaptableApi().columnScopeApi.scopeHasDataType(fc.Scope) ||
76
+ this.getColumnScopeApi().scopeHasDataType(fc.Scope) ||
77
77
  // this.getFormatColumnsWithAllScope(formatColumns)
78
- this.getAdaptableApi().columnScopeApi.scopeIsAll(fc.Scope) || this.getAdaptableApi().columnScopeApi.scopeHasColumnType(fc.Scope))
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.getAdaptableApi().columnScopeApi.isScopeInScope(scope, predicateDef.columnScope));
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.getAdaptableApi().gridApi.isSummaryNode(rowNode);
166
- const isGroupedRowNode = this.getAdaptableApi().gridApi.isGroupRowNode(rowNode);
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.getAdaptableApi().predicateApi.handleColumnPredicates((_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, false);
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.getAdaptableApi().eventApi.emit('CellChanged', cellChangedInfo);
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.getAdaptableApi().eventApi.emit('GridDataChanged', gridDataChangedInfo);
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.getAdaptableApi().gridApi.getColumnSortForColumn(column.columnId);
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.getAdaptableApi().eventApi.emit('LayoutChanged', layoutChangedInfo);
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.getAdaptableApi().gridApi.getGridState();
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.getAdaptableApi().gridApi.getAllAgGridColumns();
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.getAdaptableApi().columnApi.isColumnInGrid(columnId)) {
37
+ if (!this.getColumnApi().isColumnInGrid(columnId)) {
38
38
  return 0;
39
39
  }
40
40
  else {
41
- return this.getAdaptableApi().gridApi.getRawValueFromRowNode(rowNode, columnId);
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.getAdaptableApi().columnApi.isColumnInGrid(columnId)) {
100
+ if (!this.getColumnApi().isColumnInGrid(columnId)) {
101
101
  return 0;
102
102
  }
103
103
  else {
104
- return this.getAdaptableApi().gridApi.getRawValueFromRowNode(rowNode, columnId);
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.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
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.getAdaptableApi().columnScopeApi.isColumnInScope(column, predicate.columnScope));
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.getAdaptableApi().eventApi.emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
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.getAdaptableApi().eventApi.emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
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.getAdaptableApi().eventApi.on('AdaptableStateChanged', () => {
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.getAdaptableApi().userInterfaceApi.getCustomIconDefinition(icon.name)
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: () => 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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 && gridCell.column.dataType == 'Number' && !gridCell.column.readOnly) {
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
- if (this.api.gridApi.isCellEditable(gridCell)) {
101
- //for aggrid as we are getting strings sometimes
102
- if (typeof gridCell.rawValue != 'number') {
103
- gridCell.rawValue = parseFloat(gridCell.rawValue);
104
- }
105
- const isSatisfiedExpression = this.isPlusMinusNudgeApplied(pmr, gridCell);
106
- if (isSatisfiedExpression) {
107
- foundRule = pmr;
108
- shouldApplyPlusMinus = true;
109
- let computedValue = gridCell.rawValue + pmr.NudgeValue * side;
110
- //avoid the 0.0000000000x??
111
- // computedValue= parseFloat(computedValue.toFixed(12));
112
- replacementGridCell = {
113
- primaryKeyValue: gridCell.primaryKeyValue,
114
- column: gridCell.column,
115
- rawValue: computedValue,
116
- displayValue: computedValue,
117
- normalisedValue: computedValue,
118
- rowNode: gridCell.rowNode,
119
- isPivotCell: false,
120
- isRowGroupCell: false,
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 defaultAdaptableOptions_1 = require("../../agGrid/defaultAdaptableOptions");
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, defaultAdaptableOptions_1.getDefaultAdaptableOptions)();
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 defaultAdaptableOptions_1 = require("../../../agGrid/defaultAdaptableOptions");
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, defaultAdaptableOptions_1.applyDefaultAdaptableOptions)(props.adaptableConfig.adaptableOptions);
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,
@@ -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 defaultAdaptableOptions_1 = require("./defaultAdaptableOptions");
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, defaultAdaptableOptions_1.getDefaultAdaptableOptions)().containerOptions.adaptableContainer || 'adaptable';
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 defaultAdaptableOptions_1 = require("./defaultAdaptableOptions");
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, defaultAdaptableOptions_1.applyDefaultAdaptableOptions)(this._rawAdaptableOptions);
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
- (_j = (_h = this.CalculatedColumnExpressionService) === null || _h === void 0 ? void 0 : _h.destroy) === null || _j === void 0 ? void 0 : _j.call(_h);
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
- (_l = (_k = this.DataService) === null || _k === void 0 ? void 0 : _k.destroy) === null || _l === void 0 ? void 0 : _l.call(_k);
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
- (_o = (_m = this.Fdc3Service) === null || _m === void 0 ? void 0 : _m.destroy) === null || _o === void 0 ? void 0 : _o.call(_m);
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
- (_q = (_p = this.ModuleService) === null || _p === void 0 ? void 0 : _p.destroy) === null || _q === void 0 ? void 0 : _q.call(_p);
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
- (_s = (_r = this.ValidationService) === null || _r === void 0 ? void 0 : _r.destroy) === null || _s === void 0 ? void 0 : _s.call(_r);
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
- (_u = (_t = this.QueryLanguageService) === null || _t === void 0 ? void 0 : _t.destroy) === null || _u === void 0 ? void 0 : _u.call(_t);
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
- (_w = (_v = this.AlertService) === null || _v === void 0 ? void 0 : _v.destroy) === null || _w === void 0 ? void 0 : _w.call(_v);
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
- (_y = (_x = this.TeamSharingService) === null || _x === void 0 ? void 0 : _x.destroy) === null || _y === void 0 ? void 0 : _y.call(_x);
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
- (_0 = (_z = this.RowEditService) === null || _z === void 0 ? void 0 : _z.destroy) === null || _0 === void 0 ? void 0 : _0.call(_z);
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
- (_2 = (_1 = this.MetamodelService) === null || _1 === void 0 ? void 0 : _1.destroy) === null || _2 === void 0 ? void 0 : _2.call(_1);
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
- (_4 = (_3 = this.LicenseService) === null || _3 === void 0 ? void 0 : _3.destroy) === null || _4 === void 0 ? void 0 : _4.call(_3);
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
- (_6 = (_5 = this.FlashingCellService) === null || _5 === void 0 ? void 0 : _5.destroy) === null || _6 === void 0 ? void 0 : _6.call(_5);
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
- (_8 = (_7 = this.ThemeService) === null || _7 === void 0 ? void 0 : _7.destroy) === null || _8 === void 0 ? void 0 : _8.call(_7);
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
- (_10 = (_9 = this.ChartingService) === null || _9 === void 0 ? void 0 : _9.destroy) === null || _10 === void 0 ? void 0 : _10.call(_9);
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
- (_11 = this.unmountLoadingScreen) === null || _11 === void 0 ? void 0 : _11.call(this);
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
- (_12 = this.unmountReactRoot) === null || _12 === void 0 ? void 0 : _12.call(this);
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 (colDef && typeof colDef.editable === 'function') {
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)