@adaptabletools/adaptable 18.0.0-canary.8 → 18.0.0-canary.9

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 (84) hide show
  1. package/base.css.map +1 -1
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -1
  5. package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
  6. package/src/Api/ConfigApi.d.ts +1 -1
  7. package/src/Api/GridApi.d.ts +4 -0
  8. package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
  9. package/src/Api/Implementation/CommentsApiImpl.js +5 -0
  10. package/src/Api/Implementation/ConfigApiImpl.js +6 -3
  11. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  12. package/src/Api/Implementation/GridApiImpl.js +13 -0
  13. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -4
  14. package/src/Api/Implementation/LayoutApiImpl.js +15 -14
  15. package/src/Api/Implementation/NotesApiImpl.d.ts +4 -0
  16. package/src/Api/Implementation/NotesApiImpl.js +5 -0
  17. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  18. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  19. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  20. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  21. package/src/Api/Internal/CommentsInternalApi.js +13 -0
  22. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  23. package/src/Api/Internal/FreeTextColumnInternalApi.js +1 -1
  24. package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
  25. package/src/Api/Internal/NotesInternalApi.js +13 -0
  26. package/src/Api/LayoutApi.d.ts +11 -8
  27. package/src/Api/ScopeApi.d.ts +10 -0
  28. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  29. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  30. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  31. package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
  32. package/src/PredefinedConfig/Common/RowSummary.js +1 -0
  33. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  34. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  35. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  36. package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
  37. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  38. package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
  39. package/src/Redux/Store/AdaptableStore.js +11 -0
  40. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +2 -2
  41. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  42. package/src/Strategy/CellSummaryModule.js +50 -21
  43. package/src/Strategy/CommentsModule.js +3 -0
  44. package/src/Strategy/LayoutModule.d.ts +7 -0
  45. package/src/Strategy/LayoutModule.js +102 -3
  46. package/src/Strategy/NotesModule.js +3 -4
  47. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
  48. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
  49. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  50. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  51. package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
  52. package/src/Utilities/ObjectFactory.js +6 -6
  53. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
  54. package/src/Utilities/Services/AggregatedScalarLiveValue.js +11 -8
  55. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  56. package/src/Utilities/Services/LicenseService/index.js +4 -1
  57. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  58. package/src/Utilities/Services/QueryLanguageService.js +2 -1
  59. package/src/Utilities/Services/SummaryService.d.ts +19 -0
  60. package/src/Utilities/Services/SummaryService.js +29 -0
  61. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  62. package/src/View/Components/NewScopeComponent.js +32 -1
  63. package/src/View/Layout/TransposedPopup.js +7 -6
  64. package/src/agGrid/AdaptableAgGrid.d.ts +15 -1
  65. package/src/agGrid/AdaptableAgGrid.js +131 -23
  66. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  67. package/src/agGrid/AgGridAdapter.js +8 -0
  68. package/src/agGrid/AgGridColumnAdapter.js +14 -3
  69. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  70. package/src/components/Datepicker/index.d.ts +1 -1
  71. package/src/components/Input/index.d.ts +1 -1
  72. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  73. package/src/components/icons/index.js +2 -0
  74. package/src/components/icons/rows.d.ts +3 -0
  75. package/src/components/icons/rows.js +4 -0
  76. package/src/env.js +2 -2
  77. package/src/metamodel/adaptable.metamodel.d.ts +8 -0
  78. package/src/metamodel/adaptable.metamodel.js +18 -0
  79. package/src/parser/src/types.d.ts +5 -0
  80. package/tsconfig.esm.tsbuildinfo +1 -1
  81. package/src/View/Components/ScopeComponent.d.ts +0 -24
  82. package/src/View/Components/ScopeComponent.js +0 -133
  83. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  84. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
@@ -27,7 +27,7 @@ export interface ConfigApi {
27
27
  */
28
28
  setAdaptableStateKey(adaptableStateKey: string, config?: {
29
29
  predefinedConfig: PredefinedConfig;
30
- }): PromiseLike<void>;
30
+ }): Promise<void>;
31
31
  /**
32
32
  * Returns current Predefined Config
33
33
  */
