@adaptabletools/adaptable 18.0.0-canary.11 → 18.0.0-canary.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +4 -0
- package/base.css.map +1 -1
- package/index.css +6 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +2 -2
- package/src/AdaptableOptions/ColumnOptions.d.ts +7 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +9 -7
- package/src/AdaptableOptions/NoteOptions.d.ts +4 -1
- package/src/Api/AdaptableApi.d.ts +2 -2
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/CommentApi.d.ts +11 -12
- package/src/Api/ConfigApi.d.ts +2 -2
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -2
- package/src/Api/Implementation/ApiBase.d.ts +2 -2
- package/src/Api/Implementation/ApiBase.js +1 -1
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +10 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -2
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +9 -0
- package/src/Api/Implementation/{NotesApiImpl.d.ts → NoteApiImpl.d.ts} +7 -7
- package/src/Api/Implementation/{NotesApiImpl.js → NoteApiImpl.js} +5 -5
- package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -5
- package/src/Api/Implementation/OptionsApiImpl.js +2 -12
- package/src/Api/Internal/AdaptableInternalApi.d.ts +1 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +4 -1
- package/src/Api/Internal/NotesInternalApi.d.ts +1 -1
- package/src/Api/Internal/NotesInternalApi.js +1 -1
- package/src/Api/{NotesApi.d.ts → NoteApi.d.ts} +14 -14
- package/src/Api/OptionsApi.d.ts +8 -12
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +13 -13
- package/src/PredefinedConfig/Common/RowSummary.d.ts +6 -0
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +2 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/SystemState.d.ts +2 -3
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +6 -6
- package/src/Redux/ActionsReducers/NotesRedux.js +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +4 -10
- package/src/Strategy/CommentsModule.js +4 -4
- package/src/Strategy/NotesModule.js +5 -5
- package/src/Utilities/Services/CellPopupService.js +2 -2
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +238 -22
- package/src/View/Components/NewScopeComponent.js +2 -2
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +3 -2
- package/src/View/Notes/NotesPopup.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -0
- package/src/agGrid/AdaptableAgGrid.js +93 -54
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +3 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
- package/src/agGrid/AgGridColumnAdapter.js +2 -2
- package/src/agGrid/AgGridOptionsService.d.ts +4 -1
- package/src/agGrid/AgGridOptionsService.js +22 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +41 -3
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +22 -20
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -4
- /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
- /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
- /package/src/PredefinedConfig/{NotesState.js → NoteState.js} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Column } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableColumnGroup, BaseContext } from '../types';
|
|
3
|
-
export interface ColumnTypesContext extends BaseContext {
|
|
4
|
-
}
|
|
5
3
|
/**
|
|
6
4
|
* Options related to managing Columns in Adaptable.
|
|
7
5
|
*/
|
|
@@ -12,8 +10,8 @@ export interface ColumnOptions {
|
|
|
12
10
|
*/
|
|
13
11
|
columnFriendlyName?: (columnFriendlyNameContext: ColumnFriendlyNameContext) => string | undefined;
|
|
14
12
|
/**
|
|
15
|
-
* Optional list of Column Types - used
|
|
16
|
-
* @defaultValue
|
|
13
|
+
* Optional list of Column Types - used for Scope and creating Special Columns
|
|
14
|
+
* @defaultValue Empty Array
|
|
17
15
|
*/
|
|
18
16
|
columnTypes?: string[] | ((context: ColumnTypesContext) => string[]);
|
|
19
17
|
/**
|
|
@@ -54,3 +52,8 @@ export interface ColumnFriendlyNameContext {
|
|
|
54
52
|
*/
|
|
55
53
|
columnGroup: AdaptableColumnGroup;
|
|
56
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Context used when retrieving Column Types
|
|
57
|
+
*/
|
|
58
|
+
export interface ColumnTypesContext extends BaseContext {
|
|
59
|
+
}
|
|
@@ -2,27 +2,29 @@ import { CommentThread, BaseContext, CellAddress } from '../../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Options for managing Comments and Comment Threads in AdapTable
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface CommentOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
|
-
* Whether a cell can be
|
|
8
|
-
* TODO: check if it works
|
|
7
|
+
* Whether a cell can be receive Comments
|
|
9
8
|
*/
|
|
10
9
|
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* Loads initial Comments
|
|
13
12
|
*/
|
|
14
13
|
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
|
|
15
14
|
/**
|
|
16
|
-
* Called when
|
|
15
|
+
* Called when Comments change
|
|
17
16
|
* @param commentThreads
|
|
18
17
|
*/
|
|
19
18
|
persistCommentThreads?(commentThreads: CommentThread[]): void;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
|
-
* Context used when determining if a
|
|
21
|
+
* Context used when determining if a cell can show Comments
|
|
23
22
|
*/
|
|
24
23
|
export interface CommentableCellContext extends BaseContext {
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Cell in AdapTable which might receive a Comment
|
|
26
|
+
*/
|
|
27
|
+
cellAddress: CellAddress;
|
|
26
28
|
}
|
|
27
29
|
export interface CommentLoadContext extends BaseContext {
|
|
28
30
|
}
|
|
@@ -4,7 +4,7 @@ import { BaseContext, CellAddress } from '../../types';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface NoteOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
|
-
* Whether a cell can
|
|
7
|
+
* Whether a cell can contain Notes
|
|
8
8
|
*/
|
|
9
9
|
isCellNotable?: (context: NotableCellContext) => boolean;
|
|
10
10
|
}
|
|
@@ -12,5 +12,8 @@ export interface NoteOptions<TData = any> {
|
|
|
12
12
|
* Context used when determining if a Note can be added to a Cell
|
|
13
13
|
*/
|
|
14
14
|
export interface NotableCellContext extends BaseContext {
|
|
15
|
+
/**
|
|
16
|
+
* Cell which should contain the Note
|
|
17
|
+
*/
|
|
15
18
|
address: CellAddress;
|
|
16
19
|
}
|
|
@@ -40,7 +40,7 @@ import { StyledColumnApi } from './StyledColumnApi';
|
|
|
40
40
|
import { OptionsApi } from './OptionsApi';
|
|
41
41
|
import { ActionColumnApi } from './ActionColumnApi';
|
|
42
42
|
import { ActionRowApi } from './ActionRowApi';
|
|
43
|
-
import {
|
|
43
|
+
import { NoteApi } from './NoteApi';
|
|
44
44
|
import { Fdc3Api } from './Fdc3Api';
|
|
45
45
|
import { DataImportApi } from './DataImportApi';
|
|
46
46
|
import { GridFilterApi } from './GridFilterApi';
|
|
@@ -233,7 +233,7 @@ export interface AdaptableApi {
|
|
|
233
233
|
/**
|
|
234
234
|
* Provides access to the Notes Module
|
|
235
235
|
*/
|
|
236
|
-
|
|
236
|
+
noteApi: NoteApi;
|
|
237
237
|
/**
|
|
238
238
|
* Provides access to the Comments Module
|
|
239
239
|
*/
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -262,4 +262,8 @@ export interface ColumnApi {
|
|
|
262
262
|
* Opens Settings Panel with Column Info section selected and visible
|
|
263
263
|
*/
|
|
264
264
|
openColumnInfoSettingsPanel(): void;
|
|
265
|
+
/**
|
|
266
|
+
* Returns available columns types defined under columnOptions.columnTypes
|
|
267
|
+
*/
|
|
268
|
+
getColumnTypes(): string[];
|
|
265
269
|
}
|
package/src/Api/CommentApi.d.ts
CHANGED
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
import { CommentThread } from '../PredefinedConfig/CommentState';
|
|
2
|
-
import { CellAddress } from '../
|
|
3
|
-
import { AdaptableComment } from '../types';
|
|
2
|
+
import { AdaptableComment, CellAddress } from '../types';
|
|
4
3
|
/**
|
|
5
|
-
* Provides run-time access to
|
|
4
|
+
* Provides run-time access to Comment Module and related State
|
|
6
5
|
*/
|
|
7
6
|
export interface CommentApi {
|
|
8
7
|
/**
|
|
9
|
-
* Add
|
|
8
|
+
* Add a Comment to a Comment Thread
|
|
10
9
|
*
|
|
11
10
|
* @param comment comment
|
|
12
11
|
* @param address where the comment should be added
|
|
13
12
|
*/
|
|
14
13
|
addComment(commentText: string, address: CellAddress): void;
|
|
15
14
|
/**
|
|
16
|
-
* Edit
|
|
15
|
+
* Edit a Comment
|
|
17
16
|
*
|
|
18
17
|
* @param comment Comment to edit
|
|
19
18
|
* @param cellAddress Location of the comment, if not provided all comments will be traversed to find the comment
|
|
20
19
|
*/
|
|
21
20
|
editComment(comment: AdaptableComment, cellAddress?: CellAddress): void;
|
|
22
21
|
/**
|
|
23
|
-
* Delete a
|
|
22
|
+
* Delete a Comment
|
|
24
23
|
* @param address Location of the comment, if not provided all comments will be traversed to find the comment
|
|
25
24
|
*/
|
|
26
25
|
deleteComment(comment: AdaptableComment, cellAddress: CellAddress): void;
|
|
27
26
|
/**
|
|
28
|
-
*
|
|
27
|
+
* Get Comments for a particular cell
|
|
29
28
|
* @param CellAddress
|
|
30
29
|
*/
|
|
31
30
|
getComments(cellAddress: CellAddress): AdaptableComment[];
|
|
32
31
|
/**
|
|
33
|
-
* Delete all
|
|
32
|
+
* Delete all Comments for a particular cell
|
|
34
33
|
* @param cellAddress
|
|
35
34
|
*/
|
|
36
35
|
deleteCommentThread(cellAddress: CellAddress): void;
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
37
|
+
* Return all Comments for a particular cell
|
|
39
38
|
* @param cellAddress
|
|
40
39
|
*/
|
|
41
40
|
getCommentThread(cellAddress: CellAddress): CommentThread | undefined;
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
42
|
+
* Return all Comment Threads
|
|
44
43
|
*/
|
|
45
44
|
getCommentThreads(): CommentThread[];
|
|
46
45
|
/**
|
|
47
|
-
*
|
|
46
|
+
* Create a new Comment Thread
|
|
48
47
|
*
|
|
49
48
|
* @param commentThread
|
|
50
49
|
*/
|
|
51
50
|
addCommentThread(commentThread: CommentThread): void;
|
|
52
51
|
/**
|
|
53
|
-
*
|
|
52
|
+
* Load all Comment Threads
|
|
54
53
|
*
|
|
55
54
|
* @param commentThreads new cell comments
|
|
56
55
|
*/
|
package/src/Api/ConfigApi.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
|
|
|
16
16
|
import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
|
|
17
17
|
import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
18
18
|
import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState } from '../types';
|
|
19
|
-
import {
|
|
19
|
+
import { NoteState } from '../PredefinedConfig/NoteState';
|
|
20
20
|
/**
|
|
21
21
|
* Range of functions to access Predefined Config and Adaptable State
|
|
22
22
|
*/
|
|
@@ -108,7 +108,7 @@ export interface ConfigApi {
|
|
|
108
108
|
* Returns Notes section of Adaptable State
|
|
109
109
|
* @param returnJson return as JSON rather than object
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
getNoteState(returnJson?: boolean): NoteState;
|
|
112
112
|
/**
|
|
113
113
|
* Returns Custom Sort section of Adaptable State
|
|
114
114
|
* @param returnJson return as JSON rather than object
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ActionRowSubmittedInfo, AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowSelectionChangedInfo, ScheduleTriggeredInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo, ThemeEditedInfo } from '../types';
|
|
2
|
-
import { CalculatedColumnChangedInfo } from './Events/CalculatedColumnChanged';
|
|
3
|
-
import { CommentsChangedInfo } from './Events/CommentsChangedInfo';
|
|
1
|
+
import { ActionRowSubmittedInfo, AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowSelectionChangedInfo, ScheduleTriggeredInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo, ThemeEditedInfo } from '../types';
|
|
4
2
|
/**
|
|
5
3
|
* Responsible for publishing the many Events that AdapTable fires
|
|
6
4
|
*/
|
|
@@ -297,17 +295,17 @@ export interface EventApi {
|
|
|
297
295
|
*/
|
|
298
296
|
off(eventName: 'ChartChanged', callback: (chartChangedInfo: ChartChangedInfo) => void): void;
|
|
299
297
|
/**
|
|
300
|
-
* Event fired when
|
|
301
|
-
* @param eventName
|
|
298
|
+
* Event fired when a Comment is Changed
|
|
299
|
+
* @param eventName CommentChanged
|
|
302
300
|
* @param callback
|
|
303
301
|
*/
|
|
304
|
-
on(eventName: '
|
|
302
|
+
on(eventName: 'CommentChanged', callback: (commentChangedInfo: CommentChangedInfo) => void): () => void;
|
|
305
303
|
/**
|
|
306
|
-
* Unsubscribe from
|
|
304
|
+
* Unsubscribe from CommentChanged
|
|
307
305
|
* @param eventName
|
|
308
306
|
* @param callback
|
|
309
307
|
*/
|
|
310
|
-
off(eventName: '
|
|
308
|
+
off(eventName: 'CommentChanged', callback: (commentChangedInfo: CommentChangedInfo) => void): void;
|
|
311
309
|
/**
|
|
312
310
|
* Fired when Adaptable is up and running - has no arguments.
|
|
313
311
|
* @param eventName - AdaptableReady
|
|
@@ -352,6 +350,6 @@ export interface EventApi {
|
|
|
352
350
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
353
351
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
354
352
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
355
|
-
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataImported' | 'DataSetSelected' | 'ColumnFilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'CalculatedColumnChanged' | 'LiveDataChanged' | 'ScheduleTriggered' | 'SearchChanged' | 'CellSelectionChanged' | 'RowSelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited' | 'GridFilterApplied' | '
|
|
353
|
+
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataImported' | 'DataSetSelected' | 'ColumnFilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'CalculatedColumnChanged' | 'LiveDataChanged' | 'ScheduleTriggered' | 'SearchChanged' | 'CellSelectionChanged' | 'RowSelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited' | 'GridFilterApplied' | 'CommentChanged', data?: any): Promise<any>;
|
|
356
354
|
destroy(): void;
|
|
357
355
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommentThread } from '../../types';
|
|
2
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
+
/**
|
|
4
|
+
* Event fired when a Comment has changed
|
|
5
|
+
*/
|
|
6
|
+
export interface CommentChangedInfo extends BaseEventInfo {
|
|
7
|
+
/**
|
|
8
|
+
* All current Comment Threads
|
|
9
|
+
*/
|
|
10
|
+
commentThreads: CommentThread[];
|
|
11
|
+
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export interface GridApi {
|
|
|
26
26
|
* Retrieves filtered data from the grid
|
|
27
27
|
*/
|
|
28
28
|
getFilteredData(): any[];
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves visible data from the grid (filtered and sorted)
|
|
31
|
+
*/
|
|
32
|
+
getVisibleData(): any[];
|
|
29
33
|
/**
|
|
30
34
|
* @deprecated use `loadGridData()` instead
|
|
31
35
|
*/
|
|
@@ -40,7 +40,7 @@ import { StatusBarApi } from '../StatusBarApi';
|
|
|
40
40
|
import { StyledColumnApi } from '../StyledColumnApi';
|
|
41
41
|
import { ActionColumnApi } from '../ActionColumnApi';
|
|
42
42
|
import { ActionRowApi } from '../ActionRowApi';
|
|
43
|
-
import {
|
|
43
|
+
import { NoteApi } from '../NoteApi';
|
|
44
44
|
import { Fdc3Api } from '../Fdc3Api';
|
|
45
45
|
import { GridFilterApi } from '../GridFilterApi';
|
|
46
46
|
import { ColumnFilterApi } from '../ColumnFilterApi';
|
|
@@ -90,7 +90,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
90
90
|
dataChangeHistoryApi: DataChangeHistoryApi;
|
|
91
91
|
chartingApi: ChartingApi;
|
|
92
92
|
statusBarApi: StatusBarApi;
|
|
93
|
-
|
|
93
|
+
noteApi: NoteApi;
|
|
94
94
|
fdc3Api: Fdc3Api;
|
|
95
95
|
dataImportApi: DataImportApi;
|
|
96
96
|
gridFilterApi: GridFilterApi;
|
|
@@ -40,7 +40,7 @@ import { StyledColumnApiImpl } from './StyledColumnApiImpl';
|
|
|
40
40
|
import { CalendarApiImpl } from './CalendarApiImpl';
|
|
41
41
|
import { EntitlementApiImpl } from './EntitlementApiImpl';
|
|
42
42
|
import { OptionsApiImpl } from './OptionsApiImpl';
|
|
43
|
-
import {
|
|
43
|
+
import { NoteApiImpl } from './NoteApiImpl';
|
|
44
44
|
import { Fdc3ApiImpl } from './Fdc3ApiImpl';
|
|
45
45
|
import { DataImportApiImpl } from './DataImportApiImpl';
|
|
46
46
|
import { GridFilterApiImpl } from './GridFilterApiImpl';
|
|
@@ -94,7 +94,7 @@ export class AdaptableApiImpl {
|
|
|
94
94
|
this.dataChangeHistoryApi = new DataChangeHistoryApiImpl(adaptable);
|
|
95
95
|
this.chartingApi = new ChartingApiImpl(adaptable);
|
|
96
96
|
this.statusBarApi = new StatusBarApiImpl(adaptable);
|
|
97
|
-
this.
|
|
97
|
+
this.noteApi = new NoteApiImpl(adaptable);
|
|
98
98
|
this.fdc3Api = new Fdc3ApiImpl(adaptable);
|
|
99
99
|
this.dataImportApi = new DataImportApiImpl(adaptable);
|
|
100
100
|
this.gridFilterApi = new GridFilterApiImpl(adaptable);
|
|
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
|
7
7
|
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
9
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
10
|
-
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, NamedQueryApi,
|
|
10
|
+
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions } from '../../types';
|
|
11
11
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
12
12
|
export declare abstract class ApiBase {
|
|
13
13
|
protected adaptable: IAdaptable;
|
|
@@ -53,7 +53,7 @@ export declare abstract class ApiBase {
|
|
|
53
53
|
protected getActionColumnOptions(): ActionColumnOptions;
|
|
54
54
|
protected getActionRowOptions(): ActionRowOptions;
|
|
55
55
|
protected getColumnOptions(): ColumnOptions;
|
|
56
|
-
protected
|
|
56
|
+
protected getNoteOptions(): NoteOptions;
|
|
57
57
|
protected getCustomSortOptions(): CustomSortOptions;
|
|
58
58
|
protected getDataSetOptions(): DataSetOptions;
|
|
59
59
|
protected getCalendarOptions(): CalendarOptions;
|
|
@@ -3,6 +3,7 @@ import * as GeneralConstants from '../../Utilities/Constants/GeneralConstants';
|
|
|
3
3
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
4
4
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
5
5
|
import { ColumnInternalApi } from '../Internal/ColumnInternalApi';
|
|
6
|
+
import { createBaseContext } from '../../Utilities/ObjectFactory';
|
|
6
7
|
export class ColumnApiImpl extends ApiBase {
|
|
7
8
|
constructor(adaptable) {
|
|
8
9
|
super(adaptable);
|
|
@@ -333,4 +334,13 @@ export class ColumnApiImpl extends ApiBase {
|
|
|
333
334
|
openColumnInfoSettingsPanel() {
|
|
334
335
|
this.showModulePopup(ModuleConstants.ColumnInfoModuleId);
|
|
335
336
|
}
|
|
337
|
+
getColumnTypes() {
|
|
338
|
+
const columnTypes = this.getOptions().columnOptions.columnTypes;
|
|
339
|
+
if (typeof columnTypes === 'function') {
|
|
340
|
+
return columnTypes(createBaseContext(this.getAdaptableApi()));
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
return columnTypes;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
336
346
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import { CellAddress } from '../../
|
|
3
|
-
import { CommentThread, AdaptableComment } from '../../types';
|
|
2
|
+
import { CommentThread, AdaptableComment, CellAddress } from '../../types';
|
|
4
3
|
import { CommentApi } from '../CommentApi';
|
|
5
4
|
import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
|
|
6
5
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
@@ -20,7 +20,7 @@ import { AdaptableModule, AdaptableStateKey } from '../../PredefinedConfig/Commo
|
|
|
20
20
|
import { AdaptableOptions, AdaptableSearchState, AdaptableSortState, NamedQueryState, ScheduleState } from '../../types';
|
|
21
21
|
import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
|
|
22
22
|
import { ChartingState } from '../../PredefinedConfig/ChartingState';
|
|
23
|
-
import {
|
|
23
|
+
import { NoteState } from '../../PredefinedConfig/NoteState';
|
|
24
24
|
export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
25
25
|
configInit(): void;
|
|
26
26
|
copyAllStateToClipboard(): void;
|
|
@@ -48,7 +48,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
|
48
48
|
getApplicationState(returnJson?: boolean): ApplicationState;
|
|
49
49
|
getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
|
|
50
50
|
getChartingState(returnJson?: boolean): ChartingState;
|
|
51
|
-
|
|
51
|
+
getNoteState(returnJson?: boolean): NoteState;
|
|
52
52
|
getCustomSortState(returnJson?: boolean): CustomSortState;
|
|
53
53
|
getDashboardState(returnJson?: boolean): DashboardState;
|
|
54
54
|
getExportState(returnJson?: boolean): ExportState;
|
|
@@ -258,7 +258,7 @@ export class ConfigApiImpl extends ApiBase {
|
|
|
258
258
|
getChartingState(returnJson = false) {
|
|
259
259
|
return this.getUserStateByStateKey('Charting', returnJson);
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
getNoteState(returnJson = false) {
|
|
262
262
|
return this.getUserStateByStateKey('Notes', returnJson);
|
|
263
263
|
}
|
|
264
264
|
getCustomSortState(returnJson = false) {
|
|
@@ -315,7 +315,7 @@ export class ConfigApiImpl extends ApiBase {
|
|
|
315
315
|
this.dispatchAction(ChartingRedux.ChartingReady(this.getChartingState()));
|
|
316
316
|
break;
|
|
317
317
|
case 'Notes':
|
|
318
|
-
this.dispatchAction(NotesRedux.NotesReady(this.
|
|
318
|
+
this.dispatchAction(NotesRedux.NotesReady(this.getNoteState()));
|
|
319
319
|
break;
|
|
320
320
|
case 'CustomSort':
|
|
321
321
|
this.dispatchAction(CustomSortRedux.CustomSortReady(this.getCustomSortState()));
|
|
@@ -23,6 +23,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
23
23
|
setInitialGridData(data: any): void;
|
|
24
24
|
getGridData(): any[];
|
|
25
25
|
getFilteredData(): any[];
|
|
26
|
+
getVisibleData(): any[];
|
|
26
27
|
updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
27
28
|
addOrUpdateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<{
|
|
28
29
|
addedRows: IRowNode[];
|
|
@@ -33,6 +33,15 @@ export class GridApiImpl extends ApiBase {
|
|
|
33
33
|
getFilteredData() {
|
|
34
34
|
return this.adaptable.getFilteredData();
|
|
35
35
|
}
|
|
36
|
+
getVisibleData() {
|
|
37
|
+
const data = [];
|
|
38
|
+
this.adaptable.forAllVisibleRowNodesDo((rowNode) => {
|
|
39
|
+
if (!this.isGroupRowNode(rowNode)) {
|
|
40
|
+
data.push(rowNode.data);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
36
45
|
async updateGridData(dataRows, dataUpdateConfig) {
|
|
37
46
|
const rowNodes = await this.adaptable.updateRows(dataRows, dataUpdateConfig);
|
|
38
47
|
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Edit');
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import {
|
|
3
|
-
import { AdaptableNote, AdaptableNotes,
|
|
4
|
-
import { CellAddress } from '../../PredefinedConfig/CellAddress';
|
|
2
|
+
import { NoteApi } from '../NoteApi';
|
|
3
|
+
import { AdaptableNote, AdaptableNotes, NoteState } from '../../PredefinedConfig/NoteState';
|
|
5
4
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { NoteInternalApi } from '../Internal/NotesInternalApi';
|
|
6
|
+
import { CellAddress } from '../../types';
|
|
7
|
+
export declare class NoteApiImpl extends ApiBase implements NoteApi {
|
|
8
|
+
internalApi: NoteInternalApi;
|
|
9
9
|
constructor(adaptable: IAdaptable);
|
|
10
10
|
addNote(noteStr: string, primaryKeyValue: any, columnId: string): void;
|
|
11
11
|
editNote(note: AdaptableNote): void;
|
|
12
12
|
updateNoteText(noteStr: string, note: AdaptableNote): void;
|
|
13
13
|
deleteNote(note: AdaptableNote): void;
|
|
14
|
-
|
|
14
|
+
getNoteState(): NoteState;
|
|
15
15
|
getAllNotes(): AdaptableNotes;
|
|
16
16
|
getCellNotes(address: CellAddress): AdaptableNote[];
|
|
17
17
|
getNoteByUuid(uuid: string): AdaptableNote | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
|
|
3
|
-
import {
|
|
4
|
-
export class
|
|
3
|
+
import { NoteInternalApi } from '../Internal/NotesInternalApi';
|
|
4
|
+
export class NoteApiImpl extends ApiBase {
|
|
5
5
|
constructor(adaptable) {
|
|
6
6
|
super(adaptable);
|
|
7
|
-
this.internalApi = new
|
|
7
|
+
this.internalApi = new NoteInternalApi(adaptable);
|
|
8
8
|
}
|
|
9
9
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
10
10
|
const note = {
|
|
@@ -25,11 +25,11 @@ export class NotesApiImpl extends ApiBase {
|
|
|
25
25
|
deleteNote(note) {
|
|
26
26
|
this.dispatchAction(NotesRedux.NotesDelete(note));
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
getNoteState() {
|
|
29
29
|
return this.getAdaptableState().Notes;
|
|
30
30
|
}
|
|
31
31
|
getAllNotes() {
|
|
32
|
-
return this.
|
|
32
|
+
return this.getNoteState().Notes;
|
|
33
33
|
}
|
|
34
34
|
getCellNotes(address) {
|
|
35
35
|
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions,
|
|
2
|
+
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, NoteOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, MenuOptions, NotificationsOptions, OptionsApi, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions, GridFilterOptions } from '../../types';
|
|
3
3
|
import { GroupingOptions } from '../../AdaptableOptions/GroupingOptions';
|
|
4
4
|
import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
|
|
5
5
|
import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
|
|
6
6
|
import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
|
|
7
7
|
import { ColumnFilterOptions } from '../../AdaptableOptions/ColumnFilterOptions';
|
|
8
|
-
import {
|
|
8
|
+
import { CommentOptions } from '../../AdaptableOptions/CommentOptions';
|
|
9
9
|
export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
10
10
|
getAdaptableId(): string;
|
|
11
11
|
getAdaptableStateKey(): string;
|
|
@@ -15,13 +15,12 @@ export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
|
15
15
|
getUserName(): string;
|
|
16
16
|
getAdaptableOptions(): AdaptableOptions;
|
|
17
17
|
getActionColumnOptions(): ActionColumnOptions;
|
|
18
|
-
getColumnTypes(): string[];
|
|
19
18
|
getActionRowOptions(): ActionRowOptions;
|
|
20
19
|
getCellSummaryOptions(): CellSummaryOptions;
|
|
21
20
|
getCalendarOptions(): CalendarOptions;
|
|
22
21
|
getColumnOptions(): ColumnOptions;
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
getNoteOptions(): NoteOptions;
|
|
23
|
+
getCommentOptions(): Readonly<CommentOptions<any>>;
|
|
25
24
|
getCustomSortOptions(): CustomSortOptions;
|
|
26
25
|
getContainerOptions(): ContainerOptions;
|
|
27
26
|
getDataSetOptions(): DataSetOptions;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import { createBaseContext } from '../../Utilities/ObjectFactory';
|
|
3
2
|
export class OptionsApiImpl extends ApiBase {
|
|
4
3
|
getAdaptableId() {
|
|
5
4
|
return this.adaptable.adaptableOptions.adaptableId;
|
|
@@ -25,15 +24,6 @@ export class OptionsApiImpl extends ApiBase {
|
|
|
25
24
|
getActionColumnOptions() {
|
|
26
25
|
return this.getOptions().actionColumnOptions;
|
|
27
26
|
}
|
|
28
|
-
getColumnTypes() {
|
|
29
|
-
const columnTypes = this.getOptions().columnOptions.columnTypes;
|
|
30
|
-
if (typeof columnTypes === 'function') {
|
|
31
|
-
return columnTypes(createBaseContext(this.getAdaptableApi()));
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
return columnTypes;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
27
|
getActionRowOptions() {
|
|
38
28
|
return this.getOptions().actionRowOptions;
|
|
39
29
|
}
|
|
@@ -46,10 +36,10 @@ export class OptionsApiImpl extends ApiBase {
|
|
|
46
36
|
getColumnOptions() {
|
|
47
37
|
return this.getOptions().columnOptions;
|
|
48
38
|
}
|
|
49
|
-
|
|
39
|
+
getNoteOptions() {
|
|
50
40
|
return this.getOptions().noteOptions;
|
|
51
41
|
}
|
|
52
|
-
|
|
42
|
+
getCommentOptions() {
|
|
53
43
|
return this.getOptions().commentOptions;
|
|
54
44
|
}
|
|
55
45
|
getCustomSortOptions() {
|
|
@@ -72,7 +72,7 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
72
72
|
includeGroupRows?: boolean;
|
|
73
73
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
74
74
|
}): void;
|
|
75
|
-
forAllVisibleRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
|
|
75
|
+
forAllVisibleRowNodesDo(func: (rowNode: IRowNode, index: number) => void, config?: {
|
|
76
76
|
includeGroupRows?: boolean;
|
|
77
77
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
78
78
|
}): void;
|
|
@@ -2,7 +2,7 @@ import { ApiBase } from '../Implementation/ApiBase';
|
|
|
2
2
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
3
3
|
import { Report } from '../../PredefinedConfig/ExportState';
|
|
4
4
|
import { AdaptableColumnType } from '../../PredefinedConfig/Common/Types';
|
|
5
|
-
import { ExcelDataType } from '@ag-grid-community/core';
|
|
5
|
+
import { ExcelDataType, ExcelStyle } from '@ag-grid-community/core';
|
|
6
6
|
import { AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
7
7
|
import { DataFormatType } from '../../AdaptableOptions/ExportOptions';
|
|
8
8
|
export declare class ExportInternalApi extends ApiBase {
|
|
@@ -17,4 +17,5 @@ export declare class ExportInternalApi extends ApiBase {
|
|
|
17
17
|
isDateCellExportedAsFormattedValue(): boolean;
|
|
18
18
|
getCellExportFormatType(columnDataType: AdaptableColumnDataType): DataFormatType;
|
|
19
19
|
isDestinationEnabled(destination: string): boolean;
|
|
20
|
+
getExcelStylesForVisualDataExport(original_excelStyles: ExcelStyle[]): ExcelStyle[];
|
|
20
21
|
}
|
|
@@ -92,7 +92,7 @@ export class ExportInternalApi extends ApiBase {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
isVisualDataExportInProgress() {
|
|
95
|
-
return this.getAdaptableState().System.Export.
|
|
95
|
+
return this.getAdaptableState().System.Export.visualDataExportInProgress;
|
|
96
96
|
}
|
|
97
97
|
isDateCellExportedAsFormattedValue() {
|
|
98
98
|
return (!!this.getExportOptions().exportDateFormat ||
|
|
@@ -123,4 +123,7 @@ export class ExportInternalApi extends ApiBase {
|
|
|
123
123
|
}
|
|
124
124
|
return true;
|
|
125
125
|
}
|
|
126
|
+
getExcelStylesForVisualDataExport(original_excelStyles) {
|
|
127
|
+
return [];
|
|
128
|
+
}
|
|
126
129
|
}
|