@adaptabletools/adaptable 12.0.2 → 12.0.3
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/bundle.cjs.js +91 -91
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +6 -9
- package/src/AdaptableOptions/ExportOptions.d.ts +15 -0
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/IPushPullPluginOptions.d.ts +1 -3
- package/src/Api/FinanceApi.d.ts +8 -8
- package/src/Api/Implementation/InternalApiImpl.js +1 -2
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/StatusBarApi.d.ts +3 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +9 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +12 -3
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +1 -2
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.js +1 -2
- package/src/PredefinedConfig/ExportState.d.ts +6 -0
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -1
- package/src/PredefinedConfig/IPushPullState.d.ts +16 -5
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/TeamSharingState.d.ts +6 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +30 -1
- package/src/Redux/ActionsReducers/GridRedux.js +105 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +10 -11
- package/src/Redux/ActionsReducers/LayoutRedux.js +10 -10
- package/src/Redux/Store/AdaptableStore.js +37 -8
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/Helpers/FormatHelper.js +1 -1
- package/src/Utilities/Helpers/Helper.js +1 -1
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/agGrid/Adaptable.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +144 -1
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1656962682750;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -7,28 +7,22 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface EditOptions {
|
|
9
9
|
/**
|
|
10
|
-
* Function to validate
|
|
11
|
-
*
|
|
12
|
-
* @defaultValue undefined
|
|
10
|
+
* Function to validate Adaptable data edits on Server
|
|
13
11
|
*/
|
|
14
12
|
validateOnServer?: (cellDataChangedInfo: CellDataChangedInfo) => Promise<ValidationResult>;
|
|
15
13
|
/**
|
|
16
|
-
*
|
|
14
|
+
* Whether to display message after Server Validation runs
|
|
17
15
|
*
|
|
18
16
|
* @defaultValue true
|
|
19
17
|
* @gridInfoItem
|
|
20
18
|
*/
|
|
21
19
|
displayServerValidationMessages?: boolean;
|
|
22
20
|
/**
|
|
23
|
-
* Function which checks if given Grid Cell is editable
|
|
24
|
-
*
|
|
25
|
-
* @defaultValue undefined
|
|
21
|
+
* Function which checks if a given Grid Cell is editable
|
|
26
22
|
*/
|
|
27
23
|
isCellEditable?: (gridCell: GridCell) => boolean;
|
|
28
24
|
/**
|
|
29
25
|
* Custom Operations to use in Smart Edit
|
|
30
|
-
*
|
|
31
|
-
* @defaultValue undefined
|
|
32
26
|
*/
|
|
33
27
|
smartEditCustomOperations?: SmartEditCustomOperation[];
|
|
34
28
|
}
|
|
@@ -58,6 +52,9 @@ export declare type SmartEditCustomOperation = {
|
|
|
58
52
|
*/
|
|
59
53
|
operation: (context: SmartEditOperationContext) => number;
|
|
60
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Operation used by Smart Edit - either System or Custom
|
|
57
|
+
*/
|
|
61
58
|
export declare type SmartEditOperation = SmartEditCustomOperation | MathOperation;
|
|
62
59
|
/**
|
|
63
60
|
* Context used in Custom Smart Edit Operations
|
|
@@ -101,9 +101,24 @@ export interface ExportFormContext extends FormContext {
|
|
|
101
101
|
*/
|
|
102
102
|
customDestination: CustomDestination;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* List of System Export Destinations
|
|
106
|
+
*/
|
|
104
107
|
export declare type SystemExportDestinations = SystemExportDestination[];
|
|
108
|
+
/**
|
|
109
|
+
* Export Destinations provided by AdapTable
|
|
110
|
+
*/
|
|
105
111
|
export declare type SystemExportDestination = 'Excel' | 'CSV' | 'Clipboard' | 'JSON';
|
|
112
|
+
/**
|
|
113
|
+
* Report Context sent when using Custom Export Destinations
|
|
114
|
+
*/
|
|
106
115
|
export interface ReportContext extends BaseContext {
|
|
116
|
+
/**
|
|
117
|
+
* Definition of Report being Run
|
|
118
|
+
*/
|
|
107
119
|
report: Report;
|
|
120
|
+
/**
|
|
121
|
+
* Data being exported in the Report
|
|
122
|
+
*/
|
|
108
123
|
reportData: ReportData;
|
|
109
124
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Options
|
|
3
|
-
*
|
|
4
|
-
* ipushpull allows users to collborate and share data in powerful ways and it integrates very closely with AdapTable.
|
|
2
|
+
* Options available in ipushpull plugin; allows users to collborate and share data in powerful ways
|
|
5
3
|
*/
|
|
6
4
|
export interface IPushPullPluginOptions {
|
|
7
5
|
/**
|
package/src/Api/FinanceApi.d.ts
CHANGED
|
@@ -10,49 +10,49 @@ export interface FinanceApi {
|
|
|
10
10
|
*/
|
|
11
11
|
getPluginOptions(): FinancePluginOptions;
|
|
12
12
|
/**
|
|
13
|
-
* Creates Instrument Context
|
|
13
|
+
* Creates FDC3 Instrument Context
|
|
14
14
|
* @param instrumentColumn Instrument Column to create Context For
|
|
15
15
|
* @param rowNode Row Node to use for Context Data
|
|
16
16
|
*/
|
|
17
17
|
createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: RowNode): InstrumentContext;
|
|
18
18
|
/**
|
|
19
|
-
* Creates Instrumentlist Context
|
|
19
|
+
* Creates FDC3 Instrumentlist Context
|
|
20
20
|
* @param instrumentColumn Instrument Column to create Context For
|
|
21
21
|
* @param rowNode Row Nodes to use for Context Data
|
|
22
22
|
*/
|
|
23
23
|
createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: RowNode[]): InstrumentListContext;
|
|
24
24
|
/**
|
|
25
|
-
* Creates Position Context
|
|
25
|
+
* Creates FDC3 Position Context
|
|
26
26
|
* @param instrumentColumn Position Column to create Context For
|
|
27
27
|
* @param rowNode Row Node to use for Context Data
|
|
28
28
|
*/
|
|
29
29
|
createFDC3PositionContext(positionColumn: PositionColumn, rowNode: RowNode): PositionContext;
|
|
30
30
|
/**
|
|
31
|
-
* Creates Portfolio Context
|
|
31
|
+
* Creates FDC3 Portfolio Context
|
|
32
32
|
* @param instrumentColumn Position Column to create Context For
|
|
33
33
|
* @param rowNode Row Nodes to use for Context Data
|
|
34
34
|
*/
|
|
35
35
|
createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: RowNode[]): PortfolioContext;
|
|
36
36
|
/**
|
|
37
|
-
* Creates Contact Context
|
|
37
|
+
* Creates FDC3 Contact Context
|
|
38
38
|
* @param instrumentColumn Contact Column to create Context For
|
|
39
39
|
* @param rowNode Row Node to use for Context Data
|
|
40
40
|
*/
|
|
41
41
|
createFDC3ContactContext(contactColumn: ContactColumn, rowNode: RowNode): ContactContext;
|
|
42
42
|
/**
|
|
43
|
-
* Creates Contact List Context
|
|
43
|
+
* Creates FDC3 Contact List Context
|
|
44
44
|
* @param instrumentColumn Contact Column to create Context For
|
|
45
45
|
* @param rowNode Row Nodes to use for Context Data
|
|
46
46
|
*/
|
|
47
47
|
createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: RowNode[]): ContactListContext;
|
|
48
48
|
/**
|
|
49
|
-
* Creates Organization Context
|
|
49
|
+
* Creates FDC3 Organization Context
|
|
50
50
|
* @param instrumentColumn Organization Column to create Context For
|
|
51
51
|
* @param rowNode Row Node to use for Context Data
|
|
52
52
|
*/
|
|
53
53
|
createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: RowNode): OrganizationContext;
|
|
54
54
|
/**
|
|
55
|
-
* Creates Country Context
|
|
55
|
+
* Creates FDC3 Country Context
|
|
56
56
|
* @param instrumentColumn Country Column to create Context For
|
|
57
57
|
* @param rowNode Row Node to use for Context Data
|
|
58
58
|
*/
|
|
@@ -6,7 +6,6 @@ const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Pop
|
|
|
6
6
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
7
7
|
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
8
8
|
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
9
|
-
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
10
9
|
const AlertRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/AlertRedux"));
|
|
11
10
|
const DeadRedux = tslib_1.__importStar(require("../../Redux/DeadRedux"));
|
|
12
11
|
const ApiBase_1 = require("./ApiBase");
|
|
@@ -239,7 +238,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
239
238
|
this.dispatchAction(SystemRedux.SetLastAppliedShortcut(gridCell));
|
|
240
239
|
}
|
|
241
240
|
updateCurrentDraftLayout(layout) {
|
|
242
|
-
this.dispatchAction(
|
|
241
|
+
this.dispatchAction(GridRedux.LayoutUpdateCurrentDraft(layout));
|
|
243
242
|
}
|
|
244
243
|
getPrimaryKey() {
|
|
245
244
|
return this.adaptable.adaptableOptions.primaryKey;
|
|
@@ -329,7 +329,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
329
329
|
const layout = this.getLayoutByName(layoutName);
|
|
330
330
|
if (layout) {
|
|
331
331
|
if (layout.Columns.includes(columnId)) {
|
|
332
|
-
this.dispatchAction(LayoutRedux.
|
|
332
|
+
this.dispatchAction(LayoutRedux.LayoutRemoveColumn(layoutName, columnId));
|
|
333
333
|
this.getAdaptableApi().columnApi.hideColumn(columnId);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { GridOptions } from '@ag-grid-community/all-modules';
|
|
2
2
|
import { AdaptableStatusBar } from '../PredefinedConfig/StatusBarState';
|
|
3
|
+
/**
|
|
4
|
+
* Methods for managaing the Adaptable Status Bar
|
|
5
|
+
*/
|
|
3
6
|
export interface StatusBarApi {
|
|
4
7
|
/**
|
|
5
8
|
* Retrieves the current AG Grid Status Bar Panels
|
|
@@ -14,6 +14,9 @@ export interface CellSummmary {
|
|
|
14
14
|
Count: number | undefined;
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Defines a Custom Cell Summary operation provided by a user
|
|
19
|
+
*/
|
|
17
20
|
export interface CellSummaryOperation {
|
|
18
21
|
/**
|
|
19
22
|
* Name of the Operation - will be displayed in the Cell Summary components
|
|
@@ -13,8 +13,17 @@ export interface ColumnFilter extends AdaptableObject {
|
|
|
13
13
|
*/
|
|
14
14
|
Predicate: ColumnFilterPredicate;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A Predicate used in Column Filtering
|
|
18
|
+
*/
|
|
16
19
|
export interface ColumnFilterPredicate extends AdaptablePredicate {
|
|
17
20
|
PredicateId: TypeHint<string, SystemFilterPredicateId>;
|
|
18
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Array containing all System Filter Predicates
|
|
24
|
+
*/
|
|
19
25
|
export declare type SystemFilterPredicateIds = SystemFilterPredicateId[];
|
|
26
|
+
/**
|
|
27
|
+
* List of all the Filter Predicates shipped by AdapTable
|
|
28
|
+
*/
|
|
20
29
|
export declare type SystemFilterPredicateId = 'Values' | 'ExcludeValues' | 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'InRange' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'BooleanToggle';
|
|
@@ -7,11 +7,14 @@ import { FDC3Intent } from '../../types';
|
|
|
7
7
|
* it has a field describing what type it is, and data indicating its identity. Use this as a base
|
|
8
8
|
* to derive your own with any custom properties or metadata.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* General-purpose context type, as defined by FDC3
|
|
12
|
+
*/
|
|
10
13
|
export interface FDC3Context {
|
|
11
14
|
/**
|
|
12
|
-
* Type of
|
|
15
|
+
* Type of FDC3Context that uniquely identifies it, e.g. "instrument"; used to refer to the accepted context(s) when declaring intents
|
|
13
16
|
*/
|
|
14
|
-
type:
|
|
17
|
+
type: FDC3ContextType;
|
|
15
18
|
/**
|
|
16
19
|
* Name of the context data (optional) - a text string that describes the data being sent
|
|
17
20
|
*/
|
|
@@ -228,7 +231,13 @@ export interface AdaptableFDC3EventInfo extends BaseEventInfo {
|
|
|
228
231
|
*/
|
|
229
232
|
context: FDC3Context;
|
|
230
233
|
}
|
|
231
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Defines which FDC3 context is being used
|
|
236
|
+
*/
|
|
237
|
+
export declare type FDC3ContextType = 'fdc3.instrument' | 'fdc3.instrumentList' | 'fdc3.position' | 'fdc3.portfolio' | 'fdc3.contact' | 'fdc3.contactList' | 'fdc3.organization' | 'fdc3.country';
|
|
238
|
+
/**
|
|
239
|
+
* Context used when providing Custom FDC3 content
|
|
240
|
+
*/
|
|
232
241
|
export interface CustomFDC3Context extends FDC3Context {
|
|
233
242
|
type: any;
|
|
234
243
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* If the 'applyFilter' value is 'Throttle' then the 'throttleDelay' property should be additionally set.
|
|
2
|
+
* Whether Adaptable re-applies filtering after data edits; if `applyFilter` value is 'Throttle', `throttleDelay` should be set
|
|
4
3
|
*/
|
|
5
4
|
export interface FilterActionOnDataChange {
|
|
6
5
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* If the 'applyFilter' value is 'Throttle' then the 'throttleDelay' property should be additionally set.
|
|
3
|
+
* Whether Adaptable re-applies filtering after data edits; if `applyFilter` value is 'Throttle', `throttleDelay` should be set
|
|
5
4
|
*/
|
|
6
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -75,5 +75,11 @@ export interface ReportData {
|
|
|
75
75
|
*/
|
|
76
76
|
rows: Record<string, any>[];
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Names of Reports provided by AdapTable
|
|
80
|
+
*/
|
|
78
81
|
export declare type SystemReportName = 'Visual Data' | 'All Data' | 'Current Data' | 'Selected Cells' | 'Selected Rows';
|
|
82
|
+
/**
|
|
83
|
+
* Array containing all System Report names
|
|
84
|
+
*/
|
|
79
85
|
export declare type SystemReportNames = SystemReportName[];
|
|
@@ -142,8 +142,11 @@ export interface ColumnComparison {
|
|
|
142
142
|
*/
|
|
143
143
|
Color: string;
|
|
144
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Array of CellTextOption available in Format Columns
|
|
147
|
+
*/
|
|
145
148
|
export declare type CellTextOptions = CellTextOption[];
|
|
146
149
|
/**
|
|
147
|
-
*
|
|
150
|
+
* Text optionally to show in a Format Column special style: 'CellValue' or 'PercentageValue'
|
|
148
151
|
*/
|
|
149
152
|
export declare type CellTextOption = 'CellValue' | 'PercentageValue';
|
|
@@ -35,20 +35,31 @@ export interface IPushPullDomain {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* An ipushpull report
|
|
38
|
-
*
|
|
39
|
-
* Contains the name of the Report (which will exist in the Export State), and the ipushpull `Folder` and `Page` to which it will be sent.
|
|
40
38
|
*/
|
|
41
39
|
export interface IPushPullReport extends AdaptableObject {
|
|
40
|
+
/**
|
|
41
|
+
* Name of the Report
|
|
42
|
+
*/
|
|
42
43
|
ReportName: string;
|
|
44
|
+
/**
|
|
45
|
+
* ipushpull Folder which contains the Page
|
|
46
|
+
*/
|
|
43
47
|
Folder: string;
|
|
48
|
+
/**
|
|
49
|
+
* ipushpull Page which will contain the data
|
|
50
|
+
*/
|
|
44
51
|
Page: string;
|
|
45
52
|
}
|
|
46
53
|
/**
|
|
47
|
-
* Defines an ipushpull Schedule
|
|
48
|
-
*
|
|
49
|
-
* Properties include the report being exported to Excel (via ipushpull) and whether it is Snapshot or Live Data
|
|
54
|
+
* Defines an ipushpull Schedule
|
|
50
55
|
*/
|
|
51
56
|
export interface IPushPullSchedule extends BaseSchedule {
|
|
57
|
+
/**
|
|
58
|
+
* The report being exported to Excel (via ipushpull)
|
|
59
|
+
*/
|
|
52
60
|
IPushPullReport: IPushPullReport;
|
|
61
|
+
/**
|
|
62
|
+
* How data is sent: 'Snapshot' or 'Live Data'
|
|
63
|
+
*/
|
|
53
64
|
Transmission: 'Snapshot' | 'Live Data';
|
|
54
65
|
}
|
|
@@ -16,7 +16,7 @@ export interface LayoutState extends ConfigState {
|
|
|
16
16
|
Layouts?: Layout[];
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Defines a Layout; contains everything required i.e. Columns, Sorts, Widths, Aggregations, Grouping & Pivoting
|
|
20
20
|
*/
|
|
21
21
|
export interface Layout extends AdaptableObject {
|
|
22
22
|
/**
|
|
@@ -26,7 +26,7 @@ export interface ScheduleState extends ConfigState {
|
|
|
26
26
|
*/
|
|
27
27
|
Glue42Schedules?: Glue42Schedule[];
|
|
28
28
|
/**
|
|
29
|
-
* Schedules connected to OpenFin
|
|
29
|
+
* Schedules connected to OpenFin exports - available if OpenFin plugin is running
|
|
30
30
|
*/
|
|
31
31
|
OpenFinSchedules?: OpenFinSchedule[];
|
|
32
32
|
}
|
|
@@ -27,7 +27,7 @@ export interface Shortcut extends SuspendableObject {
|
|
|
27
27
|
*/
|
|
28
28
|
ShortcutKey: string;
|
|
29
29
|
/**
|
|
30
|
-
* Value
|
|
30
|
+
* Value acting as 2nd operand for ShortcutOperation (1st operand is the cell value)
|
|
31
31
|
*/
|
|
32
32
|
ShortcutValue: number;
|
|
33
33
|
/**
|
|
@@ -67,11 +67,17 @@ export interface SharedEntity extends AdaptableObject {
|
|
|
67
67
|
*/
|
|
68
68
|
Type: SharedEntityType;
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Defines Objects which have been imported into Team Sharing
|
|
72
|
+
*/
|
|
70
73
|
export interface TeamSharingImportInfo<T extends AdaptableObject> {
|
|
71
74
|
ModuleEntities: T[];
|
|
72
75
|
AddAction: (entity: T) => any;
|
|
73
76
|
EditAction: (entity: T) => any;
|
|
74
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Describes an Object which is being Team Shared
|
|
80
|
+
*/
|
|
75
81
|
export interface SharedEntityConfig {
|
|
76
82
|
description: string;
|
|
77
83
|
type: SharedEntityType;
|
|
@@ -6,7 +6,7 @@ import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInf
|
|
|
6
6
|
import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
8
8
|
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
9
|
-
import { CellSummmary } from '../../types';
|
|
9
|
+
import { Layout, CellSummmary, ColumnFilter } from '../../types';
|
|
10
10
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
11
11
|
/**
|
|
12
12
|
* @ReduxAction Columns have been set in the Grid
|
|
@@ -80,6 +80,12 @@ export declare const GRID_SET_TREE_MODE_ON = "GRID_SET_TREE_MODE_ON";
|
|
|
80
80
|
* @ReduxAction Grid is taken out of tree mode
|
|
81
81
|
*/
|
|
82
82
|
export declare const GRID_SET_TREE_MODE_OFF = "GRID_SET_TREE_MODE_OFF";
|
|
83
|
+
export declare const LAYOUT_UPDATE_CURRENT_DRAFT = "LAYOUT_UPDATE_CURRENT_DRAFT";
|
|
84
|
+
export declare const LAYOUT_DRAFT_COLUMN_FILTER_ADD = "LAYOUT_DRAFT_COLUMN_FILTER_ADD";
|
|
85
|
+
export declare const LAYOUT_DRAFT_COLUMN_FILTER_EDIT = "LAYOUT_DRAFT_COLUMN_FILTER_EDIT";
|
|
86
|
+
export declare const LAYOUT_DRAFT_COLUMN_FILTER_SET = "LAYOUT_DRAFT_COLUMN_FILTER_SET";
|
|
87
|
+
export declare const LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL = "LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL";
|
|
88
|
+
export declare const LAYOUT_DRAFT_COLUMN_FILTER_CLEAR = "LAYOUT_DRAFT_COLUMN_FILTER_CLEAR";
|
|
83
89
|
export interface GridDataChangedAction extends Redux.Action {
|
|
84
90
|
cellDataChangedInfo: CellDataChangedInfo;
|
|
85
91
|
}
|
|
@@ -151,6 +157,23 @@ export interface SetTreeModeOnAction extends Redux.Action {
|
|
|
151
157
|
}
|
|
152
158
|
export interface SetTreeModeOffAction extends Redux.Action {
|
|
153
159
|
}
|
|
160
|
+
export interface LayoutUpdateCurrentDraftAction extends Redux.Action {
|
|
161
|
+
layout: Layout;
|
|
162
|
+
}
|
|
163
|
+
export interface LayoutDraftColumnFilterAddAction extends Redux.Action {
|
|
164
|
+
columnFilter: ColumnFilter;
|
|
165
|
+
}
|
|
166
|
+
export interface LayoutDraftColumnFilterEditAction extends Redux.Action {
|
|
167
|
+
columnFilter: ColumnFilter;
|
|
168
|
+
}
|
|
169
|
+
export interface LayoutDraftColumnFilterSetAction extends Redux.Action {
|
|
170
|
+
columnFilter: ColumnFilter;
|
|
171
|
+
}
|
|
172
|
+
export interface LayoutDraftColumnFilterClearAction extends Redux.Action {
|
|
173
|
+
columnFilter: ColumnFilter;
|
|
174
|
+
}
|
|
175
|
+
export interface LayoutDraftColumnFilterClearAllAction extends Redux.Action {
|
|
176
|
+
}
|
|
154
177
|
export declare const GridSetColumns: (Columns: AdaptableColumn[]) => GridSetColumnsAction;
|
|
155
178
|
export declare const GridAddColumn: (Column: AdaptableColumn) => GridAddColumnAction;
|
|
156
179
|
export declare const GridAddColumns: (Columns: AdaptableColumn[]) => GridAddColumnsAction;
|
|
@@ -169,4 +192,10 @@ export declare const SetTreeModeOn: () => SetTreeModeOnAction;
|
|
|
169
192
|
export declare const SetTreeModeOff: () => SetTreeModeOffAction;
|
|
170
193
|
export declare const SetSettingPanelModuleMenuItems: (MenuItems: AdaptableMenuItem[]) => SetSettingPanelModuleMenuItemsAction;
|
|
171
194
|
export declare const SetModuleButtonMenuItems: (MenuItems: AdaptableMenuItem[]) => SetModuleButtonMenuItemsAction;
|
|
195
|
+
export declare const LayoutUpdateCurrentDraft: (layout: Layout) => LayoutUpdateCurrentDraftAction;
|
|
196
|
+
export declare const LayoutDraftColumnFilterAdd: (columnFilter: ColumnFilter) => LayoutDraftColumnFilterAddAction;
|
|
197
|
+
export declare const LayoutDraftColumnFilterEdit: (columnFilter: ColumnFilter) => LayoutDraftColumnFilterEditAction;
|
|
198
|
+
export declare const LayoutDraftColumnFilterSet: (columnFilter: ColumnFilter) => LayoutDraftColumnFilterSetAction;
|
|
199
|
+
export declare const LayoutDraftColumnFilterClear: (columnFilter: ColumnFilter) => LayoutDraftColumnFilterClearAction;
|
|
200
|
+
export declare const LayoutDraftColumnFilterClearAll: () => LayoutDraftColumnFilterClearAllAction;
|
|
172
201
|
export declare const GridReducer: Redux.Reducer<GridState>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GridReducer = exports.SetModuleButtonMenuItems = exports.SetSettingPanelModuleMenuItems = exports.SetTreeModeOff = exports.SetTreeModeOn = exports.SetPivotModeOff = exports.SetPivotModeOn = exports.GridRefreshCells = exports.GridSetCellSummary = exports.GridCreateCellSummary = exports.GridSetSelectedRows = exports.GridSetSelectedCells = exports.GridClearSort = exports.GridSetSort = exports.GridEditColumn = exports.GridRemoveColumn = exports.GridAddColumns = exports.GridAddColumn = exports.GridSetColumns = exports.GRID_SET_TREE_MODE_OFF = exports.GRID_SET_TREE_MODE_ON = exports.GRID_SET_PIVOT_MODE_OFF = exports.GRID_SET_PIVOT_MODE_ON = exports.GRID_SET_MODULE_BUTTON_MENUITEMS = exports.GRID_SET_MODULE_DROPDOWN_MENUITEMS = exports.GRID_REFRESH_CELLS = exports.GRID_SET_CELLS_SUMMARY = exports.GRID_CREATE_CELLS_SUMMARY = exports.GRID_SET_SELECTED_ROWS = exports.GRID_SET_SELECTED_CELLS = exports.GRID_CLEAR_SORT = exports.GRID_SET_SORT = exports.GRID_EDIT_COLUMN = exports.GRID_REMOVE_COLUMN = exports.GRID_ADD_COLUMNS = exports.GRID_ADD_COLUMN = exports.GRID_SET_COLUMNS = void 0;
|
|
3
|
+
exports.GridReducer = exports.LayoutDraftColumnFilterClearAll = exports.LayoutDraftColumnFilterClear = exports.LayoutDraftColumnFilterSet = exports.LayoutDraftColumnFilterEdit = exports.LayoutDraftColumnFilterAdd = exports.LayoutUpdateCurrentDraft = exports.SetModuleButtonMenuItems = exports.SetSettingPanelModuleMenuItems = exports.SetTreeModeOff = exports.SetTreeModeOn = exports.SetPivotModeOff = exports.SetPivotModeOn = exports.GridRefreshCells = exports.GridSetCellSummary = exports.GridCreateCellSummary = exports.GridSetSelectedRows = exports.GridSetSelectedCells = exports.GridClearSort = exports.GridSetSort = exports.GridEditColumn = exports.GridRemoveColumn = exports.GridAddColumns = exports.GridAddColumn = exports.GridSetColumns = exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR = exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_DRAFT_COLUMN_FILTER_SET = exports.LAYOUT_DRAFT_COLUMN_FILTER_EDIT = exports.LAYOUT_DRAFT_COLUMN_FILTER_ADD = exports.LAYOUT_UPDATE_CURRENT_DRAFT = exports.GRID_SET_TREE_MODE_OFF = exports.GRID_SET_TREE_MODE_ON = exports.GRID_SET_PIVOT_MODE_OFF = exports.GRID_SET_PIVOT_MODE_ON = exports.GRID_SET_MODULE_BUTTON_MENUITEMS = exports.GRID_SET_MODULE_DROPDOWN_MENUITEMS = exports.GRID_REFRESH_CELLS = exports.GRID_SET_CELLS_SUMMARY = exports.GRID_CREATE_CELLS_SUMMARY = exports.GRID_SET_SELECTED_ROWS = exports.GRID_SET_SELECTED_CELLS = exports.GRID_CLEAR_SORT = exports.GRID_SET_SORT = exports.GRID_EDIT_COLUMN = exports.GRID_REMOVE_COLUMN = exports.GRID_ADD_COLUMNS = exports.GRID_ADD_COLUMN = exports.GRID_SET_COLUMNS = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
5
6
|
const LayoutRedux_1 = require("./LayoutRedux");
|
|
7
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
6
8
|
/**
|
|
7
9
|
* @ReduxAction Columns have been set in the Grid
|
|
8
10
|
*/
|
|
@@ -75,6 +77,12 @@ exports.GRID_SET_TREE_MODE_ON = 'GRID_SET_TREE_MODE_ON';
|
|
|
75
77
|
* @ReduxAction Grid is taken out of tree mode
|
|
76
78
|
*/
|
|
77
79
|
exports.GRID_SET_TREE_MODE_OFF = 'GRID_SET_TREE_MODE_OFF';
|
|
80
|
+
exports.LAYOUT_UPDATE_CURRENT_DRAFT = 'LAYOUT_UPDATE_CURRENT_DRAFT';
|
|
81
|
+
exports.LAYOUT_DRAFT_COLUMN_FILTER_ADD = 'LAYOUT_DRAFT_COLUMN_FILTER_ADD';
|
|
82
|
+
exports.LAYOUT_DRAFT_COLUMN_FILTER_EDIT = 'LAYOUT_DRAFT_COLUMN_FILTER_EDIT';
|
|
83
|
+
exports.LAYOUT_DRAFT_COLUMN_FILTER_SET = 'LAYOUT_DRAFT_COLUMN_FILTER_SET';
|
|
84
|
+
exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL = 'LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL';
|
|
85
|
+
exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR = 'LAYOUT_DRAFT_COLUMN_FILTER_CLEAR';
|
|
78
86
|
const GridSetColumns = (Columns) => ({
|
|
79
87
|
type: exports.GRID_SET_COLUMNS,
|
|
80
88
|
columns: Columns,
|
|
@@ -160,6 +168,35 @@ const SetModuleButtonMenuItems = (MenuItems) => ({
|
|
|
160
168
|
menuItems: MenuItems,
|
|
161
169
|
});
|
|
162
170
|
exports.SetModuleButtonMenuItems = SetModuleButtonMenuItems;
|
|
171
|
+
const LayoutUpdateCurrentDraft = (layout) => ({
|
|
172
|
+
type: exports.LAYOUT_UPDATE_CURRENT_DRAFT,
|
|
173
|
+
layout,
|
|
174
|
+
});
|
|
175
|
+
exports.LayoutUpdateCurrentDraft = LayoutUpdateCurrentDraft;
|
|
176
|
+
const LayoutDraftColumnFilterAdd = (columnFilter) => ({
|
|
177
|
+
type: exports.LAYOUT_DRAFT_COLUMN_FILTER_ADD,
|
|
178
|
+
columnFilter,
|
|
179
|
+
});
|
|
180
|
+
exports.LayoutDraftColumnFilterAdd = LayoutDraftColumnFilterAdd;
|
|
181
|
+
const LayoutDraftColumnFilterEdit = (columnFilter) => ({
|
|
182
|
+
type: exports.LAYOUT_DRAFT_COLUMN_FILTER_EDIT,
|
|
183
|
+
columnFilter,
|
|
184
|
+
});
|
|
185
|
+
exports.LayoutDraftColumnFilterEdit = LayoutDraftColumnFilterEdit;
|
|
186
|
+
const LayoutDraftColumnFilterSet = (columnFilter) => ({
|
|
187
|
+
type: exports.LAYOUT_DRAFT_COLUMN_FILTER_SET,
|
|
188
|
+
columnFilter,
|
|
189
|
+
});
|
|
190
|
+
exports.LayoutDraftColumnFilterSet = LayoutDraftColumnFilterSet;
|
|
191
|
+
const LayoutDraftColumnFilterClear = (columnFilter) => ({
|
|
192
|
+
type: exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR,
|
|
193
|
+
columnFilter,
|
|
194
|
+
});
|
|
195
|
+
exports.LayoutDraftColumnFilterClear = LayoutDraftColumnFilterClear;
|
|
196
|
+
const LayoutDraftColumnFilterClearAll = () => ({
|
|
197
|
+
type: exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL,
|
|
198
|
+
});
|
|
199
|
+
exports.LayoutDraftColumnFilterClearAll = LayoutDraftColumnFilterClearAll;
|
|
163
200
|
const initialState = {
|
|
164
201
|
Columns: GeneralConstants_1.EMPTY_ARRAY,
|
|
165
202
|
CurrentLayout: null,
|
|
@@ -173,6 +210,7 @@ const initialState = {
|
|
|
173
210
|
IsGridInTreeMode: false,
|
|
174
211
|
};
|
|
175
212
|
const GridReducer = (state = initialState, action) => {
|
|
213
|
+
var _a, _b, _c, _d;
|
|
176
214
|
switch (action.type) {
|
|
177
215
|
case exports.GRID_SET_COLUMNS:
|
|
178
216
|
return Object.assign({}, state, {
|
|
@@ -222,12 +260,77 @@ const GridReducer = (state = initialState, action) => {
|
|
|
222
260
|
const menuItems = actionTyped.menuItems.sort((a, b) => a.label < b.label ? -1 : a.label > b.label ? 1 : 0);
|
|
223
261
|
return Object.assign({}, state, { ModuleButtonMenuItems: menuItems });
|
|
224
262
|
}
|
|
225
|
-
case
|
|
263
|
+
case exports.LAYOUT_UPDATE_CURRENT_DRAFT: {
|
|
226
264
|
const currentDraftLayout = action.layout;
|
|
227
265
|
return Object.assign({}, state, {
|
|
228
266
|
CurrentLayout: currentDraftLayout,
|
|
229
267
|
});
|
|
230
268
|
}
|
|
269
|
+
case exports.LAYOUT_DRAFT_COLUMN_FILTER_SET: {
|
|
270
|
+
const currentDraftLayout = state.CurrentLayout;
|
|
271
|
+
if (currentDraftLayout) {
|
|
272
|
+
let columnFilters = (_a = currentDraftLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
273
|
+
const columnFilterAction = action
|
|
274
|
+
.columnFilter;
|
|
275
|
+
AdaptableHelper_1.default.addUuidAndSource(columnFilterAction);
|
|
276
|
+
columnFilters = columnFilters
|
|
277
|
+
.filter((colFilter) => {
|
|
278
|
+
return colFilter.ColumnId !== columnFilterAction.ColumnId;
|
|
279
|
+
})
|
|
280
|
+
.concat(columnFilterAction);
|
|
281
|
+
return Object.assign({}, state, {
|
|
282
|
+
CurrentLayout: Object.assign(Object.assign({}, currentDraftLayout), { ColumnFilters: columnFilters }),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
case exports.LAYOUT_DRAFT_COLUMN_FILTER_ADD: {
|
|
287
|
+
const currentDraftLayout = state.CurrentLayout;
|
|
288
|
+
if (currentDraftLayout) {
|
|
289
|
+
let columnFilters = [...((_b = currentDraftLayout.ColumnFilters) !== null && _b !== void 0 ? _b : [])];
|
|
290
|
+
const columnFilterAction = action
|
|
291
|
+
.columnFilter;
|
|
292
|
+
AdaptableHelper_1.default.addUuidAndSource(columnFilterAction);
|
|
293
|
+
columnFilters.push(columnFilterAction);
|
|
294
|
+
return Object.assign({}, state, {
|
|
295
|
+
CurrentLayout: Object.assign(Object.assign({}, currentDraftLayout), { ColumnFilters: columnFilters }),
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
case exports.LAYOUT_DRAFT_COLUMN_FILTER_EDIT: {
|
|
300
|
+
const currentDraftLayout = state.CurrentLayout;
|
|
301
|
+
if (currentDraftLayout) {
|
|
302
|
+
const columnFilterAction = action
|
|
303
|
+
.columnFilter;
|
|
304
|
+
let columnFilters = ((_c = currentDraftLayout.ColumnFilters) !== null && _c !== void 0 ? _c : []).map((abObject) => abObject.Uuid === columnFilterAction.Uuid ? columnFilterAction : abObject);
|
|
305
|
+
return Object.assign({}, state, {
|
|
306
|
+
CurrentLayout: Object.assign(Object.assign({}, currentDraftLayout), { ColumnFilters: columnFilters }),
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
case exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR: {
|
|
311
|
+
const currentDraftLayout = state.CurrentLayout;
|
|
312
|
+
if (currentDraftLayout) {
|
|
313
|
+
let columnFilters = [...((_d = currentDraftLayout.ColumnFilters) !== null && _d !== void 0 ? _d : [])];
|
|
314
|
+
const actionTypedDelete = action;
|
|
315
|
+
const index = actionTypedDelete.columnFilter
|
|
316
|
+
? columnFilters.findIndex((i) => i.Uuid == actionTypedDelete.columnFilter.Uuid)
|
|
317
|
+
: -1;
|
|
318
|
+
if (index != -1) {
|
|
319
|
+
columnFilters.splice(index, 1);
|
|
320
|
+
}
|
|
321
|
+
return Object.assign({}, state, {
|
|
322
|
+
CurrentLayout: Object.assign(Object.assign({}, currentDraftLayout), { ColumnFilters: columnFilters }),
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
case exports.LAYOUT_DRAFT_COLUMN_FILTER_CLEAR_ALL: {
|
|
327
|
+
const currentDraftLayout = state.CurrentLayout;
|
|
328
|
+
if (currentDraftLayout) {
|
|
329
|
+
return Object.assign({}, state, {
|
|
330
|
+
CurrentLayout: Object.assign(Object.assign({}, currentDraftLayout), { ColumnFilters: [] }),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
231
334
|
case LayoutRedux_1.LAYOUT_SELECT: {
|
|
232
335
|
return Object.assign({}, state, {
|
|
233
336
|
CurrentLayout: null,
|