@adaptabletools/adaptable 18.0.0-canary.3 → 18.0.0-canary.4
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 +3 -0
- package/base.css.map +1 -1
- package/index.css +5 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -5
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
- package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.js +1 -5
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnFilterApi.d.ts +5 -0
- package/src/Api/Implementation/ApiBase.js +1 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +10 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -0
- package/src/Api/Implementation/LayoutApiImpl.js +14 -0
- package/src/Api/Implementation/NotesApiImpl.d.ts +2 -4
- package/src/Api/Implementation/NotesApiImpl.js +4 -8
- package/src/Api/Implementation/OptionsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/OptionsApiImpl.js +2 -2
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +8 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/PredefinedConfig/NotesState.d.ts +10 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +8 -7
- package/src/Strategy/ChartingModule.js +2 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/Comments/CommentsPopup.js +12 -8
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +193 -0
- package/src/View/Notes/NotesPopup.js +9 -11
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/Adaptable.js +2 -2
- package/src/agGrid/agGridMenuHelper.js +4 -4
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +30 -2
- package/src/metamodel/adaptable.metamodel.js +66 -32
- package/src/types.d.ts +5 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -29,12 +29,12 @@ import { CalendarOptions } from './CalendarOptions';
|
|
|
29
29
|
import { QuickSearchOptions } from './QuickSearchOptions';
|
|
30
30
|
import { FormatColumnOptions } from './FormatColumnOptions';
|
|
31
31
|
import { Fdc3Options } from './Fdc3Options';
|
|
32
|
-
import {
|
|
32
|
+
import { NoteOptions } from './NoteOptions';
|
|
33
33
|
import { PredicateOptions } from './PredicateOptions';
|
|
34
34
|
import { DataImportOptions } from './DataImportOptions';
|
|
35
35
|
import { ColumnFilterOptions } from './ColumnFilterOptions';
|
|
36
36
|
import { GridFilterOptions } from './GridFilterOptions';
|
|
37
|
-
import { CommentsOptions } from './
|
|
37
|
+
import { CommentsOptions } from './CommentOptions';
|
|
38
38
|
/**
|
|
39
39
|
* Large group of options enabling developers to set up AdapTable at design time to fit precise requirements
|
|
40
40
|
*/
|
|
@@ -128,13 +128,13 @@ export interface AdaptableOptions<TData = any> {
|
|
|
128
128
|
*/
|
|
129
129
|
containerOptions?: ContainerOptions;
|
|
130
130
|
/**
|
|
131
|
-
* Options for managing
|
|
131
|
+
* Options for managing Notes
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
noteOptions?: NoteOptions;
|
|
134
134
|
/**
|
|
135
135
|
* Options for managing AdapTable Comments
|
|
136
136
|
*/
|
|
137
|
-
|
|
137
|
+
commentOptions?: CommentsOptions<TData>;
|
|
138
138
|
/**
|
|
139
139
|
* Options for using Custom Sort
|
|
140
140
|
*/
|
|
@@ -177,17 +177,17 @@ export interface FilterFormOptions<TData = any> {
|
|
|
177
177
|
defaultFilterFormTab?: 'Values' | 'Predicates';
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Options for managing the Values (IN)
|
|
180
|
+
* Options for managing the Values (IN) Filter in Filter Bar and Filter Form
|
|
181
181
|
*/
|
|
182
182
|
export interface ValuesFilterOptions<TData = any> {
|
|
183
183
|
/**
|
|
184
|
-
* Distinct column items to display in Filter
|
|
184
|
+
* Distinct column items to display in Values Filter; useful with large datasource (though AdapTable offers virtualisation)
|
|
185
185
|
*
|
|
186
|
-
* @defaultValue
|
|
186
|
+
* @defaultValue undefined
|
|
187
187
|
* @gridInfoItem
|
|
188
188
|
* @noCodeItem
|
|
189
189
|
*/
|
|
190
|
-
maxFilterValuesToDisplay?: number;
|
|
190
|
+
maxFilterValuesToDisplay?: ((columFilterContext: ColumnFilterContext<TData>) => number) | number;
|
|
191
191
|
/**
|
|
192
192
|
* If Values filter should filter on datetime rather than date
|
|
193
193
|
* @defaultValue true
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { CommentThread, BaseContext, CellAddress } from '../../types';
|
|
2
2
|
/**
|
|
3
|
-
* Options for managing AdapTable
|
|
3
|
+
* Options for managing Comments and Comment Threads in AdapTable
|
|
4
4
|
*/
|
|
5
5
|
export interface CommentsOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
7
|
* Whether a cell can be noted on
|
|
8
8
|
* TODO: check if it works
|
|
9
9
|
*/
|
|
10
|
-
isCellCommentable?: (
|
|
10
|
+
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
|
|
11
11
|
/**
|
|
12
12
|
* Called to load initial comments
|
|
13
13
|
*/
|
|
14
|
-
loadCommentThreads?(
|
|
14
|
+
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
|
|
15
15
|
/**
|
|
16
16
|
* Called when comments change
|
|
17
17
|
* @param commentThreads
|
|
@@ -19,10 +19,10 @@ export interface CommentsOptions<TData = any> {
|
|
|
19
19
|
persistCommentThreads?(commentThreads: CommentThread[]): void;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Context used when determining if a
|
|
22
|
+
* Context used when determining if a Comment can be added to a Cell
|
|
23
23
|
*/
|
|
24
24
|
export interface CommentableCellContext extends BaseContext {
|
|
25
25
|
address: CellAddress;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface CommentLoadContext extends BaseContext {
|
|
28
28
|
}
|
|
@@ -230,5 +230,5 @@ type ModuleGroup = {
|
|
|
230
230
|
title: string;
|
|
231
231
|
};
|
|
232
232
|
export declare const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
233
|
-
export declare const
|
|
233
|
+
export declare const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
234
234
|
export {};
|
|
@@ -38,9 +38,7 @@ export const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
38
38
|
ModuleConstants.ExportModuleId,
|
|
39
39
|
ModuleConstants.DataImportModuleId,
|
|
40
40
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
41
|
-
ModuleConstants.SmartEditModuleId,
|
|
42
41
|
ModuleConstants.PlusMinusModuleId,
|
|
43
|
-
ModuleConstants.BulkUpdateModuleId,
|
|
44
42
|
ModuleConstants.ShortcutModuleId,
|
|
45
43
|
ModuleConstants.TeamSharingModuleId,
|
|
46
44
|
ModuleConstants.ScheduleModuleId,
|
|
@@ -50,7 +48,7 @@ export const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
50
48
|
ModuleConstants.NotesModuleId,
|
|
51
49
|
ModuleConstants.CommentsModuleId,
|
|
52
50
|
];
|
|
53
|
-
export const
|
|
51
|
+
export const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
54
52
|
ModuleConstants.SettingsPanelModuleId,
|
|
55
53
|
ModuleConstants.DashboardModuleId,
|
|
56
54
|
ModuleConstants.ToolPanelModuleId,
|
|
@@ -86,9 +84,7 @@ export const DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = [
|
|
|
86
84
|
ModuleConstants.ExportModuleId,
|
|
87
85
|
ModuleConstants.DataImportModuleId,
|
|
88
86
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
89
|
-
ModuleConstants.SmartEditModuleId,
|
|
90
87
|
ModuleConstants.PlusMinusModuleId,
|
|
91
|
-
ModuleConstants.BulkUpdateModuleId,
|
|
92
88
|
ModuleConstants.ShortcutModuleId,
|
|
93
89
|
ModuleConstants.TeamSharingModuleId,
|
|
94
90
|
ModuleConstants.ScheduleModuleId,
|
|
@@ -16,9 +16,4 @@ export interface BulkUpdateApi {
|
|
|
16
16
|
* @param cellUpdateRequests Cells to apply the Bulk Update
|
|
17
17
|
*/
|
|
18
18
|
applyBulkUpdate(cellUpdateRequests: CellUpdateRequest[]): void;
|
|
19
|
-
/**
|
|
20
|
-
* Sets Bulk Update value
|
|
21
|
-
* @param bulkUpdateValue the value to use in Bulk Update Operation
|
|
22
|
-
*/
|
|
23
|
-
setBulkUpdateValue(bulkUpdateValue: string): void;
|
|
24
19
|
}
|
|
@@ -122,4 +122,9 @@ export interface ColumnFilterApi {
|
|
|
122
122
|
* @param columnFilterConfig - Column Filter to set
|
|
123
123
|
*/
|
|
124
124
|
setColumnFilterForColumn(columnId: string, columnFilterConfig: ColumnFilterConfig): void;
|
|
125
|
+
/**
|
|
126
|
+
* Gets the maximum Filter Values to show for a Column
|
|
127
|
+
* @param column Column to Filter
|
|
128
|
+
*/
|
|
129
|
+
getMaxFilterValue(column: AdaptableColumn): number | undefined;
|
|
125
130
|
}
|
|
@@ -99,7 +99,7 @@ export class ApiBase {
|
|
|
99
99
|
return this.getOptions().columnOptions;
|
|
100
100
|
}
|
|
101
101
|
getNotesOptions() {
|
|
102
|
-
return this.getOptions().
|
|
102
|
+
return this.getOptions().noteOptions;
|
|
103
103
|
}
|
|
104
104
|
getCustomSortOptions() {
|
|
105
105
|
return this.getOptions().customSortOptions;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
3
3
|
import * as BulkUpdateRedux from '../../Redux/ActionsReducers/BulkUpdateRedux';
|
|
4
|
-
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
5
4
|
export class BulkUpdateApiImpl extends ApiBase {
|
|
6
5
|
getBulkUpdateValue() {
|
|
7
6
|
return this.getAdaptableState().System.BulkUpdateValue;
|
|
@@ -15,7 +14,4 @@ export class BulkUpdateApiImpl extends ApiBase {
|
|
|
15
14
|
applyBulkUpdate(cellUpdateRequests) {
|
|
16
15
|
this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(cellUpdateRequests));
|
|
17
16
|
}
|
|
18
|
-
setBulkUpdateValue(bulkUpdateValue) {
|
|
19
|
-
this.dispatchAction(SystemRedux.BulkUpdateChangeValue(bulkUpdateValue));
|
|
20
|
-
}
|
|
21
17
|
}
|
|
@@ -41,4 +41,5 @@ export declare class ColumnFilterApiImpl extends ApiBase implements ColumnFilter
|
|
|
41
41
|
unSuspendAllColumnFilters(): void;
|
|
42
42
|
getColumnFilterForColumn(columnId: string): ColumnFilter | undefined;
|
|
43
43
|
clearColumnFilterForColumn(columnId: string): void;
|
|
44
|
+
getMaxFilterValue(column: AdaptableColumn): number | undefined;
|
|
44
45
|
}
|
|
@@ -169,4 +169,14 @@ export class ColumnFilterApiImpl extends ApiBase {
|
|
|
169
169
|
this.adaptable.clearColumnFilteringForColumns([columnId]);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
+
getMaxFilterValue(column) {
|
|
173
|
+
const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
|
|
174
|
+
if (typeof maxFilterValues === 'function') {
|
|
175
|
+
const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
|
|
176
|
+
return maxFilterValues(columnFilterContext);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return maxFilterValues;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
172
182
|
}
|
|
@@ -9,6 +9,7 @@ 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';
|
|
12
13
|
export class LayoutApiImpl extends ApiBase {
|
|
13
14
|
constructor(adaptable) {
|
|
14
15
|
super(adaptable);
|
|
@@ -236,4 +237,17 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
236
237
|
}
|
|
237
238
|
return layoutSupportedFeatures;
|
|
238
239
|
}
|
|
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
|
+
}
|
|
239
253
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { NotesApi } from '../NotesApi';
|
|
3
3
|
import { AdaptableNote, AdaptableNotes, NotesState } from '../../PredefinedConfig/NotesState';
|
|
4
|
+
import { CellAddress } from '../../PredefinedConfig/CellAddress';
|
|
4
5
|
export declare class NotesApiImpl extends ApiBase implements NotesApi {
|
|
5
6
|
addNote(noteStr: string, primaryKeyValue: any, columnId: string): void;
|
|
6
7
|
editNote(note: AdaptableNote): void;
|
|
@@ -8,9 +9,6 @@ export declare class NotesApiImpl extends ApiBase implements NotesApi {
|
|
|
8
9
|
deleteNote(note: AdaptableNote): void;
|
|
9
10
|
getNotesState(): NotesState;
|
|
10
11
|
getAllNotes(): AdaptableNotes;
|
|
11
|
-
getCellNotes(
|
|
12
|
-
PrimaryKeyValue: string | number;
|
|
13
|
-
ColumnId: string;
|
|
14
|
-
}): AdaptableNote[];
|
|
12
|
+
getCellNotes(address: CellAddress): AdaptableNote[];
|
|
15
13
|
getNoteByUuid(uuid: string): AdaptableNote | undefined;
|
|
16
14
|
}
|
|
@@ -3,13 +3,9 @@ import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
|
|
|
3
3
|
export class NotesApiImpl extends ApiBase {
|
|
4
4
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
5
5
|
const note = {
|
|
6
|
-
|
|
6
|
+
Text: noteStr,
|
|
7
7
|
PrimaryKeyValue: primaryKeyValue,
|
|
8
8
|
ColumnId: columnId,
|
|
9
|
-
AdaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
10
|
-
Author: {
|
|
11
|
-
UserName: this.adaptable.api.optionsApi.getUserName(),
|
|
12
|
-
},
|
|
13
9
|
Timestamp: Date.now(),
|
|
14
10
|
};
|
|
15
11
|
this.dispatchAction(NotesRedux.NotesAdd(note));
|
|
@@ -19,7 +15,7 @@ export class NotesApiImpl extends ApiBase {
|
|
|
19
15
|
this.dispatchAction(NotesRedux.NotesEdit(note));
|
|
20
16
|
}
|
|
21
17
|
updateNoteText(noteStr, note) {
|
|
22
|
-
this.editNote(Object.assign(Object.assign({}, note), {
|
|
18
|
+
this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
|
|
23
19
|
}
|
|
24
20
|
deleteNote(note) {
|
|
25
21
|
this.dispatchAction(NotesRedux.NotesDelete(note));
|
|
@@ -30,8 +26,8 @@ export class NotesApiImpl extends ApiBase {
|
|
|
30
26
|
getAllNotes() {
|
|
31
27
|
return this.getNotesState().Notes;
|
|
32
28
|
}
|
|
33
|
-
getCellNotes(
|
|
34
|
-
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes,
|
|
29
|
+
getCellNotes(address) {
|
|
30
|
+
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
|
|
35
31
|
}
|
|
36
32
|
getNoteByUuid(uuid) {
|
|
37
33
|
return this.getAllNotes().find((note) => note.Uuid === uuid);
|
|
@@ -5,7 +5,7 @@ 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 { CommentsOptions } from '../../AdaptableOptions/
|
|
8
|
+
import { CommentsOptions } from '../../AdaptableOptions/CommentOptions';
|
|
9
9
|
export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
10
10
|
getAdaptableId(): string;
|
|
11
11
|
getAdaptableStateKey(): string;
|
|
@@ -37,10 +37,10 @@ export class OptionsApiImpl extends ApiBase {
|
|
|
37
37
|
return this.getOptions().columnOptions;
|
|
38
38
|
}
|
|
39
39
|
getNotesOptions() {
|
|
40
|
-
return this.getOptions().
|
|
40
|
+
return this.getOptions().noteOptions;
|
|
41
41
|
}
|
|
42
42
|
getCommentsOptions() {
|
|
43
|
-
return this.getOptions().
|
|
43
|
+
return this.getOptions().commentOptions;
|
|
44
44
|
}
|
|
45
45
|
getCustomSortOptions() {
|
|
46
46
|
return this.getOptions().customSortOptions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InteropioPluginOptions } from '../AdaptableOptions/InteropioPluginOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Provides run-time access to the
|
|
3
|
+
* Provides run-time access to the Interopio Plugin
|
|
4
4
|
*/
|
|
5
5
|
export interface InteropioPluginApi {
|
|
6
6
|
/**
|
|
7
|
-
* Retrieves the
|
|
7
|
+
* Retrieves the InteropioPlugOptions provided in interopio Plugin
|
|
8
8
|
*/
|
|
9
9
|
getPluginOptions(): InteropioPluginOptions;
|
|
10
10
|
}
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -174,4 +174,12 @@ export interface LayoutApi {
|
|
|
174
174
|
ColumnFilters: boolean;
|
|
175
175
|
ColumnSorts: boolean;
|
|
176
176
|
};
|
|
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;
|
|
177
185
|
}
|
package/src/Api/OptionsApi.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions,
|
|
|
5
5
|
import { Fdc3Options } from '../AdaptableOptions/Fdc3Options';
|
|
6
6
|
import { ExpressionOptions } from '../AdaptableOptions/ExpressionOptions';
|
|
7
7
|
import { DataImportOptions } from '../AdaptableOptions/DataImportOptions';
|
|
8
|
-
import { CommentsOptions } from '../AdaptableOptions/
|
|
8
|
+
import { CommentsOptions } from '../AdaptableOptions/CommentOptions';
|
|
9
9
|
/**
|
|
10
10
|
* Range of functions to access Adaptable Options
|
|
11
11
|
*/
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { AdaptableObject } from '../types';
|
|
2
2
|
import { ConfigState } from './ConfigState';
|
|
3
|
+
/**
|
|
4
|
+
* Predefined Configuration for Notes Module
|
|
5
|
+
*/
|
|
6
|
+
export interface NotesState extends ConfigState {
|
|
7
|
+
/**
|
|
8
|
+
* Collection of AdapTable Notes
|
|
9
|
+
*/
|
|
10
|
+
Notes?: AdaptableNotes;
|
|
11
|
+
}
|
|
3
12
|
/**
|
|
4
13
|
* Note that can be applied to a Cell in AdapTable
|
|
5
14
|
*/
|
|
@@ -11,13 +20,7 @@ export interface AdaptableNote extends AdaptableObject {
|
|
|
11
20
|
/**
|
|
12
21
|
* Value of the Note
|
|
13
22
|
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Author of the Note
|
|
17
|
-
*/
|
|
18
|
-
Author: {
|
|
19
|
-
UserName: string;
|
|
20
|
-
};
|
|
23
|
+
Text: string;
|
|
21
24
|
/**
|
|
22
25
|
* Value in Grid's Primary Key Column
|
|
23
26
|
*/
|
|
@@ -26,21 +29,8 @@ export interface AdaptableNote extends AdaptableObject {
|
|
|
26
29
|
* Id of Column containing the Note
|
|
27
30
|
*/
|
|
28
31
|
ColumnId: string;
|
|
29
|
-
/**
|
|
30
|
-
* Id of this AdapTable instance
|
|
31
|
-
*/
|
|
32
|
-
AdaptableId: string;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
34
|
* Collection of Cell Notes
|
|
36
35
|
*/
|
|
37
36
|
export type AdaptableNotes = AdaptableNote[];
|
|
38
|
-
/**
|
|
39
|
-
* Predefined Configuration for Notes Module
|
|
40
|
-
*/
|
|
41
|
-
export interface NotesState extends ConfigState {
|
|
42
|
-
/**
|
|
43
|
-
* Collection of AdapTable Notes
|
|
44
|
-
*/
|
|
45
|
-
Notes?: AdaptableNotes;
|
|
46
|
-
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AdaptableNote, NotesState } from '../../PredefinedConfig/NotesState';
|
|
2
2
|
import * as Redux from 'redux';
|
|
3
|
+
import { CellAddress } from '../../types';
|
|
3
4
|
/**
|
|
4
5
|
* @ReduxAction A Notes has been added
|
|
5
6
|
*/
|
|
@@ -32,8 +33,6 @@ export declare const NotesAdd: (note: AdaptableNote) => AdaptableNotesAddAction;
|
|
|
32
33
|
export declare const NotesEdit: (note: AdaptableNote) => AdaptableNotesEditAction;
|
|
33
34
|
export declare const NotesDelete: (note: AdaptableNote) => AdaptableNotesDeleteAction;
|
|
34
35
|
export declare const NotesReady: (note: NotesState) => NoteReadyAction;
|
|
35
|
-
export declare const
|
|
36
|
-
|
|
37
|
-
ColumnId: string;
|
|
38
|
-
}) => AdaptableNote[];
|
|
36
|
+
export declare const GetAllNotesSelector: (state: NotesState) => AdaptableNote[];
|
|
37
|
+
export declare const GetNotesSelector: (state: NotesState, address: CellAddress) => AdaptableNote[];
|
|
39
38
|
export declare const NotesReducer: Redux.Reducer<NotesState>;
|
|
@@ -32,21 +32,22 @@ export const NotesReady = (note) => ({
|
|
|
32
32
|
type: NOTES_READY,
|
|
33
33
|
notesState: note,
|
|
34
34
|
});
|
|
35
|
-
export const
|
|
35
|
+
export const GetAllNotesSelector = (state) => state.Notes;
|
|
36
|
+
export const GetNotesSelector = (state, address) => {
|
|
36
37
|
var _a;
|
|
37
|
-
if (!
|
|
38
|
+
if (!address) {
|
|
38
39
|
return [];
|
|
39
40
|
}
|
|
40
41
|
return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
|
|
41
|
-
if (note.PrimaryKeyValue ===
|
|
42
|
+
if (note.PrimaryKeyValue === address.PrimaryKeyValue && note.ColumnId === address.ColumnId) {
|
|
42
43
|
// happy check
|
|
43
44
|
return true;
|
|
44
45
|
}
|
|
45
46
|
// Primary keys retreived from the grid dom are always strings, so we must also consider them strings
|
|
46
|
-
if ((typeof
|
|
47
|
-
(typeof
|
|
48
|
-
return (note.PrimaryKeyValue.toString() ===
|
|
49
|
-
note.ColumnId ===
|
|
47
|
+
if ((typeof address.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
|
|
48
|
+
(typeof address.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
|
|
49
|
+
return (note.PrimaryKeyValue.toString() === address.PrimaryKeyValue.toString() &&
|
|
50
|
+
note.ColumnId === address.ColumnId);
|
|
50
51
|
}
|
|
51
52
|
return false;
|
|
52
53
|
});
|
|
@@ -6,6 +6,7 @@ import * as ChartingRedux from '../Redux/ActionsReducers/ChartingRedux';
|
|
|
6
6
|
import { ChartingStatusBarPopover } from '../View/Charting/ChartingStatusBarPopover';
|
|
7
7
|
import { getObjectTagsViewItems } from './Utilities/getObjectTagsViewItems';
|
|
8
8
|
import { isAgChartDefinition, isExternalChartDefinition, } from '../PredefinedConfig/ChartingState';
|
|
9
|
+
import Helper from '../Utilities/Helpers/Helper';
|
|
9
10
|
export class ChartingModule extends AdaptableModuleBase {
|
|
10
11
|
constructor(api) {
|
|
11
12
|
super(ModuleConstants.ChartingModuleId, ModuleConstants.ChartingFriendlyName, 'chart', 'ChartPopup', 'Create AG Grid Charts in order to see Adaptable Data visually', api);
|
|
@@ -33,7 +34,7 @@ export class ChartingModule extends AdaptableModuleBase {
|
|
|
33
34
|
}
|
|
34
35
|
isModuleAvailable() {
|
|
35
36
|
const agChartsAvailable = this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
|
|
36
|
-
const externalChartsAvailable = this.api.optionsApi.getChartingOptions().externalChartingOptions;
|
|
37
|
+
const externalChartsAvailable = Helper.objectHasKeys(this.api.optionsApi.getChartingOptions().externalChartingOptions);
|
|
37
38
|
return Boolean(agChartsAvailable || externalChartsAvailable);
|
|
38
39
|
}
|
|
39
40
|
getModuleAdaptableObjects() {
|
|
@@ -12,4 +12,4 @@ export const PredicateDocsLink = `${HOST_URL_DOCS}/guide/adaptable-predicate`;
|
|
|
12
12
|
export const PrimaryKeyDocsLink = `${HOST_URL_DOCS}/guide/getting-started-primary-key`;
|
|
13
13
|
export const LicenseDocsLink = `${HOST_URL_DOCS}/guide/licensing`;
|
|
14
14
|
export const AdaptableOptionsDocsLink = `${HOST_URL_DOCS}/guide/reference-options-overview`;
|
|
15
|
-
export const AgGridModulesDocsLink = `${HOST_URL_DOCS}/
|
|
15
|
+
export const AgGridModulesDocsLink = `${HOST_URL_DOCS}/guide/dev-guide-aggrid-modules-overview`;
|
|
@@ -197,7 +197,7 @@ export const DefaultAdaptableOptions = {
|
|
|
197
197
|
sortValuesFilter: false,
|
|
198
198
|
filterValuesUsingTime: false,
|
|
199
199
|
showDistinctFilteredValuesOnly: false,
|
|
200
|
-
maxFilterValuesToDisplay:
|
|
200
|
+
maxFilterValuesToDisplay: undefined,
|
|
201
201
|
includeBlankFilterValues: false,
|
|
202
202
|
showValuesCount: undefined,
|
|
203
203
|
},
|
|
@@ -14,13 +14,15 @@ export const DEFAULT_SETTINGS_PANEL_NAVIGATION_ITEMS = [
|
|
|
14
14
|
'StatusBar',
|
|
15
15
|
'-',
|
|
16
16
|
'Layout',
|
|
17
|
-
'Export',
|
|
18
17
|
'CalculatedColumn',
|
|
19
18
|
'FreeTextColumn',
|
|
20
19
|
'CustomSort',
|
|
21
20
|
'Alert',
|
|
22
21
|
'SystemStatus',
|
|
23
22
|
'-',
|
|
23
|
+
'Export',
|
|
24
|
+
'DataImport',
|
|
25
|
+
'-',
|
|
24
26
|
'FormatColumn',
|
|
25
27
|
'StyledColumn',
|
|
26
28
|
'FlashingCell',
|
|
@@ -30,17 +32,16 @@ export const DEFAULT_SETTINGS_PANEL_NAVIGATION_ITEMS = [
|
|
|
30
32
|
'GridFilter',
|
|
31
33
|
'ColumnFilter',
|
|
32
34
|
'DataSet',
|
|
35
|
+
'NamedQuery',
|
|
33
36
|
'-',
|
|
34
37
|
'PlusMinus',
|
|
35
38
|
'Shortcut',
|
|
36
39
|
'DataChangeHistory',
|
|
37
40
|
'-',
|
|
38
41
|
'Charting',
|
|
39
|
-
'DataImport',
|
|
40
42
|
'Schedule',
|
|
41
|
-
'NamedQuery',
|
|
42
|
-
'StateManagement',
|
|
43
43
|
'TeamSharing',
|
|
44
44
|
'Notes',
|
|
45
45
|
'Comments',
|
|
46
|
+
'StateManagement',
|
|
46
47
|
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function objectExists(item: any): boolean;
|
|
2
2
|
export declare function objectNotExists(item: any): boolean;
|
|
3
|
+
export declare function objectHasKeys(item: any): boolean;
|
|
3
4
|
export declare function getStringRepresentionFromKey(event: KeyboardEvent | any): string;
|
|
4
5
|
export declare function cloneObject<T extends any>(obj: T): T;
|
|
5
6
|
export declare const arrayToKeyMap: <T extends string | number | symbol>(arr?: T[]) => Record<T, boolean>;
|
|
@@ -20,6 +21,7 @@ export declare function clamp(value: any, boundOne: number, boundTwo: number): n
|
|
|
20
21
|
export declare const Helper: {
|
|
21
22
|
objectExists: typeof objectExists;
|
|
22
23
|
objectNotExists: typeof objectNotExists;
|
|
24
|
+
objectHasKeys: typeof objectHasKeys;
|
|
23
25
|
getStringRepresentionFromKey: typeof getStringRepresentionFromKey;
|
|
24
26
|
cloneObject: typeof cloneObject;
|
|
25
27
|
convertArrayToCsv: typeof convertArrayToCsv;
|
|
@@ -6,6 +6,9 @@ export function objectExists(item) {
|
|
|
6
6
|
export function objectNotExists(item) {
|
|
7
7
|
return !objectExists(item);
|
|
8
8
|
}
|
|
9
|
+
export function objectHasKeys(item) {
|
|
10
|
+
return Object.keys(item).length > 0;
|
|
11
|
+
}
|
|
9
12
|
export function getStringRepresentionFromKey(event) {
|
|
10
13
|
if (event.key == null) {
|
|
11
14
|
return event.char; // IE
|
|
@@ -227,6 +230,7 @@ export function clamp(value, boundOne, boundTwo) {
|
|
|
227
230
|
export const Helper = {
|
|
228
231
|
objectExists,
|
|
229
232
|
objectNotExists,
|
|
233
|
+
objectHasKeys,
|
|
230
234
|
getStringRepresentionFromKey,
|
|
231
235
|
cloneObject,
|
|
232
236
|
convertArrayToCsv,
|
|
@@ -38,7 +38,9 @@ export class AggregatedScalarLiveValue {
|
|
|
38
38
|
getAggregatedValueForRow(rowNode) {
|
|
39
39
|
const aggregationValue = this.getAggregationValue(rowNode);
|
|
40
40
|
if (aggregationValue == undefined) {
|
|
41
|
-
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`,
|
|
41
|
+
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`, (message) => {
|
|
42
|
+
this.adaptableApi.internalApi.getAdaptableInstance().logger.warn(message);
|
|
43
|
+
});
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
if (this.expressionEvaluation.rowValueGetter) {
|
|
@@ -51,7 +51,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
51
51
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All', onClick: () => {
|
|
52
52
|
this.onApplyClick();
|
|
53
53
|
}, variant: "raised", tone: "accent" }, "Apply to Grid")))) : (React.createElement(React.Fragment, null,
|
|
54
|
-
React.createElement(HelpBlock, { marginTop: 2, marginBottom: 2 }, "Select an existing
|
|
54
|
+
React.createElement(HelpBlock, { marginTop: 2, marginBottom: 2 }, "Select an existing Column value from the dropdown, or enter a new value"),
|
|
55
55
|
React.createElement(Flex, { marginTop: 2, flexDirection: "row", alignItems: "center" },
|
|
56
56
|
React.createElement(Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 },
|
|
57
57
|
React.createElement(ColumnValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns), style: { width: '100%', maxWidth: 'inherit' } })),
|