@@ -516,4 +516,8 @@ export interface GridApi {
516
516
  * @deprecated use `getRowCount()` instead
517
517
  */
518
518
  getVisibleRowCount(): number;
519
+ /**
520
+ * Opens a window with a transposed view of Grid
521
+ */
522
+ showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
519
523
  }
@@ -2,7 +2,11 @@ import { ApiBase } from './ApiBase';
2
2
  import { CellAddress } from '../../PredefinedConfig/CellAddress';
3
3
  import { CommentThread, AdaptableComment } from '../../types';
4
4
  import { CommentApi } from '../CommentApi';
5
+ import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
6
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
5
7
  export declare class CommentsApiImpl extends ApiBase implements CommentApi {
8
+ internalApi: CommentsInternalApi;
9
+ constructor(adaptable: IAdaptable);
6
10
  getComments(address: CellAddress): AdaptableComment[];
7
11
  getCommentThread(address: CellAddress): CommentThread | undefined;
8
12
  getCommentThreads(): CommentThread[];
@@ -2,7 +2,12 @@ import * as CommentRedux from '../../Redux/ActionsReducers/CommentsRedux';
2
2
  import { ApiBase } from './ApiBase';
3
3
  import ObjectFactory from '../../Utilities/ObjectFactory';
4
4
  import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
5
+ import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
5
6
  export class CommentsApiImpl extends ApiBase {
7
+ constructor(adaptable) {
8
+ super(adaptable);
9
+ this.internalApi = new CommentsInternalApi(adaptable);
10
+ }
6
11
  getComments(address) {
7
12
  return CommentRedux.GetCommentsSelector(this.getAdaptableState().Comment, address);
8
13
  }
@@ -136,16 +136,19 @@ export class ConfigApiImpl extends ApiBase {
136
136
  });
137
137
  promise
138
138
  .then(() => {
139
- this.adaptable.updateColumnModelAndRefreshGrid();
139
+ this.adaptable.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
140
140
  this.adaptable.setLayout();
141
141
  this.adaptable.api.userInterfaceApi.hideLoadingScreen();
142
142
  })
143
143
  .then(() => {
144
144
  // resolve main(result) promise
145
145
  resolve();
146
- }, () => {
146
+ }, (error) => {
147
147
  // reject main(result) promise
148
- reject();
148
+ reject(error);
149
+ })
150
+ .catch((e) => {
151
+ this.logError('Error setting Adaptable State Key', e);
149
152
  });
150
153
  });
151
154
  });
@@ -130,4 +130,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
130
130
  openGridInfoSettingsPanel(): void;
131
131
  getAgGridRowModelType(): RowModelType;
132
132
  getVisibleRowCount(): number;
133
+ showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
133
134
  }
@@ -5,6 +5,7 @@ import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
5
5
  import { GridInternalApi } from '../Internal/GridInternalApi';
6
6
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
7
7
  import { logDeprecation } from '../../Utilities/logDeprecation';
