@adaptabletools/adaptable 16.0.0-canary.2 → 16.0.0-canary.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/README.md +2 -0
- package/base.css +62 -54
- package/base.css.map +1 -1
- package/bundle.cjs.js +159 -159
- package/index.css +82 -70
- package/index.css.map +1 -1
- package/package.json +10 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -1
- package/src/AdaptableOptions/ActionRowOptions.d.ts +8 -5
- package/src/AdaptableOptions/AdaptableOptions.d.ts +9 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +1 -10
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -2
- package/src/AdaptableOptions/Fdc3Options.d.ts +150 -0
- package/src/AdaptableOptions/Fdc3Options.js +5 -0
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +9 -9
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +7 -7
- package/src/AdaptableOptions/GroupingOptions.d.ts +6 -11
- package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +5 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +21 -11
- package/src/Api/AdaptableApi.d.ts +7 -2
- package/src/Api/ColumnApi.d.ts +18 -7
- package/src/Api/DataChangeHistoryApi.d.ts +6 -0
- package/src/Api/EventApi.d.ts +22 -9
- package/src/Api/Events/ChexboxColumnClicked.d.ts +1 -0
- package/src/Api/Events/ScheduleTriggered.d.ts +11 -0
- package/src/Api/Events/ThemeChanged.d.ts +0 -6
- package/src/Api/Events/ThemeEdited.d.ts +11 -0
- package/src/Api/Events/ThemeEdited.js +2 -0
- package/src/Api/Fdc3Api.d.ts +83 -0
- package/src/Api/Fdc3Api.js +2 -0
- package/src/Api/FinanceApi.d.ts +12 -12
- package/src/Api/Implementation/ActionRowApiImpl.js +7 -5
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +4 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -1
- package/src/Api/Implementation/ColumnApiImpl.js +22 -3
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +26 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +79 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
- package/src/Api/Implementation/PredicateApiImpl.js +8 -8
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -0
- package/src/Api/Implementation/QuickSearchApiImpl.js +7 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +4 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +5 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +0 -3
- package/src/Api/Implementation/StyledColumnApiImpl.js +0 -26
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +5 -3
- package/src/Api/Internal/AdaptableInternalApi.js +18 -12
- package/src/Api/Internal/AlertInternalApi.js +7 -2
- package/src/Api/Internal/Fdc3InternalApi.d.ts +11 -0
- package/src/Api/Internal/Fdc3InternalApi.js +72 -0
- package/src/Api/Internal/FilterInternalApi.js +8 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +11 -13
- package/src/Api/Internal/ScheduleInternalApi.d.ts +8 -0
- package/src/Api/Internal/ScheduleInternalApi.js +20 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +5 -2
- package/src/Api/Internal/StyledColumnInternalApi.js +29 -2
- package/src/Api/Internal/UserInterfaceInternalApi.d.ts +5 -0
- package/src/Api/Internal/UserInterfaceInternalApi.js +18 -0
- package/src/Api/OptionsApi.d.ts +6 -1
- package/src/Api/PredicateApi.d.ts +5 -5
- package/src/Api/QuickSearchApi.d.ts +8 -0
- package/src/Api/StyledColumnApi.d.ts +0 -14
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +7 -7
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -15
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +65 -41
- package/src/PredefinedConfig/Common/{FDC3Context.d.ts → FDC3Context_DEPR.d.ts} +19 -19
- package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +2 -0
- package/src/PredefinedConfig/Common/Fdc3Context.d.ts +53 -0
- package/src/PredefinedConfig/Common/Fdc3Context.js +35 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +68 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.js +75 -0
- package/src/PredefinedConfig/Common/Types.d.ts +2 -2
- package/src/PredefinedConfig/StyledColumnState.d.ts +3 -2
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +17 -6
- package/src/Redux/ActionsReducers/SystemRedux.js +33 -3
- package/src/Redux/Store/AdaptableStore.js +3 -4
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -6
- package/src/Strategy/Fdc3Module.d.ts +13 -0
- package/src/Strategy/Fdc3Module.js +85 -0
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/ScheduleModule.js +3 -2
- package/src/Strategy/StyledColumnModule.js +24 -15
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
- package/src/Utilities/Constants/ModuleConstants.js +5 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -3
- package/src/Utilities/MenuItem.d.ts +4 -4
- package/src/Utilities/Services/Fdc3Service.d.ts +20 -0
- package/src/Utilities/Services/Fdc3Service.js +87 -0
- package/src/Utilities/Services/MetamodelService.js +5 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +1 -1
- package/src/Utilities/Services/RowEditService.js +1 -1
- package/src/Utilities/Services/TeamSharingService.d.ts +2 -0
- package/src/Utilities/Services/TeamSharingService.js +60 -3
- package/src/Utilities/Services/ValidationService.js +6 -2
- package/src/View/AdaptableView.js +9 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +9 -0
- package/src/View/Charting/useChartingElements.js +1 -1
- package/src/View/Components/AdaptableButton/index.d.ts +3 -0
- package/src/View/Components/AdaptableButton/index.js +18 -0
- package/src/View/Components/AdaptableIconComponent/index.d.ts +7 -0
- package/src/View/Components/AdaptableIconComponent/index.js +16 -0
- package/src/View/Components/AdaptableIconComponent/useCustomIcon.d.ts +2 -0
- package/src/View/Components/AdaptableIconComponent/useCustomIcon.js +12 -0
- package/src/{components → View/Components}/Badge/index.d.ts +1 -1
- package/src/{components → View/Components}/Badge/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +1 -1
- package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +3 -2
- package/src/View/Components/Panels/PanelWithButton.d.ts +2 -2
- package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +4 -4
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -2
- package/src/View/Dashboard/Dashboard.js +3 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -0
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +13 -7
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +7 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -2
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.d.ts +2 -0
- package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +26 -0
- package/src/View/QuickSearch/QuickSearchInput.d.ts +6 -0
- package/src/View/QuickSearch/QuickSearchInput.js +22 -0
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +2 -5
- package/src/View/QuickSearch/QuickSearchViewPanel.js +5 -19
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +2 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -1
- package/src/View/UIHelper.d.ts +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +0 -2
- package/src/agGrid/ActionColumnRenderer.js +21 -6
- package/src/agGrid/Adaptable.d.ts +7 -2
- package/src/agGrid/Adaptable.js +82 -37
- package/src/agGrid/BadgeRenderer.js +19 -20
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/agGridHelper.js +4 -0
- package/src/agGrid/agGridMenuHelper.js +11 -4
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +1 -0
- package/src/agGrid/attachAddaptableColumnTypes.js +5 -4
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/Drawer/index.d.ts +6 -0
- package/src/components/Drawer/index.js +60 -0
- package/src/components/ExpressionEditor/index.js +4 -2
- package/src/components/Icon/index.d.ts +11 -0
- package/src/components/{AdaptableIconComponent → Icon}/index.js +10 -10
- package/src/components/IconSelector/IconSelector.js +3 -3
- package/src/components/SimpleButton/index.js +10 -10
- package/src/components/Toggle/Toggle.d.ts +2 -2
- package/src/components/Toggle/Toggle.js +2 -2
- package/src/components/icons/fdc3.d.ts +3 -0
- package/src/components/icons/fdc3.js +9 -0
- package/src/components/icons/index.d.ts +4 -4
- package/src/components/icons/index.js +9 -7
- package/src/metamodel/adaptable.metamodel.d.ts +117 -47
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +9 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Components/AdaptableViewIcon/index.d.ts +0 -10
- package/src/View/Components/AdaptableViewIcon/index.js +0 -18
- package/src/components/AdaptableIconComponent/index.d.ts +0 -11
- /package/src/{PredefinedConfig/Common/FDC3Context.js → Api/Events/ScheduleTriggered.js} +0 -0
|
@@ -34,4 +34,12 @@ export interface QuickSearchApi {
|
|
|
34
34
|
* Opens Settings Panel with Quick Search section selected and visible
|
|
35
35
|
*/
|
|
36
36
|
openQuickSearchSettingsPanel(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Opens the floating Quick Search
|
|
39
|
+
*/
|
|
40
|
+
showFloatingQuickSearch(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Hides the floating Quick Search
|
|
43
|
+
*/
|
|
44
|
+
hideFloatingQuickSearch(): void;
|
|
37
45
|
}
|
|
@@ -57,11 +57,6 @@ export interface StyledColumnApi {
|
|
|
57
57
|
* @param styledColumn
|
|
58
58
|
*/
|
|
59
59
|
unSuspendStyledColumn(styledColumn: StyledColumn): void;
|
|
60
|
-
/**
|
|
61
|
-
* Returns first Styled Column that contains checkbox style
|
|
62
|
-
* @param columnId column to check
|
|
63
|
-
*/
|
|
64
|
-
getCheckBoxStyleStyledColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
65
60
|
/**
|
|
66
61
|
* Checks whether Column with given `columnId` has a PercentBar Style applied
|
|
67
62
|
* @param columnId column ID
|
|
@@ -77,15 +72,6 @@ export interface StyledColumnApi {
|
|
|
77
72
|
* @param columnId column ID
|
|
78
73
|
*/
|
|
79
74
|
isSparklineStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Whether given column is a (boolean) checkbox column
|
|
82
|
-
* @param columnId column to check
|
|
83
|
-
*/
|
|
84
|
-
isCheckBoxStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Publishes the CheckboxColumnClickedEvent - when the checkbox in an Checkbox Column is clicked
|
|
87
|
-
*/
|
|
88
|
-
fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
|
|
89
75
|
/**
|
|
90
76
|
* Returns a Styled Column for a given column
|
|
91
77
|
* @param column Column to check
|
|
@@ -2,7 +2,7 @@ import { AdaptableObject } from './AdaptableObject';
|
|
|
2
2
|
/**
|
|
3
3
|
* Type of data stored in an Adaptable Column
|
|
4
4
|
*/
|
|
5
|
-
export declare type AdaptableColumnDataType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'NumberArray' | 'TupleNumberArray' | 'ObjectNumberArray' | 'Unknown';
|
|
5
|
+
export declare type AdaptableColumnDataType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'StringArray' | 'NumberArray' | 'TupleNumberArray' | 'ObjectNumberArray' | 'Unknown';
|
|
6
6
|
/**
|
|
7
7
|
* Base class for Adaptable Column containing most important properties
|
|
8
8
|
*/
|
|
@@ -3,17 +3,17 @@ import { TypeHint } from './Types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines an icon to be used in AdapTable (e.g. in Dashboard Header, Buttons, Menu, etc.)
|
|
5
5
|
*/
|
|
6
|
-
export declare type AdaptableIcon =
|
|
6
|
+
export declare type AdaptableIcon = AdaptableSystemIcon | AdaptableCustomIcon | AdaptableElementIcon;
|
|
7
7
|
/**
|
|
8
|
-
* Defines an icon from the
|
|
8
|
+
* Defines an icon from the System AdapTable icon set
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface AdaptableSystemIcon extends AdaptableBaseIcon {
|
|
11
11
|
/**
|
|
12
12
|
* The name of the icon to use (referencing the AdapTable Icon Library)
|
|
13
13
|
*
|
|
14
14
|
* The icon can be a adaptable icon or a custom one defined in `interfaceOptions.customIcons`
|
|
15
15
|
*/
|
|
16
|
-
name: TypeHint<string,
|
|
16
|
+
name: TypeHint<string, AdaptableSystemIconName>;
|
|
17
17
|
/**
|
|
18
18
|
* The size (in pixels) of the SVG icon (defaults to `17px`)
|
|
19
19
|
*
|
|
@@ -23,7 +23,7 @@ export interface AdaptableInternalIcon extends AdaptableBaseIcon {
|
|
|
23
23
|
/**
|
|
24
24
|
* Defines an icon from an external source
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface AdaptableCustomIcon extends AdaptableBaseIcon {
|
|
27
27
|
/**
|
|
28
28
|
* The URL of the icon to use
|
|
29
29
|
*/
|
|
@@ -52,6 +52,6 @@ export interface AdaptableBaseIcon {
|
|
|
52
52
|
style?: React.CSSProperties;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* All AdapTable
|
|
55
|
+
* All AdapTable System Icon names
|
|
56
56
|
*/
|
|
57
|
-
export declare type
|
|
57
|
+
export declare type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AdaptableScope } from './AdaptableScope';
|
|
2
|
-
import { AdaptableColumn, AdaptableColumnDataType } from './AdaptableColumn';
|
|
3
|
-
import { AdaptableApi, AdaptableIcon, ColumnFilter } from '../../types';
|
|
4
1
|
import { IRowNode } from '@ag-grid-community/core';
|
|
2
|
+
import { AdaptableIcon, ColumnFilter } from '../../types';
|
|
3
|
+
import { AdaptableColumn, AdaptableColumnDataType } from './AdaptableColumn';
|
|
4
|
+
import { AdaptableScope } from './AdaptableScope';
|
|
5
|
+
import { BaseContext } from './BaseContext';
|
|
5
6
|
/**
|
|
6
7
|
* Predicate object used by AdapTableQL - essentially a boolean function
|
|
7
8
|
*/
|
|
@@ -51,7 +52,7 @@ export interface AdaptablePredicateDef {
|
|
|
51
52
|
/**
|
|
52
53
|
* Actual boolean function invoked when evaluating the Predicate
|
|
53
54
|
*/
|
|
54
|
-
handler: (params:
|
|
55
|
+
handler: (params: PredicateDefHandlerContext) => boolean;
|
|
55
56
|
/**
|
|
56
57
|
* String representation of the Predicate
|
|
57
58
|
*/
|
|
@@ -66,10 +67,6 @@ export interface AdaptablePredicateDef {
|
|
|
66
67
|
* Keyboard shortcuts to initiate predicate - used in Quick Filter bar
|
|
67
68
|
*/
|
|
68
69
|
shortcuts?: string[];
|
|
69
|
-
/**
|
|
70
|
-
* Display this predicate only in Quick Filter Bar (and NOT in Filter Form)
|
|
71
|
-
*/
|
|
72
|
-
onlyQuickFilter?: boolean;
|
|
73
70
|
}
|
|
74
71
|
/**
|
|
75
72
|
* Defines an Input to a Predicate
|
|
@@ -82,7 +79,7 @@ export interface PredicateDefInput {
|
|
|
82
79
|
/**
|
|
83
80
|
* Object passed into an Adaptable Predicate Definition
|
|
84
81
|
*/
|
|
85
|
-
export interface
|
|
82
|
+
export interface PredicateDefHandlerContext extends BaseContext {
|
|
86
83
|
/**
|
|
87
84
|
* Raw value in cell being evaluated
|
|
88
85
|
*/
|
|
@@ -99,18 +96,14 @@ export interface PredicateDefHandlerParams {
|
|
|
99
96
|
* AG Grid Row node which contains the cell
|
|
100
97
|
*/
|
|
101
98
|
node: IRowNode;
|
|
102
|
-
/**
|
|
103
|
-
* Any inputs required to perform evaluation
|
|
104
|
-
*/
|
|
105
|
-
inputs: any[];
|
|
106
99
|
/**
|
|
107
100
|
* Adaptable Column which contains the cell
|
|
108
101
|
*/
|
|
109
102
|
column: AdaptableColumn;
|
|
110
103
|
/**
|
|
111
|
-
*
|
|
104
|
+
* Any (optional) inputs required to perform evaluation
|
|
112
105
|
*/
|
|
113
|
-
|
|
106
|
+
inputs?: any[];
|
|
114
107
|
}
|
|
115
108
|
/**
|
|
116
109
|
* Inputs required for a Predicate
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SystemBadgeStylePredicateIds = exports.SystemFlashingCellPredicateIds = exports.SystemFormatColumnPredicateIds = exports.SystemAlertPredicateIds = exports.SystemFilterPredicateIds = exports.SystemPredicateDefs = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const isToday_1 = tslib_1.__importDefault(require("date-fns/isToday"));
|
|
7
|
-
const isYesterday_1 = tslib_1.__importDefault(require("date-fns/isYesterday"));
|
|
8
|
-
const isTomorrow_1 = tslib_1.__importDefault(require("date-fns/isTomorrow"));
|
|
9
|
-
const isThisWeek_1 = tslib_1.__importDefault(require("date-fns/isThisWeek"));
|
|
10
|
-
const isThisMonth_1 = tslib_1.__importDefault(require("date-fns/isThisMonth"));
|
|
11
|
-
const isThisQuarter_1 = tslib_1.__importDefault(require("date-fns/isThisQuarter"));
|
|
12
|
-
const isThisYear_1 = tslib_1.__importDefault(require("date-fns/isThisYear"));
|
|
13
|
-
const isPast_1 = tslib_1.__importDefault(require("date-fns/isPast"));
|
|
14
|
-
const isFuture_1 = tslib_1.__importDefault(require("date-fns/isFuture"));
|
|
15
5
|
const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
|
|
16
6
|
const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
|
|
7
|
+
const isEqual_1 = tslib_1.__importDefault(require("date-fns/isEqual"));
|
|
8
|
+
const isFuture_1 = tslib_1.__importDefault(require("date-fns/isFuture"));
|
|
9
|
+
const isPast_1 = tslib_1.__importDefault(require("date-fns/isPast"));
|
|
17
10
|
const isSameDay_1 = tslib_1.__importDefault(require("date-fns/isSameDay"));
|
|
11
|
+
const isThisMonth_1 = tslib_1.__importDefault(require("date-fns/isThisMonth"));
|
|
12
|
+
const isThisQuarter_1 = tslib_1.__importDefault(require("date-fns/isThisQuarter"));
|
|
13
|
+
const isThisWeek_1 = tslib_1.__importDefault(require("date-fns/isThisWeek"));
|
|
14
|
+
const isThisYear_1 = tslib_1.__importDefault(require("date-fns/isThisYear"));
|
|
15
|
+
const isToday_1 = tslib_1.__importDefault(require("date-fns/isToday"));
|
|
16
|
+
const isTomorrow_1 = tslib_1.__importDefault(require("date-fns/isTomorrow"));
|
|
17
|
+
const isYesterday_1 = tslib_1.__importDefault(require("date-fns/isYesterday"));
|
|
18
18
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
19
19
|
const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
|
|
20
|
+
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
20
21
|
/**
|
|
21
22
|
* Array of Predicate Defs which are shipped by AdapTable
|
|
22
23
|
*/
|
|
@@ -27,20 +28,31 @@ exports.SystemPredicateDefs = [
|
|
|
27
28
|
icon: { text: 'IN' },
|
|
28
29
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
29
30
|
moduleScope: ['filter', 'formatColumn', 'alert', 'badgeStyle'],
|
|
30
|
-
handler: ({ inputs, column, value }) => {
|
|
31
|
+
handler: ({ inputs, column, value, adaptableApi }) => {
|
|
31
32
|
if (inputs.length === 0) {
|
|
32
33
|
return true;
|
|
33
34
|
}
|
|
34
35
|
if (column.dataType === 'Date') {
|
|
35
36
|
return inputs.some((input) => {
|
|
36
|
-
|
|
37
|
+
if (adaptableApi.optionsApi.getFilterOptions().filterUsingTime) {
|
|
38
|
+
return (0, isEqual_1.default)(input, value);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return (0, isSameDay_1.default)(input, value);
|
|
42
|
+
}
|
|
37
43
|
});
|
|
38
44
|
}
|
|
39
45
|
if (column.dataType === 'Number') {
|
|
40
46
|
return inputs.includes(value);
|
|
41
47
|
}
|
|
42
48
|
if (column.dataType === 'String') {
|
|
43
|
-
return
|
|
49
|
+
return adaptableApi.internalApi.isTextComparisonCaseSensitive()
|
|
50
|
+
? inputs
|
|
51
|
+
.map((i) => {
|
|
52
|
+
return i === null || i === void 0 ? void 0 : i.toLocaleLowerCase();
|
|
53
|
+
})
|
|
54
|
+
.includes(value === null || value === void 0 ? void 0 : value.toLocaleLowerCase())
|
|
55
|
+
: inputs.includes(value);
|
|
44
56
|
}
|
|
45
57
|
return true;
|
|
46
58
|
},
|
|
@@ -53,21 +65,34 @@ exports.SystemPredicateDefs = [
|
|
|
53
65
|
icon: { text: '!IN' },
|
|
54
66
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
55
67
|
moduleScope: ['filter', 'formatColumn', 'alert', 'badgeStyle'],
|
|
56
|
-
handler: ({ inputs, column, value }) => {
|
|
68
|
+
handler: ({ inputs, column, value, adaptableApi }) => {
|
|
57
69
|
// basically negation of IN
|
|
58
70
|
if (inputs.length === 0) {
|
|
59
71
|
return true;
|
|
60
72
|
}
|
|
61
73
|
if (column.dataType === 'Date') {
|
|
62
|
-
|
|
63
|
-
return
|
|
64
|
-
|
|
74
|
+
if (adaptableApi.optionsApi.getFilterOptions().filterUsingTime) {
|
|
75
|
+
return inputs.every((input) => {
|
|
76
|
+
return !(0, isEqual_1.default)(input, value);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return inputs.every((input) => {
|
|
81
|
+
return !(0, isSameDay_1.default)(input, value);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
65
84
|
}
|
|
66
85
|
if (column.dataType === 'Number') {
|
|
67
86
|
return !inputs.includes(value);
|
|
68
87
|
}
|
|
69
88
|
if (column.dataType === 'String') {
|
|
70
|
-
return
|
|
89
|
+
return adaptableApi.internalApi.isTextComparisonCaseSensitive()
|
|
90
|
+
? !inputs
|
|
91
|
+
.map((i) => {
|
|
92
|
+
return i === null || i === void 0 ? void 0 : i.toLocaleLowerCase();
|
|
93
|
+
})
|
|
94
|
+
.includes(value === null || value === void 0 ? void 0 : value.toLocaleLowerCase())
|
|
95
|
+
: !inputs.includes(value);
|
|
71
96
|
}
|
|
72
97
|
return true;
|
|
73
98
|
},
|
|
@@ -226,11 +251,11 @@ exports.SystemPredicateDefs = [
|
|
|
226
251
|
columnScope: { DataTypes: ['String'] },
|
|
227
252
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
|
|
228
253
|
inputs: [{ type: 'text' }],
|
|
229
|
-
handler: ({ value, inputs,
|
|
254
|
+
handler: ({ value, inputs, adaptableApi }) => {
|
|
230
255
|
if (!value) {
|
|
231
256
|
return false;
|
|
232
257
|
}
|
|
233
|
-
const ignoreCase = !
|
|
258
|
+
const ignoreCase = !adaptableApi.internalApi.isTextComparisonCaseSensitive();
|
|
234
259
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
235
260
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
236
261
|
return v == i;
|
|
@@ -245,11 +270,11 @@ exports.SystemPredicateDefs = [
|
|
|
245
270
|
columnScope: { DataTypes: ['String'] },
|
|
246
271
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
|
|
247
272
|
inputs: [{ type: 'text' }],
|
|
248
|
-
handler: ({ value, inputs,
|
|
273
|
+
handler: ({ value, inputs, adaptableApi }) => {
|
|
249
274
|
if (!value) {
|
|
250
275
|
return true;
|
|
251
276
|
}
|
|
252
|
-
const ignoreCase = !
|
|
277
|
+
const ignoreCase = !adaptableApi.internalApi.isTextComparisonCaseSensitive();
|
|
253
278
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
254
279
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
255
280
|
return v != i;
|
|
@@ -264,11 +289,11 @@ exports.SystemPredicateDefs = [
|
|
|
264
289
|
columnScope: { DataTypes: ['String'] },
|
|
265
290
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
|
|
266
291
|
inputs: [{ type: 'text' }],
|
|
267
|
-
handler: ({ value, inputs,
|
|
292
|
+
handler: ({ value, inputs, adaptableApi }) => {
|
|
268
293
|
if (!value) {
|
|
269
294
|
return false;
|
|
270
295
|
}
|
|
271
|
-
const ignoreCase = !
|
|
296
|
+
const ignoreCase = !adaptableApi.internalApi.isTextComparisonCaseSensitive();
|
|
272
297
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
273
298
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
274
299
|
return v.indexOf(i) !== -1;
|
|
@@ -282,11 +307,11 @@ exports.SystemPredicateDefs = [
|
|
|
282
307
|
columnScope: { DataTypes: ['String'] },
|
|
283
308
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
|
|
284
309
|
inputs: [{ type: 'text' }],
|
|
285
|
-
handler: ({ value, inputs,
|
|
310
|
+
handler: ({ value, inputs, adaptableApi }) => {
|
|
286
311
|
if (!value) {
|
|
287
312
|
return true;
|
|
288
313
|
}
|
|
289
|
-
const ignoreCase = !
|
|
314
|
+
const ignoreCase = !adaptableApi.internalApi.isTextComparisonCaseSensitive();
|
|
290
315
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
291
316
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
292
317
|
return v.indexOf(i) === -1;
|
|
@@ -300,11 +325,11 @@ exports.SystemPredicateDefs = [
|
|
|
300
325
|
columnScope: { DataTypes: ['String'] },
|
|
301
326
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
|
|
302
327
|
inputs: [{ type: 'text' }],
|
|
303
|
-
handler: ({ value, inputs,
|
|
328
|
+
handler: ({ value, inputs, adaptableApi }) => {
|
|
304
329
|
if (!value) {
|
|
305
330
|
return false;
|
|
306
331
|
}
|
|
307
|
-
const ignoreCase = !
|
|
332
|
+
const ignoreCase = !adaptableApi.internalApi.isTextComparisonCaseSensitive();
|
|
308
333
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
309
334
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
310
335
|
return v.startsWith(i);
|
|
@@ -318,11 +343,11 @@ exports.SystemPredicateDefs = [
|
|
|
318
343
|
columnScope: { DataTypes: ['String'] },
|
|
319
344
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
|
|
320
345
|
inputs: [{ type: 'text' }],
|
|
321
|
-
handler: ({ value, inputs,
|
|
346
|
+
handler: ({ value, inputs, adaptableApi }) => {
|
|
322
347
|
if (!value) {
|
|
323
348
|
return false;
|
|
324
349
|
}
|
|
325
|
-
const ignoreCase = !
|
|
350
|
+
const ignoreCase = !adaptableApi.internalApi.isTextComparisonCaseSensitive();
|
|
326
351
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
327
352
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
328
353
|
return v.endsWith(i);
|
|
@@ -458,7 +483,7 @@ exports.SystemPredicateDefs = [
|
|
|
458
483
|
icon: { name: 'calendar' },
|
|
459
484
|
columnScope: { DataTypes: ['Date'] },
|
|
460
485
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
|
|
461
|
-
handler: ({ value,
|
|
486
|
+
handler: ({ value, adaptableApi }) => (0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(value), adaptableApi.calendarApi.getNextWorkingDay()),
|
|
462
487
|
},
|
|
463
488
|
{
|
|
464
489
|
id: 'LastWorkDay',
|
|
@@ -466,7 +491,7 @@ exports.SystemPredicateDefs = [
|
|
|
466
491
|
icon: { name: 'calendar' },
|
|
467
492
|
columnScope: { DataTypes: ['Date'] },
|
|
468
493
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
|
|
469
|
-
handler: ({ value,
|
|
494
|
+
handler: ({ value, adaptableApi }) => (0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(value), adaptableApi.calendarApi.getPreviousWorkingDay()),
|
|
470
495
|
},
|
|
471
496
|
{
|
|
472
497
|
id: 'WorkDay',
|
|
@@ -474,7 +499,7 @@ exports.SystemPredicateDefs = [
|
|
|
474
499
|
icon: { name: 'calendar' },
|
|
475
500
|
columnScope: { DataTypes: ['Date'] },
|
|
476
501
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
|
|
477
|
-
handler: ({ value,
|
|
502
|
+
handler: ({ value, adaptableApi }) => adaptableApi.calendarApi.isWorkingDay(value),
|
|
478
503
|
},
|
|
479
504
|
{
|
|
480
505
|
id: 'Holiday',
|
|
@@ -482,7 +507,7 @@ exports.SystemPredicateDefs = [
|
|
|
482
507
|
icon: { name: 'calendar' },
|
|
483
508
|
columnScope: { DataTypes: ['Date'] },
|
|
484
509
|
moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
|
|
485
|
-
handler: ({ value,
|
|
510
|
+
handler: ({ value, adaptableApi }) => adaptableApi.calendarApi.isHoliday(value),
|
|
486
511
|
},
|
|
487
512
|
{
|
|
488
513
|
id: 'InRange',
|
|
@@ -517,7 +542,6 @@ exports.SystemPredicateDefs = [
|
|
|
517
542
|
columnScope: { DataTypes: ['Boolean'] },
|
|
518
543
|
moduleScope: ['filter'],
|
|
519
544
|
inputs: [{ type: 'boolean' }],
|
|
520
|
-
onlyQuickFilter: true,
|
|
521
545
|
// working with string aliases instead of booleans because the FilterAPI cannot handle falsy filter values (it ignores them)
|
|
522
546
|
handler: ({ value, inputs }) => {
|
|
523
547
|
if (inputs[0] == 'all') {
|
|
@@ -554,9 +578,9 @@ exports.SystemPredicateDefs = [
|
|
|
554
578
|
label: 'Primary Key Duplicate',
|
|
555
579
|
columnScope: { All: true },
|
|
556
580
|
moduleScope: ['alert'],
|
|
557
|
-
handler: ({ value, column,
|
|
581
|
+
handler: ({ value, column, adaptableApi, node }) => {
|
|
558
582
|
return (column === null || column === void 0 ? void 0 : column.isPrimaryKey)
|
|
559
|
-
?
|
|
583
|
+
? adaptableApi.gridApi.internalApi
|
|
560
584
|
.getDistinctRawValuesForColumn(column.columnId, node)
|
|
561
585
|
.includes(value)
|
|
562
586
|
: false;
|
|
@@ -567,9 +591,9 @@ exports.SystemPredicateDefs = [
|
|
|
567
591
|
label: 'Existing Values Only',
|
|
568
592
|
columnScope: { All: true },
|
|
569
593
|
moduleScope: ['alert'],
|
|
570
|
-
handler: ({ value,
|
|
594
|
+
handler: ({ value, adaptableApi, column, node }) => {
|
|
571
595
|
const distinctValues = column
|
|
572
|
-
?
|
|
596
|
+
? adaptableApi.gridApi.internalApi.getDistinctRawValuesForColumn(column.columnId, node)
|
|
573
597
|
: [];
|
|
574
598
|
return !distinctValues.includes(value);
|
|
575
599
|
},
|
|
@@ -579,9 +603,9 @@ exports.SystemPredicateDefs = [
|
|
|
579
603
|
label: 'No Duplicate Values',
|
|
580
604
|
columnScope: { All: true },
|
|
581
605
|
moduleScope: ['alert'],
|
|
582
|
-
handler: ({ value,
|
|
606
|
+
handler: ({ value, adaptableApi, column, node }) => {
|
|
583
607
|
const distinctValues = column
|
|
584
|
-
?
|
|
608
|
+
? adaptableApi.gridApi.internalApi.getDistinctRawValuesForColumn(column.columnId, node)
|
|
585
609
|
: [];
|
|
586
610
|
return distinctValues.includes(value);
|
|
587
611
|
},
|
|
@@ -10,11 +10,11 @@ import { FDC3Intent } from '../../types';
|
|
|
10
10
|
/**
|
|
11
11
|
* General-purpose context type, as defined by FDC3
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface FDC3Context_DEPR {
|
|
14
14
|
/**
|
|
15
|
-
* Type of
|
|
15
|
+
* Type of FDC3Context_DEPR that uniquely identifies it, e.g. "instrument"; used to refer to the accepted context(s) when declaring intents
|
|
16
16
|
*/
|
|
17
|
-
type:
|
|
17
|
+
type: FDC3ContextTypeDepr;
|
|
18
18
|
/**
|
|
19
19
|
* Name of the context data (optional) - a text string that describes the data being sent
|
|
20
20
|
*/
|
|
@@ -33,7 +33,7 @@ export interface FDC3Context {
|
|
|
33
33
|
/**
|
|
34
34
|
* FDC3 Context to define a financial Instrument
|
|
35
35
|
*/
|
|
36
|
-
export interface
|
|
36
|
+
export interface InstrumentContextDepr extends FDC3Context_DEPR {
|
|
37
37
|
/**
|
|
38
38
|
* Context type is always `instrument`
|
|
39
39
|
*/
|
|
@@ -61,7 +61,7 @@ export interface InstrumentContext extends FDC3Context {
|
|
|
61
61
|
/**
|
|
62
62
|
* FDC3 Context to define an array of financial Instruments
|
|
63
63
|
*/
|
|
64
|
-
export interface
|
|
64
|
+
export interface InstrumentListContextDepr extends FDC3Context_DEPR {
|
|
65
65
|
/**
|
|
66
66
|
* Context type is always `instrumentList`
|
|
67
67
|
*/
|
|
@@ -77,12 +77,12 @@ export interface InstrumentListContext extends FDC3Context {
|
|
|
77
77
|
/**
|
|
78
78
|
* The instrument data
|
|
79
79
|
*/
|
|
80
|
-
instruments?:
|
|
80
|
+
instruments?: InstrumentContextDepr[];
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* FDC3 Context to define a financial Position (requires an Instrument)
|
|
84
84
|
*/
|
|
85
|
-
export interface
|
|
85
|
+
export interface PositionContextDepr extends FDC3Context_DEPR {
|
|
86
86
|
/**
|
|
87
87
|
* Context type is always `position`
|
|
88
88
|
*/
|
|
@@ -90,7 +90,7 @@ export interface PositionContext extends FDC3Context {
|
|
|
90
90
|
/**
|
|
91
91
|
* The `InstrumentContext` of the relevant Instrument
|
|
92
92
|
*/
|
|
93
|
-
instrument:
|
|
93
|
+
instrument: InstrumentContextDepr;
|
|
94
94
|
/**
|
|
95
95
|
* Free text name of Position
|
|
96
96
|
*/
|
|
@@ -107,7 +107,7 @@ export interface PositionContext extends FDC3Context {
|
|
|
107
107
|
/**
|
|
108
108
|
* FDC3 Context to define a financial Portfolio (array of Positions)
|
|
109
109
|
*/
|
|
110
|
-
export interface
|
|
110
|
+
export interface PortfolioContextDepr extends FDC3Context_DEPR {
|
|
111
111
|
/**
|
|
112
112
|
* Context type is always `portfolio`
|
|
113
113
|
*/
|
|
@@ -123,12 +123,12 @@ export interface PortfolioContext extends FDC3Context {
|
|
|
123
123
|
/**
|
|
124
124
|
* The position data
|
|
125
125
|
*/
|
|
126
|
-
positions?:
|
|
126
|
+
positions?: PositionContextDepr[];
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* FDC3 Context to define a Contact
|
|
130
130
|
*/
|
|
131
|
-
export interface
|
|
131
|
+
export interface ContactContextDepr extends FDC3Context_DEPR {
|
|
132
132
|
/**
|
|
133
133
|
* Context type is always `contact`
|
|
134
134
|
*/
|
|
@@ -150,7 +150,7 @@ export interface ContactContext extends FDC3Context {
|
|
|
150
150
|
/**
|
|
151
151
|
* FDC3 Context to define a list of Contacts
|
|
152
152
|
*/
|
|
153
|
-
export interface
|
|
153
|
+
export interface ContactListContextDepr extends FDC3Context_DEPR {
|
|
154
154
|
/**
|
|
155
155
|
* Context type is always `contactList`
|
|
156
156
|
*/
|
|
@@ -166,12 +166,12 @@ export interface ContactListContext extends FDC3Context {
|
|
|
166
166
|
/**
|
|
167
167
|
* The array of Contacts
|
|
168
168
|
*/
|
|
169
|
-
contacts?:
|
|
169
|
+
contacts?: ContactContextDepr[];
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* FDC3 Context to define an Organization
|
|
173
173
|
*/
|
|
174
|
-
export interface
|
|
174
|
+
export interface OrganizationContextDepr extends FDC3Context_DEPR {
|
|
175
175
|
/**
|
|
176
176
|
* Context type is always `organization`
|
|
177
177
|
*/
|
|
@@ -194,7 +194,7 @@ export interface OrganizationContext extends FDC3Context {
|
|
|
194
194
|
/**
|
|
195
195
|
* FDC3 Context to define a Country
|
|
196
196
|
*/
|
|
197
|
-
export interface
|
|
197
|
+
export interface CountryContextDepr extends FDC3Context_DEPR {
|
|
198
198
|
/**
|
|
199
199
|
* Context type is always `country`
|
|
200
200
|
*/
|
|
@@ -228,19 +228,19 @@ export interface AdaptableFDC3EventInfo extends BaseEventInfo {
|
|
|
228
228
|
/**
|
|
229
229
|
* Full FDC3 Context for the object related to the event
|
|
230
230
|
*/
|
|
231
|
-
context:
|
|
231
|
+
context: FDC3Context_DEPR;
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
234
|
* Defines which FDC3 context is being used
|
|
235
235
|
*/
|
|
236
|
-
export declare type
|
|
236
|
+
export declare type FDC3ContextTypeDepr = 'fdc3.instrument' | 'fdc3.instrumentList' | 'fdc3.position' | 'fdc3.portfolio' | 'fdc3.contact' | 'fdc3.contactList' | 'fdc3.organization' | 'fdc3.country';
|
|
237
237
|
/**
|
|
238
238
|
* Context used when providing Custom FDC3 content
|
|
239
239
|
*/
|
|
240
|
-
export interface CustomFDC3Context extends
|
|
240
|
+
export interface CustomFDC3Context extends FDC3Context_DEPR {
|
|
241
241
|
type: any;
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
244
|
* Data used in FDC3 Contexts
|
|
245
245
|
*/
|
|
246
|
-
export declare type
|
|
246
|
+
export declare type ContextDataDepr = Record<string, unknown>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Chart, ChatInitSettings, Contact, ContactList, Context, Country, Currency, Email, Instrument, InstrumentList, Nothing, Organization, Portfolio, Position, TimeRange, Valuation, ContextTypes } from '@finos/fdc3';
|
|
2
|
+
export declare type Fdc3ContextType = ChartContextType | ChatInitSettingsContextType | ContactContextType | ContactListContextType | CountryContextType | CurrencyContextType | EmailContextType | InstrumentContextType | InstrumentListContextType | OrganizationContextType | PortfolioContextType | PositionContextType | TimeRangeContextType | ValuationContextType | NothingContextType;
|
|
3
|
+
export declare const ChartContextKey = "fdc3.chart";
|
|
4
|
+
export declare type ChartContextType = typeof ChartContextKey;
|
|
5
|
+
export declare const ChatInitSettingsContextKey = "fdc3.chat.initSettings";
|
|
6
|
+
export declare type ChatInitSettingsContextType = typeof ChatInitSettingsContextKey;
|
|
7
|
+
export declare const ContactContextKey = "fdc3.contact";
|
|
8
|
+
export declare type ContactContextType = typeof ContactContextKey;
|
|
9
|
+
export declare const ContactListContextKey = "fdc3.contactList";
|
|
10
|
+
export declare type ContactListContextType = typeof ContactListContextKey;
|
|
11
|
+
export declare const CountryContextKey = "fdc3.country";
|
|
12
|
+
export declare type CountryContextType = typeof CountryContextKey;
|
|
13
|
+
export declare const CurrencyContextKey = "fdc3.currency";
|
|
14
|
+
export declare type CurrencyContextType = typeof CurrencyContextKey;
|
|
15
|
+
export declare const EmailContextKey = "fdc3.email";
|
|
16
|
+
export declare type EmailContextType = typeof EmailContextKey;
|
|
17
|
+
export declare const InstrumentContextKey = "fdc3.instrument";
|
|
18
|
+
export declare type InstrumentContextType = typeof InstrumentContextKey;
|
|
19
|
+
export declare const InstrumentListContextKey = "fdc3.instrumentList";
|
|
20
|
+
export declare type InstrumentListContextType = typeof InstrumentListContextKey;
|
|
21
|
+
export declare const OrganizationContextKey = "fdc3.organization";
|
|
22
|
+
export declare type OrganizationContextType = typeof OrganizationContextKey;
|
|
23
|
+
export declare const PortfolioContextKey = "fdc3.portfolio";
|
|
24
|
+
export declare type PortfolioContextType = typeof PortfolioContextKey;
|
|
25
|
+
export declare const PositionContextKey = "fdc3.position";
|
|
26
|
+
export declare type PositionContextType = typeof PositionContextKey;
|
|
27
|
+
export declare const TimeRangeContextKey = "fdc3.timerange";
|
|
28
|
+
export declare type TimeRangeContextType = typeof TimeRangeContextKey;
|
|
29
|
+
export declare const ValuationContextKey = "fdc3.valuation";
|
|
30
|
+
export declare type ValuationContextType = typeof ValuationContextKey;
|
|
31
|
+
export declare const NothingContextKey = "fdc3.nothing";
|
|
32
|
+
export declare type NothingContextType = typeof NothingContextKey;
|
|
33
|
+
export declare type Fdc3Context = ChartContext | ChatInitSettingsContext | ContactContext | ContactListContext | CountryContext | CurrencyContext | EmailContext | InstrumentContext | InstrumentListContext | OrganizationContext | PortfolioContext | PositionContext | TimeRangeContext | ValuationContext | NothingContext;
|
|
34
|
+
export declare type Fdc3CustomContext = Context;
|
|
35
|
+
export declare type TypedFdc3Context<CONTEXT, TYPE extends Fdc3ContextType> = CONTEXT & {
|
|
36
|
+
type: TYPE;
|
|
37
|
+
};
|
|
38
|
+
export declare type ChartContext = TypedFdc3Context<Chart, ContextTypes.Chart>;
|
|
39
|
+
export declare type ChatInitSettingsContext = TypedFdc3Context<ChatInitSettings, ContextTypes.ChatInitSettings>;
|
|
40
|
+
export declare type ContactContext = TypedFdc3Context<Contact, ContextTypes.Contact>;
|
|
41
|
+
export declare type ContactListContext = TypedFdc3Context<ContactList, ContextTypes.ContactList>;
|
|
42
|
+
export declare type CountryContext = TypedFdc3Context<Country, ContextTypes.Country>;
|
|
43
|
+
export declare type CurrencyContext = TypedFdc3Context<Currency, ContextTypes.Currency>;
|
|
44
|
+
export declare type EmailContext = TypedFdc3Context<Email, ContextTypes.Email>;
|
|
45
|
+
export declare type InstrumentContext = TypedFdc3Context<Instrument, ContextTypes.Instrument>;
|
|
46
|
+
export declare type InstrumentListContext = TypedFdc3Context<InstrumentList, ContextTypes.InstrumentList>;
|
|
47
|
+
export declare type OrganizationContext = TypedFdc3Context<Organization, ContextTypes.Organization>;
|
|
48
|
+
export declare type PortfolioContext = TypedFdc3Context<Portfolio, ContextTypes.Portfolio>;
|
|
49
|
+
export declare type PositionContext = TypedFdc3Context<Position, ContextTypes.Position>;
|
|
50
|
+
export declare type TimeRangeContext = TypedFdc3Context<TimeRange, ContextTypes.TimeRange>;
|
|
51
|
+
export declare type ValuationContext = TypedFdc3Context<Valuation, ContextTypes.Valuation>;
|
|
52
|
+
export declare type NothingContext = TypedFdc3Context<Nothing, ContextTypes.Nothing>;
|
|
53
|
+
export declare const ContextLabels: Record<Fdc3ContextType, string>;
|