@adaptabletools/adaptable 16.0.9 → 16.1.0-canary.0
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/agGrid.d.ts +4 -0
- package/agGrid.js +4 -0
- package/base.css +16 -14
- package/base.css.map +1 -1
- package/bundle.cjs.js +171 -170
- package/index.css +18 -14
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +12 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -2
- package/src/AdaptableOptions/ChartingOptions.d.ts +48 -3
- package/src/AdaptableOptions/ColumnOptions.d.ts +17 -0
- package/src/AdaptableOptions/DataImportOptions.d.ts +57 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +147 -8
- package/src/AdaptableOptions/MenuOptions.js +75 -0
- package/src/AdaptableOptions/NotesOptions.d.ts +23 -0
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +8 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -0
- package/src/Api/AdaptableApi.d.ts +8 -3
- package/src/Api/ChartingApi.d.ts +30 -0
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/ConfigApi.d.ts +4 -3
- package/src/Api/DataImportApi.d.ts +9 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +4 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +4 -2
- package/src/Api/Implementation/ApiBase.d.ts +2 -2
- package/src/Api/Implementation/ApiBase.js +2 -2
- package/src/Api/Implementation/ChartingApiImpl.d.ts +8 -2
- package/src/Api/Implementation/ChartingApiImpl.js +64 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +4 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ConfigApiImpl.js +9 -9
- package/src/Api/Implementation/DataImportApiImpl.d.ts +10 -0
- package/src/Api/Implementation/DataImportApiImpl.js +14 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -1
- package/src/Api/Implementation/NotesApiImpl.d.ts +20 -0
- package/src/Api/Implementation/NotesApiImpl.js +58 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
- package/src/Api/Implementation/OptionsApiImpl.js +5 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +7 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +30 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +0 -6
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +12 -0
- package/src/Api/Internal/ChartingInternalApi.d.ts +7 -0
- package/src/Api/Internal/ChartingInternalApi.js +45 -0
- package/src/Api/Internal/ColumnInternalApi.d.ts +3 -0
- package/src/Api/Internal/ColumnInternalApi.js +3 -0
- package/src/Api/Internal/DataImportInternalApi.d.ts +4 -0
- package/src/Api/Internal/DataImportInternalApi.js +49 -0
- package/src/Api/NotesAPi.d.ts +50 -0
- package/src/Api/NotesAPi.js +2 -0
- package/src/Api/OptionsApi.d.ts +8 -3
- package/src/Api/UserInterfaceApi.d.ts +22 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/ChartingState.d.ts +22 -0
- package/src/PredefinedConfig/ChartingState.js +9 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +12 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +2 -7
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +3 -1
- package/src/PredefinedConfig/NotesState.d.ts +59 -0
- package/src/PredefinedConfig/NotesState.js +2 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
- package/src/PredefinedConfig/SystemState.d.ts +5 -3
- package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -3
- package/src/Redux/ActionsReducers/ChartingRedux.js +52 -5
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +39 -0
- package/src/Redux/ActionsReducers/NotesRedux.js +88 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +10 -10
- package/src/Redux/ActionsReducers/SystemRedux.js +23 -22
- package/src/Redux/Store/AdaptableStore.js +19 -11
- package/src/Strategy/ChartingModule.d.ts +5 -2
- package/src/Strategy/ChartingModule.js +28 -7
- package/src/Strategy/ColumnInfoModule.d.ts +11 -0
- package/src/Strategy/ColumnInfoModule.js +47 -0
- package/src/Strategy/DataImportModule.d.ts +11 -0
- package/src/Strategy/DataImportModule.js +36 -0
- package/src/Strategy/DataSetModule.js +1 -0
- package/src/Strategy/Fdc3Module.js +3 -2
- package/src/Strategy/FilterModule.js +5 -0
- package/src/Strategy/GridInfoModule.js +13 -82
- package/src/Strategy/Interface/IModule.d.ts +2 -0
- package/src/Strategy/LayoutModule.js +1 -0
- package/src/Strategy/{CommentsModule.d.ts → NotesModule.d.ts} +6 -6
- package/src/Strategy/{CommentsModule.js → NotesModule.js} +41 -41
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.d.ts +2 -0
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +20 -18
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +9 -3
- package/src/Utilities/Constants/ModuleConstants.js +11 -5
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +3 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +36 -10
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +1 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +5 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +2 -2
- package/src/Utilities/ObjectFactory.d.ts +2 -1
- package/src/Utilities/ObjectFactory.js +10 -2
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +4 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/ModuleService.js +2 -0
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -2
- package/src/Utilities/Services/QueryLanguageService.js +1 -6
- package/src/Utilities/Services/ValidationService.js +15 -5
- package/src/View/AdaptableView.js +2 -2
- package/src/View/AdaptableViewFactory.js +7 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +20 -4
- package/src/View/Alert/Wizard/AlertWizard.js +14 -7
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +2 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +25 -46
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +8 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +19 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +2 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +44 -3
- package/src/View/CalculatedColumn/utils.d.ts +2 -0
- package/src/View/CalculatedColumn/utils.js +14 -0
- package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.d.ts +6 -0
- package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +47 -0
- package/src/View/Charting/ChartingWizard/{PreviewChartSection.d.ts → AgChargingWizard/PreviewChartSection.d.ts} +1 -1
- package/src/View/Charting/ChartingWizard/{PreviewChartSection.js → AgChargingWizard/PreviewChartSection.js} +2 -2
- package/src/View/Charting/ChartingWizard/{SettingsSection.d.ts → AgChargingWizard/SettingsSection.d.ts} +1 -1
- package/src/View/Charting/ChartingWizard/{SettingsSection.js → AgChargingWizard/SettingsSection.js} +4 -4
- package/src/View/Charting/ChartingWizard/AgChargingWizard/index.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/AgChargingWizard/index.js +4 -0
- package/src/View/Charting/ChartingWizard/ChartingWizard.d.ts +4 -3
- package/src/View/Charting/ChartingWizard/ChartingWizard.js +12 -39
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.d.ts +6 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +59 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +9 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +25 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/index.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/index.js +4 -0
- package/src/View/Charting/ChartingWizard/index.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/index.js +4 -0
- package/src/View/Charting/DeleteChartButton.d.ts +2 -1
- package/src/View/Charting/DeleteChartButton.js +4 -2
- package/src/View/Charting/EditChartButton.d.ts +2 -1
- package/src/View/Charting/ShowChartButton.js +47 -16
- package/src/View/Charting/{useChartState.d.ts → useAgChartState.d.ts} +1 -1
- package/src/View/Charting/{useChartState.js → useAgChartState.js} +7 -7
- package/src/View/Charting/useChartingElements.d.ts +2 -1
- package/src/View/Charting/useChartingElements.js +36 -26
- package/src/View/Charting/useExternalChartState.d.ts +7 -0
- package/src/View/Charting/useExternalChartState.js +56 -0
- package/src/View/ColumnInfo/ColumnInfo.d.ts +5 -0
- package/src/View/ColumnInfo/ColumnInfo.js +185 -0
- package/src/View/ColumnInfo/ColumnInfoPopup.d.ts +3 -0
- package/src/View/ColumnInfo/ColumnInfoPopup.js +15 -0
- package/src/View/Components/AdaptableIconSelector/index.d.ts +1 -1
- package/src/View/Components/ExternalRenderer.d.ts +1 -0
- package/src/View/Components/ExternalRenderer.js +2 -1
- package/src/View/Components/Panels/PanelWithImage.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +4 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +12 -2
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/DataImport/DataImportPopup.d.ts +6 -0
- package/src/View/DataImport/DataImportPopup.js +32 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +176 -0
- package/src/View/DataImport/DataImportWizard/index.d.ts +1 -0
- package/src/View/DataImport/DataImportWizard/index.js +4 -0
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.d.ts +10 -0
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +154 -0
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +9 -0
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +24 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.js +11 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +13 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +23 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +13 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.d.ts +1 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.js +4 -0
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.d.ts +11 -0
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +35 -0
- package/src/View/DataImport/systemFileHandlers.d.ts +3 -0
- package/src/View/DataImport/systemFileHandlers.js +44 -0
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
- package/src/View/GridInfo/{AdaptableObjectsSummary.js → GridInfoPopup/AdaptableObjectsSummary.js} +2 -2
- package/src/View/GridInfo/{AdaptableOptionsComponent.d.ts → GridInfoPopup/AdaptableOptionsComponent.d.ts} +1 -1
- package/src/View/GridInfo/{AdaptableOptionsComponent.js → GridInfoPopup/AdaptableOptionsComponent.js} +6 -6
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.d.ts +6 -0
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +82 -0
- package/src/View/GridInfo/GridInfoPopup/index.d.ts +1 -0
- package/src/View/GridInfo/GridInfoPopup/index.js +4 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Notes/NotesListing.d.ts +2 -0
- package/src/View/{Comments/CommentListing.js → Notes/NotesListing.js} +13 -14
- package/src/View/Notes/NotesPopup.d.ts +2 -0
- package/src/View/{Comments/CommentPopup.js → Notes/NotesPopup.js} +21 -21
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +6 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +14 -0
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.js +2 -2
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +28 -16
- package/src/agGrid/agGridHelper.d.ts +3 -3
- package/src/agGrid/agGridHelper.js +58 -30
- package/src/agGrid/agGridMenuHelper.d.ts +20 -9
- package/src/agGrid/agGridMenuHelper.js +292 -135
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +15 -6
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +5 -5
- package/src/components/ExpressionEditor/editorButtonsQuantileAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsQuantileAggregatedScalar.js +25 -0
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +2 -1
- package/src/components/FileDroppable/index.d.ts +2 -1
- package/src/components/FileDroppable/index.js +8 -7
- package/src/components/icons/import.d.ts +3 -0
- package/src/components/icons/import.js +7 -0
- package/src/components/icons/index.js +4 -0
- package/src/components/icons/note.d.ts +3 -0
- package/src/components/icons/note.js +7 -0
- package/src/metamodel/adaptable.metamodel.d.ts +243 -61
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/index.d.ts +2 -2
- package/src/parser/src/index.js +4 -4
- package/src/parser/src/tokenizer.d.ts +1 -1
- package/src/parser/src/tokenizer.js +14 -6
- package/src/parser/src/types.d.ts +2 -2
- package/src/types.d.ts +9 -8
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/CommentsOptions.d.ts +0 -23
- package/src/Api/CommentsApi.d.ts +0 -50
- package/src/Api/Implementation/CommentsApiImpl.d.ts +0 -20
- package/src/Api/Implementation/CommentsApiImpl.js +0 -58
- package/src/PredefinedConfig/CommentsState.d.ts +0 -59
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -39
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -92
- package/src/View/Comments/CommentListing.d.ts +0 -2
- package/src/View/Comments/CommentPopup.d.ts +0 -2
- package/src/View/GridInfo/ColumnInfoComponent.d.ts +0 -20
- package/src/View/GridInfo/ColumnInfoComponent.js +0 -176
- package/src/View/GridInfo/GridInfoPopup.d.ts +0 -16
- package/src/View/GridInfo/GridInfoPopup.js +0 -117
- package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -16
- package/src/View/GridInfo/GridOptionsComponent.js +0 -36
- /package/src/AdaptableOptions/{CommentsOptions.js → DataImportOptions.js} +0 -0
- /package/src/{Api/CommentsApi.js → AdaptableOptions/NotesOptions.js} +0 -0
- /package/src/{PredefinedConfig/CommentsState.js → Api/DataImportApi.js} +0 -0
- /package/src/View/GridInfo/{AdaptableObjectsSummary.d.ts → GridInfoPopup/AdaptableObjectsSummary.d.ts} +0 -0
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
2
|
-
import { AdaptableColumn, BaseContext } from '../types';
|
|
2
|
+
import { AdaptableColumn, AdaptableIcon, AdaptableModule, BaseContext } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Options for managing menus in AdapTable
|
|
5
5
|
*/
|
|
6
6
|
export interface MenuOptions<TData = any> {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Adds 'Ungroup' Column Menu item to a row grouped column menu
|
|
9
9
|
*
|
|
10
10
|
* @defaultValue true
|
|
11
11
|
* @gridInfoItem
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
showUngroupColumnMenuItem?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Customised Context Menu. Default context menu items are available in the provided context.
|
|
16
|
+
*/
|
|
17
|
+
customContextMenu?: (menuContext: CustomContextMenuContext<TData>) => CustomContextMenuItem[];
|
|
18
|
+
/**
|
|
19
|
+
* Customised Column Menu. Default column menu items are available in the provided context.
|
|
20
|
+
*/
|
|
21
|
+
customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
|
|
22
|
+
/**
|
|
23
|
+
* Show Adaptable Context Menu (or specific items); can be boolean value or function invoked for each menu item
|
|
16
24
|
*
|
|
25
|
+
* @deprecated Use `customContextMenu` instead
|
|
17
26
|
* @defaultValue true
|
|
18
27
|
* @gridInfoItem
|
|
19
28
|
*/
|
|
20
|
-
|
|
29
|
+
showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext<TData>) => boolean);
|
|
21
30
|
/**
|
|
22
|
-
*
|
|
31
|
+
* Show Adaptable Column Menu (or specific items); can be boolean value or function invoked for each menu item
|
|
23
32
|
*
|
|
33
|
+
* @deprecated Use `customContextMenu` instead
|
|
24
34
|
* @defaultValue true
|
|
25
35
|
* @gridInfoItem
|
|
26
36
|
*/
|
|
27
|
-
|
|
37
|
+
showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext<TData>) => boolean);
|
|
28
38
|
/**
|
|
29
39
|
* Order in which AG Grid, AdapTable and User Menu sections will appear in Column Menu (list or function)
|
|
30
40
|
*
|
|
41
|
+
* @deprecated Use `customColumnMenu` instead
|
|
31
42
|
* @defaultValue 'aggrid', 'adaptable', 'user'
|
|
32
43
|
* @gridInfoItem
|
|
33
44
|
*/
|
|
@@ -35,19 +46,143 @@ export interface MenuOptions<TData = any> {
|
|
|
35
46
|
/**
|
|
36
47
|
* Order in which AG Grid, AdapTable and User Menu sections will appear in Context Menu (list or function)
|
|
37
48
|
*
|
|
49
|
+
* @deprecated Use `customContextMenu` instead
|
|
38
50
|
* @defaultValue 'aggrid', 'adaptable', 'user'
|
|
39
51
|
* @gridInfoItem
|
|
40
52
|
*/
|
|
41
53
|
contextMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
|
|
42
54
|
/**
|
|
43
55
|
* User-defined Menu Items to add to the Column Menu
|
|
56
|
+
*
|
|
57
|
+
* @deprecated Use `customColumnMenu` instead
|
|
44
58
|
*/
|
|
45
59
|
columnMenuItems?: UserMenuItem<ColumnMenuContext>[];
|
|
46
60
|
/**
|
|
47
|
-
*
|
|
61
|
+
* Customised Context Menu. Default context menu items are available in the provided context.
|
|
62
|
+
*
|
|
63
|
+
* @deprecated Use `customContextMenu` instead
|
|
48
64
|
*/
|
|
49
65
|
contextMenuItems?: UserMenuItem<ContextMenuContext>[];
|
|
50
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Context info provided when building Custom Context Menus
|
|
69
|
+
*/
|
|
70
|
+
export interface CustomContextMenuContext<TData = any> extends ContextMenuContext<TData> {
|
|
71
|
+
/**
|
|
72
|
+
* Default AG Grid Menu Items
|
|
73
|
+
*/
|
|
74
|
+
defaultAgGridMenuItems: AgGridMenuItem<AgGridContextMenuItemType>[];
|
|
75
|
+
/**
|
|
76
|
+
* Default Adaptable Menu Items
|
|
77
|
+
*/
|
|
78
|
+
defaultAdaptableMenuItems: AdaptableSystemMenuItem[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Context info provided when building Custom Context Menus
|
|
82
|
+
*/
|
|
83
|
+
export interface CustomColumnMenuContext<TData = any> extends ColumnMenuContext<TData> {
|
|
84
|
+
/**
|
|
85
|
+
* Default AG Grid Menu Items
|
|
86
|
+
*/
|
|
87
|
+
defaultAgGridMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
|
|
88
|
+
/**
|
|
89
|
+
* Default Adaptable Menu Items
|
|
90
|
+
*/
|
|
91
|
+
defaultAdaptableMenuItems: AdaptableSystemMenuItem[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Custom Context Menu Item
|
|
95
|
+
*/
|
|
96
|
+
export declare type CustomContextMenuItem = AgGridMenuItem<AgGridContextMenuItemType> | AdaptableSystemMenuItem | UserContextMenuItem | '-' | {
|
|
97
|
+
menuType: 'Group';
|
|
98
|
+
label: string;
|
|
99
|
+
subMenuItems: CustomContextMenuItem[];
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
icon?: AdaptableIcon;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Custom Column Menu Item
|
|
105
|
+
*/
|
|
106
|
+
export declare type CustomColumnMenuItem = AgGridMenuItem<AgGridColumnMenuItemType> | AdaptableSystemMenuItem | UserColumnMenuItem | '-' | {
|
|
107
|
+
menuType: 'Group';
|
|
108
|
+
label: string;
|
|
109
|
+
subMenuItems: CustomColumnMenuItem[];
|
|
110
|
+
disabled?: boolean;
|
|
111
|
+
icon?: AdaptableIcon;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Menu Item that is provided by AG Grid
|
|
115
|
+
*/
|
|
116
|
+
export interface AgGridMenuItem<MENU_TYPE> {
|
|
117
|
+
menuType: 'AgGrid';
|
|
118
|
+
name: MENU_TYPE;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Context Menu Item that is provided by AdapTable
|
|
122
|
+
*/
|
|
123
|
+
export interface AdaptableSystemMenuItem extends AdaptableMenuItem {
|
|
124
|
+
menuType: 'Adaptable';
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Context Menu Item that is provided by User
|
|
128
|
+
*/
|
|
129
|
+
export interface UserContextMenuItem {
|
|
130
|
+
menuType: 'User';
|
|
131
|
+
/**
|
|
132
|
+
* Text to appear in the Menu Item
|
|
133
|
+
*/
|
|
134
|
+
label: string;
|
|
135
|
+
/**
|
|
136
|
+
* Function invoked when the Menu Item is clicked
|
|
137
|
+
*/
|
|
138
|
+
onClick?: (menuContext: ContextMenuContext) => void;
|
|
139
|
+
/**
|
|
140
|
+
* Whether menu item is disabled
|
|
141
|
+
*/
|
|
142
|
+
disabled?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Whether menu item is hidden
|
|
145
|
+
*/
|
|
146
|
+
hidden?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Optional icon to display
|
|
149
|
+
*/
|
|
150
|
+
icon?: AdaptableIcon;
|
|
151
|
+
/**
|
|
152
|
+
* Array of Menu Items, enabling limitless levels of menus
|
|
153
|
+
*/
|
|
154
|
+
subMenuItems?: CustomContextMenuItem[];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Context Menu Item that is provided by User
|
|
158
|
+
*/
|
|
159
|
+
export interface UserColumnMenuItem {
|
|
160
|
+
menuType: 'User';
|
|
161
|
+
/**
|
|
162
|
+
* Text to appear in the Menu Item
|
|
163
|
+
*/
|
|
164
|
+
label: string;
|
|
165
|
+
/**
|
|
166
|
+
* Function invoked when the Menu Item is clicked
|
|
167
|
+
*/
|
|
168
|
+
onClick?: (menuContext: ColumnMenuContext) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Whether menu item is disabled
|
|
171
|
+
*/
|
|
172
|
+
disabled?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Whether menu item is hidden
|
|
175
|
+
*/
|
|
176
|
+
hidden?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Optional icon to display
|
|
179
|
+
*/
|
|
180
|
+
icon?: AdaptableIcon;
|
|
181
|
+
/**
|
|
182
|
+
* Array of Menu Items, enabling limitless levels of menus
|
|
183
|
+
*/
|
|
184
|
+
subMenuItems?: CustomColumnMenuItem[];
|
|
185
|
+
}
|
|
51
186
|
/**
|
|
52
187
|
* Context used when ordering Menu Sections
|
|
53
188
|
*/
|
|
@@ -57,3 +192,7 @@ export interface MenuOrderContext extends BaseContext {
|
|
|
57
192
|
*/
|
|
58
193
|
column: AdaptableColumn;
|
|
59
194
|
}
|
|
195
|
+
export declare type AgGridContextMenuItemType = 'autoSizeAll' | 'expandAll' | 'contractAll' | 'copy' | 'copyWithHeaders' | 'cut' | 'paste' | 'resetColumns' | 'export' | 'csvExport' | 'excelExport' | 'chartRange' | 'pivotChart';
|
|
196
|
+
export declare type AgGridColumnMenuItemType = 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll';
|
|
197
|
+
export declare const DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER: AdaptableModule[];
|
|
198
|
+
export declare const DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER: AdaptableModule[];
|
|
@@ -1,2 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
6
|
+
exports.DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER = [
|
|
7
|
+
ModuleConstants.SettingsPanelModuleId,
|
|
8
|
+
ModuleConstants.LayoutModuleId,
|
|
9
|
+
ModuleConstants.FlashingCellModuleId,
|
|
10
|
+
ModuleConstants.FormatColumnModuleId,
|
|
11
|
+
ModuleConstants.StyledColumnModuleId,
|
|
12
|
+
ModuleConstants.CustomSortModuleId,
|
|
13
|
+
ModuleConstants.CellSummaryModuleId,
|
|
14
|
+
ModuleConstants.Fdc3ModuleId,
|
|
15
|
+
ModuleConstants.PlusMinusModuleId,
|
|
16
|
+
ModuleConstants.DashboardModuleId,
|
|
17
|
+
ModuleConstants.SystemStatusModuleId,
|
|
18
|
+
ModuleConstants.GridInfoModuleId,
|
|
19
|
+
ModuleConstants.ColumnInfoModuleId,
|
|
20
|
+
ModuleConstants.DataImportModuleId,
|
|
21
|
+
ModuleConstants.AlertModuleId,
|
|
22
|
+
ModuleConstants.CalculatedColumnModuleId,
|
|
23
|
+
ModuleConstants.ExportModuleId,
|
|
24
|
+
ModuleConstants.FilterModuleId,
|
|
25
|
+
ModuleConstants.SmartEditModuleId,
|
|
26
|
+
ModuleConstants.BulkUpdateModuleId,
|
|
27
|
+
ModuleConstants.TeamSharingModuleId,
|
|
28
|
+
ModuleConstants.DataChangeHistoryModuleId,
|
|
29
|
+
ModuleConstants.DataSetModuleId,
|
|
30
|
+
ModuleConstants.FreeTextColumnModuleId,
|
|
31
|
+
ModuleConstants.QueryModuleId,
|
|
32
|
+
ModuleConstants.QuickSearchModuleId,
|
|
33
|
+
ModuleConstants.ScheduleModuleId,
|
|
34
|
+
ModuleConstants.ShortcutModuleId,
|
|
35
|
+
ModuleConstants.StateManagementModuleId,
|
|
36
|
+
ModuleConstants.ToolPanelModuleId,
|
|
37
|
+
ModuleConstants.ThemeModuleId,
|
|
38
|
+
ModuleConstants.StatusBarModuleId,
|
|
39
|
+
ModuleConstants.ChartingModuleId,
|
|
40
|
+
ModuleConstants.NotesModuleId,
|
|
41
|
+
];
|
|
42
|
+
exports.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = [
|
|
43
|
+
ModuleConstants.SettingsPanelModuleId,
|
|
44
|
+
ModuleConstants.LayoutModuleId,
|
|
45
|
+
ModuleConstants.FlashingCellModuleId,
|
|
46
|
+
ModuleConstants.FormatColumnModuleId,
|
|
47
|
+
ModuleConstants.StyledColumnModuleId,
|
|
48
|
+
ModuleConstants.CustomSortModuleId,
|
|
49
|
+
ModuleConstants.CellSummaryModuleId,
|
|
50
|
+
ModuleConstants.Fdc3ModuleId,
|
|
51
|
+
ModuleConstants.PlusMinusModuleId,
|
|
52
|
+
ModuleConstants.DashboardModuleId,
|
|
53
|
+
ModuleConstants.SystemStatusModuleId,
|
|
54
|
+
ModuleConstants.GridInfoModuleId,
|
|
55
|
+
ModuleConstants.ColumnInfoModuleId,
|
|
56
|
+
ModuleConstants.DataImportModuleId,
|
|
57
|
+
ModuleConstants.AlertModuleId,
|
|
58
|
+
ModuleConstants.CalculatedColumnModuleId,
|
|
59
|
+
ModuleConstants.ExportModuleId,
|
|
60
|
+
ModuleConstants.FilterModuleId,
|
|
61
|
+
ModuleConstants.SmartEditModuleId,
|
|
62
|
+
ModuleConstants.BulkUpdateModuleId,
|
|
63
|
+
ModuleConstants.TeamSharingModuleId,
|
|
64
|
+
ModuleConstants.DataChangeHistoryModuleId,
|
|
65
|
+
ModuleConstants.DataSetModuleId,
|
|
66
|
+
ModuleConstants.FreeTextColumnModuleId,
|
|
67
|
+
ModuleConstants.QueryModuleId,
|
|
68
|
+
ModuleConstants.QuickSearchModuleId,
|
|
69
|
+
ModuleConstants.ScheduleModuleId,
|
|
70
|
+
ModuleConstants.ShortcutModuleId,
|
|
71
|
+
ModuleConstants.StateManagementModuleId,
|
|
72
|
+
ModuleConstants.ToolPanelModuleId,
|
|
73
|
+
ModuleConstants.ThemeModuleId,
|
|
74
|
+
ModuleConstants.StatusBarModuleId,
|
|
75
|
+
ModuleConstants.ChartingModuleId,
|
|
76
|
+
ModuleConstants.NotesModuleId,
|
|
77
|
+
];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseContext } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Options for managing AdapTable Notes
|
|
4
|
+
*/
|
|
5
|
+
export interface NotesOptions<TData = any> {
|
|
6
|
+
/**
|
|
7
|
+
* Whether a cell can be noted on
|
|
8
|
+
*/
|
|
9
|
+
isCellNotable?: (context: NotableCellContext) => boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Context used when determining if a Note can be added to a Cell
|
|
13
|
+
*/
|
|
14
|
+
export interface NotableCellContext extends BaseContext {
|
|
15
|
+
/**
|
|
16
|
+
* Value in Primary Key Column
|
|
17
|
+
*/
|
|
18
|
+
primaryKeyValue: string;
|
|
19
|
+
/**
|
|
20
|
+
* Column where Note will be displayed
|
|
21
|
+
*/
|
|
22
|
+
columnId: string;
|
|
23
|
+
}
|
|
@@ -39,6 +39,14 @@ export interface QuickSearchOptions<TData = any> {
|
|
|
39
39
|
* @noCodeItem
|
|
40
40
|
*/
|
|
41
41
|
runQuickSearchOnRowGroups?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Include Pivot columns when Quick Searching (highlight only)
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue true
|
|
46
|
+
* @gridInfoItem
|
|
47
|
+
* @noCodeItem
|
|
48
|
+
*/
|
|
49
|
+
runQuickSearchOnPivotColumns?: boolean;
|
|
42
50
|
/**
|
|
43
51
|
* Run Quick Search using Case Sensitivity
|
|
44
52
|
*
|
|
@@ -82,6 +82,7 @@ export interface UserInterfaceOptions<TData = any> {
|
|
|
82
82
|
/**
|
|
83
83
|
* Which sections to show in the Grid Info Screen
|
|
84
84
|
* @defaultValue ['GridSummary', 'AdaptableOptions', 'ColumnInfo', 'AdaptableObjects']
|
|
85
|
+
* @deprecated
|
|
85
86
|
*/
|
|
86
87
|
gridInfoSections?: GridInfoSections;
|
|
87
88
|
/**
|
|
@@ -218,6 +219,7 @@ export interface BulkUpdatePermittedValuesContext<TData = any> extends Permitted
|
|
|
218
219
|
export declare type GridInfoSections = GridInfoSection[];
|
|
219
220
|
/**
|
|
220
221
|
* Tabs available in the Grid Info Settings Panel
|
|
222
|
+
* @deprecated
|
|
221
223
|
*/
|
|
222
224
|
export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo' | 'AdaptableObjects';
|
|
223
225
|
/**
|
|
@@ -41,8 +41,9 @@ import { StyledColumnApi } from './StyledColumnApi';
|
|
|
41
41
|
import { OptionsApi } from './OptionsApi';
|
|
42
42
|
import { ActionColumnApi } from './ActionColumnApi';
|
|
43
43
|
import { ActionRowApi } from './ActionRowApi';
|
|
44
|
-
import {
|
|
44
|
+
import { NotesApi } from './NotesAPi';
|
|
45
45
|
import { Fdc3Api } from './Fdc3Api';
|
|
46
|
+
import { DataImportApi } from './DataImportApi';
|
|
46
47
|
/**
|
|
47
48
|
*
|
|
48
49
|
* The `AdaptableApi` provides developers with run-time access to AdapTable.
|
|
@@ -223,9 +224,13 @@ export interface AdaptableApi {
|
|
|
223
224
|
*/
|
|
224
225
|
userInterfaceApi: UserInterfaceApi;
|
|
225
226
|
/**
|
|
226
|
-
* Provides access to the
|
|
227
|
+
* Provides access to the Notes Module
|
|
227
228
|
*/
|
|
228
|
-
|
|
229
|
+
notesApi: NotesApi;
|
|
230
|
+
/**
|
|
231
|
+
* Provides access to the Data Import Module
|
|
232
|
+
*/
|
|
233
|
+
dataImportApi: DataImportApi;
|
|
229
234
|
/**
|
|
230
235
|
* Manages the FDC3 capabilities of AdapTable
|
|
231
236
|
*/
|
package/src/Api/ChartingApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChartModel, ChartRef } from '@ag-grid-community/core';
|
|
2
|
+
import { ExternalChartDefinition } from '../PredefinedConfig/ChartingState';
|
|
2
3
|
import { ChartContainer, ChartDefinition } from '../types';
|
|
3
4
|
import { ChartingOpenState } from './Events/ChartChanged';
|
|
4
5
|
/**
|
|
@@ -21,6 +22,10 @@ export interface ChartingApi {
|
|
|
21
22
|
* Retrieves all adaptable Chart definitions
|
|
22
23
|
*/
|
|
23
24
|
getChartDefinitions(): ChartDefinition[];
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves all adaptable external Chart definitions
|
|
27
|
+
*/
|
|
28
|
+
getExternalChartDefinitions(): ExternalChartDefinition[];
|
|
24
29
|
/**
|
|
25
30
|
* Retrieves Chart definition by uuid
|
|
26
31
|
* @param uuid Chart uuid
|
|
@@ -90,4 +95,29 @@ export interface ChartingApi {
|
|
|
90
95
|
* @param chartDefinition Chart to add
|
|
91
96
|
*/
|
|
92
97
|
getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
|
|
98
|
+
/**
|
|
99
|
+
* Add new external chart definition
|
|
100
|
+
*
|
|
101
|
+
* @param chartDef external chart definition
|
|
102
|
+
* @param options
|
|
103
|
+
* @param options.saveStrategy whether to ask the user to provide a name for the chart
|
|
104
|
+
*/
|
|
105
|
+
addExternalChartDefinition(chartDef: ExternalChartDefinition, options?: {
|
|
106
|
+
saveStrategy: 'auto' | 'manual';
|
|
107
|
+
}): void;
|
|
108
|
+
/**
|
|
109
|
+
* Edit existing external chart definition
|
|
110
|
+
* @param chartDef external chart definition
|
|
111
|
+
*/
|
|
112
|
+
editExternalChartDefinition(chartDef: ExternalChartDefinition): void;
|
|
113
|
+
/**
|
|
114
|
+
* Delete external chart definition
|
|
115
|
+
* @param chartDefinition chart definition
|
|
116
|
+
*/
|
|
117
|
+
deleteExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
|
|
118
|
+
/**
|
|
119
|
+
* Retrieves Chart definition by name
|
|
120
|
+
* @param name Chart name
|
|
121
|
+
*/
|
|
122
|
+
getExternalChartDefinitionByName(name: string): ExternalChartDefinition | undefined;
|
|
93
123
|
}
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -202,6 +202,11 @@ export interface ColumnApi {
|
|
|
202
202
|
* @param columnId ColumnId to lookup
|
|
203
203
|
*/
|
|
204
204
|
getFriendlyNameForColumnId(columnId: string): string;
|
|
205
|
+
/**
|
|
206
|
+
* Checks if Column has already been created
|
|
207
|
+
* @param columnId ColumnId to check
|
|
208
|
+
*/
|
|
209
|
+
doesColumnExist(columnId: string): boolean;
|
|
205
210
|
/**
|
|
206
211
|
* Retrieves Friendly Names for given ColumnIds
|
|
207
212
|
* @param columnIds ColumnIds to lookup
|
package/src/Api/ConfigApi.d.ts
CHANGED
|
@@ -15,8 +15,9 @@ import { AdaptablePersistentState, AdaptableState } from '../PredefinedConfig/Ad
|
|
|
15
15
|
import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
|
|
16
16
|
import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
|
|
17
17
|
import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
18
|
-
import { AdaptableSearchState, AdaptableSortState,
|
|
18
|
+
import { AdaptableSearchState, AdaptableSortState, PredefinedConfig, ScheduleState } from '../types';
|
|
19
19
|
import { QueryState } from '../PredefinedConfig/QueryState';
|
|
20
|
+
import { NotesState } from '../PredefinedConfig/NotesState';
|
|
20
21
|
/**
|
|
21
22
|
* Range of functions to access Predefined Config and Adaptable State
|
|
22
23
|
*/
|
|
@@ -105,10 +106,10 @@ export interface ConfigApi {
|
|
|
105
106
|
*/
|
|
106
107
|
getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
|
|
107
108
|
/**
|
|
108
|
-
* Returns
|
|
109
|
+
* Returns Notes section of Adaptable State
|
|
109
110
|
* @param returnJson return as JSON rather than object
|
|
110
111
|
*/
|
|
111
|
-
|
|
112
|
+
getNotesState(returnJson?: boolean): NotesState;
|
|
112
113
|
/**
|
|
113
114
|
* Returns Custom Sort section of Adaptable State
|
|
114
115
|
* @param returnJson return as JSON rather than object
|
|
@@ -42,8 +42,9 @@ import { StatusBarApi } from '../StatusBarApi';
|
|
|
42
42
|
import { StyledColumnApi } from '../StyledColumnApi';
|
|
43
43
|
import { ActionColumnApi } from '../ActionColumnApi';
|
|
44
44
|
import { ActionRowApi } from '../ActionRowApi';
|
|
45
|
-
import {
|
|
45
|
+
import { NotesApi } from '../NotesAPi';
|
|
46
46
|
import { Fdc3Api } from '../Fdc3Api';
|
|
47
|
+
import { DataImportApiImpl } from './DataImportApiImpl';
|
|
47
48
|
export declare class AdaptableApiImpl implements AdaptableApi {
|
|
48
49
|
protected adaptable: IAdaptable;
|
|
49
50
|
internalApi: AdaptableInternalApi;
|
|
@@ -90,8 +91,9 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
90
91
|
dataChangeHistoryApi: DataChangeHistoryApi;
|
|
91
92
|
chartingApi: ChartingApi;
|
|
92
93
|
statusBarApi: StatusBarApi;
|
|
93
|
-
|
|
94
|
+
notesApi: NotesApi;
|
|
94
95
|
fdc3Api: Fdc3Api;
|
|
96
|
+
dataImportApi: DataImportApiImpl;
|
|
95
97
|
private destroyed;
|
|
96
98
|
constructor(adaptable: IAdaptable);
|
|
97
99
|
/**
|
|
@@ -45,8 +45,9 @@ const StyledColumnApiImpl_1 = require("./StyledColumnApiImpl");
|
|
|
45
45
|
const CalendarApiImpl_1 = require("./CalendarApiImpl");
|
|
46
46
|
const EntitlementApiImpl_1 = require("./EntitlementApiImpl");
|
|
47
47
|
const OptionsApiImpl_1 = require("./OptionsApiImpl");
|
|
48
|
-
const
|
|
48
|
+
const NotesApiImpl_1 = require("./NotesApiImpl");
|
|
49
49
|
const Fdc3ApiImpl_1 = require("./Fdc3ApiImpl");
|
|
50
|
+
const DataImportApiImpl_1 = require("./DataImportApiImpl");
|
|
50
51
|
class AdaptableApiImpl {
|
|
51
52
|
constructor(adaptable) {
|
|
52
53
|
this.adaptable = adaptable;
|
|
@@ -95,8 +96,9 @@ class AdaptableApiImpl {
|
|
|
95
96
|
this.dataChangeHistoryApi = new DataChangeHistoryApiImpl_1.DataChangeHistoryApiImpl(adaptable);
|
|
96
97
|
this.chartingApi = new ChartingApiImpl_1.ChartingApiImpl(adaptable);
|
|
97
98
|
this.statusBarApi = new StatusBarApiImpl_1.StatusBarApiImpl(adaptable);
|
|
98
|
-
this.
|
|
99
|
+
this.notesApi = new NotesApiImpl_1.NotesApiImpl(adaptable);
|
|
99
100
|
this.fdc3Api = new Fdc3ApiImpl_1.Fdc3ApiImpl(adaptable);
|
|
101
|
+
this.dataImportApi = new DataImportApiImpl_1.DataImportApiImpl(adaptable);
|
|
100
102
|
// adaptable internal api
|
|
101
103
|
this.internalApi = new AdaptableInternalApi_1.AdaptableInternalApi(adaptable);
|
|
102
104
|
}
|
|
@@ -20,7 +20,7 @@ import { ExpressionApi } from '../ExpressionApi';
|
|
|
20
20
|
import { CalendarOptions } from '../../AdaptableOptions/CalendarOptions';
|
|
21
21
|
import { Fdc3Api } from '../Fdc3Api';
|
|
22
22
|
import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
|
|
23
|
-
import {
|
|
23
|
+
import { NotesOptions } from '../../AdaptableOptions/NotesOptions';
|
|
24
24
|
export declare abstract class ApiBase {
|
|
25
25
|
protected adaptable: IAdaptable;
|
|
26
26
|
/**
|
|
@@ -64,7 +64,7 @@ export declare abstract class ApiBase {
|
|
|
64
64
|
protected getActionColumnOptions(): ActionColumnOptions;
|
|
65
65
|
protected getActionRowOptions(): ActionRowOptions;
|
|
66
66
|
protected getColumnOptions(): ColumnOptions;
|
|
67
|
-
protected
|
|
67
|
+
protected getNotesOptions(): NotesOptions;
|
|
68
68
|
protected getCustomSortOptions(): CustomSortOptions;
|
|
69
69
|
protected getDataSetOptions(): DataSetOptions;
|
|
70
70
|
protected getCalendarOptions(): CalendarOptions;
|
|
@@ -102,8 +102,8 @@ class ApiBase {
|
|
|
102
102
|
getColumnOptions() {
|
|
103
103
|
return this.getOptions().columnOptions;
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
return this.getOptions().
|
|
105
|
+
getNotesOptions() {
|
|
106
|
+
return this.getOptions().notesOptions;
|
|
107
107
|
}
|
|
108
108
|
getCustomSortOptions() {
|
|
109
109
|
return this.getOptions().customSortOptions;
|
|
@@ -2,10 +2,9 @@ import { ChartModel, ChartRef } from '@ag-grid-community/core';
|
|
|
2
2
|
import { ChartingApi } from '../ChartingApi';
|
|
3
3
|
import { ApiBase } from './ApiBase';
|
|
4
4
|
import { ChartContainer, ChartDefinition } from '../../types';
|
|
5
|
-
import { ChartingInternalApi } from '../Internal/ChartingInternalApi';
|
|
6
5
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
|
+
import { ExternalChartDefinition } from '../../PredefinedConfig/ChartingState';
|
|
7
7
|
export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
8
|
-
internalApi: ChartingInternalApi;
|
|
9
8
|
constructor(adaptable: IAdaptable);
|
|
10
9
|
isChartingEnabled(): boolean;
|
|
11
10
|
getCurrentChartModels(): ChartModel[];
|
|
@@ -32,4 +31,11 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
|
32
31
|
getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
|
|
33
32
|
setChartReadOnly(chartDefinition: ChartDefinition): void;
|
|
34
33
|
setChartEditable(chartDefinition: ChartDefinition): void;
|
|
34
|
+
addExternalChartDefinition(chartDefinition: ExternalChartDefinition, options: {
|
|
35
|
+
saveStrategy: 'auto' | 'manual';
|
|
36
|
+
}): void;
|
|
37
|
+
editExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
|
|
38
|
+
deleteExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
|
|
39
|
+
getExternalChartDefinitions(): ExternalChartDefinition<unknown>[];
|
|
40
|
+
getExternalChartDefinitionByName(name: string): ExternalChartDefinition | undefined;
|
|
35
41
|
}
|
|
@@ -115,5 +115,69 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
115
115
|
setChartEditable(chartDefinition) {
|
|
116
116
|
this.dispatchAction(ChartingRedux.ChartingEditChart(Object.assign(Object.assign({}, chartDefinition), { IsReadOnly: false })));
|
|
117
117
|
}
|
|
118
|
+
addExternalChartDefinition(chartDefinition, options) {
|
|
119
|
+
var _a, _b, _c;
|
|
120
|
+
const saveStrategy = (_a = options === null || options === void 0 ? void 0 : options.saveStrategy) !== null && _a !== void 0 ? _a : 'manual';
|
|
121
|
+
if (saveStrategy === 'auto') {
|
|
122
|
+
this.dispatchAction(ChartingRedux.ChartingAddExternalChart(Object.assign(Object.assign({}, chartDefinition), { Name: (_b = chartDefinition.Name) !== null && _b !== void 0 ? _b : this.internalApi.getUniqueChartName() })));
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
const alert = {
|
|
126
|
+
alertType: 'generic',
|
|
127
|
+
header: 'Save chart',
|
|
128
|
+
message: 'Do you want to save this Chart?',
|
|
129
|
+
alertDefinition: Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyAlertDefinition()), { MessageType: 'Info', AlertProperties: {
|
|
130
|
+
DisplayNotification: true,
|
|
131
|
+
NotificationDuration: 'always',
|
|
132
|
+
}, AlertForm: {
|
|
133
|
+
Buttons: [
|
|
134
|
+
{
|
|
135
|
+
Label: 'Save',
|
|
136
|
+
Action: (context) => {
|
|
137
|
+
this.dispatchAction(ChartingRedux.ChartingAddExternalChart(Object.assign(Object.assign({}, chartDefinition), { Name: context.formData.name || this.internalApi.getUniqueChartName() })));
|
|
138
|
+
},
|
|
139
|
+
ButtonStyle: {
|
|
140
|
+
tone: 'info',
|
|
141
|
+
variant: 'raised',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
Label: 'Dismiss',
|
|
146
|
+
ButtonStyle: {
|
|
147
|
+
tone: 'neutral',
|
|
148
|
+
variant: 'raised',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
fields: [
|
|
153
|
+
{
|
|
154
|
+
name: 'name',
|
|
155
|
+
label: 'Name',
|
|
156
|
+
fieldType: 'text',
|
|
157
|
+
defaultValue: (_c = chartDefinition.Name) !== null && _c !== void 0 ? _c : '',
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
} }),
|
|
161
|
+
};
|
|
162
|
+
this.adaptable.api.alertApi.showAdaptableAlert(alert);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
editExternalChartDefinition(chartDefinition) {
|
|
166
|
+
this.dispatchAction(ChartingRedux.ChartingEditExternalChart(chartDefinition));
|
|
167
|
+
}
|
|
168
|
+
deleteExternalChartDefinition(chartDefinition) {
|
|
169
|
+
this.dispatchAction(ChartingRedux.ChartingDeleteExternalChart(chartDefinition));
|
|
170
|
+
}
|
|
171
|
+
getExternalChartDefinitions() {
|
|
172
|
+
return this.getAdaptableState().Charting.ExternalChartDefinitions;
|
|
173
|
+
}
|
|
174
|
+
getExternalChartDefinitionByName(name) {
|
|
175
|
+
if (StringExtensions_1.default.IsNotNullOrEmpty(name)) {
|
|
176
|
+
let chartDefinition = this.getExternalChartDefinitions().find((c) => c.Name == name);
|
|
177
|
+
if (this.checkItemExists(chartDefinition, name, 'Chart')) {
|
|
178
|
+
return chartDefinition;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
118
182
|
}
|
|
119
183
|
exports.ChartingApiImpl = ChartingApiImpl;
|
|
@@ -32,6 +32,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
32
32
|
hasDateDataType(columnId: string): boolean;
|
|
33
33
|
getColumnDataTypeForColumnId(columnId: string): AdaptableColumnDataType | undefined;
|
|
34
34
|
getFriendlyNameForColumnId(columnId: string): string;
|
|
35
|
+
doesColumnExist(columnId: string): boolean;
|
|
35
36
|
getFriendlyNamesForColumnIds(columnIds: string[]): string[];
|
|
36
37
|
getColumnIdForFriendlyName(friendlyName: string): string;
|
|
37
38
|
getColumnIdsForFriendlyNames(friendlyNames: string[]): string[];
|
|
@@ -164,6 +164,10 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
164
164
|
this.logMissingColumnWarning(columnId);
|
|
165
165
|
return result;
|
|
166
166
|
}
|
|
167
|
+
doesColumnExist(columnId) {
|
|
168
|
+
const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
|
|
169
|
+
return foundColumn ? true : false;
|
|
170
|
+
}
|
|
167
171
|
getFriendlyNamesForColumnIds(columnIds) {
|
|
168
172
|
const friendlyNames = [];
|
|
169
173
|
if (ArrayExtensions_1.default.IsNullOrEmpty(columnIds)) {
|