8
+ import { WINDOW_SHOW_TRANSPOSED_VIEW } from '../../View/Components/Popups/WindowPopups/windowFactory';
8
9
  export class GridApiImpl extends ApiBase {
9
10
  constructor(adaptable) {
10
11
  super(adaptable);
@@ -515,4 +516,16 @@ export class GridApiImpl extends ApiBase {
515
516
  logDeprecation(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
516
517
  return this.getRowCount();
517
518
  }
519
+ showTransposedView(transposedColumnId, hideTransposedColumn) {
520
+ this.adaptable.api.internalApi.showPopupWindow({
521
+ id: WINDOW_SHOW_TRANSPOSED_VIEW,
522
+ factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
523
+ title: 'Transposed View',
524
+ icon: 'grid',
525
+ popupProps: {
526
+ transposedColumnId,
527
+ hideTransposedColumn,
528
+ },
529
+ });
530
+ }
518
531
  }
@@ -41,6 +41,8 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
41
41
  removeColumnFromCurrentLayout(columnId: string): void;
42
42
  removeColumnFromAllLayouts(columnId: string): void;
43
43
  removeColumnFromLayout(columnId: string, layoutName: string): void;
44
+ addColumnToLayout(columnId: string, layoutName: string): void;
45
+ addColumnToCurrentLayout(columnId: string): void;
44
46
  getLayoutSupportedFeatures(): {
45
47
  RowGroupedColumns: boolean;
46
48
  AggregationColumns: boolean;
@@ -48,8 +50,4 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
48
50
  ColumnFilters: boolean;
49
51
  ColumnSorts: boolean;
50
52
  };
51
- showTransposePopup(config: {
52
- transposedColumnId: string;
53
- hideTransposedColumn?: boolean;
54
- }): void;
55
53
  }
@@ -9,7 +9,6 @@ import { createUuid } from '../../PredefinedConfig/Uuid';
9
9
  import { DEFAULT_LAYOUT } from '../../Utilities/Constants/GeneralConstants';
10
10
  import { PopupShowPrompt } from '../../Redux/ActionsReducers/PopupRedux';
11
11
  import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
12
- import { WINDOW_SHOW_TRANSPOSED_VIEW } from '../../View/Components/Popups/WindowPopups/windowFactory';
13
12
  export class LayoutApiImpl extends ApiBase {
14
13
  constructor(adaptable) {
15
14
  super(adaptable);
@@ -222,6 +221,21 @@ export class LayoutApiImpl extends ApiBase {
222
221
  }
223
222
  }
224
223
  }
224
+ addColumnToLayout(columnId, layoutName) {
225
+ const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
226
+ if (column) {
227
+ const layout = this.getLayoutByName(layoutName);
228
+ if (layout) {
229
+ if (!layout.Columns.includes(columnId)) {
230
+ this.dispatchAction(LayoutRedux.LayoutAddColumn(layoutName, columnId));
231
+ this.getAdaptableApi().columnApi.showColumn(columnId);
232
+ }
233
+ }
234
+ }
235
+ }
236
+ addColumnToCurrentLayout(columnId) {
237
+ this.addColumnToLayout(columnId, this.getCurrentLayoutName());
238
+ }
225
239
  getLayoutSupportedFeatures() {
226
240
  const layoutSupportedFeatures = {
227
241
  RowGroupedColumns: true,
@@ -237,17 +251,4 @@ export class LayoutApiImpl extends ApiBase {
237
251
  }
238
252
  return layoutSupportedFeatures;
239
253
  }
240
- showTransposePopup(config) {
241
- const { transposedColumnId, hideTransposedColumn } = config;
242
- this.adaptable.api.internalApi.showPopupWindow({
243
- id: WINDOW_SHOW_TRANSPOSED_VIEW,
244
- factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
245
- title: 'Transpose View',
246
- icon: 'grid',
247
- popupProps: {
248
- transposedColumnId,
249
- hideTransposedColumn,
250
- },
251
- });
252
- }
253
254
  }
@@ -2,7 +2,11 @@ import { ApiBase } from './ApiBase';
2
2
  import { NotesApi } from '../NotesApi';
3
3
  import { AdaptableNote, AdaptableNotes, NotesState } from '../../PredefinedConfig/NotesState';
4
4
  import { CellAddress } from '../../PredefinedConfig/CellAddress';
5
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
6
+ import { NotesInternalApi } from '../Internal/NotesInternalApi';
5
7
  export declare class NotesApiImpl extends ApiBase implements NotesApi {
8
+ internalApi: NotesInternalApi;
9
+ constructor(adaptable: IAdaptable);
6
10
  addNote(noteStr: string, primaryKeyValue: any, columnId: string): void;
7
11
  editNote(note: AdaptableNote): void;
8
12
  updateNoteText(noteStr: string, note: AdaptableNote): void;
@@ -1,6 +1,11 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
3
+ import { NotesInternalApi } from '../Internal/NotesInternalApi';
3
4
  export class NotesApiImpl extends ApiBase {
5
+ constructor(adaptable) {
6
+ super(adaptable);
7
+ this.internalApi = new NotesInternalApi(adaptable);
8
+ }
4
9
  addNote(noteStr, primaryKeyValue, columnId) {
5
10
  const note = {
6
11
  Text: noteStr,
@@ -10,6 +10,7 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
10
10
  scopeIsEmpty(scope: AdaptableScope): boolean;
11
11
  scopeIsAll(scope: AdaptableScope): boolean;
12
12
  scopeHasDataType(scope: AdaptableScope): boolean;
13
+ scopeHasColumnType(scope: AdaptableScope): boolean;
13
14
  scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
14
15
  scopeHasColumns(scope: AdaptableScope): boolean;
15
16
  isSingleColumnScope(scope: AdaptableScope): boolean;
@@ -21,6 +22,7 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
21
22
  isPrimaryKeyColumnInScopeColumns(scope: AdaptableScope): boolean;
22
23
  getScopeToString(scope: AdaptableScope): string;
23
24
  getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
25
+ getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
24
26
  getDataTypesInScope(scope: AdaptableScope): ScopeDataType[] | undefined;
25
27
  isColumnInNumericScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
26
28
  isColumnInStringsScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
@@ -13,6 +13,10 @@ export class ScopeApiImpl extends ApiBase {
13
13
  if ('DataTypes' in scope && scope.DataTypes.includes(column.dataType)) {
14
14
  return true;
15
15
  }
16
+ if ('ColumnTypes' in scope &&
17
+ scope.ColumnTypes.some((columnType) => { var _a; return (_a = column.columnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType); })) {
18
+ return true;
19
+ }
16
20
  if ('ColumnIds' in scope && scope.ColumnIds.includes(column.columnId)) {
17
21
  return true;
18
22
  }
@@ -27,13 +31,7 @@ export class ScopeApiImpl extends ApiBase {
27
31
  return columns;
28
32
  }
29
33
  return columns.filter((c) => {
30
- if ('DataTypes' in scope && scope.DataTypes.includes(c.dataType)) {
31
- return true;
32
- }
33
- if ('ColumnIds' in scope && scope.ColumnIds.includes(c.columnId)) {
34
- return true;
35
- }
36
- return false;
34
+ return this.isColumnInScope(c, scope);
37
35
  });
38
36
  }
39
37
  getScopeDescription(scope) {
@@ -44,6 +42,9 @@ export class ScopeApiImpl extends ApiBase {
44
42
  // do we need a true check here?
45
43
  return 'Columns: All';
46
44
  }
45
+ if ('ColumnTypes' in scope) {
46
+ return ((scope.ColumnTypes.length > 0 ? 'ColumnTypes' : 'ColumnType') + ': ' + scope.ColumnTypes.join(', '));
47
+ }
47
48
  if ('DataTypes' in scope) {
48
49
  return ((scope.DataTypes.length > 0 ? 'DataTypes' : 'DataType') + ': ' + scope.DataTypes.join(', '));
49
50
  }
@@ -67,6 +68,9 @@ export class ScopeApiImpl extends ApiBase {
67
68
  scopeHasDataType(scope) {
68
69
  return scope !== undefined && 'DataTypes' in scope;
69
70
  }
71
+ scopeHasColumnType(scope) {
72
+ return scope !== undefined && 'ColumnTypes' in scope;
73
+ }
70
74
  scopeHasOnlyBooleanDataType(scope) {
71
75
  var _a;
72
76
  return 'DataTypes' in scope && ((_a = scope.DataTypes) === null || _a === void 0 ? void 0 : _a.length) == 1 && scope.DataTypes[0] == 'Boolean';
@@ -120,6 +124,9 @@ export class ScopeApiImpl extends ApiBase {
120
124
  if ('All' in scope) {
121
125
  return 'Columns: All';
122
126
  }
127
+ if ('ColumnTypes' in scope) {
128
+ return 'ColumnTypes: ' + scope.ColumnTypes.join(',');
129
+ }
123
130
  if ('DataTypes' in scope) {
124
131
  return 'DataTypes: ' + scope.DataTypes.join(',');
125
132
  }
@@ -140,6 +147,12 @@ export class ScopeApiImpl extends ApiBase {
140
147
  }
141
148
  return undefined;
142
149
  }
150
+ getColumnTypesInScope(scope) {
151
+ if (scope !== undefined && 'ColumnTypes' in scope) {
152
+ return scope.ColumnTypes;
153
+ }
154
+ return undefined;
155
+ }
143
156
  getDataTypesInScope(scope) {
144
157
  if (scope !== undefined && 'DataTypes' in scope) {
145
158
  return scope.DataTypes;
@@ -129,7 +129,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
129
129
  ? calculatedColumn.FriendlyName
130
130
  : calculatedColumn.ColumnId,
131
131
  colId: calculatedColumn.ColumnId,
132
- hide: true,
132
+ hide: false,
133
133
  editable: false,
134
134
  width: calculatedColumnSettings.Width,
135
135
  enableValue: calculatedColumnSettings.Aggregatable,
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable(): boolean;
4
+ }
@@ -0,0 +1,13 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable() {
4
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
5
+ if (currentLayout.EnablePivot) {
6
+ return false;
7
+ }
8
+ if (currentLayout.RowGroupedColumns) {
9
+ return false;
10
+ }
11
+ return true;
12
+ }
13
+ }
@@ -69,8 +69,9 @@ export class FormatColumnInternalApi extends ApiBase {
69
69
  // this.getFormatColumnsWithColumnScope(formatColumns)
70
70
  (this.adaptable.api.scopeApi.scopeHasColumns(fc.Scope) ||
71
71
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
72
- this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) || // this.getFormatColumnsWithAllScope(formatColumns)
73
- this.adaptable.api.scopeApi.scopeIsAll(fc.Scope))
72
+ this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) ||
73
+ // this.getFormatColumnsWithAllScope(formatColumns)
74
+ this.adaptable.api.scopeApi.scopeIsAll(fc.Scope) || this.adaptable.api.scopeApi.scopeHasColumnType(fc.Scope))
74
75
  );
75
76
  });
76
77
  }
@@ -65,7 +65,7 @@ export class FreeTextColumnInternalApi extends ApiBase {
65
65
  headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
66
66
  colId: freeTextColumn.ColumnId,
67
67
  editable: true,
68
- hide: true,
68
+ hide: false,
69
69
  width: freeTextColumnSettings.Width,
70
70
  enableValue: freeTextColumnSettings.Aggregatable,
71
71
  filter: freeTextColumnSettings.Filterable,
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class NotesInternalApi extends ApiBase {
3
+ areNotesAvailable(): boolean;
4
+ }
@@ -0,0 +1,13 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export class NotesInternalApi extends ApiBase {
3
+ areNotesAvailable() {
4
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
5
+ if (currentLayout.EnablePivot) {
6
+ return false;
7
+ }
8
+ if (currentLayout.RowGroupedColumns) {
9
+ return false;
10
+ }
11
+ return true;
12
+ }
13
+ }
@@ -163,6 +163,17 @@ export interface LayoutApi {
163
163
  * @param layoutName layout from which to remove Column
164
164
  */
165
165
  removeColumnFromLayout(columnId: string, layoutName: string): void;
166
+ /**
167
+ * Adds a Column to a given Layout
168
+ * @param columnId Column to add
169
+ * @param layoutName layout to which to add Column
170
+ */
171
+ addColumnToLayout(columnId: string, layoutName: string): void;
172
+ /**
173
+ * Adds a Column to Current Layout
174
+ * @param columnId Column to add
175
+ */
176
+ addColumnToCurrentLayout(columnId: string): void;
166
177
  /**
167
178
  * Returns what the layout supports.
168
179
  * This takes into account the data-source.
@@ -174,12 +185,4 @@ export interface LayoutApi {
174
185
  ColumnFilters: boolean;
175
186
  ColumnSorts: boolean;
176
187
  };
177
- /**
178
- * Opens a window with a transposed view of the grid
179
- * it only works for client side data
180
- */
181
- showTransposePopup(config: {
182
- transposedColumnId: string;
183
- hideTransposedColumn?: boolean;
184
- }): void;
185
188
  }
@@ -31,6 +31,11 @@ export interface ScopeApi {
31
31
  * @param scope Scope to check
32
32
  */
33
33
  scopeHasDataType(scope: AdaptableScope): boolean;
34
+ /**
35
+ * True if Scope contains ColumnTypes
36
+ * @param scope Scope to check
37
+ */
38
+ scopeHasColumnType(scope: AdaptableScope): boolean;
34
39
  /**
35
40
  * True if the Scope is DataTypes and contains only Boolean
36
41
  * @param scope Scope to check
@@ -87,6 +92,11 @@ export interface ScopeApi {
87
92
  * @param scope Scope to check
88
93
  */
89
94
  getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
95
+ /**
96
+ * Returns all the ColumnTypes in the Scope
97
+ * @param scope Scope to check
98
+ */
99
+ getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
90
100
  /**
91
101
  * Returns all the DataTypes in the Scope
92
102
  * @param scope Scope to check
@@ -19,6 +19,10 @@ export interface AdaptableColumnBase extends AdaptableObject {
19
19
  * DataType of the Column
20
20
  */
21
21
  dataType: AdaptableColumnDataType;
22
+ /**
23
+ * Column Types of the Column
24
+ */
25
+ columnTypes?: string[];
22
26
  }
23
27
  export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
24
28
  oldColumns: AdaptableColumn[];
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
54
54
  /**
55
55
  * All AdapTable System Icon names
56
56
  */
57
- export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter';
57
+ export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter' | 'rows';
@@ -8,7 +8,10 @@ export type ScopeDataTypes<Type = ScopeDataType> = {
8
8
  export type ScopeColumnIds = {
9
9
  ColumnIds: string[];
10
10
  };
11
+ export type ScopeColumnTypes = {
12
+ ColumnTypes: string[];
13
+ };
11
14
  /**
12
15
  * Defines where a given Object / Module is active
13
16
  */
14
- export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds;
17
+ export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds | ScopeColumnTypes;
@@ -0,0 +1,7 @@
1
+ import { SummarySupportedExpression } from '../../Utilities/Services/SummaryService';
2
+ export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
3
+ export type RowSummaryPosition = 'Top' | 'Bottom';
4
+ export interface RowSummary {
5
+ Position?: RowSummaryPosition;
6
+ ColumnsMap: Record<string, SummarySupportedExpression>;
7
+ }
@@ -0,0 +1 @@
1
+ export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
@@ -3,6 +3,7 @@ import { AdaptableObject } from './Common/AdaptableObject';
3
3
  import { ColumnSort } from './Common/ColumnSort';
4
4
  import { ColumnFilter, GridFilter } from '../types';
5
5
  import { AggregationColumns } from './Common/AggregationColumns';
6
+ import { RowSummary } from './Common/RowSummary';
6
7
  /**
7
8
  * Predefined Configuration for the Layout Module
8
9
  */
@@ -82,4 +83,8 @@ export interface Layout extends AdaptableObject {
82
83
  * Whether to include the aggFunc name in the column header: e.g. 'sum(Bank Balance)' will just be 'Bank Balance'
83
84
  */
84
85
  SuppressAggFuncInHeader?: boolean;
86
+ /**
87
+ * Row summaries
88
+ */
89
+ RowSummaries?: RowSummary[];
85
90
  }
@@ -20,6 +20,10 @@ export type { OpenFinReport };
20
20
  type ROW_PRIMARY_KEY = string;
21
21
  type COLUMN_ID_OR_WHOLE_ROW_LABEL = string;
22
22
  export type DataChangeHistoryMode = 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
23
+ export type SystemRowSummary = {
24
+ Position: 'Top' | 'Bottom';
25
+ RowData: Record<string, any>;
26
+ };
23
27
  /**
24
28
  * Internal state, used by Adaptable during a session; none of it is provided through Predefined Config, nor is it persisted
25
29
  */
@@ -103,6 +107,9 @@ export interface SystemState extends InternalState, IPushPullState, OpenFinState
103
107
  focusedEntity?: 'Note' | 'Comment';
104
108
  popupPosition?: CellAddress | null;
105
109
  };
110
+ RowSummary?: {
111
+ rowSummaries?: SystemRowSummary[];
112
+ };
106
113
  }
107
114
  export interface ProgressIndicator {
108
115
  active: boolean;
@@ -30,6 +30,10 @@ export declare const LAYOUT_SELECT = "LAYOUT_SELECT";
30
30
  * @ReduxAction A Layout has been (auto)saved
31
31
  */
32
32
  export declare const LAYOUT_SAVE = "LAYOUT_SAVE";
33
+ /**
34
+ * @ReduxAction A Column has been added
35
+ */
36
+ export declare const LAYOUT_ADD_COLUMN = "LAYOUT_ADD_COLUMN";
33
37
  /**
34
38
  * @ReduxAction A Column has been removed
35
39
  */
@@ -145,6 +149,10 @@ export interface LayoutSetColumnCaptionAction extends Redux.Action {
145
149
  columnId: string;
146
150
  caption: string;
147
151
  }
152
+ export interface LayoutAddColumnAction extends Redux.Action {
153
+ layoutName: string;
154
+ columnId: string;
155
+ }
148
156
  export interface LayoutRemoveColumnAction extends Redux.Action {
149
157
  layoutName: string;
150
158
  columnId: string;
@@ -163,6 +171,7 @@ export declare const LayoutAdd: (layout: Layout) => LayoutAddAction;
163
171
  export declare const LayoutDelete: (layout: Layout) => LayoutDeleteAction;
164
172
  export declare const LayoutSave: (layout: Layout) => LayoutSaveAction;
165
173
  export declare const LayoutSetColumnCaption: (layoutName: string, columnId: string, caption: string) => LayoutSetColumnCaptionAction;
174
+ export declare const LayoutAddColumn: (layoutName: string, columnId: string) => LayoutAddColumnAction;
166
175
  export declare const LayoutRemoveColumn: (layoutName: string, columnId: string) => LayoutRemoveColumnAction;
167
176
  export declare const LayoutSelect: (layoutName: string) => LayoutSelectAction;
168
177
  export declare const LayoutReady: (layoutState: LayoutState) => LayoutReadyAction;
@@ -28,6 +28,10 @@ export const LAYOUT_SELECT = 'LAYOUT_SELECT';
28
28
  * @ReduxAction A Layout has been (auto)saved
29
29
  */
30
30
  export const LAYOUT_SAVE = 'LAYOUT_SAVE';
31
+ /**
32
+ * @ReduxAction A Column has been added
33
+ */
34
+ export const LAYOUT_ADD_COLUMN = 'LAYOUT_ADD_COLUMN';
31
35
  /**
32
36
  * @ReduxAction A Column has been removed
33
37
  */
@@ -149,6 +153,11 @@ export const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
149
153
  columnId,
150
154
  caption,
151
155
  });
156
+ export const LayoutAddColumn = (layoutName, columnId) => ({
157
+ type: LAYOUT_ADD_COLUMN,
158
+ layoutName,
159
+ columnId,
160
+ });
152
161
  export const LayoutRemoveColumn = (layoutName, columnId) => ({
153
162
  type: LAYOUT_REMOVE_COLUMN,
154
163
  layoutName,
@@ -218,6 +227,17 @@ export const LayoutReducer = (state = initialState, action) => {
218
227
  }
219
228
  return state;
220
229
  }
230
+ case LAYOUT_ADD_COLUMN: {
231
+ const addColumnAction = action;
232
+ const layoutname = addColumnAction.layoutName;
233
+ const colToAdd = addColumnAction.columnId;
234
+ let layoutToUpdate = state.Layouts.find((l) => l.Name === layoutname);
235
+ if (layoutToUpdate) {
236
+ layoutToUpdate.Columns.push(colToAdd);
237
+ return Object.assign(Object.assign({}, state), { Layouts: state.Layouts.map((abObject) => abObject.Uuid === layoutToUpdate.Uuid ? layoutToUpdate : abObject) });
238
+ }
239
+ return state;
240
+ }
221
241
  case LAYOUT_REMOVE_COLUMN: {
222
242
  const removeColumnAction = action;
223
243
  const layoutname = removeColumnAction.layoutName;
@@ -77,6 +77,7 @@ export declare const SYSTEM_VISUAL_EXPORT_END = "SYSTEM_VISUAL_EXPORT_END";
77
77
  export declare const SYSTEM_CELL_POPUP_SHOW = "SYSTEM_CELL_POPUP_SHOW";
78
78
  export declare const SYSTEM_CELL_POPUP_HIDE = "SYSTEM_CELL_POPUP_HIDE";
79
79
  export declare const SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = "SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY";
80
+ export declare const SYSTEM_SUMMARY_ROW_SET = "SYSTEM_SUMMARY_ROW_SET";
80
81
  export declare const DATA_IMPORT_COMPLETED = "DATA_IMPORT_COMPLETED";
81
82
  export interface DataImportCompletedAction extends Redux.Action {
82
83
  dataImportedInfo: DataImportedInfo;
@@ -328,6 +329,10 @@ export declare const SystemVisualExportEnd: () => SystemVisualExportEndAction;
328
329
  export declare const SystemQuickSearchFloatingVisibility: (visible: boolean) => SystemQuickSearchFloatingVisibilityAction;
329
330
  export declare const SystemCellPopupShow: (cellPosition: CellAddress, editMode?: boolean) => SystemCellPopupShowAction;
330
331
  export declare const SystemCellPopupEditFocusedEntity: (focusedEntity: 'Note' | 'Comment') => SystemCellPopupEditFocusedEntityAction;
332
+ export declare const SystemRowSummartSet: (systemRowSummaries: SystemState['RowSummary']['rowSummaries']) => {
333
+ readonly type: "SYSTEM_SUMMARY_ROW_SET";
334
+ readonly rowSummaries: import("../../PredefinedConfig/SystemState").SystemRowSummary[];
335
+ };
331
336
  export declare const SystemCellPopupHide: () => SystemCellPopupHideAction;
332
337
  export declare const SystemDisableDeleteConfirmationSelector: (state: SystemState) => boolean;
333
338
  export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState) => Record<string, Record<string, number>>;
@@ -87,10 +87,12 @@ export const SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = 'SYSTEM_SET_QUICK_SEA
87
87
  // Data Export (Report)
88
88
  export const SYSTEM_VISUAL_EXPORT_BEGIN = 'SYSTEM_VISUAL_EXPORT_BEGIN';
89
89
  export const SYSTEM_VISUAL_EXPORT_END = 'SYSTEM_VISUAL_EXPORT_END';
90
- // Notes
90
+ // Notes and Comments
91
91
  export const SYSTEM_CELL_POPUP_SHOW = 'SYSTEM_CELL_POPUP_SHOW';
92
92
  export const SYSTEM_CELL_POPUP_HIDE = 'SYSTEM_CELL_POPUP_HIDE';
93
93
  export const SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = 'SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY';
94
+ // Row Summaries
95
+ export const SYSTEM_SUMMARY_ROW_SET = 'SYSTEM_SUMMARY_ROW_SET';
94
96
  // Data Import
95
97
  export const DATA_IMPORT_COMPLETED = 'DATA_IMPORT_COMPLETED';
96
98
  export const SystemHighlightCellAdd = (cellHighlightInfo) => ({
@@ -316,6 +318,10 @@ export const SystemCellPopupEditFocusedEntity = (focusedEntity) => ({
316
318
  type: SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY,
317
319
  focusedEntity,
318
320
  });
321
+ export const SystemRowSummartSet = (systemRowSummaries) => ({
322
+ type: SYSTEM_SUMMARY_ROW_SET,
323
+ rowSummaries: systemRowSummaries,
324
+ });
319
325
  export const SystemCellPopupHide = () => ({
320
326
  type: SYSTEM_CELL_POPUP_HIDE,
321
327
  });
@@ -758,6 +764,12 @@ export const SystemReducer = (state = initialState, action) => {
758
764
  popupPosition: null,
759
765
  } });
760
766
  }
767
+ case SYSTEM_SUMMARY_ROW_SET: {
768
+ const typedAction = action;
769
+ return Object.assign(Object.assign({}, state), { RowSummary: {
770
+ rowSummaries: typedAction.rowSummaries,
771
+ } });
772
+ }
761
773
  default:
762
774
  return state;
763
775
  }