@adaptabletools/adaptable 11.2.2 → 11.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +24 -1
- package/bundle.cjs.js +103 -103
- package/index.css +28 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +9 -0
- package/src/AdaptableOptions/FormatColumnOptions.js +2 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +36 -11
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +0 -1
- package/src/Api/ColumnApi.d.ts +4 -1
- package/src/Api/FinanceApi.d.ts +3 -2
- package/src/Api/FormatColumnApi.d.ts +22 -1
- package/src/Api/GridApi.d.ts +8 -1
- package/src/Api/Implementation/ColumnApiImpl.js +6 -2
- package/src/Api/Implementation/FilterApiImpl.js +2 -7
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +5 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +29 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +3 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -0
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -0
- package/src/Api/Implementation/InternalApiImpl.js +49 -28
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +6 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +2 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -2
- package/src/Api/Implementation/ThemeApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +16 -4
- package/src/Api/InternalApi.d.ts +2 -0
- package/src/Api/LayoutApi.d.ts +6 -1
- package/src/Api/TeamSharingApi.d.ts +10 -1
- package/src/Api/UserInterfaceApi.d.ts +6 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +8 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +17 -1
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +5 -1
- package/src/Redux/ActionsReducers/TeamSharingRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +4 -4
- package/src/Strategy/DashboardModule.js +3 -0
- package/src/Strategy/FilterModule.d.ts +7 -0
- package/src/Strategy/FilterModule.js +11 -2
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/Interface/IModule.d.ts +5 -0
- package/src/Strategy/LayoutModule.js +7 -7
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +4 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +16 -36
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +24 -14
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +32 -9
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +2 -2
- package/src/View/AdaptableView.js +8 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.d.ts +13 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +41 -0
- package/src/View/Components/EntityRulesEditor/index.js +2 -1
- package/src/View/Components/ExpressionWizard.js +2 -1
- package/src/View/Components/FilterForm/FilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -0
- package/src/View/Components/TagValueSelector/index.js +4 -3
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +2 -2
- package/src/View/Export/ReportExportDropdown.js +1 -1
- package/src/View/Filter/ActiveFiltersPanel.d.ts +1 -13
- package/src/View/Filter/ActiveFiltersPanel.js +8 -31
- package/src/View/Filter/FilterStatusBarSubPanelPopover.js +1 -10
- package/src/View/Filter/FilterViewPanel.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +53 -22
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +4 -4
- package/src/agGrid/Adaptable.d.ts +3 -0
- package/src/agGrid/Adaptable.js +31 -22
- package/src/agGrid/agGridHelper.js +1 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +8 -1
- package/src/components/ExpressionEditor/index.js +54 -5
- package/src/metamodel/adaptable.metamodel.d.ts +49 -20
- package/src/metamodel/adaptable.metamodel.js +158 -31
- package/src/parser/src/types.d.ts +1 -1
- package/src/types.d.ts +5 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -3,6 +3,7 @@ import { LayoutApi } from '../LayoutApi';
|
|
|
3
3
|
import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
5
5
|
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
6
|
+
import { LayoutAssociatedObject } from '../../types';
|
|
6
7
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
7
8
|
getLayoutState(): LayoutState;
|
|
8
9
|
shouldAutoSaveLayout: (layout?: Layout) => boolean;
|
|
@@ -40,4 +41,5 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
40
41
|
isDefaultLayout(layout: Layout): boolean;
|
|
41
42
|
isCurrentLayoutDefault(): boolean;
|
|
42
43
|
areExpandedRowGroupsSavedInLayouts(): boolean;
|
|
44
|
+
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
43
45
|
}
|
|
@@ -315,5 +315,11 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
315
315
|
return (this.getLayoutOptions().includeExpandedRowGroups ||
|
|
316
316
|
this.getLayoutOptions().displayRowGroups === 'dynamic');
|
|
317
317
|
}
|
|
318
|
+
isObjectAvailableInCurrentLayout(adaptableObject) {
|
|
319
|
+
var _a;
|
|
320
|
+
return ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(adaptableObject.Tags)
|
|
321
|
+
? true
|
|
322
|
+
: (_a = adaptableObject.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag).includes(this.getCurrentLayoutName());
|
|
323
|
+
}
|
|
318
324
|
}
|
|
319
325
|
exports.LayoutApiImpl = LayoutApiImpl;
|
|
@@ -80,7 +80,7 @@ class SystemStatusApiImpl extends ApiBase_1.ApiBase {
|
|
|
80
80
|
}
|
|
81
81
|
fireSystemStatusMessageDisplayedEvent(systemStatusMessageInfo) {
|
|
82
82
|
const systemStatusMessageDisplayedInfo = {
|
|
83
|
-
adaptableApi: this.
|
|
83
|
+
adaptableApi: this.getAdaptableApi(),
|
|
84
84
|
systemStatusMessageInfo: systemStatusMessageInfo,
|
|
85
85
|
};
|
|
86
86
|
this.adaptable.api.eventApi.emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { TeamSharingApi } from '../TeamSharingApi';
|
|
3
|
-
import { TeamSharingState, SharedEntity } from '../../types';
|
|
3
|
+
import { TeamSharingState, SharedEntity, AdaptableModule, AdaptableObject, SharedEntityConfig } from '../../types';
|
|
4
4
|
export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingApi {
|
|
5
5
|
getTeamSharingState(): TeamSharingState;
|
|
6
6
|
getSharedEntities(): SharedEntity[];
|
|
@@ -9,4 +9,5 @@ export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingAp
|
|
|
9
9
|
checkForUpdates(): void;
|
|
10
10
|
showTeamSharingPopup(): void;
|
|
11
11
|
fireTeamSharingEntityChangedEvent(sharedEntity: SharedEntity): void;
|
|
12
|
+
shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
|
|
12
13
|
}
|
|
@@ -5,6 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
7
|
const TeamSharingRedux_1 = require("../../Redux/ActionsReducers/TeamSharingRedux");
|
|
8
|
+
const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/TeamSharingRedux"));
|
|
9
|
+
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
8
10
|
class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
9
11
|
getTeamSharingState() {
|
|
10
12
|
return this.getAdaptableState().TeamSharing;
|
|
@@ -13,8 +15,8 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
|
13
15
|
return this.getAdaptableState().TeamSharing.SharedEntities;
|
|
14
16
|
}
|
|
15
17
|
isTeamSharingActivated() {
|
|
16
|
-
return (!this.
|
|
17
|
-
.getEntitlementService()
|
|
18
|
+
return (!this.getAdaptableApi()
|
|
19
|
+
.internalApi.getEntitlementService()
|
|
18
20
|
.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
|
|
19
21
|
this.adaptable.adaptableOptions.teamSharingOptions &&
|
|
20
22
|
this.adaptable.adaptableOptions.teamSharingOptions.enableTeamSharing &&
|
|
@@ -41,5 +43,12 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
|
41
43
|
this.adaptable.api.eventApi.emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
46
|
+
shareEntity(entity, module, sharedEntityConfig) {
|
|
47
|
+
if (!this.isTeamSharingActivated()) {
|
|
48
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be shared');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.dispatchAction(TeamSharingRedux.TeamSharingShare(entity, module, sharedEntityConfig));
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
exports.TeamSharingApiImpl = TeamSharingApiImpl;
|
|
@@ -48,7 +48,7 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
|
|
|
48
48
|
}
|
|
49
49
|
this.adaptable.applyAdaptableTheme(currentTheme);
|
|
50
50
|
let themeChangedInfo = {
|
|
51
|
-
adaptableApi: this.
|
|
51
|
+
adaptableApi: this.getAdaptableApi(),
|
|
52
52
|
theme: currentTheme,
|
|
53
53
|
};
|
|
54
54
|
this.adaptable.api.eventApi.emit('ThemeChanged', themeChangedInfo);
|
|
@@ -4,7 +4,7 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
|
4
4
|
import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
|
|
5
5
|
import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../../PredefinedConfig/Common/Menu';
|
|
6
6
|
import { ActionColumn, BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
|
|
7
|
-
import { GridCell } from '../../types';
|
|
7
|
+
import { AdaptableObjectTag, GridCell } from '../../types';
|
|
8
8
|
export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfaceApi {
|
|
9
9
|
getColorPalette(): string[];
|
|
10
10
|
getStyleClassNames(): string[] | undefined;
|
|
@@ -25,4 +25,5 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
25
25
|
getEditableCellStyle(): AdaptableStyle | undefined;
|
|
26
26
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
27
27
|
getAllActionColumn(): ActionColumn[];
|
|
28
|
+
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
28
29
|
}
|
|
@@ -8,7 +8,7 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
8
8
|
let colorPalette = this.getUserInterfaceOptions().colorPalette;
|
|
9
9
|
// first do the function then get hardcoded items
|
|
10
10
|
if (colorPalette != null && typeof colorPalette === 'function') {
|
|
11
|
-
const currentTheme = this.
|
|
11
|
+
const currentTheme = this.getAdaptableApi().themeApi.getCurrentTheme();
|
|
12
12
|
const colours = colorPalette(currentTheme);
|
|
13
13
|
return colours;
|
|
14
14
|
}
|
|
@@ -35,14 +35,14 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
35
35
|
// columns id
|
|
36
36
|
permittedValuesItem = permittedValues.find((permittedValue) => {
|
|
37
37
|
return ('ColumnIds' in permittedValue.scope &&
|
|
38
|
-
this.
|
|
38
|
+
this.getAdaptableApi().scopeApi.isColumnInScope(column, permittedValue.scope));
|
|
39
39
|
});
|
|
40
40
|
if (permittedValuesItem) {
|
|
41
41
|
return permittedValuesItem;
|
|
42
42
|
}
|
|
43
43
|
permittedValuesItem = permittedValues.find((permittedValue) => {
|
|
44
44
|
return ('DataTypes' in permittedValue.scope &&
|
|
45
|
-
this.
|
|
45
|
+
this.getAdaptableApi().scopeApi.isColumnInScope(column, permittedValue.scope));
|
|
46
46
|
});
|
|
47
47
|
if (permittedValuesItem) {
|
|
48
48
|
return permittedValuesItem;
|
|
@@ -70,7 +70,7 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
70
70
|
if (permittedValues != null && typeof permittedValues === 'function') {
|
|
71
71
|
if (column) {
|
|
72
72
|
const permittedValuesParams = {
|
|
73
|
-
adaptableApi: this.
|
|
73
|
+
adaptableApi: this.getAdaptableApi(),
|
|
74
74
|
column: column,
|
|
75
75
|
};
|
|
76
76
|
return permittedValues(permittedValuesParams);
|
|
@@ -172,5 +172,17 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
172
172
|
var _a;
|
|
173
173
|
return (_a = this.getUserInterfaceOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
174
174
|
}
|
|
175
|
+
getAdaptableObjectTags() {
|
|
176
|
+
let objectTags = this.getUserInterfaceOptions().objectTags;
|
|
177
|
+
if (objectTags != null && typeof objectTags === 'function') {
|
|
178
|
+
return objectTags(this.getAdaptableApi());
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
let arr = objectTags;
|
|
182
|
+
if (arr && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(arr)) {
|
|
183
|
+
return arr;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
175
187
|
}
|
|
176
188
|
exports.UserInterfaceApiImpl = UserInterfaceApiImpl;
|
package/src/Api/InternalApi.d.ts
CHANGED
|
@@ -131,4 +131,6 @@ export interface InternalApi {
|
|
|
131
131
|
shouldDisplayTagSections(): boolean;
|
|
132
132
|
getAvailableTags(): AdaptableObjectTag[] | undefined;
|
|
133
133
|
showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
|
|
134
|
+
getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
|
|
135
|
+
getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
|
|
134
136
|
}
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptableColumn, ColumnSort } from '../../types';
|
|
1
|
+
import { AdaptableColumn, ColumnSort, LayoutAssociatedObject } from '../../types';
|
|
2
2
|
import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
|
|
3
3
|
/**
|
|
4
4
|
* Provides run-time access to the Layout Module and associated state
|
|
@@ -182,4 +182,9 @@ export interface LayoutApi {
|
|
|
182
182
|
* Returns true if Layouts will contain Expanded Row Groups information
|
|
183
183
|
*/
|
|
184
184
|
areExpandedRowGroupsSavedInLayouts(): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Does an object's Tags include the Current Layout
|
|
187
|
+
* @param adaptableObject object to check
|
|
188
|
+
*/
|
|
189
|
+
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
185
190
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
2
|
+
import { SharedEntity } from '../PredefinedConfig/TeamSharingState';
|
|
3
|
+
import { AdaptableModule, SharedEntityConfig, TeamSharingState } from '../types';
|
|
2
4
|
/**
|
|
3
5
|
* Provides run-time access to Team Sharing Module and associated state
|
|
4
6
|
*/
|
|
@@ -32,4 +34,11 @@ export interface TeamSharingApi {
|
|
|
32
34
|
* @param sharedEntity Entity that has been changed
|
|
33
35
|
*/
|
|
34
36
|
fireTeamSharingEntityChangedEvent(sharedEntity: SharedEntity): void;
|
|
37
|
+
/**
|
|
38
|
+
* Puts an Adaptable Object into Team Share
|
|
39
|
+
* @param entity entity to Share
|
|
40
|
+
* @param module module which Shared Entity belongs to
|
|
41
|
+
* @param sharedEntityConfig Config info about the Sharing Actions
|
|
42
|
+
*/
|
|
43
|
+
shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
|
|
35
44
|
}
|
|
@@ -3,6 +3,7 @@ import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
|
3
3
|
import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { ActionColumn, BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../AdaptableOptions/UserInterfaceOptions';
|
|
5
5
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
6
|
+
import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
|
|
6
7
|
/**
|
|
7
8
|
* Functions relating to User Interface section of Adaptable State
|
|
8
9
|
*/
|
|
@@ -70,7 +71,11 @@ export interface UserInterfaceApi {
|
|
|
70
71
|
*/
|
|
71
72
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
72
73
|
/**
|
|
73
|
-
* Retrieves any Action Columns in User Interface Options
|
|
74
|
+
* Retrieves any Action Columns (provided in User Interface Options)
|
|
74
75
|
*/
|
|
75
76
|
getAllActionColumn(): ActionColumn[];
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves any Object Tags (provided in User Interface Options)
|
|
79
|
+
*/
|
|
80
|
+
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
76
81
|
}
|
|
@@ -33,6 +33,10 @@ export interface AdaptableColumnGroup {
|
|
|
33
33
|
* Defines an Adaptable Column - created at run-time based on AG Grid column definition
|
|
34
34
|
*/
|
|
35
35
|
export interface AdaptableColumn extends AdaptableColumnBase {
|
|
36
|
+
/**
|
|
37
|
+
* Is the field of the row to get the cell data from
|
|
38
|
+
*/
|
|
39
|
+
field?: string;
|
|
36
40
|
/**
|
|
37
41
|
* Is this the Primary Key column
|
|
38
42
|
*/
|
|
@@ -11,10 +11,15 @@ export declare type AdaptableFormat = {
|
|
|
11
11
|
Formatter: 'StringFormatter';
|
|
12
12
|
Options: StringFormatterOptions;
|
|
13
13
|
};
|
|
14
|
+
export interface BaseFormatterOptions {
|
|
15
|
+
CustomDisplayFormats?: {
|
|
16
|
+
Id: string;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
14
19
|
/**
|
|
15
20
|
* Formatter Options for Numeric Columns
|
|
16
21
|
*/
|
|
17
|
-
export interface NumberFormatterOptions {
|
|
22
|
+
export interface NumberFormatterOptions extends BaseFormatterOptions {
|
|
18
23
|
/**
|
|
19
24
|
* Number of digits to show in fractions
|
|
20
25
|
*/
|
|
@@ -55,7 +60,7 @@ export interface NumberFormatterOptions {
|
|
|
55
60
|
/**
|
|
56
61
|
* Formatter Options for Date Columns - contains a single `Pattern` property
|
|
57
62
|
*/
|
|
58
|
-
export interface DateFormatterOptions {
|
|
63
|
+
export interface DateFormatterOptions extends BaseFormatterOptions {
|
|
59
64
|
/**
|
|
60
65
|
* Pattern to use for Date Format
|
|
61
66
|
*/
|
|
@@ -64,7 +69,7 @@ export interface DateFormatterOptions {
|
|
|
64
69
|
/**
|
|
65
70
|
* Formatter Options for String Columns
|
|
66
71
|
*/
|
|
67
|
-
export interface StringFormatterOptions {
|
|
72
|
+
export interface StringFormatterOptions extends BaseFormatterOptions {
|
|
68
73
|
/**
|
|
69
74
|
* Sets text to Upper or Lower case
|
|
70
75
|
*/
|
|
@@ -16,20 +16,20 @@ export interface AdaptableObject {
|
|
|
16
16
|
*/
|
|
17
17
|
IsReadOnly?: boolean;
|
|
18
18
|
/**
|
|
19
|
-
* List of
|
|
19
|
+
* List of Tags associated with the Object; often used for (but not limited to) managing Layout object scope
|
|
20
20
|
*/
|
|
21
21
|
Tags?: AdaptableObjectTag[];
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Tag
|
|
24
|
+
* Object Tag - defined as a label and a value
|
|
25
25
|
*/
|
|
26
|
-
export declare type AdaptableObjectTag = {
|
|
26
|
+
export declare type AdaptableObjectTag = string | {
|
|
27
27
|
/**
|
|
28
|
-
* Label for the
|
|
28
|
+
* Label for the Tag
|
|
29
29
|
*/
|
|
30
30
|
label: string;
|
|
31
31
|
/**
|
|
32
|
-
* Value for the
|
|
32
|
+
* Value for the Tag - string or number
|
|
33
33
|
*/
|
|
34
34
|
value: string | number;
|
|
35
35
|
};
|
|
@@ -27,7 +27,23 @@ exports.SystemPredicateDefs = [
|
|
|
27
27
|
icon: { text: 'IN' },
|
|
28
28
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
29
29
|
moduleScope: ['filter'],
|
|
30
|
-
handler: ({
|
|
30
|
+
handler: ({ inputs, column, value }) => {
|
|
31
|
+
if (inputs.length === 0) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
if (column.dataType === 'Date') {
|
|
35
|
+
return inputs.some((input) => {
|
|
36
|
+
return isSameDay_1.default(input, value);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (column.dataType === 'Number') {
|
|
40
|
+
return inputs.includes(value);
|
|
41
|
+
}
|
|
42
|
+
if (column.dataType === 'String') {
|
|
43
|
+
return inputs.includes(value);
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
},
|
|
31
47
|
toString: ({ inputs }) => `IN (${inputs.join(', ')})`,
|
|
32
48
|
shortcuts: ['#', '['],
|
|
33
49
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CustomFDC3Intent } from '../../AdaptableOptions/FinancePluginOptions';
|
|
1
2
|
import { BaseEventInfo } from '../../Api/Events/BaseEventInfo';
|
|
2
3
|
import { FDC3Intent } from '../../types';
|
|
3
4
|
/**
|
|
@@ -221,10 +222,13 @@ export interface AdaptableFDC3EventInfo extends BaseEventInfo {
|
|
|
221
222
|
/**
|
|
222
223
|
* The FDC3 Intent which caused Event to fire (if type is `RaiseIntent`)
|
|
223
224
|
*/
|
|
224
|
-
intent?: FDC3Intent;
|
|
225
|
+
intent?: FDC3Intent | CustomFDC3Intent;
|
|
225
226
|
/**
|
|
226
227
|
* Full FDC3 Context for the object related to the event
|
|
227
228
|
*/
|
|
228
229
|
context: FDC3Context;
|
|
229
230
|
}
|
|
230
231
|
export declare type ContextType = 'fdc3.instrument' | 'fdc3.instrumentList' | 'fdc3.position' | 'fdc3.portfolio' | 'fdc3.contact' | 'fdc3.contactList' | 'fdc3.organization' | 'fdc3.country';
|
|
232
|
+
export interface CustomFDC3Context extends FDC3Context {
|
|
233
|
+
type: any;
|
|
234
|
+
}
|
|
@@ -42,7 +42,7 @@ export interface TeamSharingCommitImportAction extends Redux.Action {
|
|
|
42
42
|
}
|
|
43
43
|
export interface TeamSharingCheckForUpdatesAction extends Redux.Action {
|
|
44
44
|
}
|
|
45
|
-
export declare const TeamSharingShare: (
|
|
45
|
+
export declare const TeamSharingShare: (entity: AdaptableObject, module: AdaptableModule, configuration: SharedEntityConfig) => TeamSharingShareAction;
|
|
46
46
|
export declare const TeamSharingSet: (Entities: SharedEntity[]) => TeamSharingSetAction;
|
|
47
47
|
export declare const TeamSharingImportItem: (SharedEntity: SharedEntity) => TeamSharingImportItemAction;
|
|
48
48
|
export declare const TeamSharingProcessImport: (ImportSteps: TeamSharingImportStep[]) => TeamSharingProcessImportAction;
|
|
@@ -12,11 +12,11 @@ exports.TEAMSHARING_REMOVE_ITEM = 'TEAMSHARING_REMOVE_ITEM';
|
|
|
12
12
|
exports.TEAMSHARING_LINK_ITEM = 'TEAMSHARING_LINK_ITEM';
|
|
13
13
|
exports.TEAMSHARING_UPDATE_ITEM = 'TEAMSHARING_UPDATE_ITEM';
|
|
14
14
|
exports.TEAMSHARING_CHECK_FOR_UPDATES = 'TEAMSHARING_CHECK_FOR_UPDATES';
|
|
15
|
-
exports.TeamSharingShare = (
|
|
15
|
+
exports.TeamSharingShare = (entity, module, configuration) => ({
|
|
16
16
|
type: exports.TEAMSHARING_SHARE,
|
|
17
|
-
Entity,
|
|
18
|
-
Module,
|
|
19
|
-
Configuration,
|
|
17
|
+
Entity: entity,
|
|
18
|
+
Module: module,
|
|
19
|
+
Configuration: configuration,
|
|
20
20
|
});
|
|
21
21
|
exports.TeamSharingSet = (Entities) => ({
|
|
22
22
|
type: exports.TEAMSHARING_SET,
|
|
@@ -23,6 +23,9 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
23
23
|
// but so do all the other possible handlers of the 'DashboardChanged' event
|
|
24
24
|
// therefore, we give them a head start to subscribe to 'DashboardChanged' before emitting it
|
|
25
25
|
setTimeout(() => {
|
|
26
|
+
if (this.api.isDestroyed()) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
26
29
|
this.api.dashboardApi.fireDashboardChangedEvent('ADAPTABLE_READY', null, this.api.dashboardApi.getDashboardState());
|
|
27
30
|
}, 20);
|
|
28
31
|
}
|
|
@@ -17,6 +17,13 @@ export declare class FilterModule extends AdaptableModuleBase implements IModule
|
|
|
17
17
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
18
18
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
20
|
+
toViewCompact(filter: ColumnFilter): {
|
|
21
|
+
item: {
|
|
22
|
+
name: string;
|
|
23
|
+
values: string[];
|
|
24
|
+
};
|
|
25
|
+
abObject: ColumnFilter;
|
|
26
|
+
};
|
|
20
27
|
toView(filter: ColumnFilter): AdaptableObjectView;
|
|
21
28
|
toViewAll(): AdaptableObjectView[];
|
|
22
29
|
getViewProperties(): {
|
|
@@ -77,12 +77,21 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
77
77
|
EditAction: FilterRedux.ColumnFilterEdit,
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
+
toViewCompact(filter) {
|
|
81
|
+
return {
|
|
82
|
+
item: {
|
|
83
|
+
name: this.api.columnApi.getFriendlyNameFromColumnId(filter.ColumnId),
|
|
84
|
+
values: [this.api.filterApi.columnFilterToString(filter)],
|
|
85
|
+
},
|
|
86
|
+
abObject: filter,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
80
89
|
toView(filter) {
|
|
81
90
|
return {
|
|
82
91
|
items: [
|
|
83
92
|
{
|
|
84
93
|
name: 'Column',
|
|
85
|
-
values: [filter.ColumnId],
|
|
94
|
+
values: [this.api.columnApi.getFriendlyNameFromColumnId(filter.ColumnId)],
|
|
86
95
|
},
|
|
87
96
|
{
|
|
88
97
|
name: 'Filter',
|
|
@@ -120,7 +129,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
120
129
|
return {
|
|
121
130
|
content: text,
|
|
122
131
|
popover,
|
|
123
|
-
popoverMinWidth:
|
|
132
|
+
popoverMinWidth: 320,
|
|
124
133
|
};
|
|
125
134
|
},
|
|
126
135
|
};
|
|
@@ -247,7 +247,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
name: 'Display Format',
|
|
250
|
-
values: [FormatColumnFormatWizardSection_1.getFormatColumnFormatSummaryValue(formatColumn)],
|
|
250
|
+
values: [FormatColumnFormatWizardSection_1.getFormatColumnFormatSummaryValue(formatColumn, this.api.formatColumnApi)],
|
|
251
251
|
},
|
|
252
252
|
getFormatColumnSettingsViewItems_1.getFormatColumnSettingsViewItems(formatColumn),
|
|
253
253
|
getObjectTagsViewItems_1.getObjectTagsViewItems(formatColumn, this.api),
|
|
@@ -62,6 +62,10 @@ export interface AdaptableObjectView {
|
|
|
62
62
|
*/
|
|
63
63
|
abObject: AdaptableObject;
|
|
64
64
|
}
|
|
65
|
+
export interface AdaptableObjectCompactView {
|
|
66
|
+
item: AdaptableObjectItemView;
|
|
67
|
+
abObject: AdaptableObject;
|
|
68
|
+
}
|
|
65
69
|
export declare type AdaptableModuleViewAction = React.FunctionComponent<{
|
|
66
70
|
data: AdaptableObject;
|
|
67
71
|
accessLevel: AccessLevel;
|
|
@@ -130,6 +134,7 @@ export interface IModule {
|
|
|
130
134
|
*/
|
|
131
135
|
toView?: (abObject: AdaptableObject) => AdaptableObjectView;
|
|
132
136
|
toViewAll?: () => AdaptableObjectView[];
|
|
137
|
+
toViewCompact?: (abObject: AdaptableObject) => AdaptableObjectCompactView;
|
|
133
138
|
getViewProperties?: () => AdaptableModuleView;
|
|
134
139
|
}
|
|
135
140
|
/**
|
|
@@ -144,7 +144,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
144
144
|
}
|
|
145
145
|
toView(layout) {
|
|
146
146
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
147
|
-
const maxColumnsToDisplay = (_d = (_c = (_b = (_a = this.api.internalApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.layoutOptions) === null || _b === void 0 ? void 0 : _b.
|
|
147
|
+
const maxColumnsToDisplay = (_d = (_c = (_b = (_a = this.api.internalApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.layoutOptions) === null || _b === void 0 ? void 0 : _b.layoutViewOptions) === null || _c === void 0 ? void 0 : _c.maxColumnsToDisplay) !== null && _d !== void 0 ? _d : 10;
|
|
148
148
|
const columnIdToFriendlyName = (columnId) => {
|
|
149
149
|
return this.api.columnApi.getFriendlyNameFromColumnId(columnId);
|
|
150
150
|
};
|
|
@@ -152,11 +152,12 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
152
152
|
if (columns.length >
|
|
153
153
|
maxColumnsToDisplay + 1 /* +1 is to show tag only beginning with 2, 'other 2' */) {
|
|
154
154
|
const extraColumns = columns.length - maxColumnsToDisplay;
|
|
155
|
-
const firstNColumns = columns
|
|
156
|
-
.slice(0, maxColumnsToDisplay)
|
|
157
|
-
.map((colId) => columnIdToFriendlyName(colId));
|
|
155
|
+
const firstNColumns = columns.slice(0, maxColumnsToDisplay);
|
|
158
156
|
columns = [...firstNColumns, `and other ${extraColumns}`];
|
|
159
157
|
}
|
|
158
|
+
else {
|
|
159
|
+
columns = columns.map((column) => this.api.columnApi.getFriendlyNameFromColumnId(column));
|
|
160
|
+
}
|
|
160
161
|
return {
|
|
161
162
|
items: [
|
|
162
163
|
{
|
|
@@ -220,9 +221,8 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
223
|
handleLayoutChange() {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
// no need if no callback implementation is provided
|
|
224
|
+
if (!this.api.internalApi.hasLayoutSpecificObjects()) {
|
|
225
|
+
// no need if no callback implementation is provided or no auto checking
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
// PlusMinus
|
|
@@ -8,6 +8,6 @@ exports.getObjectTagsViewItems = (object, api) => {
|
|
|
8
8
|
}
|
|
9
9
|
return {
|
|
10
10
|
name: 'Tags',
|
|
11
|
-
values: (_a = object === null || object === void 0 ? void 0 : object.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag
|
|
11
|
+
values: (_a = object === null || object === void 0 ? void 0 : object.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => api.internalApi.getLabelForTag(tag)),
|
|
12
12
|
};
|
|
13
13
|
};
|
|
@@ -134,9 +134,12 @@ exports.DefaultAdaptableOptions = {
|
|
|
134
134
|
autoSizeColumnsInLayout: false,
|
|
135
135
|
autoSizeColumnsInPivotLayout: false,
|
|
136
136
|
createDefaultLayout: false,
|
|
137
|
-
|
|
137
|
+
layoutViewOptions: {
|
|
138
138
|
maxColumnsToDisplay: 10,
|
|
139
139
|
},
|
|
140
|
+
layoutTagOptions: {
|
|
141
|
+
autoCheckTagsForLayouts: false,
|
|
142
|
+
},
|
|
140
143
|
},
|
|
141
144
|
menuOptions: {
|
|
142
145
|
showAdaptableContextMenu: true,
|
|
@@ -196,13 +196,14 @@ const getSumAggregation$ = (source$, initialSum) => {
|
|
|
196
196
|
const getColumnValueSum = (column, context) => {
|
|
197
197
|
let sum = 0;
|
|
198
198
|
context.api.internalApi.forAllRowNodesDo((rowNode) => {
|
|
199
|
-
var _a;
|
|
200
199
|
// if there is a WHERE clause defined, check if the current rowNode satisfies the condition
|
|
201
200
|
if (context.filterFn && !context.filterFn(rowNode)) {
|
|
202
201
|
return;
|
|
203
202
|
}
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
if (context.api.gridApi.isGroupRowNode(rowNode)) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const cellValue = context.api.gridApi.getRawValueFromRowNode(rowNode, column);
|
|
206
207
|
if (cellValue != undefined) {
|
|
207
208
|
sum = sum + expressionFunctionUtils_1.getNumericValue(rowNode.data[column]);
|
|
208
209
|
}
|
|
@@ -28,15 +28,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
28
28
|
},
|
|
29
29
|
columnDependencies: [sumColumnName],
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
const groupByColumnName = groupByParameter.value;
|
|
33
|
-
aggregationExpressionEvaluation.aggregationParams.groupBy = [
|
|
34
|
-
{
|
|
35
|
-
field: groupByColumnName,
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
aggregationExpressionEvaluation.columnDependencies.push(groupByColumnName);
|
|
39
|
-
}
|
|
31
|
+
addGroupByParams(groupByParameter, aggregationExpressionEvaluation);
|
|
40
32
|
const result = {
|
|
41
33
|
name: 'SUM',
|
|
42
34
|
type: 'aggregation',
|
|
@@ -149,15 +141,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
149
141
|
},
|
|
150
142
|
columnDependencies: [avgColumnName],
|
|
151
143
|
};
|
|
152
|
-
|
|
153
|
-
const groupByColumnName = groupByParameter.value;
|
|
154
|
-
aggregationExpressionEvaluation.aggregationParams.groupBy = [
|
|
155
|
-
{
|
|
156
|
-
field: groupByColumnName,
|
|
157
|
-
},
|
|
158
|
-
];
|
|
159
|
-
aggregationExpressionEvaluation.columnDependencies.push(groupByColumnName);
|
|
160
|
-
}
|
|
144
|
+
addGroupByParams(groupByParameter, aggregationExpressionEvaluation);
|
|
161
145
|
const result = {
|
|
162
146
|
name: 'AVG',
|
|
163
147
|
type: 'aggregation',
|
|
@@ -198,15 +182,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
198
182
|
},
|
|
199
183
|
columnDependencies: [minColumnName],
|
|
200
184
|
};
|
|
201
|
-
|
|
202
|
-
const groupByColumnName = groupByParameter.value;
|
|
203
|
-
aggregationExpressionEvaluation.aggregationParams.groupBy = [
|
|
204
|
-
{
|
|
205
|
-
field: groupByColumnName,
|
|
206
|
-
},
|
|
207
|
-
];
|
|
208
|
-
aggregationExpressionEvaluation.columnDependencies.push(groupByColumnName);
|
|
209
|
-
}
|
|
185
|
+
addGroupByParams(groupByParameter, aggregationExpressionEvaluation);
|
|
210
186
|
const result = {
|
|
211
187
|
name: 'MIN',
|
|
212
188
|
type: 'aggregation',
|
|
@@ -247,15 +223,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
247
223
|
},
|
|
248
224
|
columnDependencies: [maxColumnName],
|
|
249
225
|
};
|
|
250
|
-
|
|
251
|
-
const groupByColumnName = groupByParameter.value;
|
|
252
|
-
aggregationExpressionEvaluation.aggregationParams.groupBy = [
|
|
253
|
-
{
|
|
254
|
-
field: groupByColumnName,
|
|
255
|
-
},
|
|
256
|
-
];
|
|
257
|
-
aggregationExpressionEvaluation.columnDependencies.push(groupByColumnName);
|
|
258
|
-
}
|
|
226
|
+
addGroupByParams(groupByParameter, aggregationExpressionEvaluation);
|
|
259
227
|
const result = {
|
|
260
228
|
name: 'MAX',
|
|
261
229
|
type: 'aggregation',
|
|
@@ -337,3 +305,15 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
337
305
|
examples: ['[col1]', 'COL("col1")'],
|
|
338
306
|
},
|
|
339
307
|
};
|
|
308
|
+
// !! mutates expressionEvaluation
|
|
309
|
+
const addGroupByParams = (groupByParameter, expressionEvaluation) => {
|
|
310
|
+
if (groupByParameter) {
|
|
311
|
+
const groupByColumnName = groupByParameter.value;
|
|
312
|
+
expressionEvaluation.aggregationParams.groupBy = [
|
|
313
|
+
{
|
|
314
|
+
field: groupByColumnName,
|
|
315
|
+
},
|
|
316
|
+
];
|
|
317
|
+
expressionEvaluation.columnDependencies.push(groupByColumnName);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
@@ -226,10 +226,8 @@ exports.booleanExpressionFunctions = {
|
|
|
226
226
|
var _a;
|
|
227
227
|
const searchTerm = expressionFunctionUtils_1.getStringValue(context, String(args[0]));
|
|
228
228
|
return (_a = context.api) === null || _a === void 0 ? void 0 : _a.columnApi.getColumns().some((column) => {
|
|
229
|
-
var _a
|
|
230
|
-
const value =
|
|
231
|
-
? // for Date columns use the display value, as we do a textual comparison
|
|
232
|
-
(_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getDisplayValueFromRowNode(context.node, column.columnId) : (_b = context.api) === null || _b === void 0 ? void 0 : _b.gridApi.getNormalisedValueFromRowNode(context.node, column.columnId);
|
|
229
|
+
var _a;
|
|
230
|
+
const value = (_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getDisplayValueFromRowNode(context.node, column.columnId);
|
|
233
231
|
const columnValue = expressionFunctionUtils_1.getStringValue(context, String(value));
|
|
234
232
|
return columnValue.indexOf(searchTerm) !== -1;
|
|
235
233
|
});
|