@adaptabletools/adaptable 11.1.5 → 11.1.6
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 +122 -122
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +139 -9
- package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +3 -3
- package/src/AdaptableOptions/SmartEdit.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +4 -1
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +4 -1
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +11 -7
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +12 -0
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +8 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +144 -3
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -0
- package/src/Redux/Store/AdaptableStore.js +11 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +6 -0
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +15 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -1
- package/src/agGrid/Adaptable.js +3 -3
- package/src/agGrid/agGridMenuHelper.js +1 -0
- package/src/components/icons/analysis.d.ts +3 -0
- package/src/components/icons/analysis.js +8 -0
- package/src/components/icons/call.d.ts +3 -0
- package/src/components/icons/call.js +7 -0
- package/src/components/icons/chat.d.ts +3 -0
- package/src/components/icons/chat.js +8 -0
- package/src/components/icons/index.js +14 -0
- package/src/components/icons/instrument.d.ts +3 -0
- package/src/components/icons/instrument.js +8 -0
- package/src/components/icons/news.d.ts +3 -0
- package/src/components/icons/news.js +8 -0
- package/src/components/icons/person.d.ts +3 -0
- package/src/components/icons/person.js +7 -0
- package/src/components/icons/quote.d.ts +3 -0
- package/src/components/icons/quote.js +7 -0
- package/src/metamodel/adaptable.metamodel.d.ts +112 -5
- package/src/metamodel/adaptable.metamodel.js +212 -21
- package/src/types.d.ts +2 -2
- 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": "11.1.
|
|
3
|
+
"version": "11.1.6",
|
|
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: 1650312974062;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
2
|
+
import { GridCell } from '../../types';
|
|
1
3
|
/**
|
|
2
4
|
* Options required for when using the Finance plugin
|
|
3
5
|
*/
|
|
4
6
|
export interface FinancePluginOptions {
|
|
5
7
|
/**
|
|
6
|
-
* Columns to be defined as
|
|
8
|
+
* Columns to be defined as FDC3
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
fdc3Columns?: {
|
|
11
|
+
/**
|
|
12
|
+
* FDC3 Instruments
|
|
13
|
+
*/
|
|
14
|
+
instrumentColumns?: InstrumentColumn[];
|
|
15
|
+
/**
|
|
16
|
+
* FDC3 Positions
|
|
17
|
+
*/
|
|
18
|
+
positionColumns?: PositionColumn[];
|
|
19
|
+
/**
|
|
20
|
+
* FDC3 Contacts
|
|
21
|
+
*/
|
|
22
|
+
contactColumns?: ContactColumn[];
|
|
23
|
+
/**
|
|
24
|
+
* FDC3 Countries
|
|
25
|
+
*/
|
|
26
|
+
countryColumns?: CountryColumn[];
|
|
27
|
+
/**
|
|
28
|
+
* FDC3 Organizations
|
|
29
|
+
*/
|
|
30
|
+
organizationColumns?: OrganizationColumn[];
|
|
31
|
+
};
|
|
9
32
|
/**
|
|
10
33
|
* Columns to use a Weighted Average aggregation
|
|
11
34
|
*/
|
|
12
35
|
weightedAverageColumns?: WeightedAverageColumn[];
|
|
13
36
|
}
|
|
14
37
|
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
38
|
+
* An Column which contains a Weighted Average aggregation
|
|
39
|
+
*/
|
|
40
|
+
export interface WeightedAverageColumn {
|
|
17
41
|
/**
|
|
18
42
|
* Column which will contain the aggregation
|
|
19
43
|
*/
|
|
@@ -23,14 +47,36 @@ export interface FinancePluginOptions {
|
|
|
23
47
|
*/
|
|
24
48
|
weightedColumnId: string;
|
|
25
49
|
}
|
|
26
|
-
|
|
27
|
-
* Defines an Column which will be defind as an (FDC3) Instrument
|
|
28
|
-
*/
|
|
29
|
-
export interface InstrumentColumn {
|
|
50
|
+
export interface FDC3Column {
|
|
30
51
|
/**
|
|
31
|
-
* Column defined as
|
|
52
|
+
* Id of Column defined as FDC3
|
|
32
53
|
*/
|
|
33
54
|
columnId: string;
|
|
55
|
+
/**
|
|
56
|
+
* If provided, will supply `name` property in FDC3 message
|
|
57
|
+
*/
|
|
58
|
+
name?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Should Column display a 'Broadcast' context menu item
|
|
61
|
+
*/
|
|
62
|
+
showBroadcastContextMenu?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Label to display in Broadcast Context Menu Item
|
|
65
|
+
*/
|
|
66
|
+
broadcastContextMenuLabel?: string | ((gridCell: GridCell, node: RowNode) => string);
|
|
67
|
+
/**
|
|
68
|
+
* FDC3 intents which the Column can raise
|
|
69
|
+
*/
|
|
70
|
+
intents?: any;
|
|
71
|
+
/**
|
|
72
|
+
* Label to display in Intent Context Menu Item
|
|
73
|
+
*/
|
|
74
|
+
intentContextMenuLabel?: string | ((intent: FDC3Intent, gridCell: GridCell, node: RowNode) => string);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A Column which will be defined as an FDC3 Instrument
|
|
78
|
+
*/
|
|
79
|
+
export interface InstrumentColumn extends FDC3Column {
|
|
34
80
|
/**
|
|
35
81
|
* Column which holds a ticker value as instrument data
|
|
36
82
|
*/
|
|
@@ -63,4 +109,88 @@ export interface InstrumentColumn {
|
|
|
63
109
|
* Column which holds a FIGI value as instrument data
|
|
64
110
|
*/
|
|
65
111
|
figiColumnId?: string;
|
|
112
|
+
/**
|
|
113
|
+
* FDC3 Intents available to the Column
|
|
114
|
+
*/
|
|
115
|
+
intents?: InstrumentIntents;
|
|
116
|
+
}
|
|
117
|
+
export declare type InstrumentIntents = InstrumentIntent[];
|
|
118
|
+
export declare type InstrumentIntent = 'ViewChart' | 'ViewQuote' | 'ViewNews' | 'ViewAnalysis' | 'ViewInstrument';
|
|
119
|
+
/**
|
|
120
|
+
* A (Numeric) Column which will be defined as an FDC3 Position
|
|
121
|
+
*/
|
|
122
|
+
export interface PositionColumn extends FDC3Column {
|
|
123
|
+
/**
|
|
124
|
+
* Column which contains the Instrument information of the FDC3 Message
|
|
125
|
+
*/
|
|
126
|
+
instrumentColumnId: string;
|
|
127
|
+
/**
|
|
128
|
+
* FDC3 Intents available to the Column
|
|
129
|
+
*/
|
|
130
|
+
intents?: PositionIntents;
|
|
131
|
+
}
|
|
132
|
+
export declare type PositionIntents = PositionIntent[];
|
|
133
|
+
export declare type PositionIntent = 'ViewChart' | 'ViewNews' | 'ViewAnalysis';
|
|
134
|
+
/**
|
|
135
|
+
* A (String) Column which will be defined as an FDC3 Contact
|
|
136
|
+
* columnId and at least one other property is required
|
|
137
|
+
*/
|
|
138
|
+
export interface ContactColumn extends FDC3Column {
|
|
139
|
+
/**
|
|
140
|
+
* Column which holds the email address of a Contact
|
|
141
|
+
*/
|
|
142
|
+
emailColumnId?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Column which holds an FDS_ID value a Contact
|
|
145
|
+
*/
|
|
146
|
+
fds_IdColumnId?: string;
|
|
147
|
+
/**
|
|
148
|
+
* FDC3 Intents available to the Column
|
|
149
|
+
*/
|
|
150
|
+
intents?: ContactIntents;
|
|
151
|
+
}
|
|
152
|
+
export declare type ContactIntents = ContactIntent[];
|
|
153
|
+
export declare type ContactIntent = 'StartCall' | 'StartChat' | 'ViewContact';
|
|
154
|
+
/**
|
|
155
|
+
* A (String) Column which will be defined as an FDC3 Organization
|
|
156
|
+
*/
|
|
157
|
+
export interface OrganizationColumn extends FDC3Column {
|
|
158
|
+
/**
|
|
159
|
+
* Column which contains the LEI
|
|
160
|
+
*/
|
|
161
|
+
leiColumnId?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Column which contains a PermId
|
|
164
|
+
*/
|
|
165
|
+
permIdColumnId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Column which contains an FDS_ID
|
|
168
|
+
*/
|
|
169
|
+
fds_IdColumnId?: string;
|
|
170
|
+
/**
|
|
171
|
+
* FDC3 Intents available to the Column
|
|
172
|
+
*/
|
|
173
|
+
intents?: OrganizationIntents;
|
|
174
|
+
}
|
|
175
|
+
export declare type OrganizationIntents = OrganizationIntent[];
|
|
176
|
+
export declare type OrganizationIntent = 'ViewNews' | 'ViewAnalysis';
|
|
177
|
+
/**
|
|
178
|
+
* A (String) Column which will be defined as an FDC3 Country
|
|
179
|
+
*/
|
|
180
|
+
export interface CountryColumn extends FDC3Column {
|
|
181
|
+
/**
|
|
182
|
+
* Column which contains the ISOALPHA2 Standard
|
|
183
|
+
*/
|
|
184
|
+
isoAlpha2ColumnId?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Column which contains the ISOALPHA3 Standard
|
|
187
|
+
*/
|
|
188
|
+
isoAlpha3ColumnId?: string;
|
|
189
|
+
/**
|
|
190
|
+
* FDC3 Intents available to the Column
|
|
191
|
+
*/
|
|
192
|
+
intents?: CountryIntents;
|
|
66
193
|
}
|
|
194
|
+
export declare type CountryIntents = CountryIntent[];
|
|
195
|
+
export declare type CountryIntent = 'ViewChart';
|
|
196
|
+
export declare type FDC3Intent = 'ViewChart' | 'ViewQuote' | 'ViewNews' | 'ViewAnalysis' | 'ViewInstrument' | 'StartCall' | 'StartChat' | 'ViewContact';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableFDC3EventInfo } from '../PredefinedConfig/Common/FDC3Context';
|
|
3
3
|
/**
|
|
4
4
|
* Options required for when using the OpenFin plugin
|
|
5
5
|
*/
|
|
@@ -45,8 +45,8 @@ export interface OpenFinPluginOptions {
|
|
|
45
45
|
*/
|
|
46
46
|
onValidationFailureInExcel?: 'override' | 'show-notification' | 'show-undo-notification';
|
|
47
47
|
/**
|
|
48
|
-
* Useful when you also use the finance plugin configured with
|
|
48
|
+
* Useful when you also use the finance plugin configured with fdc3 related columns - values in cells such columns can be broadcasted to fdc3, and this function
|
|
49
49
|
* will be called for broadcasting. It's your job to broadcast to the desired fdc3 channel
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
onFDC3MessageSent?: (eventInfo: AdaptableFDC3EventInfo) => void;
|
|
52
52
|
}
|
|
@@ -26,9 +26,9 @@ export declare type SmartEditCustomOperation = {
|
|
|
26
26
|
*/
|
|
27
27
|
adaptableApi: AdaptableApi;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Current selected grid cell
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
currentCell: GridCell;
|
|
32
32
|
}) => number;
|
|
33
33
|
};
|
|
34
34
|
export declare type SmartEditOperation = SmartEditCustomOperation | MathOperation;
|
|
@@ -47,7 +47,6 @@ export interface AdaptableApi {
|
|
|
47
47
|
* Provides access to the Alert Module
|
|
48
48
|
*/
|
|
49
49
|
alertApi: AlertApi;
|
|
50
|
-
flashingCellApi: FlashingCellApi;
|
|
51
50
|
/**
|
|
52
51
|
* Provides access to the Application Module
|
|
53
52
|
*/
|
|
@@ -104,6 +103,10 @@ export interface AdaptableApi {
|
|
|
104
103
|
* Provides access to AdapTable's filtering functionality
|
|
105
104
|
*/
|
|
106
105
|
filterApi: FilterApi;
|
|
106
|
+
/**
|
|
107
|
+
* Provides access to the Flashing Cell Module
|
|
108
|
+
*/
|
|
109
|
+
flashingCellApi: FlashingCellApi;
|
|
107
110
|
/**
|
|
108
111
|
* Provides access to the Format Column Module
|
|
109
112
|
*/
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -211,5 +211,5 @@ export interface EventApi {
|
|
|
211
211
|
off(eventName: 'AdaptableReady', callback: (adaptableReadyInfo: AdaptableReadyInfo) => void): void;
|
|
212
212
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
213
213
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
214
|
-
emit(eventName: 'AdaptableReady' | 'AlertFired' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'AdaptableStateChanged' | 'DashboardChanged' | 'CellChanged' | 'GridDataChanged' | 'LayoutChanged' | 'LiveDataChanged' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | '
|
|
214
|
+
emit(eventName: 'AdaptableReady' | 'AlertFired' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'AdaptableStateChanged' | 'DashboardChanged' | 'CellChanged' | 'GridDataChanged' | 'LayoutChanged' | 'LiveDataChanged' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'FDC3MessageSent', data?: any): Promise<any>;
|
|
215
215
|
}
|
|
@@ -168,9 +168,12 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
168
168
|
return !!this.getColumnFromId(columnId, false);
|
|
169
169
|
}
|
|
170
170
|
getColumnFromId(columnId, logWarning = true) {
|
|
171
|
+
if (columnId == undefined) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
171
174
|
// just return null if no columns rather than logging a warning - otherwise get lots at startup
|
|
172
175
|
if (ArrayExtensions_1.default.IsNullOrEmpty(this.getColumns())) {
|
|
173
|
-
return
|
|
176
|
+
return;
|
|
174
177
|
}
|
|
175
178
|
const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
|
|
176
179
|
if (foundColumn) {
|
|
@@ -12,7 +12,7 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
|
|
|
12
12
|
getAllSuspendedFormatColumn(): FormatColumn[];
|
|
13
13
|
getAllFormatColumnWithStyle(): FormatColumn[];
|
|
14
14
|
getColumnComparisonForFormatColumn(formatColumn: FormatColumn): ColumnComparison | undefined;
|
|
15
|
-
getColumnIdsFromColumnComparison(
|
|
15
|
+
getColumnIdsFromColumnComparison(columnComparison: ColumnComparison): string[];
|
|
16
16
|
getAllFormatColumnWithDisplayFormat(): FormatColumn[];
|
|
17
17
|
getAllFormatColumnWithCellAlignment(): FormatColumn[];
|
|
18
18
|
addFormatColumn(formatColumn: FormatColumn): FormatColumn;
|
|
@@ -40,15 +40,19 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
40
40
|
}
|
|
41
41
|
return undefined;
|
|
42
42
|
}
|
|
43
|
-
getColumnIdsFromColumnComparison(
|
|
43
|
+
getColumnIdsFromColumnComparison(columnComparison) {
|
|
44
44
|
let returnValues = [];
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (typeof columnComparison.MinValue === 'string') {
|
|
46
|
+
let minIds = this.adaptable.api.columnApi.getColumnIdsFromId(columnComparison.MinValue, false);
|
|
47
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(minIds)) {
|
|
48
|
+
returnValues.push(...minIds);
|
|
49
|
+
}
|
|
48
50
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
if (typeof columnComparison.MaxValue === 'string') {
|
|
52
|
+
let maxIds = this.adaptable.api.columnApi.getColumnIdsFromId(columnComparison.MaxValue, false);
|
|
53
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(maxIds)) {
|
|
54
|
+
returnValues.push(...maxIds);
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
return returnValues;
|
|
54
58
|
}
|
|
@@ -10,11 +10,13 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
|
|
|
10
10
|
scopeIsEmpty(scope: AdaptableScope): boolean;
|
|
11
11
|
scopeIsAll(scope: AdaptableScope): boolean;
|
|
12
12
|
scopeHasDataType(scope: AdaptableScope): boolean;
|
|
13
|
+
scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
|
|
13
14
|
scopeHasColumns(scope: AdaptableScope): boolean;
|
|
14
15
|
isSingleColumnScope(scope: AdaptableScope): boolean;
|
|
15
16
|
getSingleColumnInScope(scope: AdaptableScope): string | undefined;
|
|
16
17
|
isSingleNumericColumnScope(scope: AdaptableScope): boolean;
|
|
17
18
|
isSingleBooleanColumnScope(scope: AdaptableScope): boolean;
|
|
19
|
+
areAllBooleanColumnsInScope(scope: AdaptableScope): boolean;
|
|
18
20
|
isColumnInScopeColumns(column: AdaptableColumn, scope: AdaptableScope): boolean;
|
|
19
21
|
isPrimaryKeyColumnInScopeColumns(scope: AdaptableScope): boolean;
|
|
20
22
|
getScopeToString(scope: AdaptableScope): string;
|
|
@@ -71,6 +71,10 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
71
71
|
scopeHasDataType(scope) {
|
|
72
72
|
return scope !== undefined && 'DataTypes' in scope;
|
|
73
73
|
}
|
|
74
|
+
scopeHasOnlyBooleanDataType(scope) {
|
|
75
|
+
var _a;
|
|
76
|
+
return 'DataTypes' in scope && ((_a = scope.DataTypes) === null || _a === void 0 ? void 0 : _a.length) == 1 && scope.DataTypes[0] == 'Boolean';
|
|
77
|
+
}
|
|
74
78
|
scopeHasColumns(scope) {
|
|
75
79
|
return scope !== undefined && 'ColumnIds' in scope;
|
|
76
80
|
}
|
|
@@ -100,6 +104,14 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
100
104
|
scope.ColumnIds.length == 1 &&
|
|
101
105
|
this.adaptable.api.columnApi.isBooleanColumn(this.adaptable.api.columnApi.getColumnFromId(scope.ColumnIds[0])));
|
|
102
106
|
}
|
|
107
|
+
areAllBooleanColumnsInScope(scope) {
|
|
108
|
+
return (this.scopeHasColumns(scope) &&
|
|
109
|
+
!this.scopeHasDataType(scope) &&
|
|
110
|
+
!this.scopeIsAll(scope) &&
|
|
111
|
+
'ColumnIds' in scope &&
|
|
112
|
+
scope.ColumnIds.length &&
|
|
113
|
+
scope.ColumnIds.every((columnId) => this.adaptable.api.columnApi.isBooleanColumn(this.adaptable.api.columnApi.getColumnFromId(columnId))));
|
|
114
|
+
}
|
|
103
115
|
isColumnInScopeColumns(column, scope) {
|
|
104
116
|
return this.scopeHasColumns(scope) && this.isColumnInScope(column, scope);
|
|
105
117
|
}
|
package/src/Api/ScopeApi.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ export interface ScopeApi {
|
|
|
31
31
|
* @param scope Scope to check
|
|
32
32
|
*/
|
|
33
33
|
scopeHasDataType(scope: AdaptableScope): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* True if the Scope is DataTypes and contains only Boolean
|
|
36
|
+
* @param scope Scope to check
|
|
37
|
+
*/
|
|
38
|
+
scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
|
|
34
39
|
/**
|
|
35
40
|
* True if Scope contains just 1 ColumnId
|
|
36
41
|
* @param scope Scope to check
|
|
@@ -51,6 +56,11 @@ export interface ScopeApi {
|
|
|
51
56
|
* @param scope Scope to check
|
|
52
57
|
*/
|
|
53
58
|
isSingleBooleanColumnScope(scope: AdaptableScope): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* True if all selected columns are boolean
|
|
61
|
+
* @param scope Scope to check
|
|
62
|
+
*/
|
|
63
|
+
areAllBooleanColumnsInScope(scope: AdaptableScope): boolean;
|
|
54
64
|
/**
|
|
55
65
|
* True if Scope contains ColumnIds
|
|
56
66
|
* @param scope Scope to check
|
|
@@ -73,4 +73,12 @@ export interface StringFormatterOptions {
|
|
|
73
73
|
* Trims text (both start and end)
|
|
74
74
|
*/
|
|
75
75
|
Trim?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Prefix to use before the cell text
|
|
78
|
+
*/
|
|
79
|
+
Prefix?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Suffix to use after the cell text
|
|
82
|
+
*/
|
|
83
|
+
Suffix?: string;
|
|
76
84
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BaseEventInfo } from '../../Api/Events/BaseEventInfo';
|
|
2
|
+
import { FDC3Intent } from '../../types';
|
|
1
3
|
/**
|
|
2
4
|
* General-purpose context type, as defined by [FDC3](https://fdc3.finos.org/docs/1.0/context-intro).
|
|
3
5
|
* A context object is a well-understood datum that is streamable between FDC3 participants. As a result
|
|
@@ -28,7 +30,7 @@ export interface FDC3Context {
|
|
|
28
30
|
[key: string]: unknown;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
|
-
* Built-in context to define a financial
|
|
33
|
+
* Built-in context to define a financial Instrument
|
|
32
34
|
*/
|
|
33
35
|
export interface InstrumentContext extends FDC3Context {
|
|
34
36
|
/**
|
|
@@ -38,11 +40,11 @@ export interface InstrumentContext extends FDC3Context {
|
|
|
38
40
|
/**
|
|
39
41
|
* Free text name of instrument
|
|
40
42
|
*/
|
|
41
|
-
name
|
|
43
|
+
name?: string;
|
|
42
44
|
/**
|
|
43
45
|
* The instrument data
|
|
44
46
|
*/
|
|
45
|
-
id
|
|
47
|
+
id?: {
|
|
46
48
|
[key: string]: string;
|
|
47
49
|
} & {
|
|
48
50
|
ticker?: string;
|
|
@@ -55,3 +57,142 @@ export interface InstrumentContext extends FDC3Context {
|
|
|
55
57
|
FIGI?: string;
|
|
56
58
|
};
|
|
57
59
|
}
|
|
60
|
+
export interface InstrumentListContext extends FDC3Context {
|
|
61
|
+
/**
|
|
62
|
+
* Context type is always 'instrumentList'
|
|
63
|
+
*/
|
|
64
|
+
type: 'instrumentList';
|
|
65
|
+
/**
|
|
66
|
+
* Free text name of instrument list
|
|
67
|
+
*/
|
|
68
|
+
name?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Optional Id
|
|
71
|
+
*/
|
|
72
|
+
id?: any;
|
|
73
|
+
/**
|
|
74
|
+
* The instrument data
|
|
75
|
+
*/
|
|
76
|
+
instruments?: InstrumentContext[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Built-in context to define a financial position
|
|
80
|
+
*/
|
|
81
|
+
export interface PositionContext extends FDC3Context {
|
|
82
|
+
/**
|
|
83
|
+
* Context type is always 'position'
|
|
84
|
+
*/
|
|
85
|
+
type: 'position';
|
|
86
|
+
instrument: InstrumentContext;
|
|
87
|
+
/**
|
|
88
|
+
* Free text name of Position
|
|
89
|
+
*/
|
|
90
|
+
name?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional Id
|
|
93
|
+
*/
|
|
94
|
+
id?: any;
|
|
95
|
+
/**
|
|
96
|
+
* Holding in the Position
|
|
97
|
+
*/
|
|
98
|
+
holding: number;
|
|
99
|
+
}
|
|
100
|
+
export interface PortfolioContext extends FDC3Context {
|
|
101
|
+
/**
|
|
102
|
+
* Context type is always 'portfolio'
|
|
103
|
+
*/
|
|
104
|
+
type: 'portfolio';
|
|
105
|
+
/**
|
|
106
|
+
* Free text name of portfolio
|
|
107
|
+
*/
|
|
108
|
+
name?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Optional Id
|
|
111
|
+
*/
|
|
112
|
+
id?: any;
|
|
113
|
+
/**
|
|
114
|
+
* The position data
|
|
115
|
+
*/
|
|
116
|
+
positions?: PositionContext[];
|
|
117
|
+
}
|
|
118
|
+
export interface ContactContext extends FDC3Context {
|
|
119
|
+
/**
|
|
120
|
+
* Context type is always 'contact'
|
|
121
|
+
*/
|
|
122
|
+
type: 'contact';
|
|
123
|
+
/**
|
|
124
|
+
* Free text name of contact
|
|
125
|
+
*/
|
|
126
|
+
name?: string;
|
|
127
|
+
/**
|
|
128
|
+
* The contact data
|
|
129
|
+
*/
|
|
130
|
+
id?: {
|
|
131
|
+
[key: string]: string;
|
|
132
|
+
} & {
|
|
133
|
+
email?: string;
|
|
134
|
+
FDS_ID?: string;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export interface ContactListContext extends FDC3Context {
|
|
138
|
+
/**
|
|
139
|
+
* Context type is always 'contactList'
|
|
140
|
+
*/
|
|
141
|
+
type: 'contactList';
|
|
142
|
+
/**
|
|
143
|
+
* Free text name of contact list
|
|
144
|
+
*/
|
|
145
|
+
name?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Optional Id
|
|
148
|
+
*/
|
|
149
|
+
id?: any;
|
|
150
|
+
/**
|
|
151
|
+
* The contact data
|
|
152
|
+
*/
|
|
153
|
+
contacts?: ContactContext[];
|
|
154
|
+
}
|
|
155
|
+
export interface OrganizationContext extends FDC3Context {
|
|
156
|
+
/**
|
|
157
|
+
* Context type is always 'organization'
|
|
158
|
+
*/
|
|
159
|
+
type: 'organization';
|
|
160
|
+
/**
|
|
161
|
+
* Free text name of organization
|
|
162
|
+
*/
|
|
163
|
+
name?: string;
|
|
164
|
+
/**
|
|
165
|
+
* The organization data
|
|
166
|
+
*/
|
|
167
|
+
id?: {
|
|
168
|
+
[key: string]: string;
|
|
169
|
+
} & {
|
|
170
|
+
LEI?: string;
|
|
171
|
+
PERMID?: string;
|
|
172
|
+
FDS_ID?: string;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export interface CountryContext extends FDC3Context {
|
|
176
|
+
/**
|
|
177
|
+
* Context type is always 'country'
|
|
178
|
+
*/
|
|
179
|
+
type: 'country';
|
|
180
|
+
/**
|
|
181
|
+
* Free text name of country
|
|
182
|
+
*/
|
|
183
|
+
name?: string;
|
|
184
|
+
/**
|
|
185
|
+
* The country data
|
|
186
|
+
*/
|
|
187
|
+
id?: {
|
|
188
|
+
[key: string]: string;
|
|
189
|
+
} & {
|
|
190
|
+
ISOALPHA2?: string;
|
|
191
|
+
ISOALPHA3?: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
export interface AdaptableFDC3EventInfo extends BaseEventInfo {
|
|
195
|
+
type: 'RaiseIntent' | 'BroadcastMessage';
|
|
196
|
+
intent?: FDC3Intent;
|
|
197
|
+
context: FDC3Context;
|
|
198
|
+
}
|
|
@@ -118,6 +118,10 @@ export interface ContextMenuContext extends BaseMenuContext {
|
|
|
118
118
|
* Whether Column that was clicked is only column with selected cells
|
|
119
119
|
*/
|
|
120
120
|
isSingleSelectedColumn: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Whether the clicked cell is the only selected cell
|
|
123
|
+
*/
|
|
124
|
+
isSingleSelectedCell: boolean;
|
|
121
125
|
/**
|
|
122
126
|
* Current AG Grid row node
|
|
123
127
|
*/
|
|
@@ -201,6 +201,14 @@ class AdaptableStore {
|
|
|
201
201
|
ConfigConstants.POPUP,
|
|
202
202
|
ConfigConstants.PLUGINS,
|
|
203
203
|
];
|
|
204
|
+
const didPersistentStateChange = (state, newState) => {
|
|
205
|
+
return Object.keys(newState).some((key) => {
|
|
206
|
+
if (nonPersistentReduxKeys.includes(key)) {
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
return (state === null || state === void 0 ? void 0 : state[key]) !== (newState === null || newState === void 0 ? void 0 : newState[key]);
|
|
210
|
+
});
|
|
211
|
+
};
|
|
204
212
|
// this is now VERY BADLY NAMED!
|
|
205
213
|
let rootReducer = AdaptableReduxMerger_1.mergeReducer(rootReducerWithResetManagement, exports.LOAD_STATE);
|
|
206
214
|
const composeEnhancers = (x) => x;
|
|
@@ -214,7 +222,9 @@ class AdaptableStore {
|
|
|
214
222
|
const emitterArg = { action, state, newState };
|
|
215
223
|
this.emitter.emit(action.type, emitterArg);
|
|
216
224
|
const finalState = emitterArg.newState;
|
|
217
|
-
const shouldPersist =
|
|
225
|
+
const shouldPersist = state !== finalState &&
|
|
226
|
+
didPersistentStateChange(state, finalState) &&
|
|
227
|
+
!((_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.License) === null || _b === void 0 ? void 0 : _b.disablePersistence) &&
|
|
218
228
|
!NON_PERSIST_ACTIONS[action.type] &&
|
|
219
229
|
!init &&
|
|
220
230
|
!this.loadStorageInProgress;
|
|
@@ -87,6 +87,12 @@ function StringFormatter(input, options = {}) {
|
|
|
87
87
|
return undefined;
|
|
88
88
|
}
|
|
89
89
|
let s = input;
|
|
90
|
+
if (options.Prefix !== undefined) {
|
|
91
|
+
s = options.Prefix + s;
|
|
92
|
+
}
|
|
93
|
+
if (options.Suffix !== undefined) {
|
|
94
|
+
s = s + options.Suffix;
|
|
95
|
+
}
|
|
90
96
|
if (options.Case !== undefined) {
|
|
91
97
|
if (options.Case == 'Lower') {
|
|
92
98
|
s = s.toLowerCase();
|
|
@@ -37,7 +37,7 @@ class ColumnSelector extends React.Component {
|
|
|
37
37
|
let currentColumnName = selectedColumnIds.length > 0
|
|
38
38
|
? (_a = this.props.ColumnList.find((c) => c.columnId == selectedColumnIds[0])) === null || _a === void 0 ? void 0 : _a.friendlyName : 'Select a column';
|
|
39
39
|
return (React.createElement("div", { "data-name": 'column-selector' },
|
|
40
|
-
React.createElement(FormLayout_1.default, { columns: [
|
|
40
|
+
React.createElement(FormLayout_1.default, { columns: [{ name: 'columnSelector', style: { display: 'flex' } }], style: this.props.style },
|
|
41
41
|
React.createElement(FormLayout_1.FormRow, null,
|
|
42
42
|
React.createElement(DropdownButton_1.default, { marginRight: 2, columns: ['label'], showClearButton: currentColumnName != 'Select a column', onClear: () => this.onClearButton(), style: { width: '100%', fontSize: 'small' }, className: "ab-DashboardToolbar__Layout__select", items: sortedColumnOptions, disabled: sortedColumnOptions.length == 0 }, currentColumnName)))));
|
|
43
43
|
}
|
|
@@ -307,7 +307,11 @@ const renderStringFormat = (data, _onChange, setFormatOption) => {
|
|
|
307
307
|
React.createElement(Radio_1.default, { marginLeft: 2, checked: data.DisplayFormat.Options.Case == 'Upper', onChange: (checked) => setFormatOption('Case', 'Upper') }, "Upper"),
|
|
308
308
|
React.createElement(Radio_1.default, { marginLeft: 2, checked: data.DisplayFormat.Options.Case == 'Sentence', onChange: (checked) => setFormatOption('Case', 'Sentence') }, "Sentence"),
|
|
309
309
|
React.createElement(Radio_1.default, { marginLeft: 2, checked: data.DisplayFormat.Options.Case == undefined, onChange: (checked) => setFormatOption('Case', undefined) }, "None"),
|
|
310
|
-
React.createElement(CheckBox_1.CheckBox, { marginLeft: 5, checked: data.DisplayFormat.Options.Trim, onChange: (checked) => setFormatOption('Trim', checked) }, "Trim"))
|
|
310
|
+
React.createElement(CheckBox_1.CheckBox, { marginLeft: 5, checked: data.DisplayFormat.Options.Trim, onChange: (checked) => setFormatOption('Trim', checked) }, "Trim")),
|
|
311
|
+
React.createElement(FormLayout_1.FormRow, { label: "Prefix" },
|
|
312
|
+
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Prefix, onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) })),
|
|
313
|
+
React.createElement(FormLayout_1.FormRow, { label: "Suffix" },
|
|
314
|
+
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Suffix, onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) })))))),
|
|
311
315
|
React.createElement(Tabs_1.Tabs, { marginTop: 2, keyboardNavigation: false },
|
|
312
316
|
React.createElement(Tabs_1.Tabs.Tab, null, "Example"),
|
|
313
317
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormatColumn } from '../../../PredefinedConfig/FormatColumnState';
|
|
3
3
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
4
|
-
export declare const isFormatColumnStyleValid: (data: FormatColumn, api: AdaptableApi) => true | "No format applied";
|
|
4
|
+
export declare const isFormatColumnStyleValid: (data: FormatColumn, api: AdaptableApi) => true | "No format applied" | "Invalid Cell Range" | "Invalid Column Comparison Range";
|
|
5
5
|
declare type FormatColumnStyleWizardSectionProps = {
|
|
6
6
|
onChange: (data: FormatColumn) => void;
|
|
7
7
|
};
|