@adaptabletools/adaptable-cjs 18.0.0-canary.12 → 18.0.0-canary.13
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 +1 -1
- package/base.css.map +1 -1
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -53
- package/src/AdaptableOptions/MenuOptions.js +3 -3
- package/src/Api/AdaptableApi.d.ts +2 -2
- package/src/Api/ConfigApi.d.ts +2 -3
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
- package/src/Api/Implementation/ConfigApiImpl.js +7 -7
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
- package/src/Api/Implementation/GridApiImpl.js +8 -1
- package/src/Api/Implementation/NoteApiImpl.d.ts +2 -2
- package/src/Api/Implementation/NoteApiImpl.js +9 -9
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -2
- package/src/Api/Internal/AdaptableInternalApi.js +11 -11
- package/src/Api/Internal/CalculatedColumnInternalApi.js +3 -2
- package/src/Api/Internal/Fdc3InternalApi.js +2 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.js +3 -2
- package/src/Api/Internal/GridInternalApi.d.ts +2 -0
- package/src/Api/Internal/GridInternalApi.js +15 -0
- package/src/Api/NoteApi.d.ts +5 -5
- package/src/Api/OptionsApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +0 -11
- package/src/PredefinedConfig/AdaptableState.d.ts +1 -1
- package/src/PredefinedConfig/CommentState.d.ts +16 -12
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +6 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/NoteState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +26 -26
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.js +7 -7
- package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +1 -5
- package/src/Strategy/{CommentsModule.js → CommentModule.js} +7 -8
- package/src/Strategy/LayoutModule.d.ts +1 -0
- package/src/Strategy/LayoutModule.js +17 -1
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
- package/src/Strategy/{NotesModule.js → NoteModule.js} +9 -5
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +10 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +4 -24
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
- package/src/Utilities/Services/CellPopupService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +4 -0
- package/src/Utilities/Services/QueryLanguageService.js +2 -2
- package/src/Utilities/Services/SummaryService.d.ts +1 -1
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +18 -0
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Comments/CommentsPopup.js +8 -4
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +5 -5
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/Layout/TransposedPopup.js +19 -18
- package/src/View/Layout/Wizard/LayoutWizard.js +8 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +146 -0
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +5 -5
- package/src/agGrid/AdaptableAgGrid.js +4 -4
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +5 -0
- package/src/agGrid/AgGridColumnAdapter.js +3 -3
- package/src/agGrid/defaultAdaptableOptions.js +0 -7
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
- package/src/components/icons/note.js +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +36 -11
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/parser.js +117 -1257
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
- package/src/parser/src/types.d.ts +2 -2
- package/src/types.d.ts +1 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- /package/src/Api/Internal/{NotesInternalApi.d.ts → NoteInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext
|
|
1
|
+
import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
2
2
|
import { AdaptableColumn, AdaptableIcon, AdaptableModule, BaseContext } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Options for managing menus in AdapTable – provided using 2 collections
|
|
@@ -12,58 +12,6 @@ export interface MenuOptions<TData = any> {
|
|
|
12
12
|
* Customises Column Menu (default column menu items are available in the provided context)
|
|
13
13
|
*/
|
|
14
14
|
customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
|
|
15
|
-
/**
|
|
16
|
-
* Show Adaptable Context Menu (or specific items); can be boolean value or function invoked for each menu item
|
|
17
|
-
*
|
|
18
|
-
* @deprecated Use `customContextMenu` instead
|
|
19
|
-
* @defaultValue true
|
|
20
|
-
* @gridInfoItem
|
|
21
|
-
*/
|
|
22
|
-
showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext<TData>) => boolean);
|
|
23
|
-
/**
|
|
24
|
-
* Show AdapTable Column Menu (or specific items); can be boolean value or function invoked for each menu item
|
|
25
|
-
*
|
|
26
|
-
* @deprecated Use `customColumnMenu` instead
|
|
27
|
-
* @defaultValue true
|
|
28
|
-
* @gridInfoItem
|
|
29
|
-
*/
|
|
30
|
-
showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext<TData>) => boolean);
|
|
31
|
-
/**
|
|
32
|
-
* Adds 'Ungroup' Column Menu item to a row grouped column menu
|
|
33
|
-
*
|
|
34
|
-
* @deprecated Now provided by AG Grid and property is ignored
|
|
35
|
-
* @defaultValue true
|
|
36
|
-
* @gridInfoItem
|
|
37
|
-
*/
|
|
38
|
-
showUngroupColumnMenuItem?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Order in which AG Grid, AdapTable and User Menu sections will appear in Column Menu (list or function)
|
|
41
|
-
*
|
|
42
|
-
* @deprecated Use `customColumnMenu` instead
|
|
43
|
-
* @defaultValue 'aggrid', 'adaptable', 'user'
|
|
44
|
-
* @gridInfoItem
|
|
45
|
-
*/
|
|
46
|
-
columnMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
|
|
47
|
-
/**
|
|
48
|
-
* Order in which AG Grid, AdapTable and User Menu sections will appear in Context Menu (list or function)
|
|
49
|
-
*
|
|
50
|
-
* @deprecated Use `customContextMenu` instead
|
|
51
|
-
* @defaultValue 'aggrid', 'adaptable', 'user'
|
|
52
|
-
* @gridInfoItem
|
|
53
|
-
*/
|
|
54
|
-
contextMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
|
|
55
|
-
/**
|
|
56
|
-
* User-defined Menu Items to add to the Column Menu
|
|
57
|
-
*
|
|
58
|
-
* @deprecated Use `customColumnMenu` instead
|
|
59
|
-
*/
|
|
60
|
-
columnMenuItems?: UserMenuItem<ColumnMenuContext>[];
|
|
61
|
-
/**
|
|
62
|
-
* Customised Context Menu. Default context menu items are available in the provided context.
|
|
63
|
-
*
|
|
64
|
-
* @deprecated Use `customContextMenu` instead
|
|
65
|
-
*/
|
|
66
|
-
contextMenuItems?: UserMenuItem<ContextMenuContext>[];
|
|
67
15
|
}
|
|
68
16
|
/**
|
|
69
17
|
* Context info provided when building Custom Context Menus
|
|
@@ -49,8 +49,8 @@ exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
49
49
|
ModuleConstants.StateManagementModuleId,
|
|
50
50
|
ModuleConstants.ThemeModuleId,
|
|
51
51
|
ModuleConstants.ChartingModuleId,
|
|
52
|
-
ModuleConstants.
|
|
53
|
-
ModuleConstants.
|
|
52
|
+
ModuleConstants.NoteModuleId,
|
|
53
|
+
ModuleConstants.CommentModuleId,
|
|
54
54
|
];
|
|
55
55
|
exports.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
56
56
|
ModuleConstants.SettingsPanelModuleId,
|
|
@@ -95,5 +95,5 @@ exports.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
|
95
95
|
ModuleConstants.StateManagementModuleId,
|
|
96
96
|
ModuleConstants.ThemeModuleId,
|
|
97
97
|
ModuleConstants.ChartingModuleId,
|
|
98
|
-
ModuleConstants.
|
|
98
|
+
ModuleConstants.NoteModuleId,
|
|
99
99
|
];
|
|
@@ -231,11 +231,11 @@ export interface AdaptableApi {
|
|
|
231
231
|
*/
|
|
232
232
|
userInterfaceApi: UserInterfaceApi;
|
|
233
233
|
/**
|
|
234
|
-
* Provides access to the
|
|
234
|
+
* Provides access to the Note Module
|
|
235
235
|
*/
|
|
236
236
|
noteApi: NoteApi;
|
|
237
237
|
/**
|
|
238
|
-
* Provides access to the
|
|
238
|
+
* Provides access to the Comment Module
|
|
239
239
|
*/
|
|
240
240
|
commentApi: CommentApi;
|
|
241
241
|
/**
|
package/src/Api/ConfigApi.d.ts
CHANGED
|
@@ -15,8 +15,7 @@ import { AdaptablePersistentState, AdaptableState } from '../PredefinedConfig/Ad
|
|
|
15
15
|
import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
|
|
16
16
|
import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
|
|
17
17
|
import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
18
|
-
import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState } from '../types';
|
|
19
|
-
import { NoteState } from '../PredefinedConfig/NoteState';
|
|
18
|
+
import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState, NoteState } from '../types';
|
|
20
19
|
/**
|
|
21
20
|
* Range of functions to access Predefined Config and Adaptable State
|
|
22
21
|
*/
|
|
@@ -105,7 +104,7 @@ export interface ConfigApi {
|
|
|
105
104
|
*/
|
|
106
105
|
getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
|
|
107
106
|
/**
|
|
108
|
-
* Returns
|
|
107
|
+
* Returns Note section of Adaptable State
|
|
109
108
|
* @param returnJson return as JSON rather than object
|
|
110
109
|
*/
|
|
111
110
|
getNoteState(returnJson?: boolean): NoteState;
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
|
|
|
10
10
|
import { IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
11
11
|
import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
|
|
12
12
|
import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
|
|
13
|
+
import { TransposeConfig } from '../PredefinedConfig/Common/TransposeConfig';
|
|
13
14
|
/**
|
|
14
15
|
* Provides access to important properites of AdapTable e.g. sorting, selected cells etc.
|
|
15
16
|
*/
|
|
@@ -523,5 +524,5 @@ export interface GridApi {
|
|
|
523
524
|
/**
|
|
524
525
|
* Opens a window with a transposed view of Grid
|
|
525
526
|
*/
|
|
526
|
-
showTransposedView(
|
|
527
|
+
showTransposedView(transposeConfig: TransposeConfig): void;
|
|
527
528
|
}
|
|
@@ -13,11 +13,8 @@ class ActionColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
13
13
|
return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
14
14
|
}
|
|
15
15
|
getColDefsForActionColumns() {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
suppressMenu: false,
|
|
19
|
-
suppressMovable: false,
|
|
20
|
-
};
|
|
16
|
+
const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
|
|
17
|
+
const defaultActionColumnSettings = Object.assign(Object.assign({}, defaultSpecialColumnSettings), { resizable: true, suppressMenu: false, suppressMovable: false });
|
|
21
18
|
return this.getActionColumnApi()
|
|
22
19
|
.getActionColumns()
|
|
23
20
|
.map((actionColumn) => {
|
|
@@ -29,7 +26,7 @@ class ActionColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
29
26
|
editable: false,
|
|
30
27
|
width: actionColumnSettings.width,
|
|
31
28
|
resizable: actionColumnSettings.resizable,
|
|
32
|
-
|
|
29
|
+
suppressHeaderMenuButton: actionColumnSettings.suppressMenu,
|
|
33
30
|
suppressMovable: actionColumnSettings.suppressMovable,
|
|
34
31
|
filter: false,
|
|
35
32
|
sortable: false,
|
|
@@ -12,7 +12,7 @@ const AlertRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Ale
|
|
|
12
12
|
const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
|
|
13
13
|
const CalculatedColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CalculatedColumnRedux"));
|
|
14
14
|
const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
|
|
15
|
-
const
|
|
15
|
+
const NoteRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NoteRedux"));
|
|
16
16
|
const CustomSortRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CustomSortRedux"));
|
|
17
17
|
const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
|
|
18
18
|
const FormatColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FormatColumnRedux"));
|
|
@@ -182,10 +182,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
182
182
|
return returnJson
|
|
183
183
|
? JSON.stringify(this.getAdaptableState().Charting)
|
|
184
184
|
: this.getAdaptableState().Charting;
|
|
185
|
-
case '
|
|
185
|
+
case 'Note':
|
|
186
186
|
return returnJson
|
|
187
|
-
? JSON.stringify(this.getAdaptableState().
|
|
188
|
-
: this.getAdaptableState().
|
|
187
|
+
? JSON.stringify(this.getAdaptableState().Note)
|
|
188
|
+
: this.getAdaptableState().Note;
|
|
189
189
|
case 'CustomSort':
|
|
190
190
|
return returnJson
|
|
191
191
|
? JSON.stringify(this.getAdaptableState().CustomSort)
|
|
@@ -263,7 +263,7 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
263
263
|
return this.getUserStateByStateKey('Charting', returnJson);
|
|
264
264
|
}
|
|
265
265
|
getNoteState(returnJson = false) {
|
|
266
|
-
return this.getUserStateByStateKey('
|
|
266
|
+
return this.getUserStateByStateKey('Note', returnJson);
|
|
267
267
|
}
|
|
268
268
|
getCustomSortState(returnJson = false) {
|
|
269
269
|
return this.getUserStateByStateKey('CustomSort', returnJson);
|
|
@@ -318,8 +318,8 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
318
318
|
case 'Charting':
|
|
319
319
|
this.dispatchAction(ChartingRedux.ChartingReady(this.getChartingState()));
|
|
320
320
|
break;
|
|
321
|
-
case '
|
|
322
|
-
this.dispatchAction(
|
|
321
|
+
case 'Note':
|
|
322
|
+
this.dispatchAction(NoteRedux.NoteReady(this.getNoteState()));
|
|
323
323
|
break;
|
|
324
324
|
case 'CustomSort':
|
|
325
325
|
this.dispatchAction(CustomSortRedux.CustomSortReady(this.getCustomSortState()));
|
|
@@ -14,6 +14,7 @@ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChang
|
|
|
14
14
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
15
15
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
16
16
|
import { GridInternalApi } from '../Internal/GridInternalApi';
|
|
17
|
+
import { TransposeConfig } from '../../PredefinedConfig/Common/TransposeConfig';
|
|
17
18
|
export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
18
19
|
internalApi: GridInternalApi;
|
|
19
20
|
constructor(adaptable: IAdaptable);
|
|
@@ -131,5 +132,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
131
132
|
openGridInfoSettingsPanel(): void;
|
|
132
133
|
getAgGridRowModelType(): RowModelType;
|
|
133
134
|
getVisibleRowCount(): number;
|
|
134
|
-
showTransposedView(
|
|
135
|
+
showTransposedView(transposeConfig: TransposeConfig): void;
|
|
135
136
|
}
|
|
@@ -529,7 +529,12 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
529
529
|
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
|
|
530
530
|
return this.getRowCount();
|
|
531
531
|
}
|
|
532
|
-
showTransposedView(
|
|
532
|
+
showTransposedView(transposeConfig) {
|
|
533
|
+
var _a, _b, _c, _d;
|
|
534
|
+
const transposedColumnId = (_a = transposeConfig.transposedColumnId) !== null && _a !== void 0 ? _a : this.getAdaptableApi().optionsApi.getPrimaryKey();
|
|
535
|
+
const hideTransposedColumn = (_b = transposeConfig.hideTransposedColumn) !== null && _b !== void 0 ? _b : true;
|
|
536
|
+
const visibleColumns = (_c = transposeConfig.visibleColumns) !== null && _c !== void 0 ? _c : false;
|
|
537
|
+
const visibleRows = (_d = transposeConfig.visibleRows) !== null && _d !== void 0 ? _d : false;
|
|
533
538
|
this.adaptable.api.internalApi.showPopupWindow({
|
|
534
539
|
id: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
535
540
|
factoryId: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
@@ -538,6 +543,8 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
538
543
|
popupProps: {
|
|
539
544
|
transposedColumnId,
|
|
540
545
|
hideTransposedColumn,
|
|
546
|
+
visibleColumns,
|
|
547
|
+
visibleRows,
|
|
541
548
|
},
|
|
542
549
|
});
|
|
543
550
|
}
|
|
@@ -2,7 +2,7 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { NoteApi } from '../NoteApi';
|
|
3
3
|
import { AdaptableNote, AdaptableNotes, NoteState } from '../../PredefinedConfig/NoteState';
|
|
4
4
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
5
|
-
import { NoteInternalApi } from '../Internal/
|
|
5
|
+
import { NoteInternalApi } from '../Internal/NoteInternalApi';
|
|
6
6
|
import { CellAddress } from '../../types';
|
|
7
7
|
export declare class NoteApiImpl extends ApiBase implements NoteApi {
|
|
8
8
|
internalApi: NoteInternalApi;
|
|
@@ -13,6 +13,6 @@ export declare class NoteApiImpl extends ApiBase implements NoteApi {
|
|
|
13
13
|
deleteNote(note: AdaptableNote): void;
|
|
14
14
|
getNoteState(): NoteState;
|
|
15
15
|
getAllNotes(): AdaptableNotes;
|
|
16
|
-
|
|
16
|
+
getNotesForCell(address: CellAddress): AdaptableNote[];
|
|
17
17
|
getNoteByUuid(uuid: string): AdaptableNote | undefined;
|
|
18
18
|
}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NoteApiImpl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const NoteRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NoteRedux"));
|
|
7
|
+
const NoteInternalApi_1 = require("../Internal/NoteInternalApi");
|
|
8
8
|
class NoteApiImpl extends ApiBase_1.ApiBase {
|
|
9
9
|
constructor(adaptable) {
|
|
10
10
|
super(adaptable);
|
|
11
|
-
this.internalApi = new
|
|
11
|
+
this.internalApi = new NoteInternalApi_1.NoteInternalApi(adaptable);
|
|
12
12
|
}
|
|
13
13
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
14
14
|
const note = {
|
|
@@ -17,26 +17,26 @@ class NoteApiImpl extends ApiBase_1.ApiBase {
|
|
|
17
17
|
ColumnId: columnId,
|
|
18
18
|
Timestamp: Date.now(),
|
|
19
19
|
};
|
|
20
|
-
this.dispatchAction(
|
|
20
|
+
this.dispatchAction(NoteRedux.NoteAdd(note));
|
|
21
21
|
}
|
|
22
22
|
editNote(note) {
|
|
23
23
|
note.Timestamp = Date.now();
|
|
24
|
-
this.dispatchAction(
|
|
24
|
+
this.dispatchAction(NoteRedux.NoteEdit(note));
|
|
25
25
|
}
|
|
26
26
|
updateNoteText(noteStr, note) {
|
|
27
27
|
this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
|
|
28
28
|
}
|
|
29
29
|
deleteNote(note) {
|
|
30
|
-
this.dispatchAction(
|
|
30
|
+
this.dispatchAction(NoteRedux.NoteDelete(note));
|
|
31
31
|
}
|
|
32
32
|
getNoteState() {
|
|
33
|
-
return this.getAdaptableState().
|
|
33
|
+
return this.getAdaptableState().Note;
|
|
34
34
|
}
|
|
35
35
|
getAllNotes() {
|
|
36
36
|
return this.getNoteState().Notes;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
getNotesForCell(address) {
|
|
39
|
+
return NoteRedux.GetNotesSelector(this.getAdaptableState().Note, address);
|
|
40
40
|
}
|
|
41
41
|
getNoteByUuid(uuid) {
|
|
42
42
|
return this.getAllNotes().find((note) => note.Uuid === uuid);
|
|
@@ -2,7 +2,6 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { UserInterfaceApi } from '../UserInterfaceApi';
|
|
3
3
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
|
|
5
|
-
import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../../PredefinedConfig/Common/Menu';
|
|
6
5
|
import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
|
|
7
6
|
import { AdaptableObjectTag, CustomWindowConfig, GridCell } from '../../types';
|
|
8
7
|
import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
|
|
@@ -24,8 +23,6 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
24
23
|
getEditLookUpItems(): EditLookUpPermittedValues[];
|
|
25
24
|
getEditLookUpItemForColumn(column: AdaptableColumn): EditLookUpPermittedValues | undefined;
|
|
26
25
|
getEditLookUpValuesForEditLookUpItem(editLookUpItem: EditLookUpPermittedValues, gridCell: GridCell): any[] | undefined;
|
|
27
|
-
addColumnMenuItem(userMenuItem: UserMenuItem<ColumnMenuContext>): void;
|
|
28
|
-
addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
|
|
29
26
|
getEditableCellStyle(): AdaptableStyle | undefined;
|
|
30
27
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
31
28
|
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
@@ -146,14 +146,6 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
146
146
|
}
|
|
147
147
|
return this.adaptable.api.gridApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, gridCell.column, gridCell);
|
|
148
148
|
}
|
|
149
|
-
addColumnMenuItem(userMenuItem) {
|
|
150
|
-
var _a;
|
|
151
|
-
(_a = this.getMenuOptions().columnMenuItems) === null || _a === void 0 ? void 0 : _a.push(userMenuItem);
|
|
152
|
-
}
|
|
153
|
-
addContextMenuItem(userMenuItem) {
|
|
154
|
-
var _a;
|
|
155
|
-
(_a = this.getMenuOptions().contextMenuItems) === null || _a === void 0 ? void 0 : _a.push(userMenuItem);
|
|
156
|
-
}
|
|
157
149
|
getEditableCellStyle() {
|
|
158
150
|
return this.getUserInterfaceOptions().editableCellStyle;
|
|
159
151
|
}
|
|
@@ -224,7 +224,7 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
|
224
224
|
lockVisible: true,
|
|
225
225
|
suppressColumnsToolPanel: true,
|
|
226
226
|
suppressFiltersToolPanel: true,
|
|
227
|
-
|
|
227
|
+
suppressHeaderMenuButton: true,
|
|
228
228
|
suppressMovable: true,
|
|
229
229
|
filter: false,
|
|
230
230
|
sortable: false,
|
|
@@ -105,8 +105,8 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
105
105
|
getPreviousGroupedColumnsIndex(layoutId: string): {
|
|
106
106
|
[key: string]: number;
|
|
107
107
|
};
|
|
108
|
-
getValueUsingField(rowData: Record<string, any>,
|
|
109
|
-
setValueUsingField(rowData: Record<string, any>,
|
|
108
|
+
getValueUsingField(rowData: Record<string, any>, fieldName: string): any;
|
|
109
|
+
setValueUsingField(rowData: Record<string, any>, fieldName: string, newValue: any): Record<string, any>;
|
|
110
110
|
findAdaptableObjectsByLookupCriteria<T extends AdaptableObjectWithScope>({ scope, tag, ids }: AdaptableObjectLookupCriteria, specificAdaptableObjects: T[]): T[];
|
|
111
111
|
buildBaseContext(): BaseContext;
|
|
112
112
|
getActionButtonsAndActionColumn(colDef: ColDef): {
|
|
@@ -370,17 +370,17 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
370
370
|
return (_a = SystemRedux.SystemPreviousGroupedColumnsSelector(this.getAdaptableState().System)) === null || _a === void 0 ? void 0 : _a[layoutId];
|
|
371
371
|
}
|
|
372
372
|
// "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/utils/object.ts#L205
|
|
373
|
-
getValueUsingField(rowData,
|
|
374
|
-
if (!rowData || !(
|
|
373
|
+
getValueUsingField(rowData, fieldName) {
|
|
374
|
+
if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
|
-
const isColumnValueKeyNested =
|
|
377
|
+
const isColumnValueKeyNested = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
|
|
378
378
|
// if no '.', then it's not a deep value
|
|
379
379
|
if (!isColumnValueKeyNested) {
|
|
380
|
-
return rowData[
|
|
380
|
+
return rowData[fieldName];
|
|
381
381
|
}
|
|
382
382
|
// otherwise it is a deep value, so need to dig for it
|
|
383
|
-
const fields =
|
|
383
|
+
const fields = fieldName.split('.');
|
|
384
384
|
let currentObject = rowData;
|
|
385
385
|
for (let i = 0; i < fields.length; i++) {
|
|
386
386
|
if (currentObject == null) {
|
|
@@ -391,22 +391,22 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
391
391
|
return currentObject;
|
|
392
392
|
}
|
|
393
393
|
// "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/valueService/valueService.ts#L236
|
|
394
|
-
setValueUsingField(rowData,
|
|
395
|
-
if (!rowData || !(
|
|
394
|
+
setValueUsingField(rowData, fieldName, newValue) {
|
|
395
|
+
if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
|
-
const isColumnValueKeyContainsDots =
|
|
398
|
+
const isColumnValueKeyContainsDots = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
|
|
399
399
|
let valuesAreSame = false;
|
|
400
400
|
if (!isColumnValueKeyContainsDots) {
|
|
401
401
|
// soft comparison to match strings and numbers
|
|
402
|
-
valuesAreSame = rowData[
|
|
402
|
+
valuesAreSame = rowData[fieldName] == newValue;
|
|
403
403
|
if (!valuesAreSame) {
|
|
404
|
-
rowData[
|
|
404
|
+
rowData[fieldName] = newValue;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
else {
|
|
408
408
|
// otherwise it is a deep value, so need to dig for it
|
|
409
|
-
const fieldPieces =
|
|
409
|
+
const fieldPieces = fieldName.split('.');
|
|
410
410
|
let currentObject = rowData;
|
|
411
411
|
while (fieldPieces.length > 0 && currentObject) {
|
|
412
412
|
const fieldPiece = fieldPieces.shift();
|
|
@@ -96,7 +96,8 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
96
96
|
this.adaptable.api.eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
|
|
97
97
|
}
|
|
98
98
|
getColDefsForCalculatedColumns() {
|
|
99
|
-
const
|
|
99
|
+
const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
|
|
100
|
+
const defaultCalculatedColumnSettings = (0, ObjectFactory_1.CreateEmptyCalculatedColumn)(defaultSpecialColumnSettings).CalculatedColumnSettings;
|
|
100
101
|
return this.getCalculatedColumnApi()
|
|
101
102
|
.getCalculatedColumns()
|
|
102
103
|
.map((calculatedColumn) => {
|
|
@@ -143,7 +144,7 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
143
144
|
enableRowGroup: calculatedColumnSettings.Groupable,
|
|
144
145
|
sortable: calculatedColumnSettings.Sortable,
|
|
145
146
|
enablePivot: calculatedColumnSettings.Pivotable,
|
|
146
|
-
|
|
147
|
+
suppressHeaderMenuButton: calculatedColumnSettings.SuppressMenu,
|
|
147
148
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
148
149
|
type: columnTypes,
|
|
149
150
|
valueGetter,
|
|
@@ -42,7 +42,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
42
42
|
editable: false,
|
|
43
43
|
width: actionColumnConfig.width,
|
|
44
44
|
resizable: actionColumnConfig.resizable,
|
|
45
|
-
|
|
45
|
+
suppressHeaderMenuButton: true,
|
|
46
46
|
suppressMovable: !actionColumnConfig.movable,
|
|
47
47
|
filter: false,
|
|
48
48
|
sortable: false,
|
|
@@ -62,7 +62,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
62
62
|
editable: false,
|
|
63
63
|
width: actionColumnConfig.defaultWidth,
|
|
64
64
|
resizable: true,
|
|
65
|
-
|
|
65
|
+
suppressHeaderMenuButton: true,
|
|
66
66
|
suppressMovable: false,
|
|
67
67
|
filter: false,
|
|
68
68
|
sortable: false,
|
|
@@ -47,7 +47,8 @@ class FreeTextColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
47
47
|
return references;
|
|
48
48
|
}
|
|
49
49
|
getColDefsForFreeTextColumns() {
|
|
50
|
-
const
|
|
50
|
+
const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
|
|
51
|
+
const defaultFreeTextColumnSettings = (0, ObjectFactory_1.CreateEmptyFreeTextColumn)(defaultSpecialColumnSettings).FreeTextColumnSettings;
|
|
51
52
|
return this.getFreeTextColumnApi()
|
|
52
53
|
.getFreeTextColumns()
|
|
53
54
|
.map((freeTextColumn) => {
|
|
@@ -78,7 +79,7 @@ class FreeTextColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
78
79
|
enableRowGroup: freeTextColumnSettings.Groupable,
|
|
79
80
|
sortable: freeTextColumnSettings.Sortable,
|
|
80
81
|
enablePivot: freeTextColumnSettings.Pivotable,
|
|
81
|
-
|
|
82
|
+
suppressHeaderMenuButton: freeTextColumnSettings.SuppressMenu,
|
|
82
83
|
suppressMovable: freeTextColumnSettings.SuppressMovable,
|
|
83
84
|
cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
|
|
84
85
|
? 'agLargeTextCellEditor'
|
|
@@ -10,6 +10,7 @@ import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
|
|
|
10
10
|
import { EditLookUpPermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
|
|
11
11
|
import { DistinctValuesParams } from '../../AdaptableInterfaces/IAdaptable';
|
|
12
12
|
import { AdaptableColumnType } from '../../PredefinedConfig/Common/Types';
|
|
13
|
+
import { SpecialColumnSettings } from '../../PredefinedConfig/Common/SpecialColumnSettings';
|
|
13
14
|
export declare class GridInternalApi extends ApiBase {
|
|
14
15
|
/**
|
|
15
16
|
* Fires Grid Sorted Event
|
|
@@ -96,4 +97,5 @@ export declare class GridInternalApi extends ApiBase {
|
|
|
96
97
|
};
|
|
97
98
|
getAlertRowClass(params: RowClassParams): string | null;
|
|
98
99
|
getRowHighlightClass(params: RowClassParams): string | null;
|
|
100
|
+
deriveSpecialColumnSettingsFromAgGridDefaultColDef(): Partial<SpecialColumnSettings>;
|
|
99
101
|
}
|
|
@@ -408,5 +408,20 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
408
408
|
? highlightRow.highlightStyle.ClassName
|
|
409
409
|
: null;
|
|
410
410
|
}
|
|
411
|
+
deriveSpecialColumnSettingsFromAgGridDefaultColDef() {
|
|
412
|
+
const defaultColumnDefinition = this.adaptable.agGridAdapter.getDefaultColumnDefinition();
|
|
413
|
+
return {
|
|
414
|
+
Filterable: defaultColumnDefinition.filter,
|
|
415
|
+
Resizable: defaultColumnDefinition.resizable,
|
|
416
|
+
Groupable: defaultColumnDefinition.enableRowGroup,
|
|
417
|
+
Sortable: defaultColumnDefinition.sortable,
|
|
418
|
+
Pivotable: defaultColumnDefinition.enablePivot,
|
|
419
|
+
Aggregatable: defaultColumnDefinition.enableValue,
|
|
420
|
+
SuppressMenu: defaultColumnDefinition.suppressHeaderMenuButton,
|
|
421
|
+
SuppressMovable: defaultColumnDefinition.suppressMovable,
|
|
422
|
+
HeaderToolTip: defaultColumnDefinition.headerTooltip,
|
|
423
|
+
Width: defaultColumnDefinition.width,
|
|
424
|
+
};
|
|
425
|
+
}
|
|
411
426
|
}
|
|
412
427
|
exports.GridInternalApi = GridInternalApi;
|
package/src/Api/NoteApi.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { CellAddress } from '../../types';
|
|
|
6
6
|
export interface NoteApi {
|
|
7
7
|
/**
|
|
8
8
|
* Adds a new Note
|
|
9
|
-
* @param
|
|
9
|
+
* @param text
|
|
10
10
|
* @param primaryKeyValue
|
|
11
11
|
* @param columnId
|
|
12
12
|
*/
|
|
13
|
-
addNote(
|
|
13
|
+
addNote(text: string, primaryKeyValue: any, columnId: string): void;
|
|
14
14
|
/**
|
|
15
15
|
* Edits a Note
|
|
16
16
|
* @param note
|
|
@@ -18,10 +18,10 @@ export interface NoteApi {
|
|
|
18
18
|
editNote(note: AdaptableNote): void;
|
|
19
19
|
/**
|
|
20
20
|
* Edits text of a Note
|
|
21
|
-
* @param
|
|
21
|
+
* @param text
|
|
22
22
|
* @param note
|
|
23
23
|
*/
|
|
24
|
-
updateNoteText(
|
|
24
|
+
updateNoteText(text: string, note: AdaptableNote): void;
|
|
25
25
|
/**
|
|
26
26
|
* Deletes a Note
|
|
27
27
|
* @param note
|
|
@@ -39,7 +39,7 @@ export interface NoteApi {
|
|
|
39
39
|
* Gets all Notes for a cell
|
|
40
40
|
* @param CellAddress note position
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
getNotesForCell(CellAddress: CellAddress): AdaptableNote[];
|
|
43
43
|
/**
|
|
44
44
|
* Returns a Note by uuid
|
|
45
45
|
* @param uuid note uuid
|
package/src/Api/OptionsApi.d.ts
CHANGED
|
@@ -143,8 +143,8 @@ export interface OptionsApi {
|
|
|
143
143
|
*/
|
|
144
144
|
getFormatColumnOptions(): Readonly<FormatColumnOptions>;
|
|
145
145
|
/**
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
* Returns `AdaptableOptions.noteOptions`
|
|
147
|
+
*/
|
|
148
148
|
getNoteOptions(): Readonly<NoteOptions>;
|
|
149
149
|
/**
|
|
150
150
|
* Returns `AdaptableOptions.settingsPanelOptions`
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
2
2
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
3
|
-
import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
3
|
import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../AdaptableOptions/UserInterfaceOptions';
|
|
5
4
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
6
5
|
import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -54,16 +53,6 @@ export interface UserInterfaceApi {
|
|
|
54
53
|
* @param gridCell: the currently edited Grid Cell
|
|
55
54
|
*/
|
|
56
55
|
getEditLookUpValuesForEditLookUpItem(editLookUpItem: EditLookUpPermittedValues, gridCell: GridCell): any[] | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* Adds menu item to Column Menu
|
|
59
|
-
* @param userMenuItem Menu Item to add
|
|
60
|
-
*/
|
|
61
|
-
addColumnMenuItem(userMenuItem: UserMenuItem<ColumnMenuContext>): void;
|
|
62
|
-
/**
|
|
63
|
-
* Adds menu item to Context Menu
|
|
64
|
-
* @param userMenuItem Menu Item to add
|
|
65
|
-
*/
|
|
66
|
-
addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
|
|
67
56
|
/**
|
|
68
57
|
* Returns Style set for Editable cells
|
|
69
58
|
*/
|