@adaptabletools/adaptable-cjs 21.2.1 → 21.2.2
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/README.md +4 -6
- package/package.json +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +4 -4
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/Api/CustomSortApi.d.ts +6 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +5 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +82 -1
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +17 -2
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +12 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +4 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +1 -0
- package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
- package/src/Api/Internal/LayoutInternalApi.js +9 -0
- package/src/Api/LayoutApi.d.ts +7 -1
- package/src/Api/ScheduleApi.d.ts +5 -0
- package/src/Api/ShortcutApi.d.ts +5 -0
- package/src/Api/StyledColumnApi.d.ts +5 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +6 -6
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +16 -16
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +18 -17
- package/src/Utilities/Constants/DocumentationLinkConstants.js +19 -18
- package/src/Utilities/Services/ModuleService.js +37 -38
- package/src/agGrid/AdaptableAgGrid.d.ts +11 -1
- package/src/agGrid/AdaptableAgGrid.js +63 -9
- package/src/agGrid/AdaptableFilterHandler.d.ts +1 -0
- package/src/agGrid/AdaptableFilterHandler.js +15 -5
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +3 -0
- package/src/agGrid/AgGridAdapter.d.ts +2 -0
- package/src/agGrid/AgGridAdapter.js +29 -15
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.d.ts +6 -0
- package/src/layout-manager/src/index.js +20 -0
- package/src/metamodel/adaptable.metamodel.d.ts +57 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/README.md
CHANGED
|
@@ -4,11 +4,11 @@ Repository for the vanilla version of AdapTable - the AG Grid extension develope
|
|
|
4
4
|
|
|
5
5
|
AdapTable provides a huge range of Data Grid (and FDC3) features, which extend AG Grid, and allow advanced users to manage, edit and visualise their data in ways not previously possible.
|
|
6
6
|
|
|
7
|
-
There are also [AdapTable React](https://
|
|
7
|
+
There are also [AdapTable React](https://www.adaptabletools.com/docs/react-overview), [AdapTable Angular](https://www.adaptabletools.com/docs/angular-overview) and [AdapTable Vue](https://www.adaptabletools.com/docs/vue-overview) versions available for those who wish to access AdapTable using their preferred Framework.
|
|
8
8
|
|
|
9
9
|
## Documentation
|
|
10
10
|
|
|
11
|
-
For full details on how to install, instantiate and reference AdapTable programmatically at run-time please read the [AdapTable Developer Documentation](https://
|
|
11
|
+
For full details on how to install, instantiate and reference AdapTable programmatically at run-time please read the [AdapTable Developer Documentation](https://www.adaptabletools.com/docs).
|
|
12
12
|
|
|
13
13
|
## Licenses
|
|
14
14
|
|
|
@@ -20,14 +20,12 @@ We can also make a trial license available for a short period of time to allow y
|
|
|
20
20
|
|
|
21
21
|
**Note: The AdapTable license does not include an AG Grid license which must be bought separately**.
|
|
22
22
|
|
|
23
|
-
Please contact [`sales@adaptabletools.com`](mailto:sales@adaptabletools.com) or see our [License Help Page](https://
|
|
23
|
+
Please contact [`sales@adaptabletools.com`](mailto:sales@adaptabletools.com) or see our [License Help Page](https://www.adaptabletools.com/buy/buying-adaptable-licensing) for more information.
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
## Demos
|
|
27
27
|
|
|
28
|
-
The [AdapTable Documentation](https://
|
|
29
|
-
|
|
30
|
-
Additionally you can see a number of large demos at the [Adaptable Tools website](https://www.adaptabletools.com/demos).
|
|
28
|
+
The [AdapTable Documentation](https://www.adaptabletools.com/docs) contains numerous demos that show the many different functionalities available in AdapTable.
|
|
31
29
|
|
|
32
30
|
## Other AdapTable Resources
|
|
33
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.2",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -363,8 +363,7 @@ export interface DataFormatDataType {
|
|
|
363
363
|
date?: DataFormatType;
|
|
364
364
|
}
|
|
365
365
|
/**
|
|
366
|
-
* Custom Export
|
|
367
|
-
* Use `ExcelExportParams` for Excel format exports and `CsvExportParams` for CSV, JSON and any custom format exports
|
|
366
|
+
* Custom Export Params extending AG Grid's base export params; allows overriding AdapTable default export
|
|
368
367
|
*/
|
|
369
368
|
export type CustomExportParams = ExcelExportParams | CsvExportParams;
|
|
370
369
|
/**
|
|
@@ -174,6 +174,9 @@ export interface IsRowFilterableContext<TData = any> extends BaseContext {
|
|
|
174
174
|
*/
|
|
175
175
|
data: TData;
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* AdapTable's Filter components: FilterBar or FilterForm
|
|
179
|
+
*/
|
|
177
180
|
export type AdaptableFilterComponentLocation = 'FilterBar' | 'FilterForm';
|
|
178
181
|
/**
|
|
179
182
|
* Context used for setting default Predicates for Column Filters
|
|
@@ -204,6 +204,9 @@ export interface AdaptableColumn<TData = any> extends AdaptableColumnBase {
|
|
|
204
204
|
*/
|
|
205
205
|
isPivotTotalColumn: boolean;
|
|
206
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Key properties of a Column (used in Layout Editor)
|
|
209
|
+
*/
|
|
207
210
|
export interface AdaptableColumnProperties {
|
|
208
211
|
sortable: boolean;
|
|
209
212
|
filterable: boolean;
|
|
@@ -212,6 +215,9 @@ export interface AdaptableColumnProperties {
|
|
|
212
215
|
pivotable: boolean;
|
|
213
216
|
aggregatable: boolean;
|
|
214
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* Summary of a Column including filters and all unique values
|
|
220
|
+
*/
|
|
215
221
|
export interface AdaptableColumnSummary {
|
|
216
222
|
column: AdaptableColumn;
|
|
217
223
|
columnFilter: ColumnFilter;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Object
|
|
2
|
+
* Object used to configure GridApi row management methods
|
|
3
3
|
*/
|
|
4
4
|
export interface DataUpdateConfig {
|
|
5
5
|
/**
|
|
6
|
-
* Whether
|
|
6
|
+
* Whether row operation should happen asynchronously
|
|
7
7
|
*/
|
|
8
8
|
runAsync?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether to flush async
|
|
10
|
+
* Whether to flush async operations
|
|
11
11
|
*/
|
|
12
12
|
flushAsync?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
* Callback function invoked when a batch successfully
|
|
14
|
+
* Callback function invoked when a batch successfully concludes
|
|
15
15
|
*/
|
|
16
16
|
callback?: (res: any) => void;
|
|
17
17
|
/**
|
|
@@ -3,6 +3,9 @@ import { IRowNode } from 'ag-grid-enterprise';
|
|
|
3
3
|
* What row action triggered the Row Change: 'Add', 'Update', 'Delete' or 'Load'
|
|
4
4
|
*/
|
|
5
5
|
export type RowDataChangeTrigger = 'Add' | 'Update' | 'Delete' | 'Load';
|
|
6
|
+
/**
|
|
7
|
+
* Info for RowDataChangedEvent, which rows changed and why
|
|
8
|
+
*/
|
|
6
9
|
export interface RowDataChangedInfo<TData = any> {
|
|
7
10
|
/**
|
|
8
11
|
* Timestamp of change occurrence (in milliseconds)
|
|
@@ -134,7 +134,7 @@ export interface PredefinedConfig {
|
|
|
134
134
|
*/
|
|
135
135
|
CustomSort?: CustomSortState;
|
|
136
136
|
/**
|
|
137
|
-
* Large series of properties to give users full control over the look and feel of the *Dashboard* - the section above the grid with toolbars and buttons
|
|
137
|
+
* Large series of properties to give users full control over the look and feel of the *Dashboard* - the section (typically above the grid) with toolbars and buttons
|
|
138
138
|
*/
|
|
139
139
|
Dashboard?: DashboardState;
|
|
140
140
|
/**
|
|
@@ -54,6 +54,9 @@ export interface GridCell<TData = any> {
|
|
|
54
54
|
*/
|
|
55
55
|
isRowGroupCell: boolean;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Extended GridCell, props to show how often appears in data source and how often visible
|
|
59
|
+
*/
|
|
57
60
|
export interface GridCellWithCount extends GridCell {
|
|
58
61
|
/**
|
|
59
62
|
* How many times Cell appears in Data Source
|
|
@@ -64,6 +67,9 @@ export interface GridCellWithCount extends GridCell {
|
|
|
64
67
|
*/
|
|
65
68
|
visibleCount?: number;
|
|
66
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Grid Cell used in Grouped Rows
|
|
72
|
+
*/
|
|
67
73
|
export interface GridCellWithChildren extends GridCell {
|
|
68
74
|
/**
|
|
69
75
|
* Children of Cell
|
|
@@ -74,6 +80,9 @@ export interface GridCellWithChildren extends GridCell {
|
|
|
74
80
|
*/
|
|
75
81
|
leafChildrenCount?: number;
|
|
76
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Defines a Unique Cell Value (incl. how many times it appears in Grid)
|
|
85
|
+
*/
|
|
77
86
|
export interface UniqueGridCell<TData = any> {
|
|
78
87
|
/**
|
|
79
88
|
* Raw value of Cell
|
|
@@ -63,7 +63,12 @@ export interface CustomSortApi {
|
|
|
63
63
|
* @param values Custom Sort values to use (replaces what was previously used)
|
|
64
64
|
* @returns Custom Sort
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
editCustomSortValues(columnId: string, values: string[]): CustomSort;
|
|
67
|
+
/**
|
|
68
|
+
* Edits a Custom Sort
|
|
69
|
+
* @param customSort Custom Sort to Edit
|
|
70
|
+
*/
|
|
71
|
+
editCustomSort(customSort: CustomSort): CustomSort;
|
|
67
72
|
/**
|
|
68
73
|
* Removes Custom Sort for a given ColumnId
|
|
69
74
|
* @param column columnId on which to delete the Custom Sort
|
|
@@ -19,7 +19,8 @@ export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi
|
|
|
19
19
|
getCustomSortForColumn(columnId: string): CustomSort | undefined;
|
|
20
20
|
addCustomSort(customSort: CustomSort): CustomSort;
|
|
21
21
|
createCustomSort(columnId: string, values: string[]): CustomSort;
|
|
22
|
-
|
|
22
|
+
editCustomSortValues(columnId: string, values: string[]): CustomSort;
|
|
23
|
+
editCustomSort(customSort: CustomSort): CustomSort;
|
|
23
24
|
deleteCustomSort(column: string): void;
|
|
24
25
|
suspendCustomSort(customSort: CustomSort): CustomSort;
|
|
25
26
|
unSuspendCustomSort(customSort: CustomSort): CustomSort;
|
|
@@ -77,7 +77,7 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
|
|
|
77
77
|
let customSort = { ColumnId: columnId, SortedValues: values };
|
|
78
78
|
return this.addCustomSort(customSort);
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
editCustomSortValues(columnId, values) {
|
|
81
81
|
const previousCustomSort = this.getCustomSortForColumn(columnId);
|
|
82
82
|
if (!previousCustomSort) {
|
|
83
83
|
this.logWarn(`No custom sort defined for ${columnId}`);
|
|
@@ -90,6 +90,10 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
|
|
|
90
90
|
this.dispatchAction(CustomSortRedux.CustomSortEdit(newCustomSort));
|
|
91
91
|
return this.getCustomSortByColumn(columnId);
|
|
92
92
|
}
|
|
93
|
+
editCustomSort(customSort) {
|
|
94
|
+
this.dispatchAction(CustomSortRedux.CustomSortEdit(customSort));
|
|
95
|
+
return this.getCustomSortByColumn(customSort.Uuid);
|
|
96
|
+
}
|
|
93
97
|
deleteCustomSort(column) {
|
|
94
98
|
let customSort = this.getCustomSortForColumn(column);
|
|
95
99
|
if (customSort) {
|
|
@@ -26,6 +26,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
26
26
|
getLayoutByName(layoutName: string): Layout | null;
|
|
27
27
|
createOrUpdateExtendedLayout(extendedLayoutInfo: ExtendedLayout): void;
|
|
28
28
|
getExtendedLayoutByName(layoutName: string): ExtendedLayout | undefined;
|
|
29
|
+
cloneExtendedLayout(extendedLayoutToClone: ExtendedLayout, layoutName: string): ExtendedLayout | false;
|
|
29
30
|
getLayouts(): Layout[];
|
|
30
31
|
getLayoutById(id: Layout['Uuid']): Layout;
|
|
31
32
|
saveCurrentLayout(): void;
|
|
@@ -246,6 +246,87 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
246
246
|
Extensions: extensions,
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
+
cloneExtendedLayout(extendedLayoutToClone, layoutName) {
|
|
250
|
+
// first clone the underlying Layout
|
|
251
|
+
const clonedLayout = this.cloneLayout(extendedLayoutToClone.Layout, layoutName);
|
|
252
|
+
if (clonedLayout == false) {
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
255
|
+
// Alerts
|
|
256
|
+
const alertExtensions = extendedLayoutToClone.Extensions.filter((e) => e.Module == 'Alert');
|
|
257
|
+
alertExtensions.forEach((le) => {
|
|
258
|
+
const alertDef = le.Object;
|
|
259
|
+
alertDef.Tags?.push(layoutName);
|
|
260
|
+
this.getAlertApi().editAlertDefinition(alertDef);
|
|
261
|
+
});
|
|
262
|
+
// Custom Sorts
|
|
263
|
+
const customSortExtensions = extendedLayoutToClone.Extensions.filter((e) => {
|
|
264
|
+
return e.Module == 'CustomSort';
|
|
265
|
+
});
|
|
266
|
+
customSortExtensions.forEach((le) => {
|
|
267
|
+
const customSort = le.Object;
|
|
268
|
+
customSort.Tags?.push(layoutName);
|
|
269
|
+
this.getCustomSortApi().editCustomSort(customSort);
|
|
270
|
+
});
|
|
271
|
+
// Flashing Cells
|
|
272
|
+
const flashingCellExtensions = extendedLayoutToClone.Extensions.filter((e) => {
|
|
273
|
+
return e.Module == 'FlashingCell';
|
|
274
|
+
});
|
|
275
|
+
flashingCellExtensions.forEach((le) => {
|
|
276
|
+
const flashingCellDef = le.Object;
|
|
277
|
+
flashingCellDef.Tags?.push(layoutName);
|
|
278
|
+
this.getFlashingCellApi().editFlashingCellDefinition(flashingCellDef);
|
|
279
|
+
});
|
|
280
|
+
// FormatColumns
|
|
281
|
+
const formatColumnExtensions = extendedLayoutToClone.Extensions.filter((e) => e.Module == 'FormatColumn');
|
|
282
|
+
formatColumnExtensions.forEach((le) => {
|
|
283
|
+
const formatCol = le.Object;
|
|
284
|
+
formatCol.Tags?.push(layoutName);
|
|
285
|
+
this.getFormatColumnApi().editFormatColumn(formatCol);
|
|
286
|
+
});
|
|
287
|
+
// Plus Minus
|
|
288
|
+
const plusMinusExtensions = extendedLayoutToClone.Extensions.filter((e) => {
|
|
289
|
+
return e.Module == 'PlusMinus';
|
|
290
|
+
});
|
|
291
|
+
plusMinusExtensions.forEach((le) => {
|
|
292
|
+
const plusMinusNudge = le.Object;
|
|
293
|
+
plusMinusNudge.Tags?.push(layoutName);
|
|
294
|
+
this.getPlusMinusApi().editPlusMinusNudge(plusMinusNudge);
|
|
295
|
+
});
|
|
296
|
+
// Schedule
|
|
297
|
+
const scheduleExtensions = extendedLayoutToClone.Extensions.filter((e) => {
|
|
298
|
+
return e.Module == 'Schedule';
|
|
299
|
+
});
|
|
300
|
+
scheduleExtensions.forEach((le) => {
|
|
301
|
+
const schedule = le.Object;
|
|
302
|
+
schedule.Tags?.push(layoutName);
|
|
303
|
+
this.getScheduleApi().editSchedule(schedule);
|
|
304
|
+
});
|
|
305
|
+
// Shortcut
|
|
306
|
+
const shortCutExtensions = extendedLayoutToClone.Extensions.filter((e) => {
|
|
307
|
+
return e.Module == 'Shortcut';
|
|
308
|
+
});
|
|
309
|
+
shortCutExtensions.forEach((le) => {
|
|
310
|
+
const shortcut = le.Object;
|
|
311
|
+
shortcut.Tags?.push(layoutName);
|
|
312
|
+
this.getShortcutApi().editShortcut(shortcut);
|
|
313
|
+
});
|
|
314
|
+
// StyledColumn
|
|
315
|
+
const styledColumnExtensions = extendedLayoutToClone.Extensions.filter((e) => {
|
|
316
|
+
return e.Module == 'StyledColumn';
|
|
317
|
+
});
|
|
318
|
+
styledColumnExtensions.forEach((le) => {
|
|
319
|
+
const styledColumn = le.Object;
|
|
320
|
+
styledColumn.Tags?.push(layoutName);
|
|
321
|
+
this.getStyledColumnApi().editStyledColumn(styledColumn);
|
|
322
|
+
});
|
|
323
|
+
// now create the new Extended Layout with the same extensions
|
|
324
|
+
const extendedLayout = {
|
|
325
|
+
Layout: clonedLayout,
|
|
326
|
+
Extensions: extendedLayoutToClone.Extensions,
|
|
327
|
+
};
|
|
328
|
+
return extendedLayout;
|
|
329
|
+
}
|
|
249
330
|
getLayouts() {
|
|
250
331
|
return this.getAdaptableState().Layout.Layouts ?? [];
|
|
251
332
|
}
|
|
@@ -291,7 +372,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
291
372
|
}
|
|
292
373
|
cloneLayout(layoutToClone, layoutName) {
|
|
293
374
|
if (!this.doesLayoutExist(layoutToClone)) {
|
|
294
|
-
this.logError("Cannot clone
|
|
375
|
+
this.logError("Cannot clone Layout with Name: '" + layoutName + "' as other Layout does not exist");
|
|
295
376
|
return false;
|
|
296
377
|
}
|
|
297
378
|
const newLayout = {
|
|
@@ -4,6 +4,7 @@ import { AdaptableColumnPredicate, AdaptablePredicate, AdaptablePredicateDef, Pr
|
|
|
4
4
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
5
5
|
import { PredicateInternalApi } from '../Internal/PredicateInternalApi';
|
|
6
6
|
import { TreeSelectionState } from '@infinite-table/infinite-react';
|
|
7
|
+
export declare const clearPredicateDefMapMemo: () => void;
|
|
7
8
|
export declare const getTreeSelectionStateForPredicateInputs: (inputs: any[], cache?: WeakMap<any[], TreeSelectionState>) => TreeSelectionState<any>;
|
|
8
9
|
export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
9
10
|
internalApi: PredicateInternalApi;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PredicateApiImpl = exports.getTreeSelectionStateForPredicateInputs = void 0;
|
|
3
|
+
exports.PredicateApiImpl = exports.getTreeSelectionStateForPredicateInputs = exports.clearPredicateDefMapMemo = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
@@ -9,6 +9,11 @@ const PredicateInternalApi_1 = require("../Internal/PredicateInternalApi");
|
|
|
9
9
|
const AdaptablePredicate_1 = require("../../AdaptableState/Common/AdaptablePredicate");
|
|
10
10
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
11
11
|
const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
12
|
+
const predicateDefMap_MEMO = new Map();
|
|
13
|
+
const clearPredicateDefMapMemo = () => {
|
|
14
|
+
predicateDefMap_MEMO.clear();
|
|
15
|
+
};
|
|
16
|
+
exports.clearPredicateDefMapMemo = clearPredicateDefMapMemo;
|
|
12
17
|
const treeSelectionStatesForPredicates = new WeakMap();
|
|
13
18
|
const getTreeSelectionStateForPredicateInputs = (inputs, cache = treeSelectionStatesForPredicates) => {
|
|
14
19
|
const treeSelectionState = cache.get(inputs);
|
|
@@ -141,7 +146,14 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
141
146
|
if (!predicate) {
|
|
142
147
|
return defaultReturn;
|
|
143
148
|
}
|
|
144
|
-
|
|
149
|
+
// memoization to avoid repeated lookups
|
|
150
|
+
// during filtering of large datasets
|
|
151
|
+
// see #column_filter_predicates_evaluation
|
|
152
|
+
let predicateDef = predicateDefMap_MEMO.get(predicate.PredicateId);
|
|
153
|
+
if (predicateDef === undefined) {
|
|
154
|
+
predicateDef = this.getPredicateDefById(predicate.PredicateId);
|
|
155
|
+
predicateDefMap_MEMO.set(predicate.PredicateId, predicateDef);
|
|
156
|
+
}
|
|
145
157
|
if (predicateDef === undefined) {
|
|
146
158
|
return defaultReturn;
|
|
147
159
|
}
|
|
@@ -169,6 +181,9 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
169
181
|
if (predicates === undefined || predicates === null || predicates?.length === 0) {
|
|
170
182
|
return this.handlePredicate(undefined, params, defaultReturn);
|
|
171
183
|
}
|
|
184
|
+
if (predicates.length === 1) {
|
|
185
|
+
return this.handlePredicate(predicates[0], params, defaultReturn);
|
|
186
|
+
}
|
|
172
187
|
if (params.predicatesOperator && params.predicatesOperator === 'OR') {
|
|
173
188
|
return predicates?.some((p) => this.handlePredicate(p, params, defaultReturn));
|
|
174
189
|
}
|
|
@@ -23,6 +23,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
|
|
|
23
23
|
getReportSchedules(config?: LayoutExtendedConfig): ReportSchedule[];
|
|
24
24
|
getActiveReportSchedules(): ReportSchedule[];
|
|
25
25
|
getSuspendedReportSchedules(): ReportSchedule[];
|
|
26
|
+
editSchedule(schedule: BaseSchedule): BaseSchedule;
|
|
26
27
|
addReportSchedule(schedule: ReportSchedule): ReportSchedule;
|
|
27
28
|
editReportSchedule(schedule: ReportSchedule): ReportSchedule;
|
|
28
29
|
deleteReportSchedule(schedule: ReportSchedule): void;
|
|
@@ -60,6 +60,18 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
|
|
|
60
60
|
getSuspendedReportSchedules() {
|
|
61
61
|
return this.getReportSchedules().filter((schedule) => schedule.IsSuspended);
|
|
62
62
|
}
|
|
63
|
+
editSchedule(schedule) {
|
|
64
|
+
switch (schedule.ScheduleType) {
|
|
65
|
+
case 'ipushpull':
|
|
66
|
+
return this.editIPushPullSchedule(schedule);
|
|
67
|
+
case 'Reminder':
|
|
68
|
+
return this.editReminderSchedule(schedule);
|
|
69
|
+
case 'OpenFin':
|
|
70
|
+
return this.editOpenFinSchedule(schedule);
|
|
71
|
+
case 'Report':
|
|
72
|
+
return this.editReportSchedule(schedule);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
63
75
|
addReportSchedule(schedule) {
|
|
64
76
|
this.dispatchAction(ScheduleRedux.ReportScheduleAdd(schedule));
|
|
65
77
|
return this.getScheduleById(schedule.Uuid);
|
|
@@ -9,6 +9,7 @@ export declare class ShortcutApiImpl extends ApiBase implements ShortcutApi {
|
|
|
9
9
|
getActiveShortcuts(config?: LayoutExtendedConfig): Shortcut[];
|
|
10
10
|
getSuspendedShortcuts(config?: LayoutExtendedConfig): Shortcut[];
|
|
11
11
|
addShortcut(shortcut: Shortcut): Shortcut;
|
|
12
|
+
editShortcut(shortcut: Shortcut): Shortcut;
|
|
12
13
|
deleteShortcut(shortcut: Shortcut): void;
|
|
13
14
|
deleteAllShortcuts(): void;
|
|
14
15
|
suspendShortcut(shortcut: Shortcut): Shortcut;
|
|
@@ -26,6 +26,10 @@ class ShortcutApiImpl extends ApiBase_1.ApiBase {
|
|
|
26
26
|
this.dispatchAction(ShortcutRedux.ShortcutAdd(shortcut));
|
|
27
27
|
return this.getShortcutById(shortcut.Uuid);
|
|
28
28
|
}
|
|
29
|
+
editShortcut(shortcut) {
|
|
30
|
+
this.dispatchAction(ShortcutRedux.ShortcutEdit(shortcut));
|
|
31
|
+
return this.getShortcutById(shortcut.Uuid);
|
|
32
|
+
}
|
|
29
33
|
deleteShortcut(shortcut) {
|
|
30
34
|
this.dispatchAction(ShortcutRedux.ShortcutDelete(shortcut));
|
|
31
35
|
}
|
|
@@ -16,6 +16,7 @@ export declare class StyledColumnApiImpl extends ApiBase implements StyledColumn
|
|
|
16
16
|
deleteStyledColumn(styledColumn: StyledColumn): void;
|
|
17
17
|
deleteAllStyledColumns(): void;
|
|
18
18
|
addStyledColumn(styledColumn: StyledColumn): void;
|
|
19
|
+
editStyledColumn(styledColumn: StyledColumn): StyledColumn;
|
|
19
20
|
isSparklineStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
20
21
|
getActiveStyledColumnForColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
21
22
|
hasPercentBarStyle(columnId: string): boolean;
|
|
@@ -38,6 +38,10 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
38
38
|
addStyledColumn(styledColumn) {
|
|
39
39
|
this.dispatchAction(StyledColumnRedux.StyledColumnAdd(styledColumn));
|
|
40
40
|
}
|
|
41
|
+
editStyledColumn(styledColumn) {
|
|
42
|
+
this.dispatchAction(StyledColumnRedux.StyledColumnEdit(styledColumn));
|
|
43
|
+
return this.getStyledColumnById(styledColumn.Uuid);
|
|
44
|
+
}
|
|
41
45
|
isSparklineStyleStyledColumn(column) {
|
|
42
46
|
if (!column) {
|
|
43
47
|
return false;
|
|
@@ -101,6 +101,7 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
101
101
|
predicatesOperator: columnFilter.PredicatesOperator,
|
|
102
102
|
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
103
103
|
};
|
|
104
|
+
// #column_filter_predicates_evaluation
|
|
104
105
|
return this.getPredicateApi().handlePredicates(columnFilter.Predicates, predicateDefHandlerContext, true);
|
|
105
106
|
}
|
|
106
107
|
/**
|
|
@@ -190,5 +190,14 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
190
190
|
delete result.Name;
|
|
191
191
|
return result;
|
|
192
192
|
}
|
|
193
|
+
getCurrentLayout_perfOptimized() {
|
|
194
|
+
// perf-optimized version of getCurrentLayout()
|
|
195
|
+
const layoutState = this.getAdaptableState().Layout;
|
|
196
|
+
const currentLayoutName = layoutState.CurrentLayout;
|
|
197
|
+
if (!currentLayoutName) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
return layoutState.Layouts.find((layout) => layout.Name === currentLayoutName);
|
|
201
|
+
}
|
|
193
202
|
}
|
|
194
203
|
exports.LayoutInternalApi = LayoutInternalApi;
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -64,9 +64,15 @@ export interface LayoutApi {
|
|
|
64
64
|
getExtendedLayoutByName(layoutName: string): ExtendedLayout | undefined;
|
|
65
65
|
/**
|
|
66
66
|
* Creates (or Updates) an Extended Layout
|
|
67
|
-
* @param extendedLayout
|
|
67
|
+
* @param extendedLayout ExtendedLayout to Create
|
|
68
68
|
*/
|
|
69
69
|
createOrUpdateExtendedLayout(extendedLayout: ExtendedLayout): void;
|
|
70
|
+
/**
|
|
71
|
+
* Clones an Extended Layout
|
|
72
|
+
* @param extendedLayoutToClone ExtendedLayout to Clone
|
|
73
|
+
* @param layoutName New name for Layout being cloned
|
|
74
|
+
*/
|
|
75
|
+
cloneExtendedLayout(extendedLayoutToClone: ExtendedLayout, layoutName: string): ExtendedLayout | false;
|
|
70
76
|
/**
|
|
71
77
|
* Retrieves all Layouts in Adaptable State
|
|
72
78
|
* @returns layouts
|
package/src/Api/ScheduleApi.d.ts
CHANGED
|
@@ -94,6 +94,11 @@ export interface ScheduleApi {
|
|
|
94
94
|
* @returns report schedule
|
|
95
95
|
*/
|
|
96
96
|
editReportSchedule(reportSchedule: ReportSchedule): ReportSchedule;
|
|
97
|
+
/**
|
|
98
|
+
* Edits a Schedule
|
|
99
|
+
* @param schedule Schedule to Edit
|
|
100
|
+
*/
|
|
101
|
+
editSchedule(schedule: BaseSchedule): BaseSchedule;
|
|
97
102
|
/**
|
|
98
103
|
* Deletes Report / Export Schedule
|
|
99
104
|
* @param ReportSchedule Report / export Schedule to delete
|
package/src/Api/ShortcutApi.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ export interface ShortcutApi {
|
|
|
40
40
|
* @param shortcut Shortcut to delete
|
|
41
41
|
*/
|
|
42
42
|
deleteShortcut(shortcut: Shortcut): void;
|
|
43
|
+
/**
|
|
44
|
+
* Edits Shortcut in state
|
|
45
|
+
* @param shortcut Shortcut to edit
|
|
46
|
+
*/
|
|
47
|
+
editShortcut(shortcut: Shortcut): Shortcut;
|
|
43
48
|
/**
|
|
44
49
|
* Suspends Shortcut definition
|
|
45
50
|
* @param shortcut Shortcut to suspend
|
|
@@ -41,6 +41,11 @@ export interface StyledColumnApi {
|
|
|
41
41
|
* @param styledColumn
|
|
42
42
|
*/
|
|
43
43
|
deleteStyledColumn(styledColumn: StyledColumn): void;
|
|
44
|
+
/**
|
|
45
|
+
* Edits a Styled Column
|
|
46
|
+
* @param styledColumn Styled Column to edit
|
|
47
|
+
*/
|
|
48
|
+
editStyledColumn(styledColumn: StyledColumn): StyledColumn;
|
|
44
49
|
/**
|
|
45
50
|
* Delete all Styled Columns in State
|
|
46
51
|
*/
|
|
@@ -58,13 +58,13 @@ export interface StyledColumnUnSuspendAllAction extends Redux.Action {
|
|
|
58
58
|
export interface StyledColumnReadyAction extends Redux.Action {
|
|
59
59
|
StyledColumnState: StyledColumnState;
|
|
60
60
|
}
|
|
61
|
-
export declare const StyledColumnAdd: (
|
|
62
|
-
export declare const StyledColumnEdit: (
|
|
63
|
-
export declare const StyledColumnDelete: (
|
|
61
|
+
export declare const StyledColumnAdd: (styledColumn: StyledColumn) => StyledColumnAddAction;
|
|
62
|
+
export declare const StyledColumnEdit: (styledColumn: StyledColumn) => StyledColumnEditAction;
|
|
63
|
+
export declare const StyledColumnDelete: (styledColumn: StyledColumn) => StyledColumnDeleteAction;
|
|
64
64
|
export declare const StyledColumnDeleteAll: () => StyledColumnDeleteAllAction;
|
|
65
|
-
export declare const StyledColumnSuspend: (
|
|
66
|
-
export declare const StyledColumnUnSuspend: (
|
|
65
|
+
export declare const StyledColumnSuspend: (styledColumn: StyledColumn) => StyledColumnSuspendAction;
|
|
66
|
+
export declare const StyledColumnUnSuspend: (styledColumn: StyledColumn) => StyledColumnSuspendAction;
|
|
67
67
|
export declare const StyledColumnSuspendAll: () => StyledColumnSuspendAllAction;
|
|
68
68
|
export declare const StyledColumnUnSuspendAll: () => StyledColumnUnSuspendAllAction;
|
|
69
|
-
export declare const StyledColumnReady: (
|
|
69
|
+
export declare const StyledColumnReady: (styledColumnState: StyledColumnState) => StyledColumnReadyAction;
|
|
70
70
|
export declare const StyledColumnReducer: Redux.Reducer<StyledColumnState>;
|
|
@@ -41,33 +41,33 @@ exports.STYLED_COLUMN_SUSPEND_ALL = 'STYLED_COLUMN_SUSPEND_ALL';
|
|
|
41
41
|
* @ReduxAction All StyledColumn Modules are unsuspended, or activated
|
|
42
42
|
*/
|
|
43
43
|
exports.STYLED_COLUMN_UNSUSPEND_ALL = 'STYLED_COLUMN_UNSUSPEND_ALL';
|
|
44
|
-
const StyledColumnAdd = (
|
|
44
|
+
const StyledColumnAdd = (styledColumn) => ({
|
|
45
45
|
type: exports.STYLED_COLUMN_ADD,
|
|
46
|
-
StyledColumn:
|
|
46
|
+
StyledColumn: styledColumn,
|
|
47
47
|
});
|
|
48
48
|
exports.StyledColumnAdd = StyledColumnAdd;
|
|
49
|
-
const StyledColumnEdit = (
|
|
49
|
+
const StyledColumnEdit = (styledColumn) => ({
|
|
50
50
|
type: exports.STYLED_COLUMN_EDIT,
|
|
51
|
-
StyledColumn:
|
|
51
|
+
StyledColumn: styledColumn,
|
|
52
52
|
});
|
|
53
53
|
exports.StyledColumnEdit = StyledColumnEdit;
|
|
54
|
-
const StyledColumnDelete = (
|
|
54
|
+
const StyledColumnDelete = (styledColumn) => ({
|
|
55
55
|
type: exports.STYLED_COLUMN_DELETE,
|
|
56
|
-
StyledColumn:
|
|
56
|
+
StyledColumn: styledColumn,
|
|
57
57
|
});
|
|
58
58
|
exports.StyledColumnDelete = StyledColumnDelete;
|
|
59
59
|
const StyledColumnDeleteAll = () => ({
|
|
60
60
|
type: exports.STYLED_COLUMN_DELETE_ALL,
|
|
61
61
|
});
|
|
62
62
|
exports.StyledColumnDeleteAll = StyledColumnDeleteAll;
|
|
63
|
-
const StyledColumnSuspend = (
|
|
63
|
+
const StyledColumnSuspend = (styledColumn) => ({
|
|
64
64
|
type: exports.STYLED_COLUMN_SUSPEND,
|
|
65
|
-
StyledColumn:
|
|
65
|
+
StyledColumn: styledColumn,
|
|
66
66
|
});
|
|
67
67
|
exports.StyledColumnSuspend = StyledColumnSuspend;
|
|
68
|
-
const StyledColumnUnSuspend = (
|
|
68
|
+
const StyledColumnUnSuspend = (styledColumn) => ({
|
|
69
69
|
type: exports.STYLED_COLUMN_UNSUSPEND,
|
|
70
|
-
StyledColumn:
|
|
70
|
+
StyledColumn: styledColumn,
|
|
71
71
|
});
|
|
72
72
|
exports.StyledColumnUnSuspend = StyledColumnUnSuspend;
|
|
73
73
|
const StyledColumnSuspendAll = () => ({
|
|
@@ -78,23 +78,23 @@ const StyledColumnUnSuspendAll = () => ({
|
|
|
78
78
|
type: exports.STYLED_COLUMN_UNSUSPEND_ALL,
|
|
79
79
|
});
|
|
80
80
|
exports.StyledColumnUnSuspendAll = StyledColumnUnSuspendAll;
|
|
81
|
-
const StyledColumnReady = (
|
|
81
|
+
const StyledColumnReady = (styledColumnState) => ({
|
|
82
82
|
type: exports.STYLED_COLUMN_READY,
|
|
83
|
-
StyledColumnState:
|
|
83
|
+
StyledColumnState: styledColumnState,
|
|
84
84
|
});
|
|
85
85
|
exports.StyledColumnReady = StyledColumnReady;
|
|
86
86
|
const initialState = {
|
|
87
87
|
StyledColumns: GeneralConstants_1.EMPTY_ARRAY,
|
|
88
88
|
};
|
|
89
89
|
const StyledColumnReducer = (state = initialState, action) => {
|
|
90
|
-
let
|
|
90
|
+
let styledColumns;
|
|
91
91
|
switch (action.type) {
|
|
92
92
|
case exports.STYLED_COLUMN_ADD: {
|
|
93
93
|
const actionStyledColumn = action.StyledColumn;
|
|
94
94
|
AdaptableHelper_1.default.addAdaptableObjectPrimitives(actionStyledColumn);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return { ...state, StyledColumns:
|
|
95
|
+
styledColumns = [].concat(state.StyledColumns);
|
|
96
|
+
styledColumns.push(actionStyledColumn);
|
|
97
|
+
return { ...state, StyledColumns: styledColumns };
|
|
98
98
|
}
|
|
99
99
|
case exports.STYLED_COLUMN_EDIT:
|
|
100
100
|
const actionStyledColumn = action.StyledColumn;
|