@adaptabletools/adaptable-cjs 18.0.0-canary.2 → 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 +2 -6
- 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 +10 -8
- 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 +6 -1
- 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 +4 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +198 -0
- package/src/View/Notes/NotesPopup.js +8 -10
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/Adaptable.js +2 -2
- package/src/agGrid/agGridMenuHelper.js +3 -3
- 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.cjs.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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
6
6
|
exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
@@ -42,9 +42,7 @@ exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
42
42
|
ModuleConstants.ExportModuleId,
|
|
43
43
|
ModuleConstants.DataImportModuleId,
|
|
44
44
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
45
|
-
ModuleConstants.SmartEditModuleId,
|
|
46
45
|
ModuleConstants.PlusMinusModuleId,
|
|
47
|
-
ModuleConstants.BulkUpdateModuleId,
|
|
48
46
|
ModuleConstants.ShortcutModuleId,
|
|
49
47
|
ModuleConstants.TeamSharingModuleId,
|
|
50
48
|
ModuleConstants.ScheduleModuleId,
|
|
@@ -54,7 +52,7 @@ exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
54
52
|
ModuleConstants.NotesModuleId,
|
|
55
53
|
ModuleConstants.CommentsModuleId,
|
|
56
54
|
];
|
|
57
|
-
exports.
|
|
55
|
+
exports.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
58
56
|
ModuleConstants.SettingsPanelModuleId,
|
|
59
57
|
ModuleConstants.DashboardModuleId,
|
|
60
58
|
ModuleConstants.ToolPanelModuleId,
|
|
@@ -90,9 +88,7 @@ exports.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = [
|
|
|
90
88
|
ModuleConstants.ExportModuleId,
|
|
91
89
|
ModuleConstants.DataImportModuleId,
|
|
92
90
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
93
|
-
ModuleConstants.SmartEditModuleId,
|
|
94
91
|
ModuleConstants.PlusMinusModuleId,
|
|
95
|
-
ModuleConstants.BulkUpdateModuleId,
|
|
96
92
|
ModuleConstants.ShortcutModuleId,
|
|
97
93
|
ModuleConstants.TeamSharingModuleId,
|
|
98
94
|
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
|
}
|
|
@@ -103,7 +103,7 @@ class ApiBase {
|
|
|
103
103
|
return this.getOptions().columnOptions;
|
|
104
104
|
}
|
|
105
105
|
getNotesOptions() {
|
|
106
|
-
return this.getOptions().
|
|
106
|
+
return this.getOptions().noteOptions;
|
|
107
107
|
}
|
|
108
108
|
getCustomSortOptions() {
|
|
109
109
|
return this.getOptions().customSortOptions;
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
|
|
8
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
9
8
|
class BulkUpdateApiImpl extends ApiBase_1.ApiBase {
|
|
10
9
|
getBulkUpdateValue() {
|
|
11
10
|
return this.getAdaptableState().System.BulkUpdateValue;
|
|
@@ -19,8 +18,5 @@ class BulkUpdateApiImpl extends ApiBase_1.ApiBase {
|
|
|
19
18
|
applyBulkUpdate(cellUpdateRequests) {
|
|
20
19
|
this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(cellUpdateRequests));
|
|
21
20
|
}
|
|
22
|
-
setBulkUpdateValue(bulkUpdateValue) {
|
|
23
|
-
this.dispatchAction(SystemRedux.BulkUpdateChangeValue(bulkUpdateValue));
|
|
24
|
-
}
|
|
25
21
|
}
|
|
26
22
|
exports.BulkUpdateApiImpl = BulkUpdateApiImpl;
|
|
@@ -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
|
}
|
|
@@ -173,5 +173,15 @@ class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
173
173
|
this.adaptable.clearColumnFilteringForColumns([columnId]);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
+
getMaxFilterValue(column) {
|
|
177
|
+
const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
|
|
178
|
+
if (typeof maxFilterValues === 'function') {
|
|
179
|
+
const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
|
|
180
|
+
return maxFilterValues(columnFilterContext);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
return maxFilterValues;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
176
186
|
}
|
|
177
187
|
exports.ColumnFilterApiImpl = ColumnFilterApiImpl;
|
|
@@ -13,6 +13,7 @@ const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
|
13
13
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
14
14
|
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
15
15
|
const LayoutInternalApi_1 = require("../Internal/LayoutInternalApi");
|
|
16
|
+
const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
|
|
16
17
|
class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
17
18
|
constructor(adaptable) {
|
|
18
19
|
super(adaptable);
|
|
@@ -240,5 +241,18 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
240
241
|
}
|
|
241
242
|
return layoutSupportedFeatures;
|
|
242
243
|
}
|
|
244
|
+
showTransposePopup(config) {
|
|
245
|
+
const { transposedColumnId, hideTransposedColumn } = config;
|
|
246
|
+
this.adaptable.api.internalApi.showPopupWindow({
|
|
247
|
+
id: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
248
|
+
factoryId: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
249
|
+
title: 'Transpose View',
|
|
250
|
+
icon: 'grid',
|
|
251
|
+
popupProps: {
|
|
252
|
+
transposedColumnId,
|
|
253
|
+
hideTransposedColumn,
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
}
|
|
243
257
|
}
|
|
244
258
|
exports.LayoutApiImpl = LayoutApiImpl;
|
|
@@ -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
|
}
|
|
@@ -7,13 +7,9 @@ const NotesRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Not
|
|
|
7
7
|
class NotesApiImpl extends ApiBase_1.ApiBase {
|
|
8
8
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
9
9
|
const note = {
|
|
10
|
-
|
|
10
|
+
Text: noteStr,
|
|
11
11
|
PrimaryKeyValue: primaryKeyValue,
|
|
12
12
|
ColumnId: columnId,
|
|
13
|
-
AdaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
14
|
-
Author: {
|
|
15
|
-
UserName: this.adaptable.api.optionsApi.getUserName(),
|
|
16
|
-
},
|
|
17
13
|
Timestamp: Date.now(),
|
|
18
14
|
};
|
|
19
15
|
this.dispatchAction(NotesRedux.NotesAdd(note));
|
|
@@ -23,7 +19,7 @@ class NotesApiImpl extends ApiBase_1.ApiBase {
|
|
|
23
19
|
this.dispatchAction(NotesRedux.NotesEdit(note));
|
|
24
20
|
}
|
|
25
21
|
updateNoteText(noteStr, note) {
|
|
26
|
-
this.editNote(Object.assign(Object.assign({}, note), {
|
|
22
|
+
this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
|
|
27
23
|
}
|
|
28
24
|
deleteNote(note) {
|
|
29
25
|
this.dispatchAction(NotesRedux.NotesDelete(note));
|
|
@@ -34,8 +30,8 @@ class NotesApiImpl extends ApiBase_1.ApiBase {
|
|
|
34
30
|
getAllNotes() {
|
|
35
31
|
return this.getNotesState().Notes;
|
|
36
32
|
}
|
|
37
|
-
getCellNotes(
|
|
38
|
-
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes,
|
|
33
|
+
getCellNotes(address) {
|
|
34
|
+
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
|
|
39
35
|
}
|
|
40
36
|
getNoteByUuid(uuid) {
|
|
41
37
|
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;
|
|
@@ -40,10 +40,10 @@ class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
|
40
40
|
return this.getOptions().columnOptions;
|
|
41
41
|
}
|
|
42
42
|
getNotesOptions() {
|
|
43
|
-
return this.getOptions().
|
|
43
|
+
return this.getOptions().noteOptions;
|
|
44
44
|
}
|
|
45
45
|
getCommentsOptions() {
|
|
46
|
-
return this.getOptions().
|
|
46
|
+
return this.getOptions().commentOptions;
|
|
47
47
|
}
|
|
48
48
|
getCustomSortOptions() {
|
|
49
49
|
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>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotesReducer = exports.GetNotesSelector = exports.NotesReady = exports.NotesDelete = exports.NotesEdit = exports.NotesAdd = exports.NOTES_READY = exports.NOTES_DELETE = exports.NOTES_EDIT = exports.NOTES_ADD = void 0;
|
|
3
|
+
exports.NotesReducer = exports.GetNotesSelector = exports.GetAllNotesSelector = exports.NotesReady = exports.NotesDelete = exports.NotesEdit = exports.NotesAdd = exports.NOTES_READY = exports.NOTES_DELETE = exports.NOTES_EDIT = exports.NOTES_ADD = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
6
6
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
@@ -40,21 +40,23 @@ const NotesReady = (note) => ({
|
|
|
40
40
|
notesState: note,
|
|
41
41
|
});
|
|
42
42
|
exports.NotesReady = NotesReady;
|
|
43
|
-
const
|
|
43
|
+
const GetAllNotesSelector = (state) => state.Notes;
|
|
44
|
+
exports.GetAllNotesSelector = GetAllNotesSelector;
|
|
45
|
+
const GetNotesSelector = (state, address) => {
|
|
44
46
|
var _a;
|
|
45
|
-
if (!
|
|
47
|
+
if (!address) {
|
|
46
48
|
return [];
|
|
47
49
|
}
|
|
48
50
|
return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
|
|
49
|
-
if (note.PrimaryKeyValue ===
|
|
51
|
+
if (note.PrimaryKeyValue === address.PrimaryKeyValue && note.ColumnId === address.ColumnId) {
|
|
50
52
|
// happy check
|
|
51
53
|
return true;
|
|
52
54
|
}
|
|
53
55
|
// Primary keys retreived from the grid dom are always strings, so we must also consider them strings
|
|
54
|
-
if ((typeof
|
|
55
|
-
(typeof
|
|
56
|
-
return (note.PrimaryKeyValue.toString() ===
|
|
57
|
-
note.ColumnId ===
|
|
56
|
+
if ((typeof address.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
|
|
57
|
+
(typeof address.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
|
|
58
|
+
return (note.PrimaryKeyValue.toString() === address.PrimaryKeyValue.toString() &&
|
|
59
|
+
note.ColumnId === address.ColumnId);
|
|
58
60
|
}
|
|
59
61
|
return false;
|
|
60
62
|
});
|
|
@@ -10,6 +10,7 @@ const ChartingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/Cha
|
|
|
10
10
|
const ChartingStatusBarPopover_1 = require("../View/Charting/ChartingStatusBarPopover");
|
|
11
11
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
12
12
|
const ChartingState_1 = require("../PredefinedConfig/ChartingState");
|
|
13
|
+
const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
|
|
13
14
|
class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
14
15
|
constructor(api) {
|
|
15
16
|
super(ModuleConstants.ChartingModuleId, ModuleConstants.ChartingFriendlyName, 'chart', 'ChartPopup', 'Create AG Grid Charts in order to see Adaptable Data visually', api);
|
|
@@ -37,7 +38,7 @@ class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
37
38
|
}
|
|
38
39
|
isModuleAvailable() {
|
|
39
40
|
const agChartsAvailable = this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
|
|
40
|
-
const externalChartsAvailable = this.api.optionsApi.getChartingOptions().externalChartingOptions;
|
|
41
|
+
const externalChartsAvailable = Helper_1.default.objectHasKeys(this.api.optionsApi.getChartingOptions().externalChartingOptions);
|
|
41
42
|
return Boolean(agChartsAvailable || externalChartsAvailable);
|
|
42
43
|
}
|
|
43
44
|
getModuleAdaptableObjects() {
|
|
@@ -15,4 +15,4 @@ exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-predicate`
|
|
|
15
15
|
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/getting-started-primary-key`;
|
|
16
16
|
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
|
|
17
17
|
exports.AdaptableOptionsDocsLink = `${exports.HOST_URL_DOCS}/guide/reference-options-overview`;
|
|
18
|
-
exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/
|
|
18
|
+
exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-aggrid-modules-overview`;
|
|
@@ -201,7 +201,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
201
201
|
sortValuesFilter: false,
|
|
202
202
|
filterValuesUsingTime: false,
|
|
203
203
|
showDistinctFilteredValuesOnly: false,
|
|
204
|
-
maxFilterValuesToDisplay:
|
|
204
|
+
maxFilterValuesToDisplay: undefined,
|
|
205
205
|
includeBlankFilterValues: false,
|
|
206
206
|
showValuesCount: undefined,
|
|
207
207
|
},
|
|
@@ -17,13 +17,15 @@ exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_ITEMS = [
|
|
|
17
17
|
'StatusBar',
|
|
18
18
|
'-',
|
|
19
19
|
'Layout',
|
|
20
|
-
'Export',
|
|
21
20
|
'CalculatedColumn',
|
|
22
21
|
'FreeTextColumn',
|
|
23
22
|
'CustomSort',
|
|
24
23
|
'Alert',
|
|
25
24
|
'SystemStatus',
|
|
26
25
|
'-',
|
|
26
|
+
'Export',
|
|
27
|
+
'DataImport',
|
|
28
|
+
'-',
|
|
27
29
|
'FormatColumn',
|
|
28
30
|
'StyledColumn',
|
|
29
31
|
'FlashingCell',
|
|
@@ -33,17 +35,16 @@ exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_ITEMS = [
|
|
|
33
35
|
'GridFilter',
|
|
34
36
|
'ColumnFilter',
|
|
35
37
|
'DataSet',
|
|
38
|
+
'NamedQuery',
|
|
36
39
|
'-',
|
|
37
40
|
'PlusMinus',
|
|
38
41
|
'Shortcut',
|
|
39
42
|
'DataChangeHistory',
|
|
40
43
|
'-',
|
|
41
44
|
'Charting',
|
|
42
|
-
'DataImport',
|
|
43
45
|
'Schedule',
|
|
44
|
-
'NamedQuery',
|
|
45
|
-
'StateManagement',
|
|
46
46
|
'TeamSharing',
|
|
47
47
|
'Notes',
|
|
48
48
|
'Comments',
|
|
49
|
+
'StateManagement',
|
|
49
50
|
];
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Helper = exports.clamp = exports.modeNumberArray = exports.medianNumberArray = exports.meanNumberArray = exports.standardDeviationNumberArray = exports.sumNumberArray = exports.roundNumberTo4dp = exports.roundNumber = exports.isInputNotNullOrEmpty = exports.isInputNullOrEmpty = exports.returnItemCount = exports.copyToClipboard = exports.createDownloadedFile = exports.convertArrayToCsv = exports.arrayToKeyMap = exports.cloneObject = exports.getStringRepresentionFromKey = exports.objectNotExists = exports.objectExists = void 0;
|
|
3
|
+
exports.Helper = exports.clamp = exports.modeNumberArray = exports.medianNumberArray = exports.meanNumberArray = exports.standardDeviationNumberArray = exports.sumNumberArray = exports.roundNumberTo4dp = exports.roundNumber = exports.isInputNotNullOrEmpty = exports.isInputNullOrEmpty = exports.returnItemCount = exports.copyToClipboard = exports.createDownloadedFile = exports.convertArrayToCsv = exports.arrayToKeyMap = exports.cloneObject = exports.getStringRepresentionFromKey = exports.objectHasKeys = exports.objectNotExists = exports.objectExists = void 0;
|
|
4
4
|
const StringExtensions_1 = require("../Extensions/StringExtensions");
|
|
5
5
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
6
6
|
function objectExists(item) {
|
|
@@ -11,6 +11,10 @@ function objectNotExists(item) {
|
|
|
11
11
|
return !objectExists(item);
|
|
12
12
|
}
|
|
13
13
|
exports.objectNotExists = objectNotExists;
|
|
14
|
+
function objectHasKeys(item) {
|
|
15
|
+
return Object.keys(item).length > 0;
|
|
16
|
+
}
|
|
17
|
+
exports.objectHasKeys = objectHasKeys;
|
|
14
18
|
function getStringRepresentionFromKey(event) {
|
|
15
19
|
if (event.key == null) {
|
|
16
20
|
return event.char; // IE
|
|
@@ -249,6 +253,7 @@ exports.clamp = clamp;
|
|
|
249
253
|
exports.Helper = {
|
|
250
254
|
objectExists,
|
|
251
255
|
objectNotExists,
|
|
256
|
+
objectHasKeys,
|
|
252
257
|
getStringRepresentionFromKey,
|
|
253
258
|
cloneObject,
|
|
254
259
|
convertArrayToCsv,
|
|
@@ -41,7 +41,9 @@ class AggregatedScalarLiveValue {
|
|
|
41
41
|
getAggregatedValueForRow(rowNode) {
|
|
42
42
|
const aggregationValue = this.getAggregationValue(rowNode);
|
|
43
43
|
if (aggregationValue == undefined) {
|
|
44
|
-
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`,
|
|
44
|
+
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`, (message) => {
|
|
45
|
+
this.adaptableApi.internalApi.getAdaptableInstance().logger.warn(message);
|
|
46
|
+
});
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
49
|
if (this.expressionEvaluation.rowValueGetter) {
|
|
@@ -55,7 +55,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
55
55
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All', onClick: () => {
|
|
56
56
|
this.onApplyClick();
|
|
57
57
|
}, variant: "raised", tone: "accent" }, "Apply to Grid")))) : (React.createElement(React.Fragment, null,
|
|
58
|
-
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, "Select an existing
|
|
58
|
+
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, "Select an existing Column value from the dropdown, or enter a new value"),
|
|
59
59
|
React.createElement(rebass_1.Flex, { marginTop: 2, flexDirection: "row", alignItems: "center" },
|
|
60
60
|
React.createElement(rebass_1.Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 },
|
|
61
61
|
React.createElement(ColumnValueSelector_1.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' } })),
|